/// <summary> /// Initializes a new instance of the <see cref="ContentFolder"/> class. /// </summary> /// <param name="type">The folder type.</param> /// <param name="path">The path to the item.</param> /// <param name="node">The folder parent node.</param> internal ContentFolder(ContentFolderType type, string path, ContentTreeNode node) : base(path) { FolderType = type; Node = node; ShortName = System.IO.Path.GetFileName(path); }
/// <summary> /// Initializes a new instance of the <see cref="ContentTreeNode"/> class. /// </summary> /// <param name="parent">The parent node.</param> /// <param name="path">The folder path.</param> public ContentTreeNode(ContentTreeNode parent, string path) : this(parent?.FolderType ?? ContentFolderType.Other, path) { if (parent != null) { // Link Folder.ParentFolder = parent.Folder; Parent = parent; } }
/// <summary> /// Initializes a new instance of the <see cref="ContentTreeNode"/> class. /// </summary> /// <param name="parent">The parent node.</param> /// <param name="type">The folder type.</param> /// <param name="path">The folder path.</param> protected ContentTreeNode(ContentTreeNode parent, ContentFolderType type, string path) : base(false, Editor.Instance.Icons.FolderClosed12, Editor.Instance.Icons.FolderOpened12) { _folder = new ContentFolder(type, path, this); Text = _folder.ShortName; if (parent != null) { Folder.ParentFolder = parent.Folder; Parent = parent; } }
/// <summary> /// Initializes a new instance of the <see cref="ContentFolder"/> class. /// </summary> /// <param name="type">The folder type.</param> /// <param name="path">The path to the item.</param> /// <param name="node">The folder parent node.</param> internal ContentFolder(ContentFolderType type, string path, ContentTreeNode node) : base(path) { FolderType = type; Node = node; }
/// <summary> /// Initializes a new instance of the <see cref="ContentTreeNode"/> class. /// </summary> /// <param name="parent">The parent node.</param> /// <param name="path">The folder path.</param> public ContentTreeNode(ContentTreeNode parent, string path) : this(parent, parent?.FolderType ?? ContentFolderType.Other, path) { }