private void VocabularyAddButton_Click(object sender, EventArgs e) { VocabularyEditorWindow vocabularyEditor = new VocabularyEditorWindow(this); vocabularyEditor.Show(); Editors.Add(vocabularyEditor); vocabularyEditor.OnEndEdit += OnEndEdit; }
private void VocabularyEditButton_Click(object sender, EventArgs e) { string guid = (string)VocabularyView.Rows[VocabularyView.CurrentCell.RowIndex].Cells[0].Value; bool found = false; foreach (Vocabulary vocabulary in Data.Vocabulary) { if (vocabulary.GUID.ToUpper() == guid.ToUpper()) { VocabularyEditorWindow intentEditor = new VocabularyEditorWindow(this, vocabulary); intentEditor.OnEndEdit += OnEndEdit; Editors.Add(intentEditor); intentEditor.Show(); found = true; break; } } if (!found) { MessageBox.Show("Could not find vocabulary with GUID: \"" + guid.ToUpper() + "\".", "Error!"); } }