public void on_add_ld(object sender, EventArgs args) { int i = ied.AddLDevice(null, ied.AccessPoint[iap].name, templates); var n = new LogicalDeviceNode(ied.AccessPoint[iap].Server.LDevice[i]); Nodes.Add(n); update_nodes(); }
private void update_nodes() { var ap = ((tAccessPoint)Tag); Nodes.Clear(); if (ap.Server != null) { if (ap.Server.LDevice != null) { for (int i = 0; i < ap.Server.LDevice.Length; i++) { if (ap.Server.LDevice[i].templates == null) { ap.Server.LDevice[i].templates = templates; } var n = new LogicalDeviceNode(ap.Server.LDevice [i]); n.Updated += (sender, what) => { OnUpdated(what); }; Nodes.Add(n); } Expand(); } } }