예제 #1
0
 private void fetView_FileExplorerView_ParentMouseDoubleClick(object sender, FileExplorerViewItem parent)
 {
     if (fetTree.SelectedTreeViewItem != null)
     {
         TreeViewItem treeViewParent = ControlHelpers.FindParent <TreeViewItem>(fetTree.SelectedTreeViewItem);
         if (treeViewParent != null)
         {
             treeViewParent.IsSelected = true;
         }
     }
 }
예제 #2
0
 private void lvwExplorer_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     FileExplorerView_MouseDoubleClick?.Invoke(sender, e);
     if (lvwExplorer.SelectedItems.Count == 1 && lvwExplorer.SelectedItem != null)
     {
         FileExplorerViewItem parent = lvwExplorer.SelectedItem as FileExplorerViewItem;
         if (parent != null)
         {
             if (parent.FileInfo == null)
             {
                 FileExplorerView_ParentMouseDoubleClick?.Invoke(sender, parent);
             }
             else if (ExecuteFileOnDoubleClick)
             {
                 System.Diagnostics.Process p = new System.Diagnostics.Process();
                 p.StartInfo = new System.Diagnostics.ProcessStartInfo(parent.FileInfo.FullName);
                 p.Start();
             }
         }
     }
 }