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); } }
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); } }