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); })); }
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}\""); } } }