Esempio n. 1
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);
		}
Esempio n. 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));
		}
Esempio n. 3
0
		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;
		}
Esempio n. 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;
		}
Esempio n. 5
0
		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();
		}
Esempio n. 6
0
 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));
 }
Esempio n. 7
0
 public MouseEvent(IAppWindow window, int wheelDelta, int x, int y)
 {
     Type = MouseEventType.Wheel;
     Window = window;
     WheelDelta = wheelDelta;
     X = x;
     Y = y;
 }
Esempio n. 8
0
 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;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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;
		}
Esempio n. 12
0
		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();
		}
Esempio n. 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();
		}
Esempio n. 14
0
		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;
		}
Esempio n. 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;
		}
Esempio n. 16
0
		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;
		}
Esempio n. 17
0
 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;
 }
Esempio n. 18
0
        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());
            }
        }
Esempio n. 19
0
 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;
             }
         }
     }
 }
Esempio n. 20
0
 public AboutScreenFileTabContent(IAppWindow appWindow, IPluginManager pluginManager)
 {
     this.appWindow     = appWindow;
     this.pluginManager = pluginManager;
 }
Esempio n. 21
0
 public AboutScreenFileTabContent(IAppWindow appWindow)
 {
     this.appWindow = appWindow;
 }
Esempio n. 22
0
 UIDispatcher(IAppWindow appWindow) => Dispatcher = appWindow.MainWindow.Dispatcher;
Esempio n. 23
0
 FindInCodeInit(IAppWindow appWindow, IFileTabManager fileTabManager)
 {
     this.fileTabManager = fileTabManager;
     appWindow.MainWindowCommands.Add(ApplicationCommands.Find, Execute, CanExecute);
 }
Esempio n. 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;
 }
Esempio n. 25
0
 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));
 }
Esempio n. 26
0
        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;
        }
Esempio n. 27
0
 LocalSettingsHexBoxCtxMenuCommand(IAppWindow appWindow)
 {
     this.appWindow = appWindow;
 }
Esempio n. 28
0
 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;
 }
Esempio n. 29
0
 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);
 }
Esempio n. 30
0
 DecompileFileTabContentFactory(IAppWindow appWindow)
 {
     this.appWindow = appWindow;
 }
Esempio n. 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);
 }
Esempio n. 32
0
 AboutScreenMenuItem(IFileTabManager fileTabManager, IAppWindow appWindow)
 {
     this.fileTabManager = fileTabManager;
     this.appWindow      = appWindow;
 }
Esempio n. 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;
 }
Esempio n. 34
0
 CodeCommand(Lazy <IUndoCommandManager> undoCommandManager, IAppWindow appWindow)
     : base(appWindow.FileTreeView)
 {
     this.undoCommandManager = undoCommandManager;
     this.appWindow          = appWindow;
 }
Esempio n. 35
0
 ModulesSaver(IAppWindow appWindow, IMessageBoxService messageBoxService, IPickSaveFilename pickSaveFilename)
 {
     this.appWindow         = appWindow;
     this.messageBoxService = messageBoxService;
     this.pickSaveFilename  = pickSaveFilename;
 }
Esempio n. 36
0
 ExceptionsOperationsImpl(IAppWindow appWindow, IExceptionsVM exceptionsVM, Lazy <DbgExceptionSettingsService> dbgExceptionSettingsService)
 {
     this.appWindow    = appWindow;
     this.exceptionsVM = exceptionsVM;
     this.dbgExceptionSettingsService = dbgExceptionSettingsService;
 }
Esempio n. 37
0
 WordWrapInit(IAppWindow appWindow, Lazy <IDocumentViewerOptionsService> documentViewerOptionsService)
 {
     this.documentViewerOptionsService = documentViewerOptionsService;
     appWindow.MainWindow.KeyDown     += MainWindow_KeyDown;
 }
Esempio n. 38
0
 AboutScreenMenuItem(IFileTabManager fileTabManager, IAppWindow appWindow, IPluginManager pluginManager)
 {
     this.fileTabManager = fileTabManager;
     this.appWindow      = appWindow;
     this.pluginManager  = pluginManager;
 }
Esempio n. 39
0
 FindInCodeInit(IAppWindow appWindow, IFileTabManager fileTabManager)
 {
     this.fileTabManager = fileTabManager;
     appWindow.MainWindowCommands.Add(ApplicationCommands.Find, Execute, CanExecute);
 }
Esempio n. 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();
 }
Esempio n. 41
0
 public AboutScreenFileTabContent(IAppWindow appWindow, IPluginManager pluginManager)
 {
     this.appWindow = appWindow;
     this.pluginManager = pluginManager;
 }
Esempio n. 42
0
 FilesCommand(Lazy <IUndoCommandManager> undoCommandManager, IAppWindow appWindow)
 {
     this.undoCommandManager = undoCommandManager;
     this.appWindow          = appWindow;
 }
Esempio n. 43
0
 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);
 }
Esempio n. 44
0
 EditMenuCommand(Lazy <IUndoCommandManager> undoCommandManager, Lazy <IDocumentSaver> documentSaver, IAppWindow appWindow)
     : base(appWindow.FileTreeView)
 {
     this.undoCommandManager = undoCommandManager;
     this.documentSaver      = documentSaver;
     this.appWindow          = appWindow;
 }
Esempio n. 45
0
 DecompileFileTabContentFactory(IAppWindow appWindow, IPluginManager pluginManager)
 {
     this.appWindow     = appWindow;
     this.pluginManager = pluginManager;
 }
Esempio n. 46
0
 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);
 }
Esempio n. 47
0
		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;
		}
Esempio n. 48
0
 ShowModuleLoaderServiceImpl(IAppWindow appWindow) => this.appWindow = appWindow;
Esempio n. 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);
 }
Esempio n. 50
0
 RefreshToolBarCommand(ITheDebugger theDebugger, IAppWindow appWindow)
 {
     this.theDebugger = theDebugger;
     this.appWindow   = appWindow;
     theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged;
 }
Esempio n. 51
0
 FilesCommand(Lazy <IUndoCommandManager> undoCommandManager, Lazy <IDocumentSaver> documentSaver, IAppWindow appWindow)
 {
     this.undoCommandManager = undoCommandManager;
     this.documentSaver      = documentSaver;
     this.appWindow          = appWindow;
 }
Esempio n. 52
0
 public DisableAllBreakpointsDebugMainMenuCommand(Lazy <ITheDebugger> theDebugger, IAppWindow appWindow)
     : base(DebugRoutedCommands.DisableAllBreakpoints, theDebugger, null)
 {
     this.appWindow = appWindow;
 }
Esempio n. 53
0
 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));
 }
Esempio n. 54
0
 Loader(IAppWindow appWindow)
 {
     initd = true;
 }
Esempio n. 55
0
        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);
        }
Esempio n. 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();
        }
Esempio n. 57
0
 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);
 }
Esempio n. 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));
        }
Esempio n. 59
0
 public FullScreenCommand(IAppWindow appWindow)
     : base(MetroWindow.FullScreenCommand)
 {
     this.window = (MetroWindow)appWindow.MainWindow;
 }
Esempio n. 60
0
 public AboutScreenDocumentTabContent(IDocumentViewerContentFactoryProvider documentViewerContentFactoryProvider, IAppWindow appWindow, IExtensionService extensionService, IContentType aboutContentType)
 {
     this.documentViewerContentFactoryProvider = documentViewerContentFactoryProvider;
     this.appWindow        = appWindow;
     this.extensionService = extensionService;
     this.aboutContentType = aboutContentType;
 }