private void context_Extract_Click(object sender, RoutedEventArgs e) { SaveFileDialog saveFileDialog = new SaveFileDialog(); saveFileDialog.FileName = Path.GetFileName(File.FileName); bool? nullable = saveFileDialog.ShowDialog(); if ((!nullable.GetValueOrDefault() ? 0 : (nullable.HasValue ? 1 : 0)) == 0) return; try { File.Extract(saveFileDialog.FileName); } catch (Exception ex) { int num = (int)MessageWindow.Show(ex.Message); } }
private void file_SaveAs_Click(object sender, RoutedEventArgs e) { if (CurrentReader.rdaFolder.GetAllFiles().Count == 0) { MessageWindow.Show("Cannot save an empty file!"); } else { AnnoModificationManager4.Misc.SaveFileDialog saveFileDialog = new AnnoModificationManager4.Misc.SaveFileDialog(); saveFileDialog.Filter = "RDA File|*.rda|Savegame|*.sww|Scenario|*.rdu"; if (!saveFileDialog.ShowDialog().GetValueOrDefault()) { return; } SaveFile(saveFileDialog.FileName); } }
private void file_SaveAs_Click(object sender, RoutedEventArgs e) { if (CurrentReader.rdaFolder.GetAllFiles().Count == 0) { MessageWindow.Show("Cannot save an empty file!"); } else { AnnoModificationManager4.Misc.SaveFileDialog saveFileDialog = new AnnoModificationManager4.Misc.SaveFileDialog(); saveFileDialog.Filter = "RDA File|*.rda|Savegame|*.sww|Scenario|*.rdu"; if (!saveFileDialog.ShowDialog().GetValueOrDefault()) return; SaveFile(saveFileDialog.FileName); } }