private void ImportArchive(object sender, EventArgs e) { var res = openArchive.ShowDialog(); if (res == DialogResult.OK || res == DialogResult.Yes) { archive = ArchiveManager.LoadArchiveFromFile(openArchive.OpenFile(), Program.WorkingDirectory); } }
private void ImportArchive(object sender, EventArgs e) { var res = openArchive.ShowDialog(); if (res == DialogResult.OK || res == DialogResult.Yes) { var a = ArchiveManager.LoadArchiveFromFile(openArchive.OpenFile(), Program.TmpDirectory); if (!Directory.Exists(Program.ArchivePath(a))) { Directory.Move(Program.TmpDirectory, Program.ArchivePath(a)); LoadArchivesToTable(); } else { //SHOW ERROR Directory.Delete(Program.TmpDirectory, true); } } }