Пример #1
0
        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);
            }
        }
Пример #2
0
        private void ProcessEnumNode(INode2 node)
        {
            string varname = node.LabelPin.Spread.Replace("|", "");

            //Only register variable if name not blank
            if (varname != "")
            {
                if (this.engine != null)
                {
                    TodoVariable var = this.engine.GetVariableByName(varname);
                    if (var == null)
                    {
                        var          = new TodoVariable(varname);
                        var.Category = "Global";
                        this.engine.RegisterVariable(var, false);
                    }

                    TodoHdeEnumVariable hdevar = new TodoHdeEnumVariable(node, this.engine, varname);

                    this.enums[node.InternalCOMInterf] = hdevar;
                }
            }
        }