Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new editable tree view item.
 /// </summary>
 /// <param name="parent">Parent of item.</param>
 /// <param name="file">The file system object for this tree itme.</param>
 /// <param name="dynamicLoad">True to load dynamically</param>
 public FileTreeViewItem(ModelTreeViewItem parent, FileSystemInfo file, bool dynamicLoad)
     : base(parent, dynamicLoad)
 {
     this.File        = file;
     this.Text        = file.Name;
     this.IsDirectory = file is DirectoryInfo;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new tree view item model.
 /// </summary>
 /// <param name="parent">Parent item.</param>
 /// <param name="dynamicLoad">True if this item will dynamically load it's children, otherwise false.</param>
 public ModelTreeViewItem(ModelTreeViewItem parent, bool dynamicLoad)
 {
     this.m_Text          = string.Empty;
     this.IsEnabled       = true;
     this.m_Parent        = parent;
     this.m_IsDynamicLoad = dynamicLoad;
     this.m_Children      = new ObservableCollection <ModelTreeViewItem>();
     if (this.m_IsDynamicLoad)
     {
         this.m_Children.Add(s_DummyChild);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new editable tree view item.
 /// </summary>
 /// <param name="parent">Parent of item.</param>
 /// <param name="directory">The directory for this tree itme.</param>
 /// <param name="dynamicLoad">True to load dynamically</param>
 public FileTreeViewItem(ModelTreeViewItem parent, DirectoryInfo directory, bool dynamicLoad)
     : base(parent, dynamicLoad)
 {
     this.File        = directory;
     this.Text        = directory.Name;
     this.IsDirectory = true;
     this.Icon        = MainMenuIcon.FolderClose;
     if ((directory.Attributes & FileAttributes.Hidden) != 0)
     {
         this.IconBrush         = Brushes.BurlyWood.Clone();
         this.IconBrush.Opacity = 0.7;
         this.IconBrush.Freeze();
     }
     else
     {
         this.IconBrush = Brushes.BurlyWood;
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new editable tree view item.
 /// </summary>
 /// <param name="parent">Parent of item.</param>
 /// <param name="file">The file for this tree itme.</param>
 public FileTreeViewItem(ModelTreeViewItem parent, FileInfo file)
     : base(parent, false)
 {
     this.File        = file;
     this.Text        = file.Name;
     this.IsDirectory = false;
     this.Icon        = MainMenuIconConverter.GetIconForFile(file);
     if ((file.Attributes & FileAttributes.Hidden) != 0)
     {
         this.IconBrush         = MainMenuIconConverter.GetIconBrushForFile(file).Clone();
         this.IconBrush.Opacity = 0.7;
         this.IconBrush.Freeze();
     }
     else
     {
         this.IconBrush = MainMenuIconConverter.GetIconBrushForFile(file);
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new editable tree view item.
 /// </summary>
 /// <param name="parent">Parent of item.</param>
 /// <param name="dynamicLoad">True to load dynamically</param>
 protected EditableTreeViewItem(ModelTreeViewItem parent, bool dynamicLoad)
     : base(parent, dynamicLoad)
 {
 }
Exemplo n.º 6
0
 /// <summary>
 /// Initializes a new editable tree view item.
 /// </summary>
 /// <param name="parent">Parent of item.</param>
 /// <param name="dynamicLoad">True to load dynamically</param>
 public FileTreeViewItem(ModelTreeViewItem parent, bool dynamicLoad)
     : base(parent, dynamicLoad)
 {
 }
Exemplo n.º 7
0
 /// <summary>
 /// Initializes a new tree view item model.
 /// </summary>
 /// <param name="parent">Parent item.</param>
 public ModelTreeViewItem(ModelTreeViewItem parent)
     : this(parent, false)
 {
 }