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); }
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)); }
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; }
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; }
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(); }
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)); }
public MouseEvent(IAppWindow window, int wheelDelta, int x, int y) { Type = MouseEventType.Wheel; Window = window; WheelDelta = wheelDelta; X = x; Y = y; }
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; }
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; }
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; }
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; }
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(); }
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(); }
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; }
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; }
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; }
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; }
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()); } }
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; } } } }
public AboutScreenFileTabContent(IAppWindow appWindow, IPluginManager pluginManager) { this.appWindow = appWindow; this.pluginManager = pluginManager; }
public AboutScreenFileTabContent(IAppWindow appWindow) { this.appWindow = appWindow; }
UIDispatcher(IAppWindow appWindow) => Dispatcher = appWindow.MainWindow.Dispatcher;
FindInCodeInit(IAppWindow appWindow, IFileTabManager fileTabManager) { this.fileTabManager = fileTabManager; appWindow.MainWindowCommands.Add(ApplicationCommands.Find, Execute, CanExecute); }
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; }
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)); }
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; }
LocalSettingsHexBoxCtxMenuCommand(IAppWindow appWindow) { this.appWindow = appWindow; }
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; }
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); }
DecompileFileTabContentFactory(IAppWindow appWindow) { this.appWindow = appWindow; }
AboutScreenMenuItem(IFileTabManager fileTabManager, IAppWindow appWindow) { this.fileTabManager = fileTabManager; this.appWindow = appWindow; }
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; }
CodeCommand(Lazy <IUndoCommandManager> undoCommandManager, IAppWindow appWindow) : base(appWindow.FileTreeView) { this.undoCommandManager = undoCommandManager; this.appWindow = appWindow; }
ModulesSaver(IAppWindow appWindow, IMessageBoxService messageBoxService, IPickSaveFilename pickSaveFilename) { this.appWindow = appWindow; this.messageBoxService = messageBoxService; this.pickSaveFilename = pickSaveFilename; }
ExceptionsOperationsImpl(IAppWindow appWindow, IExceptionsVM exceptionsVM, Lazy <DbgExceptionSettingsService> dbgExceptionSettingsService) { this.appWindow = appWindow; this.exceptionsVM = exceptionsVM; this.dbgExceptionSettingsService = dbgExceptionSettingsService; }
WordWrapInit(IAppWindow appWindow, Lazy <IDocumentViewerOptionsService> documentViewerOptionsService) { this.documentViewerOptionsService = documentViewerOptionsService; appWindow.MainWindow.KeyDown += MainWindow_KeyDown; }
AboutScreenMenuItem(IFileTabManager fileTabManager, IAppWindow appWindow, IPluginManager pluginManager) { this.fileTabManager = fileTabManager; this.appWindow = appWindow; this.pluginManager = pluginManager; }
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(); }
FilesCommand(Lazy <IUndoCommandManager> undoCommandManager, IAppWindow appWindow) { this.undoCommandManager = undoCommandManager; this.appWindow = appWindow; }
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); }
EditMenuCommand(Lazy <IUndoCommandManager> undoCommandManager, Lazy <IDocumentSaver> documentSaver, IAppWindow appWindow) : base(appWindow.FileTreeView) { this.undoCommandManager = undoCommandManager; this.documentSaver = documentSaver; this.appWindow = appWindow; }
DecompileFileTabContentFactory(IAppWindow appWindow, IPluginManager pluginManager) { this.appWindow = appWindow; this.pluginManager = pluginManager; }
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); }
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; }
ShowModuleLoaderServiceImpl(IAppWindow appWindow) => this.appWindow = appWindow;
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); }
RefreshToolBarCommand(ITheDebugger theDebugger, IAppWindow appWindow) { this.theDebugger = theDebugger; this.appWindow = appWindow; theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged; }
FilesCommand(Lazy <IUndoCommandManager> undoCommandManager, Lazy <IDocumentSaver> documentSaver, IAppWindow appWindow) { this.undoCommandManager = undoCommandManager; this.documentSaver = documentSaver; this.appWindow = appWindow; }
public DisableAllBreakpointsDebugMainMenuCommand(Lazy <ITheDebugger> theDebugger, IAppWindow appWindow) : base(DebugRoutedCommands.DisableAllBreakpoints, theDebugger, null) { this.appWindow = appWindow; }
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)); }
Loader(IAppWindow appWindow) { initd = true; }
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); }
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(); }
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); }
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)); }
public FullScreenCommand(IAppWindow appWindow) : base(MetroWindow.FullScreenCommand) { this.window = (MetroWindow)appWindow.MainWindow; }
public AboutScreenDocumentTabContent(IDocumentViewerContentFactoryProvider documentViewerContentFactoryProvider, IAppWindow appWindow, IExtensionService extensionService, IContentType aboutContentType) { this.documentViewerContentFactoryProvider = documentViewerContentFactoryProvider; this.appWindow = appWindow; this.extensionService = extensionService; this.aboutContentType = aboutContentType; }