コード例 #1
0
 private void PreviewCommand_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     try
     {
         xmlContent.Preview();
     }
     catch (Exception exception)
     {
         MessageBoxExtension.ErroBox(exception.Message);
     }
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
        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);
            }
        }