/// <summary> /// Initializes a new instance of the <see cref="LayerSceneNode"/> class. /// </summary> /// <param name="sceneTree">The <see cref="SceneTreeView"/> where the tree node will be used.</param> /// <param name="value">The layer.</param> public LayerSceneNode(SceneTreeView sceneTree, Layer value) : base(sceneTree, value) { Value.ListChanged += new ObservableList <Actor> .ListChangedEventHandler(Value_ListChanged); foreach (Actor actor in Value) { Nodes.Add(SceneTree.CreateNodeByType(actor)); } if (value.IsParallax) { if (layerParallaxIcon == null) { layerParallaxIcon = Properties.Resources.layerParallax; } Image = layerParallaxIcon; } else { if (layerIcon == null) { layerIcon = Properties.Resources.layer; } Image = layerIcon; } }
/// <summary> /// Initializes a new instance of the <see cref="PathSceneNode"/> class. /// </summary> /// <param name="sceneTree">The <see cref="SceneTreeView"/> where the tree node will be used.</param> /// <param name="path">The path.</param> public PathSceneNode(SceneTreeView sceneTree, Path path) : base(sceneTree, path) { if (pathIcon == null) { pathIcon = Properties.Resources.path; } Image = pathIcon; }
/// <summary> /// Initializes a new instance of the <see cref="SceneNode<T>"/> class. /// </summary> /// <param name="sceneTree">The <see cref="SceneTreeView"/> where the tree node will be used.</param> /// <param name="value">The scene content.</param> public SceneNode(SceneTreeView sceneTree, T value) : base(sceneTree, value.Name) { _value = value; _visible = value.Visible; Value.NameChanged += new EventHandler(Value_NameChanged); Value.VisibleChanged += new EventHandler(Value_VisibleChanged); }
/// <summary> /// Initializes a new instance of the <see cref="ActorSceneNode"/> class. /// Creates the nodes for the actor children. /// </summary> /// <param name="sceneTree">The <see cref="SceneTreeView"/> where the tree node will be used.</param> /// <param name="value">The actor.</param> public ActorSceneNode(SceneTreeView sceneTree, Actor value) : base(sceneTree, value) { Value.Children.ListChanged += new ObservableList <Actor> .ListChangedEventHandler(Children_ListChanged); foreach (Actor child in Value.Children) { Nodes.Add(SceneTree.CreateNodeByType(child)); } if (actorIcon == null) { actorIcon = Properties.Resources.actor; } Image = actorIcon; }
/// <summary> /// Initializes a new instance of the <see cref="NodeWithEvents"/> class. /// </summary> /// <param name="sceneTree">The <see cref="SceneTreeView"/> where the tree node will be used.</param> /// <param name="text">The text of the tree node.</param> public NodeWithEvents(SceneTreeView sceneTree, string text) : base(sceneTree, text) { }
/// <summary> /// Initializes a new instance of the <see cref="BaseSceneTreeNode"/> class. /// </summary> /// <param name="sceneTree">The <see cref="SceneTreeView"/> where the tree node will be used.</param> /// <param name="text">The text of the tree node.</param> public BaseSceneTreeNode(SceneTreeView sceneTree, string text) : base(text) { _sceneTree = sceneTree; AllowVisible = true; }