Пример #1
0
 public bool IsEnabled(TextViewContext context)
 {
     if (context.SelectedTreeNodes == null)
     {
         return(false);
     }
     return(context.SelectedTreeNodes
            .All(n => {
         var a = OpenContainingFolder.GetAssemblyTreeNode(n);
         return a != null && File.Exists(a.LoadedAssembly.FileName);
     }));
 }
Пример #2
0
 public void Execute(TextViewContext context)
 {
     if (context.SelectedTreeNodes == null)
     {
         return;
     }
     foreach (var n in context.SelectedTreeNodes)
     {
         var node = OpenContainingFolder.GetAssemblyTreeNode(n);
         var path = Path.GetDirectoryName(node.LoadedAssembly.FileName);
         if (Directory.Exists(path))
         {
             MainWindow.ExecuteCommand("cmd.exe", $"/k \"cd {path}\"");
         }
     }
 }