void _setpropertyMenuItem_Click(object sender, EventArgs e) { DaggerBasePin pin = Tag as DaggerBasePin; ValueEditorDialog ved = new ValueEditorDialog(pin); if (ved.ShowDialog() == DialogResult.OK) { pin.Data = ved.Data; pin.ParentNode.Process(); } ved.Dispose(); }
private void _saveSubNodeToTreeViewToolStripMenuItem_Click(object sender, EventArgs e) { byte[] subnode = (_node as DaggerSubNode).SubNodeGraph.SerializeSubGraph(-1); if (subnode != null) { if (_parentGraph.DaggerNodeTreeView != null) { ValueEditorDialog vue = new ValueEditorDialog("Subnode Name", "Subnode"); if (vue.ShowDialog() == DialogResult.OK) { _parentGraph.DaggerNodeTreeView.AddSubNode("User functions", (string)vue.Data, false, subnode); } } else { ValueEditorDialog vue = new ValueEditorDialog("Subnode Name", "Subnode"); if (vue.ShowDialog() == DialogResult.OK) { _node.ParentGraph.AddNode(new DaggerSubNode((string)vue.Data, subnode)); } } } }