public void CreateIED(SCL sCL, TreeNode nodeSCL) { tIED iED = new tIED(); iED.configVersion = "0"; this.objectManagement.AddObjectToArrayObjectOfParentObject(iED, sCL); tAccessPoint accessPoint = new tAccessPoint(); this.objectManagement.AddObjectToArrayObjectOfParentObject(accessPoint, iED); accessPoint.Server = new tServer(); accessPoint.Server.Authentication = new tServerAuthentication(); tLDevice lDevice = new tLDevice(); this.objectManagement.AddObjectToArrayObjectOfParentObject(lDevice, accessPoint.Server); lDevice.LN0 = new LN0(); tLN lN = new tLN(); lN.lnType = "LPHD1"; lN.inst = 1; lN.lnClass = tLNClassEnum.LPHD.ToString(); lDevice.AddLN(lN); this.treeViewSCL.GetNodesItemOfArray(sCL.IED, sCL.GetType(), nodeSCL.TreeView.Nodes["root"].Nodes["SCL"]); this.CreatingDependenciesLN(sCL, sCL.IED[sCL.IED.Length - 1].AccessPoint[0].Server .LDevice[0].LN0, nodeSCL.TreeView.Nodes["root"].Nodes["SCL"] .Nodes["tIED[]"].Nodes[sCL.IED.Length - 1].Nodes["tAccessPoint[]"] .Nodes[0].Nodes["tServer"].Nodes["tLDevice[]"].Nodes[0].Nodes["LN0"]); this.CreatingDependenciesLN(sCL, sCL.IED[sCL.IED.Length - 1].AccessPoint[0].Server .LDevice[0].LN[0], nodeSCL.TreeView.Nodes["root"].Nodes["SCL"] .Nodes["tIED[]"].Nodes[sCL.IED.Length - 1].Nodes["tAccessPoint[]"] .Nodes[0].Nodes["tServer"].Nodes["tLDevice[]"].Nodes[0].Nodes["tLN[]"].Nodes[0]); }
private void on_add_ln(object sender, EventArgs args) { ld.AddLN(null); update_nodes(); OnUpdated(TopSclNode.WhatUpdated.LogicalNodeAdded); }