OpenFileInit(IDocumentTreeView documentTreeView, IAppWindow appWindow, AssemblyExplorerMostRecentlyUsedList mruList) { this.documentTreeView = documentTreeView; this.appWindow = appWindow; this.mruList = mruList; appWindow.MainWindowCommands.Add(ApplicationCommands.Open, (s, e) => { Open(); e.Handled = true; }, (s, e) => e.CanExecute = true); }
OpenFromGAC(IAppWindow appWindow, IDocumentTreeView documentTreeView, AssemblyExplorerMostRecentlyUsedList mruList, IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider) { this.appWindow = appWindow; this.documentTreeView = documentTreeView; this.mruList = mruList; classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.UIMisc); this.textElementProvider = textElementProvider; }
internal static IDsDocument[] OpenDocuments(IDocumentTreeView documentTreeView, Window ownerWindow, AssemblyExplorerMostRecentlyUsedList mruList, IEnumerable <string> filenames, bool selectDocument = true) { var documentLoader = new DsDocumentLoader(documentTreeView.DocumentService, ownerWindow, mruList); var loadedDocuments = documentLoader.Load(filenames.Select(a => new DocumentToLoad(DsDocumentInfo.CreateDocument(a)))); var document = loadedDocuments.Length == 0 ? null : loadedDocuments[loadedDocuments.Length - 1]; if (selectDocument && document is not null) { Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => { var node = documentTreeView.FindNode(document); if (node is not null) { documentTreeView.TreeView.SelectItems(new[] { node }); } })); } return(loadedDocuments); }
RecentFilesCommand(IDocumentTreeView documentTreeView, AssemblyExplorerMostRecentlyUsedList mruList) { this.documentTreeView = documentTreeView; this.mruList = mruList; }
RecentFilesCommandItem(AssemblyExplorerMostRecentlyUsedList mruList) => this.mruList = mruList;