private void ProcessNode(INode2 node) { string varname = node.LabelPin.Spread.Replace("|", ""); //Only register variable if name not blank if (varname != "") { if (this.engine != null) { TodoHdeVariable hdevar = new TodoHdeVariable(node, this.engine, varname); this.nodes[node.InternalCOMInterf] = hdevar; } } }
void LabelPin_Changed(object sender, EventArgs e) { IPin2 pin = (IPin2)sender; INode parent = pin.ParentNode.InternalCOMInterf; if (nodes.ContainsKey(parent)) { TodoHdeVariable var = nodes[parent]; var.Dispose(); nodes.Remove(parent); this.NodeAddedCB(pin.ParentNode); } }
private void ProcessNode(INode2 node) { string varname = node.LabelPin.Spread.Replace("|", ""); //Only register variable if name not blank if (varname != "") { if (this.engine != null) { TodoHdeVariable hdevar = new TodoHdeVariable(node, this.engine, varname); this.nodes[node.InternalCOMInterf] = hdevar; } } this.exposednodes.Add(node); node.LabelPin.Changed += this.LabelPin_Changed; node.FindPin("Tag").Changed += this.LabelPin_Changed; }
private void NodeRemovedCB(INode2 node) { if (this.nodes.ContainsKey(node.InternalCOMInterf)) { TodoHdeVariable hdevar = this.nodes[node.InternalCOMInterf]; hdevar.Dispose(); this.nodes.Remove(node.InternalCOMInterf); } if (this.enums.ContainsKey(node.InternalCOMInterf)) { TodoHdeEnumVariable hdevar = this.enums[node.InternalCOMInterf]; hdevar.Dispose(); } if (this.exposednodes.Contains(node)) { node.LabelPin.Changed -= LabelPin_Changed; this.exposednodes.Remove(node); } }