private void buttonNewNode_Click(object sender, EventArgs e) { InputDialog new_name_dlg = new InputDialog(); new_name_dlg.SetInstr("Name of new node ..."); // in this example we're assuming that "name" will be required for nodes new_name_dlg.ShowDialog(); if (new_name_dlg.DialogResult == System.Windows.Forms.DialogResult.OK) { NodeWrapper.AddGraphNode(CurrentGraph, new_name_dlg.TextValue.Trim()); RebuildNodeList(); } }
private void buttonEdit_Click(object sender, EventArgs e) { string propname = comboProps.SelectedItem.ToString(); InputDialog new_prop_val_dlg = new InputDialog(); new_prop_val_dlg.SetInstr("New value property ..."); new_prop_val_dlg.ShowDialog(); if (new_prop_val_dlg.DialogResult != System.Windows.Forms.DialogResult.OK) { return; } working_component.SetCustomString(propname, new_prop_val_dlg.TextValue); DisplayPropVal(); }