public EditInterfaceTreeNode(EditInterface editInterface, EditInterfaceTreeView editInterfaceTreeView) : base(editInterface.getName()) { if (editInterface.IconReferenceTag != null) { this.ImageResource = editInterface.IconReferenceTag.ToString(); } this.editInterfaceTreeView = editInterfaceTreeView; this.editInterface = editInterface; editInterface.OnSubInterfaceAdded += editInterface_OnSubInterfaceAdded; editInterface.OnSubInterfaceRemoved += editInterface_OnSubInterfaceRemoved; editInterface.OnBackColorChanged += editInterface_OnBackColorChanged; editInterface.OnForeColorChanged += editInterface_OnForeColorChanged; editInterface.OnIconReferenceChanged += editInterface_OnIconReferenceChanged; editInterface.OnNameChanged += editInterface_OnNameChanged; if (editInterface.hasSubEditInterfaces()) { foreach (EditInterface subInterface in editInterface.getSubEditInterfaces()) { this.Children.add(new EditInterfaceTreeNode(subInterface, editInterfaceTreeView)); } } }