private void AddOutputButton_Click(object sender, EventArgs e) { OutputEntityEditorWindow outputEntityEditorWindow = new OutputEntityEditorWindow(this); outputEntityEditorWindow.Show(); outputEntityEditorWindow.OnEndEdit += Output_OnEndEdit; Editors2.Add(outputEntityEditorWindow); }
private void EditOutputButton_Click(object sender, EventArgs e) { string guid = (string)OutputEntityView.Rows[OutputEntityView.CurrentCell.RowIndex].Cells[0].Value; bool found = false; foreach (OutputEntity output in Data.Outputs) { if (output.GUID.ToUpper() == guid.ToUpper()) { OutputEntityEditorWindow outputEditor = new OutputEntityEditorWindow(this, output); outputEditor.OnEndEdit += Output_OnEndEdit; Editors2.Add(outputEditor); outputEditor.Show(); found = true; break; } } if (!found) { MessageBox.Show("Could not find output with GUID: \"" + guid.ToUpper() + "\".", "Error!"); } }