Exemplo n.º 1
0
        public void ButtonOKClick(object sender, EventArgs e)
        {
            object lN = this.treeViewSCL.SearchUPForTypeAndGetSCLTreeNode(this.treeSCL.TreeView.SelectedNode, typeof(tSubstation)).Tag;

            if (this.comboBoxtLNode.Items.Count > 0)
            {
                tLNode[] LNodes = new tLNode[this.comboBoxtLNode.Items.Count];
                for (int x = 0; x < this.comboBoxtLNode.Items.Count; x++)
                {
                    LNodes[x] = (this.comboBoxtLNode.Items[x] as LNodeComboBox).LNodes;
                }
                if (this.LNodeSCL != null)
                {
                    this.LNodeSCL = null;
                }
                else
                {
                    this.LNodeSCL = new tLNode();
                }
                this.LNodeSCL = LNodes[this.comboBoxtLNode.SelectedIndex];
                this.objectManagement.AddObjectToArrayObjectOfParentObject(this.LNodeSCL, lN);
                treeViewSCL.GetNodesItemOfArray((lN as tSubstation).LNode, lN.GetType(), this.treeViewSCL.SearchUPForTypeAndGetSCLTreeNode(this.treeSCL.TreeView.SelectedNode, typeof(tSubstation)));
            }
            this.Close();
        }
Exemplo n.º 2
0
        public void CreatetLNode(TreeNode treeSCL, SCL sCLObject)
        {
            this.treeSCL = treeSCL;
            this.scl     = sCLObject;
            this.nodeSCL = sCLObject;

            if (this.scl.IED != null)
            {
                for (int a = 0; a < this.scl.IED.Length; a++)
                {
                    if (this.scl.IED[a].AccessPoint != null)
                    {
                        for (int b = 0; b < this.scl.IED[a].AccessPoint.Length; b++)
                        {
                            if (this.scl.IED[a].AccessPoint[b].Server != null)
                            {
                                for (int c = 0; c < this.scl.IED[a].AccessPoint[b].Server.LDevice.Length; c++)
                                {
                                    if (this.scl.IED[a].AccessPoint[b].Server.LDevice[c].LN != null)
                                    {
                                        for (int d = 0; d < this.scl.IED[a].AccessPoint[b].Server.LDevice[c].LN.Length; d++)
                                        {
                                            this.LNodeSCL         = new tLNode();
                                            this.LNodeSCL.ldInst  = this.scl.IED[a].AccessPoint[b].Server.LDevice[c].inst.ToString();
                                            this.LNodeSCL.iedName = this.scl.IED[a].name;
                                            this.LNodeSCL.lnInst  = this.scl.IED[a].AccessPoint[b].Server.LDevice[c].LN[d].inst.ToString();
                                            this.LNodeSCL.lnClass = this.scl.IED[a].AccessPoint[b].Server.LDevice[c].LN[d].lnClass;
                                            this.LNodeSCL.lnType  = this.scl.IED[a].AccessPoint[b].Server.LDevice[c].LN[d].lnType;
                                            this.comboBoxtLNode.Items.Add(new LNodeComboBox(this.LNodeSCL));
                                        }
                                    }
                                }
                            }
                            if (this.scl.IED[a].AccessPoint[b].LN != null)
                            {
                                for (int d = 0; d < this.scl.IED[a].AccessPoint[b].LN.Length; d++)
                                {
                                    this.LNodeSCL         = new tLNode();
                                    this.LNodeSCL.iedName = this.scl.IED[a].name;
                                    this.LNodeSCL.lnInst  = this.scl.IED[a].AccessPoint[b].LN[d].inst.ToString();
                                    this.LNodeSCL.lnClass = this.scl.IED[a].AccessPoint[b].LN[d].lnClass;
                                    this.LNodeSCL.lnType  = this.scl.IED[a].AccessPoint[b].LN[d].lnType;
                                    this.comboBoxtLNode.Items.Add(new LNodeComboBox(this.LNodeSCL));
                                }
                            }
                        }
                    }
                }
            }
            this.comboBoxtLNode.DisplayMember = "DisplayLNodes";
        }
Exemplo n.º 3
0
 public LNodeComboBox(tLNode LNodes)
 {
     this.LNodes = LNodes;
 }