private void NewCommand_Executed(object sender, ExecutedRoutedEventArgs e) { LinearCalibration lc = new LinearCalibration() { CalibrationType = (ChemicalElemetCalibration)Enum.Parse(typeof(ChemicalElemetCalibration), type) }; CalibrationDataDialog cldDlg = new CalibrationDataDialog(ref lc); if (cldDlg.ShowDialog() == true) { CALogger.WriteToLogFile(string.Format("Создана калибровка {0} - {1}", lc.Description, lc.CalibrationType.ToString())); lc.Insert(); FillData(); } }