コード例 #1
0
ファイル: AboutScreen.cs プロジェクト: manojdjoshi/dnSpy
		AboutScreenMenuItem(IDocumentViewerContentFactoryProvider documentViewerContentFactoryProvider, IDocumentTabService documentTabService, IAppWindow appWindow, IExtensionService extensionService, IContentTypeRegistryService contentTypeRegistryService) {
			this.documentViewerContentFactoryProvider = documentViewerContentFactoryProvider;
			this.documentTabService = documentTabService;
			this.appWindow = appWindow;
			this.extensionService = extensionService;
			aboutContentType = contentTypeRegistryService.GetContentType(ContentTypes.AboutDnSpy);
		}
コード例 #2
0
		NavigationCommandInstaller(IDocumentTabService documentTabService, IAppWindow appWindow) {
			this.documentTabService = documentTabService;
			Debug.Assert(Application.Current != null && Application.Current.MainWindow != null);
			var cmds = appWindow.MainWindowCommands;
			cmds.Add(NavigationCommands.BrowseBack, new RelayCommand(a => BrowseBack(), a => CanBrowseBack));
			cmds.Add(NavigationCommands.BrowseForward, new RelayCommand(a => BrowseForward(), a => CanBrowseForward));
		}
コード例 #3
0
ファイル: FileListLoader.cs プロジェクト: GreenDamTan/dnSpy
		FileListLoader(IAppWindow appWindow, FileListManager fileListManager, FileTabManager fileTabManager, FileTabSerializer fileTabSerializer, [ImportMany] IEnumerable<Lazy<IFileListListener, IFileListListenerMetadata>> mefListeners) {
			this.fileListManager = fileListManager;
			this.fileTabManager = fileTabManager;
			this.fileTabSerializer = fileTabSerializer;
			this.listeners = mefListeners.OrderBy(a => a.Metadata.Order).ToArray();
			appWindow.MainWindowClosed += AppWindow_MainWindowClosed;
		}
コード例 #4
0
		DocumentListLoader(IAppWindow appWindow, DocumentListService documentListService, DocumentTabService documentTabService, DocumentTabSerializer documentTabSerializer, [ImportMany] IEnumerable<Lazy<IDocumentListListener, IDocumentListListenerMetadata>> documentListListeners) {
			this.documentListService = documentListService;
			this.documentTabService = documentTabService;
			this.documentTabSerializer = documentTabSerializer;
			this.documentListListeners = documentListListeners.OrderBy(a => a.Metadata.Order).ToArray();
			appWindow.MainWindowClosed += AppWindow_MainWindowClosed;
		}
コード例 #5
0
ファイル: SaveCommands.cs プロジェクト: GreenDamTan/dnSpy
		ExportProjectCommand(IAppWindow appWindow, IFileTreeView fileTreeView, ILanguageManager languageManager, IFileTreeViewSettings fileTreeViewSettings, IExportToProjectSettings exportToProjectSettings, [ImportMany] IEnumerable<Lazy<IBamlDecompiler>> bamlDecompilers) {
			this.appWindow = appWindow;
			this.fileTreeView = fileTreeView;
			this.languageManager = languageManager;
			this.fileTreeViewSettings = fileTreeViewSettings;
			this.exportToProjectSettings = exportToProjectSettings;
			this.bamlDecompiler = bamlDecompilers.FirstOrDefault();
		}
コード例 #6
0
ファイル: NavigationCommands.cs プロジェクト: lovebanyi/dnSpy
 NavigationCommandInstaller(IFileTabManager fileTabManager, IAppWindow appWindow)
 {
     this.fileTabManager = fileTabManager;
     Debug.Assert(Application.Current != null && Application.Current.MainWindow != null);
     var cmds = appWindow.MainWindowCommands;
     cmds.Add(NavigationCommands.BrowseBack, new RelayCommand(a => BrowseBack(), a => CanBrowseBack));
     cmds.Add(NavigationCommands.BrowseForward, new RelayCommand(a => BrowseForward(), a => CanBrowseForward));
 }
コード例 #7
0
 public MouseEvent(IAppWindow window, int wheelDelta, int x, int y)
 {
     Type = MouseEventType.Wheel;
     Window = window;
     WheelDelta = wheelDelta;
     X = x;
     Y = y;
 }
コード例 #8
0
ファイル: CloseWindowController.cs プロジェクト: x893/WDS
 public CloseWindowController(IAppWindow win, IIOPortHandler[] portHandlers)
 {
     _win = win;
     _state = ClosingState.NoClosing;
     _portHandlers = portHandlers;
     _portHandlerClosedStates = new Dictionary<IIOPortHandler, bool>();
     foreach (IIOPortHandler handler in portHandlers)
         _portHandlerClosedStates[handler] = false;
 }
コード例 #9
0
 public MouseEvent(IAppWindow window, int deltaX, int deltaY, int x, int y)
 {
     Type = MouseEventType.Move;
     Window = window;
     DeltaX = deltaX;
     DeltaY = deltaY;
     X = x;
     Y = y;
 }
コード例 #10
0
 public MouseEvent(IAppWindow window, MouseButton button, ButtonState buttonState, int x, int y)
 {
     Type = MouseEventType.Button;
     Window = window;
     Button = button;
     ButtonState = buttonState;
     X = x;
     Y = y;
 }
コード例 #11
0
		InMemoryModuleManager(ITheDebugger theDebugger, IFileTabManager fileTabManager, Lazy<IMethodAnnotations> methodAnnotations, IAppWindow appWindow) {
			this.fileTabManager = fileTabManager;
			this.fileTreeView = fileTabManager.FileTreeView;
			this.fileManager = this.fileTreeView.FileManager;
			this.appWindow = appWindow;
			this.methodAnnotations = methodAnnotations;
			this.theDebugger = theDebugger;
			theDebugger.OnProcessStateChanged_First += TheDebugger_OnProcessStateChanged_First;
		}
コード例 #12
0
ファイル: SaveCommands.cs プロジェクト: manojdjoshi/dnSpy
		ExportProjectCommand(IAppWindow appWindow, IDocumentTreeView documentTreeView, IDecompilerService decompilerService, IDocumentTreeViewSettings documentTreeViewSettings, IExportToProjectSettings exportToProjectSettings, [ImportMany] IEnumerable<Lazy<IBamlDecompiler>> bamlDecompilers, [ImportMany] IEnumerable<Lazy<IXamlOutputOptionsProvider>> xamlOutputOptionsProviders) {
			this.appWindow = appWindow;
			this.documentTreeView = documentTreeView;
			this.decompilerService = decompilerService;
			this.documentTreeViewSettings = documentTreeViewSettings;
			this.exportToProjectSettings = exportToProjectSettings;
			bamlDecompiler = bamlDecompilers.FirstOrDefault();
			xamlOutputOptionsProvider = xamlOutputOptionsProviders.FirstOrDefault();
		}
コード例 #13
0
		AppSettingsService(IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider, IAppWindow appWindow, ITreeViewService treeViewService, ITreeViewNodeTextElementProvider treeViewNodeTextElementProvider, [ImportMany] IEnumerable<Lazy<IAppSettingsPageContainer, IAppSettingsPageContainerMetadata>> appSettingsPageContainers, [ImportMany] IEnumerable<Lazy<IAppSettingsPageProvider>> appSettingsPageProviders, [ImportMany] IEnumerable<Lazy<IAppSettingsModifiedListener, IAppSettingsModifiedListenerMetadata>> appSettingsModifiedListeners) {
			classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.UIMisc);
			this.textElementProvider = textElementProvider;
			this.appWindow = appWindow;
			this.treeViewService = treeViewService;
			this.treeViewNodeTextElementProvider = treeViewNodeTextElementProvider;
			this.appSettingsPageContainers = appSettingsPageContainers.OrderBy(a => a.Metadata.Order).ToArray();
			this.appSettingsPageProviders = appSettingsPageProviders.ToArray();
			this.appSettingsModifiedListeners = appSettingsModifiedListeners.OrderBy(a => a.Metadata.Order).ToArray();
		}
コード例 #14
0
ファイル: Commands.cs プロジェクト: manojdjoshi/dnSpy
		UndoRedoCommmandLoader(IWpfCommandService wpfCommandService, Lazy<IUndoCommandService> undoCommandService, IAppWindow appWindow, IMessageBoxService messageBoxService) {
			this.undoCommandService = undoCommandService;
			this.messageBoxService = messageBoxService;

			var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_MAINWINDOW);
			cmds.Add(UndoRoutedCommands.Undo, (s, e) => undoCommandService.Value.Undo(), (s, e) => e.CanExecute = undoCommandService.Value.CanUndo);
			cmds.Add(UndoRoutedCommands.Redo, (s, e) => undoCommandService.Value.Redo(), (s, e) => e.CanExecute = undoCommandService.Value.CanRedo);

			appWindow.MainWindowClosing += AppWindow_MainWindowClosing;
		}
コード例 #15
0
		InMemoryModuleService(ITheDebugger theDebugger, IDocumentTabService documentTabService, Lazy<IMethodAnnotations> methodAnnotations, IAppWindow appWindow, SimpleProcessReader simpleProcessReader) {
			this.documentTabService = documentTabService;
			documentTreeView = documentTabService.DocumentTreeView;
			documentService = documentTreeView.DocumentService;
			this.appWindow = appWindow;
			this.methodAnnotations = methodAnnotations;
			this.theDebugger = theDebugger;
			this.simpleProcessReader = simpleProcessReader;
			theDebugger.OnProcessStateChanged_First += TheDebugger_OnProcessStateChanged_First;
		}
コード例 #16
0
ファイル: Commands.cs プロジェクト: lovebanyi/dnSpy
		UndoRedoCommmandLoader(IWpfCommandManager wpfCommandManager, Lazy<IUndoCommandManager> undoCommandManager, IAppWindow appWindow, IMessageBoxManager messageBoxManager) {
			this.undoCommandManager = undoCommandManager;
			this.messageBoxManager = messageBoxManager;

			var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW);
			cmds.Add(UndoRoutedCommands.Undo, (s, e) => undoCommandManager.Value.Undo(), (s, e) => e.CanExecute = undoCommandManager.Value.CanUndo);
			cmds.Add(UndoRoutedCommands.Redo, (s, e) => undoCommandManager.Value.Redo(), (s, e) => e.CanExecute = undoCommandManager.Value.CanRedo);

			appWindow.MainWindowClosing += AppWindow_MainWindowClosing;
		}
コード例 #17
0
ファイル: WDSApplication.cs プロジェクト: x893/WDS
 public bool closeResourcesReady(IAppWindow appWin)
 {
     if (this._appWinReadyToClose.ContainsKey(appWin))
     {
         this._appWinReadyToClose[appWin] = true;
     }
     else
     {
         GlobalServices.ErrMsg("WDSApplication.closeResourcesReady:", "No window found");
         return false;
     }
     bool flag = true;
     foreach (IAppWindow window in this._appWinReadyToClose.Keys)
     {
         if (!this._appWinReadyToClose[window])
         {
             flag = false;
             break;
         }
     }
     if (flag)
     {
         Form form = (Form) this._mainWin;
         if (form.InvokeRequired)
         {
             form.Invoke(new MethodInvoker(form.Close));
         }
         else
         {
             form.Close();
         }
         if (this._helperWins == null)
         {
             return flag;
         }
         foreach (IAppWindow window2 in this._helperWins)
         {
             form = (Form) window2;
             if (form.InvokeRequired)
             {
                 form.Invoke(new MethodInvoker(form.Close));
             }
             else
             {
                 form.Close();
             }
         }
     }
     return flag;
 }
コード例 #18
0
ファイル: CloseWindowController.cs プロジェクト: x893/WDS
        public void formClosingEventHandler(ref object sender, ref FormClosingEventArgs e, IAppWindow win, string appId, bool AllowCancel)
        {
            bool isOwnedByDDI = _portHandlers[0].getAdtRecord().IsOwnedByDDI;
            if ((_state == ClosingState.NoClosing) ||
                ((_state == ClosingState.ClosingResources) && isOwnedByDDI)
                )
            {
                e.Cancel = true;
                if (win.AppDataChanged)
                {
                    switch (DialogResult.No)
                    {
                        case DialogResult.Yes:
                            win.saveLocal();
                            if (!isOwnedByDDI)
                            {
                                break;
                            }
                            ClosingJobs(win);
                            return;

                        case DialogResult.No:
                            if (!isOwnedByDDI)
                            {
                                break;
                            }
                            ClosingJobs(win);
                            return;

                        case DialogResult.Cancel:
                            WDSApplicationManager.instance().AppCloseAllowed = false;
                            return;
                    }
                }
                if ((e.CloseReason == CloseReason.MdiFormClosing) || (e.CloseReason == CloseReason.ApplicationExitCall))
                {
                    GlobalServices.WarnMsg(appId, "Sending TerminateWDS Request to WDS Core");
                    WDSApplicationManager.instance().terminateWDS();
                }
                else if (_portHandlers[0].getAdtRecord().IsOwnedByDDI)
                    ClosingJobs(win);
                else
                    WDSApplicationManager.instance().closeApplications(_portHandlers[0].getAdtRecord());
            }
        }
コード例 #19
0
ファイル: WDSApplicationManager.cs プロジェクト: x893/WDS
 public void closeApplication(IAppWindow appWin)
 {
     lock (_soApps)
     {
         foreach (WDSApplication application in this._apps)
         {
             if (application.hasWindow(appWin))
             {
                 if (!_removeApps.Contains(application))
                 {
                     _removeApps.Add(application);
                     application.startClosing();
                 }
                 break;
             }
         }
     }
 }
コード例 #20
0
 public AboutScreenFileTabContent(IAppWindow appWindow, IPluginManager pluginManager)
 {
     this.appWindow     = appWindow;
     this.pluginManager = pluginManager;
 }
コード例 #21
0
ファイル: AboutScreen.cs プロジェクト: zstreamer/dnSpy
 public AboutScreenFileTabContent(IAppWindow appWindow)
 {
     this.appWindow = appWindow;
 }
コード例 #22
0
ファイル: UIDispatcher.cs プロジェクト: wagnerhsu/tools-dnSpy
 UIDispatcher(IAppWindow appWindow) => Dispatcher = appWindow.MainWindow.Dispatcher;
コード例 #23
0
ファイル: Commands.cs プロジェクト: lovebanyi/dnSpy
 FindInCodeInit(IAppWindow appWindow, IFileTabManager fileTabManager)
 {
     this.fileTabManager = fileTabManager;
     appWindow.MainWindowCommands.Add(ApplicationCommands.Find, Execute, CanExecute);
 }
コード例 #24
0
 AllTabsMenuItemCommand(IDocumentTabService documentTabService, ISaveService saveService, ITabsVMSettings tabsVMSettings, IAppWindow appWindow, IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider)
     : base(documentTabService)
 {
     this.saveService         = saveService;
     this.tabsVMSettings      = tabsVMSettings;
     this.appWindow           = appWindow;
     classificationFormatMap  = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.UIMisc);
     this.textElementProvider = textElementProvider;
 }
コード例 #25
0
ファイル: SaveCommands.cs プロジェクト: formylover/dnSpy-1
 SaveCommandInit(ISaveService saveService, IAppWindow appWindow, IDocumentTabService documentTabService)
 {
     appWindow.MainWindowCommands.Add(ApplicationCommands.Save, (s, e) => saveService.Save(documentTabService.ActiveTab), (s, e) => e.CanExecute = saveService.CanSave(documentTabService.ActiveTab));
 }
コード例 #26
0
ファイル: Commands.cs プロジェクト: net10010/dnSpy
        UndoRedoCommmandLoader(IWpfCommandManager wpfCommandManager, Lazy <IUndoCommandManager> undoCommandManager, IAppWindow appWindow, IMessageBoxManager messageBoxManager)
        {
            this.undoCommandManager = undoCommandManager;
            this.messageBoxManager  = messageBoxManager;

            var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW);

            cmds.Add(UndoRoutedCommands.Undo, (s, e) => undoCommandManager.Value.Undo(), (s, e) => e.CanExecute = undoCommandManager.Value.CanUndo);
            cmds.Add(UndoRoutedCommands.Redo, (s, e) => undoCommandManager.Value.Redo(), (s, e) => e.CanExecute = undoCommandManager.Value.CanRedo);

            appWindow.MainWindowClosing += AppWindow_MainWindowClosing;
        }
コード例 #27
0
 LocalSettingsHexBoxCtxMenuCommand(IAppWindow appWindow)
 {
     this.appWindow = appWindow;
 }
コード例 #28
0
ファイル: Commands.cs プロジェクト: kulminati/dnSpy
 OpenListCommand(IAppWindow appWindow, IFileListLoader fileListLoader, FileListManager fileListManager, IMessageBoxManager messageBoxManager, IFileManager fileManager)
 {
     this.appWindow = appWindow;
     this.fileListLoader = fileListLoader;
     this.fileListManager = fileListManager;
     this.messageBoxManager = messageBoxManager;
     this.fileManager = fileManager;
 }
コード例 #29
0
ファイル: ViewCommands.cs プロジェクト: yueding/dnSpy
 FullScreenInit(IAppWindow appWindow, IFileTreeView fileTreeView)
 {
     var fullScreenCommand = new FullScreenCommand(appWindow);
     appWindow.MainWindowCommands.Add(MetroWindow.FullScreenCommand, (s, e) => fullScreenCommand.FullScreen(), (s, e) => e.CanExecute = true, ModifierKeys.Shift | ModifierKeys.Alt, Key.Enter);
     appWindow.MainWindowCommands.Add(CollapseUnusedNodesCommand, (s, e) => fileTreeView.TreeView.CollapseUnusedNodes(), (s, e) => e.CanExecute = true, ModifierKeys.Control | ModifierKeys.Shift, Key.W);
 }
コード例 #30
0
ファイル: AboutScreen.cs プロジェクト: zstreamer/dnSpy
 DecompileFileTabContentFactory(IAppWindow appWindow)
 {
     this.appWindow = appWindow;
 }
コード例 #31
0
 AboutScreenMenuItem(IDocumentViewerContentFactoryProvider documentViewerContentFactoryProvider, IDocumentTabService documentTabService, IAppWindow appWindow, IExtensionService extensionService, IContentTypeRegistryService contentTypeRegistryService)
 {
     this.documentViewerContentFactoryProvider = documentViewerContentFactoryProvider;
     this.documentTabService = documentTabService;
     this.appWindow          = appWindow;
     this.extensionService   = extensionService;
     aboutContentType        = contentTypeRegistryService.GetContentType(ContentTypes.AboutDnSpy);
 }
コード例 #32
0
ファイル: AboutScreen.cs プロジェクト: zstreamer/dnSpy
 AboutScreenMenuItem(IFileTabManager fileTabManager, IAppWindow appWindow)
 {
     this.fileTabManager = fileTabManager;
     this.appWindow      = appWindow;
 }
コード例 #33
0
 InMemoryModuleManager(ITheDebugger theDebugger, IFileTabManager fileTabManager, Lazy <IMethodAnnotations> methodAnnotations, IAppWindow appWindow)
 {
     this.fileTabManager                 = fileTabManager;
     this.fileTreeView                   = fileTabManager.FileTreeView;
     this.fileManager                    = this.fileTreeView.FileManager;
     this.appWindow                      = appWindow;
     this.methodAnnotations              = methodAnnotations;
     this.theDebugger                    = theDebugger;
     theDebugger.OnProcessStateChanged2 += TheDebugger_OnProcessStateChanged2;
 }
コード例 #34
0
 CodeCommand(Lazy <IUndoCommandManager> undoCommandManager, IAppWindow appWindow)
     : base(appWindow.FileTreeView)
 {
     this.undoCommandManager = undoCommandManager;
     this.appWindow          = appWindow;
 }
コード例 #35
0
ファイル: ModulesSaver.cs プロジェクト: youxiaotian/dnSpy
 ModulesSaver(IAppWindow appWindow, IMessageBoxService messageBoxService, IPickSaveFilename pickSaveFilename)
 {
     this.appWindow         = appWindow;
     this.messageBoxService = messageBoxService;
     this.pickSaveFilename  = pickSaveFilename;
 }
コード例 #36
0
 ExceptionsOperationsImpl(IAppWindow appWindow, IExceptionsVM exceptionsVM, Lazy <DbgExceptionSettingsService> dbgExceptionSettingsService)
 {
     this.appWindow    = appWindow;
     this.exceptionsVM = exceptionsVM;
     this.dbgExceptionSettingsService = dbgExceptionSettingsService;
 }
コード例 #37
0
ファイル: Commands.cs プロジェクト: azureidea/dnSpy-1
 WordWrapInit(IAppWindow appWindow, Lazy <IDocumentViewerOptionsService> documentViewerOptionsService)
 {
     this.documentViewerOptionsService = documentViewerOptionsService;
     appWindow.MainWindow.KeyDown     += MainWindow_KeyDown;
 }
コード例 #38
0
 AboutScreenMenuItem(IFileTabManager fileTabManager, IAppWindow appWindow, IPluginManager pluginManager)
 {
     this.fileTabManager = fileTabManager;
     this.appWindow      = appWindow;
     this.pluginManager  = pluginManager;
 }
コード例 #39
0
ファイル: Commands.cs プロジェクト: 0x53A/dnSpy
 FindInCodeInit(IAppWindow appWindow, IFileTabManager fileTabManager)
 {
     this.fileTabManager = fileTabManager;
     appWindow.MainWindowCommands.Add(ApplicationCommands.Find, Execute, CanExecute);
 }
コード例 #40
0
 AppSettingsService(IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider, IAppWindow appWindow, ITreeViewService treeViewService, ITreeViewNodeTextElementProvider treeViewNodeTextElementProvider, [ImportMany] IEnumerable <Lazy <IAppSettingsPageContainer, IAppSettingsPageContainerMetadata> > appSettingsPageContainers, [ImportMany] IEnumerable <Lazy <IAppSettingsPageProvider> > appSettingsPageProviders, [ImportMany] IEnumerable <Lazy <IAppSettingsModifiedListener, IAppSettingsModifiedListenerMetadata> > appSettingsModifiedListeners)
 {
     this.classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.OptionsDialog);
     this.textElementProvider     = textElementProvider;
     this.appWindow       = appWindow;
     this.treeViewService = treeViewService;
     this.treeViewNodeTextElementProvider = treeViewNodeTextElementProvider;
     this.appSettingsPageContainers       = appSettingsPageContainers.OrderBy(a => a.Metadata.Order).ToArray();
     this.appSettingsPageProviders        = appSettingsPageProviders.ToArray();
     this.appSettingsModifiedListeners    = appSettingsModifiedListeners.OrderBy(a => a.Metadata.Order).ToArray();
 }
コード例 #41
0
ファイル: AboutScreen.cs プロジェクト: n017/dnSpy
 public AboutScreenFileTabContent(IAppWindow appWindow, IPluginManager pluginManager)
 {
     this.appWindow = appWindow;
     this.pluginManager = pluginManager;
 }
コード例 #42
0
ファイル: ModuleCommands.cs プロジェクト: haise0/reAtomizer
 FilesCommand(Lazy <IUndoCommandManager> undoCommandManager, IAppWindow appWindow)
 {
     this.undoCommandManager = undoCommandManager;
     this.appWindow          = appWindow;
 }
コード例 #43
0
ファイル: Commands.cs プロジェクト: lovebanyi/dnSpy
 WordWrapInit(IAppWindow appWindow, TextEditorSettingsImpl textEditorSettings, IAppSettings appSettings, IMessageBoxManager messageBoxManager)
 {
     this.textEditorSettings = textEditorSettings;
     this.appSettings = appSettings;
     this.messageBoxManager = messageBoxManager;
     appWindow.MainWindowCommands.Add(WordWrap, (s, e) => ToggleWordWrap(), (s, e) => e.CanExecute = true, ModifierKeys.Control | ModifierKeys.Alt, Key.W);
 }
コード例 #44
0
ファイル: ModuleCommands.cs プロジェクト: haise0/reAtomizer
 EditMenuCommand(Lazy <IUndoCommandManager> undoCommandManager, Lazy <IDocumentSaver> documentSaver, IAppWindow appWindow)
     : base(appWindow.FileTreeView)
 {
     this.undoCommandManager = undoCommandManager;
     this.documentSaver      = documentSaver;
     this.appWindow          = appWindow;
 }
コード例 #45
0
 DecompileFileTabContentFactory(IAppWindow appWindow, IPluginManager pluginManager)
 {
     this.appWindow     = appWindow;
     this.pluginManager = pluginManager;
 }
コード例 #46
0
ファイル: Commands.cs プロジェクト: kulminati/dnSpy
 OpenFileInit(IFileTreeView fileTreeView, IAppWindow appWindow)
 {
     this.fileTreeView = fileTreeView;
     this.appWindow = appWindow;
     appWindow.MainWindowCommands.Add(ApplicationCommands.Open, (s, e) => { Open(); e.Handled = true; }, (s, e) => e.CanExecute = true);
 }
コード例 #47
0
ファイル: Commands.cs プロジェクト: manojdjoshi/dnSpy
		OpenListCommand(IAppWindow appWindow, IDocumentListLoader documentListLoader, DocumentListService documentListService, IMessageBoxService messageBoxService, IDsDocumentService documentService, IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider) {
			this.appWindow = appWindow;
			this.documentListLoader = documentListLoader;
			this.documentListService = documentListService;
			this.messageBoxService = messageBoxService;
			this.documentService = documentService;
			classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.UIMisc);
			this.textElementProvider = textElementProvider;
		}
コード例 #48
0
 ShowModuleLoaderServiceImpl(IAppWindow appWindow) => this.appWindow = appWindow;
コード例 #49
0
 OpenFileInit(IDocumentTreeView documentTreeView, IAppWindow appWindow)
 {
     this.documentTreeView = documentTreeView;
     this.appWindow        = appWindow;
     appWindow.MainWindowCommands.Add(ApplicationCommands.Open, (s, e) => { Open(); e.Handled = true; }, (s, e) => e.CanExecute = true);
 }
コード例 #50
0
 RefreshToolBarCommand(ITheDebugger theDebugger, IAppWindow appWindow)
 {
     this.theDebugger = theDebugger;
     this.appWindow   = appWindow;
     theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged;
 }
コード例 #51
0
ファイル: ModuleCommands.cs プロジェクト: haise0/reAtomizer
 FilesCommand(Lazy <IUndoCommandManager> undoCommandManager, Lazy <IDocumentSaver> documentSaver, IAppWindow appWindow)
 {
     this.undoCommandManager = undoCommandManager;
     this.documentSaver      = documentSaver;
     this.appWindow          = appWindow;
 }
コード例 #52
0
 public DisableAllBreakpointsDebugMainMenuCommand(Lazy <ITheDebugger> theDebugger, IAppWindow appWindow)
     : base(DebugRoutedCommands.DisableAllBreakpoints, theDebugger, null)
 {
     this.appWindow = appWindow;
 }
コード例 #53
0
ファイル: SaveCommands.cs プロジェクト: n017/dnSpy
 SaveCommandInit(ISaveManager saveManager, IAppWindow appWindow, IFileTabManager fileTabManager)
 {
     appWindow.MainWindowCommands.Add(ApplicationCommands.Save, (s, e) => saveManager.Save(fileTabManager.ActiveTab), (s, e) => e.CanExecute = saveManager.CanSave(fileTabManager.ActiveTab));
 }
コード例 #54
0
 Loader(IAppWindow appWindow)
 {
     initd = true;
 }
コード例 #55
0
ファイル: Commands.cs プロジェクト: kulminati/dnSpy
        OpenFromGacCommandLoader(IFileTreeView fileTreeView, IAppWindow appWindow, IWpfCommandManager wpfCommandManager)
        {
            this.fileTreeView = fileTreeView;
            this.appWindow = appWindow;

            var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW);
            cmds.Add(OpenFromGac, (s, e) => Execute(), (s, e) => e.CanExecute = true, ModifierKeys.Control | ModifierKeys.Shift, Key.O);
        }
コード例 #56
0
        public DiscordRpc(IOutputService outputService, IDocumentTabService tabService, IAppWindow appWindow, DbgManager dbgManager)
        {
            _appWindow = appWindow;
            StartTime  = DateTime.UtcNow;

            _presenceProviders = new IPresenceProvider[]
            {
                new DebuggerPresenceProvider(dbgManager),
                new TreeNodePresenceProvider(tabService),
                new CurrentTabPresenceProvider(tabService),
                new FallbackPresenceProvider(),
            };

            var outputPane = outputService.Create(Constants.LoggerOutputPaneGuid, "Discord RPC");

            _outputPaneLogger = new OutputPaneLogger(outputPane)
            {
                Level = LogLevel.Info,
            };

            UpdateTimer = new Timer(1000)
            {
                AutoReset = true
            };
            UpdateTimer.Elapsed += OnTimerTick;
            Client = new DiscordRpcClient(Constants.DiscordApplicationId, autoEvents: true)
            {
                SkipIdenticalPresence = true,
                Logger = _outputPaneLogger,
            };
            Client.OnReady += OnClientReady;

            Client.Initialize();
        }
コード例 #57
0
ファイル: Program.cs プロジェクト: gitter-badger/Grasshopper
 static Matrix4x4 CreateProjectionMatrix(IAppWindow window)
 {
     const float fieldOfView = 0.65f;
     const float nearPlane = 0.1f;
     const float farPlane = 1000f;
     var aspectRatio = (float)window.ClientWidth / window.ClientHeight;
     return Matrix4x4.CreatePerspectiveFieldOfView(fieldOfView, aspectRatio, nearPlane, farPlane);
 }
コード例 #58
0
        static void Execute(Lazy <IUndoCommandManager> undoCommandManager, Lazy <IDocumentSaver> documentSaver, IAppWindow appWindow, IFileTreeNodeData[] nodes)
        {
            if (!CanExecute(nodes))
            {
                return;
            }

            var modNode = (IModuleFileNode)nodes[0];

            if (!documentSaver.Value.AskUserToSaveIfModified(new[] { modNode.DnSpyFile }))
            {
                return;
            }

            undoCommandManager.Value.Add(new RemoveNetModuleFromAssemblyCommand(undoCommandManager, modNode));
        }
コード例 #59
0
ファイル: ViewCommands.cs プロジェクト: yueding/dnSpy
 public FullScreenCommand(IAppWindow appWindow)
     : base(MetroWindow.FullScreenCommand)
 {
     this.window = (MetroWindow)appWindow.MainWindow;
 }
コード例 #60
0
 public AboutScreenDocumentTabContent(IDocumentViewerContentFactoryProvider documentViewerContentFactoryProvider, IAppWindow appWindow, IExtensionService extensionService, IContentType aboutContentType)
 {
     this.documentViewerContentFactoryProvider = documentViewerContentFactoryProvider;
     this.appWindow        = appWindow;
     this.extensionService = extensionService;
     this.aboutContentType = aboutContentType;
 }