Esempio n. 1
0
 private void TreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
 {
     Model.TreeViewItem treeViewItem = e.NewValue as Model.TreeViewItem;
     if (treeViewItem != null && parent != treeViewItem)
     {
         if (treeViewItem.IsDirectory)
         {
             LoadFolder(treeViewItem.Children, treeViewItem.Info.FullName);
         }
         else
         {
             if (treeViewItem.IsText)
             {
                 ShowText(treeViewItem.Info);
             }
         }
     }
 }
Esempio n. 2
0
 public void LoadFolder(string projectPath)
 {
     parent = new Model.TreeViewItem(new System.IO.FileInfo(projectPath));
     solutionExplorerViewModel.Root.Add(parent);
     LoadFolder(parent.Children, projectPath);
 }