private void EditFileFormat() { BindingManagerBase bm = this.BindingContext[dataView1]; string settings_name = ((DataRowView)bm.Current).Row[1].ToString(); FileFormatSettingsEdit FileFormatSettingsEditForm = new FileFormatSettingsEdit(cl, settings_name, true); if (FileFormatSettingsEditForm.ShowDialog() == DialogResult.OK) { RefreshFormatsTable(); } return; }
private void NewFileFormat() { cl.AddNewFormat("новый формат"); FileFormatSettingsEdit FileFormatSettingsEditForm = new FileFormatSettingsEdit(cl, "новый формат", false); if (FileFormatSettingsEditForm.ShowDialog() == DialogResult.OK) { RefreshFormatsTable(); } else { cl.DelFormat("новый формат"); } }