static Archive Setup() { if (!Directory.Exists(WorkingDirectory)) { Directory.CreateDirectory(WorkingDirectory); ArchiveManager.SaveArchiveToDir(WorkingDirectory, Archive.Default); } return(ArchiveManager.LoadArchiveFromDir(WorkingDirectory)); }
internal void LoadArchivesToTable() { if (Directory.Exists(Program.ArchivesDirectory)) { var dirs = Directory.GetDirectories(Program.ArchivesDirectory); archivesTable.Controls.Clear(); archivesTable.RowStyles.Clear(); foreach (var dir in dirs) { var archive = ArchiveManager.LoadArchiveFromDir(dir); var control = new ArchiveControl(archive); archivesTable.Controls.Add(control); } } else { Directory.CreateDirectory(Program.ArchivesDirectory); } }
private void ReloadArchive(object sender, EventArgs e) { archive = ArchiveManager.LoadArchiveFromDir(Program.WorkingDirectory); }