예제 #1
0
 private void Save()
 {
     try
     {
         if (savePath.Count() != 0)
         {
             var saver = new ProjectSaver();
             saver.SaveProjectExecute(testTabControl, savePath, mainProcessNumber);
         }
         else
         {
             SaveAs();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #2
0
        private void SaveAs()
        {
            try
            {
                Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog
                {
                    FileName   = "Project",
                    DefaultExt = ".xml",
                    Filter     = "(XMl documents .xml)|*.xml"
                };

                if ((bool)dlg.ShowDialog())
                {
                    var saver = new ProjectSaver();
                    saver.SaveProjectExecute(testTabControl, dlg.FileName, mainProcessNumber);
                    savePath = dlg.FileName;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }