using System.Collections.Generic; using System.IO; namespace Terminal.Gui { /// /// Delegate for providing an implementation that returns all /// that should be shown in a (in the collapse-able tree area of the dialog). /// /// public delegate IEnumerable FileDialogTreeRootGetter (); /// /// Describes a top level directory that should be offered to the user in the /// tree view section of a . For example "Desktop", /// "Downloads", "Documents" etc. /// public class FileDialogRootTreeNode { /// /// Creates a new instance of the class /// /// /// public FileDialogRootTreeNode (string displayName, DirectoryInfo path) { this.DisplayName = displayName; this.Path = path; } /// /// Gets the text that should be displayed in the tree for this item. /// public string DisplayName { get; } /// /// Gets the path that should be shown/explored when selecting this node /// of the tree. /// public DirectoryInfo Path { get; } /// public override string ToString () { return this.DisplayName; } } }