private void PreviewCommand_Executed(object sender, ExecutedRoutedEventArgs e) { try { xmlContent.Preview(); } catch (Exception exception) { MessageBoxExtension.ErroBox(exception.Message); } }
private void SaveAsCommand_Executed(object sender, ExecutedRoutedEventArgs e) { try { string name = FileExtension.SaveFile("保存文件", DefaultSetting.SaveFileTypeFilterDefault); xmlContent.Save(name); } catch (Exception exception) { MessageBoxExtension.ErroBox(exception.Message); } }
private void OpenCommand_Executed(object sender, ExecutedRoutedEventArgs e) { try { string[] names = FileExtension.OpenFiles("打开文件", DefaultSetting.OpenFileTypeFilterDefault); foreach (string path in names) { xmlContent.Load(path); } } catch (Exception exception) { MessageBoxExtension.ErroBox(exception.Message); } }