示例#1
0
 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);
 }
示例#2
0
 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;
 }
示例#3
0
        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);
        }
示例#4
0
 RecentFilesCommand(IDocumentTreeView documentTreeView, AssemblyExplorerMostRecentlyUsedList mruList)
 {
     this.documentTreeView = documentTreeView;
     this.mruList          = mruList;
 }
示例#5
0
 RecentFilesCommandItem(AssemblyExplorerMostRecentlyUsedList mruList) => this.mruList = mruList;