protected void OnControlAdded(object sender, wControlCollectEventArgs e) { var node = tvList.Nodes[0].Nodes.Add(e.Control.Name); e.Control.PropertyChangedEvent += m_propertyChangedEvent; node.Tag = e.Control; }
protected void OnControlAdded(object sender, wControlCollectEventArgs args) { var handler = ControlAddedEvent; if (handler != null) { handler(this, args); } }
protected void OnControlRemoved(object sender, wControlCollectEventArgs e) { e.Control.PropertyChangedEvent -= m_propertyChangedEvent; foreach (TreeNode node in tvList.Nodes[0].Nodes) { if (node.Tag.Equals(e.Control)) { node.Remove(); return; } } }