void miCopySpectr_Click(object sender, EventArgs e) { try { if (Selected == null) { MessageBox.Show(MainForm.MForm, Common.MLS.Get(MLSConst, "Выберите спектр который нужно перемерить"), Common.MLS.Get(MLSConst, "Предупреждение"), MessageBoxButtons.OK, MessageBoxIcon.Warning ); return; } LastPath = SelectedTag.GetPath(); /*DialogResult dr = MessageBox.Show(MainForm.MForm, * Common.MLS.Get(MLSConst, "Вы действительно хотите перемерить спектр: ") + LastPath, * Common.MLS.Get(MLSConst, "Осторожно!!!"), * MessageBoxButtons.YesNo, * MessageBoxIcon.Warning); * * if (dr == DialogResult.No) * return;*/ string name = util.StringDialog.GetString(MainForm.MForm, Common.MLS.Get(MLSConst, "Копирование пробы"), Common.MLS.Get(MLSConst, "Введите имя для копии пробы:") + LastPath, "", true); if (name == null) { return; } Spectr sp = new Spectr(LastPath); int path_ind = LastPath.LastIndexOf('\\'); string path = LastPath.Substring(0, path_ind + 1); sp.SaveAs(path + name); ReLoadList(); } catch (Exception ex) { Common.Log(ex); } }
void miRemoveFolder_Click(object sender, EventArgs e) { try { if (SelectedTag == null || SelectedTag.SpName != null) { return; } if (Selected.Nodes.Count != 0) { return; } DialogResult dr = MessageBox.Show(MainForm.MForm, Common.MLS.Get(MLSConst, "Вы действительно хотите удалить папку: ") + SelectedTag.GetPath(), Common.MLS.Get(MLSConst, "Осторожно!!!"), MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (dr == DialogResult.No) { return; } SelectedTag.Folder.DeleteFolder(); ReLoadList(); } catch (Exception ex) { Common.Log(ex); } }