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 context_Extract_Click(object sender, RoutedEventArgs e) { SaveFileDialog saveFileDialog = new SaveFileDialog(); saveFileDialog.InitialDirectory = Settings.Default.LastSelectedPathForExtraction; saveFileDialog.FileName = Path.GetFileName(File.FileName); bool?nullable = saveFileDialog.ShowDialog(); if ((!nullable.GetValueOrDefault() ? 0 : (nullable.HasValue ? 1 : 0)) == 0) { return; } Settings.Default.LastSelectedPathForExtraction = Path.GetDirectoryName(saveFileDialog.FileName); // Settings are saved when the application exits try { File.Extract(saveFileDialog.FileName); } catch (Exception ex) { int num = (int)MessageWindow.Show(ex.Message); } }