private void phraseToolStripMenuItem_Click(object sender, EventArgs e) { frm_AddEdit_PhraseTrigger newTrigger = new frm_AddEdit_PhraseTrigger(); if (newTrigger.ShowDialog() == DialogResult.OK) { ProfileEdited(); refresh_dgTriggers(); } // if() }
// Edit Trigger private void editToolStripMenuItem_Click(object sender, EventArgs e) { if (dgTriggers.MultiSelect == true) { throw new NotImplementedException("Editing mutliple triggers at once is unsupported."); } foreach (DataGridViewRow row in this.dgTriggers.SelectedRows) { VI_Trigger selected_trigger = row.DataBoundItem as VI_Trigger; if (selected_trigger != null) { frm_AddEdit_PhraseTrigger newTrigger = new frm_AddEdit_PhraseTrigger(selected_trigger); if (newTrigger.ShowDialog() == DialogResult.OK) { ProfileEdited(); refresh_dgTriggers(); } // if() } } }
private void EditTrigger() { if (dgTriggers.MultiSelect == true) { throw new NotImplementedException("Editing mutliple triggers at once is unsupported."); } foreach (DataGridViewRow row in this.dgTriggers.SelectedRows) { VI_Trigger selected_trigger = row.DataBoundItem as VI_Trigger; if (selected_trigger != null) { frm_AddEdit_PhraseTrigger newTrigger = new frm_AddEdit_PhraseTrigger(selected_trigger); if (newTrigger.ShowDialog() == DialogResult.OK) { ProfileEdited(); refresh_dgTriggers(); } // if() } } }