Esempio 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;
 }
Esempio 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);
     }
 }
Esempio 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;
     }
 }
Esempio 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);
     }
 }
 /// <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)
 {
 }
Esempio 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)
 {
 }
Esempio 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)
 {
 }