WordWrapInit(IAppWindow appWindow, IEditorOptionsFactoryService editorOptionsFactoryService, IAppSettings appSettings, IMessageBoxManager messageBoxManager) { this.editorOptions = editorOptionsFactoryService.GlobalOptions; this.appSettings = appSettings; this.messageBoxManager = messageBoxManager; appWindow.MainWindow.KeyDown += MainWindow_KeyDown; }
BamlTabSaver(IFileTab tab, BamlResourceElementNode bamlNode, IDocumentViewer documentViewer, IMessageBoxManager messageBoxManager) { this.tab = tab; this.bamlNode = bamlNode; this.documentViewer = documentViewer; this.messageBoxManager = messageBoxManager; }
public ShellViewModel( IMessageBoxManager messageBoxManager, IWellDataImporter wellDataImporter, IWellProvider wellProvider, ITankProvider tankProvider, IWindowManager windowManager, IFactory <AddWellViewModel> wellViewModelFactory, IAutoUpdater autoUpdater) { _messageBoxManager = messageBoxManager; _wellDataImporter = wellDataImporter; _wellProvider = wellProvider; _tankProvider = tankProvider; _windowManager = windowManager; _wellViewModelFactory = wellViewModelFactory; _autoUpdater = autoUpdater; WellItems = new BindableCollection <WellModel>(); TankItems = new BindableCollection <TankModel>(); MessageQueue = new SnackbarMessageQueue(TimeSpan.FromSeconds(2)) { IgnoreDuplicate = true }; _propertyObserver = new PropertyObserver <ShellViewModel>(this); _propertyObserver.OnChangeOf(x => x.SelectedWell).Do((vm) => LoadTanks(vm.SelectedWell).ConfigureAwait(false)); }
BamlTabSaver(IFileTab tab, BamlResourceElementNode bamlNode, ITextEditorUIContext uiContext, IMessageBoxManager messageBoxManager) { this.tab = tab; this.bamlNode = bamlNode; this.uiContext = uiContext; this.messageBoxManager = messageBoxManager; }
public SearchService(IWpfTextView wpfTextView, ITextSearchService2 textSearchService2, ISearchSettings searchSettings, IMessageBoxManager messageBoxManager, ITextStructureNavigator textStructureNavigator, Lazy<IReplaceListenerProvider>[] replaceListenerProviders) { if (wpfTextView == null) throw new ArgumentNullException(nameof(wpfTextView)); if (textSearchService2 == null) throw new ArgumentNullException(nameof(textSearchService2)); if (searchSettings == null) throw new ArgumentNullException(nameof(searchSettings)); if (messageBoxManager == null) throw new ArgumentNullException(nameof(messageBoxManager)); if (textStructureNavigator == null) throw new ArgumentNullException(nameof(textStructureNavigator)); if (replaceListenerProviders == null) throw new ArgumentNullException(nameof(replaceListenerProviders)); this.wpfTextView = wpfTextView; this.textSearchService2 = textSearchService2; this.searchSettings = searchSettings; this.messageBoxManager = messageBoxManager; this.textStructureNavigator = textStructureNavigator; this.replaceListenerProviders = replaceListenerProviders; this.listeners = new List<ITextMarkerListener>(); this.searchString = string.Empty; this.replaceString = string.Empty; this.searchKind = SearchKind.None; this.searchControlPosition = SearchControlPosition.Default; wpfTextView.VisualElement.CommandBindings.Add(new CommandBinding(ApplicationCommands.Find, (s, e) => ShowFind())); wpfTextView.VisualElement.CommandBindings.Add(new CommandBinding(ApplicationCommands.Replace, (s, e) => ShowReplace())); wpfTextView.Closed += WpfTextView_Closed; UseGlobalSettings(true); }
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); }
GoToCommand(IWpfCommandManager wpfCommandManager, IFileTabManager fileTabManager, IMessageBoxManager messageBoxManager) { this.fileTabManager = fileTabManager; this.messageBoxManager = messageBoxManager; var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_TEXTEDITOR_UICONTEXT); cmds.Add(GoToRoutedCommand, Execute, CanExecute, ModifierKeys.Control, Key.G); }
public static void OpenWebPage(string url, IMessageBoxManager messageBoxManager) { try { Process.Start(url); } catch { messageBoxManager.Show(dnSpy_Resources.CouldNotStartBrowser); } }
SearchServiceProvider(ITextSearchService2 textSearchService2, ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService, ISearchSettings searchSettings, IMessageBoxManager messageBoxManager, [ImportMany] IEnumerable <Lazy <IReplaceListenerProvider> > replaceListenerProviders) { this.textSearchService2 = textSearchService2; this.textStructureNavigatorSelectorService = textStructureNavigatorSelectorService; this.searchSettings = searchSettings; this.messageBoxManager = messageBoxManager; this.replaceListenerProviders = replaceListenerProviders.ToArray(); }
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; }
NodeTabSaver(IMessageBoxManager messageBoxManager, IFileTab tab, IFileTreeNodeDecompiler fileTreeNodeDecompiler, ILanguage language, ITextEditorUIContext uiContext, IFileTreeNodeData[] nodes) { this.messageBoxManager = messageBoxManager; this.tab = tab; this.fileTreeNodeDecompiler = fileTreeNodeDecompiler; this.language = language; this.uiContext = uiContext; this.nodes = nodes; }
NodeTabSaver(IMessageBoxManager messageBoxManager, IFileTab tab, IFileTreeNodeDecompiler fileTreeNodeDecompiler, IDecompiler decompiler, IDocumentViewer documentViewer, IFileTreeNodeData[] nodes) { this.messageBoxManager = messageBoxManager; this.tab = tab; this.fileTreeNodeDecompiler = fileTreeNodeDecompiler; this.decompiler = decompiler; this.documentViewer = documentViewer; this.nodes = nodes; }
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 ShellViewModel(IMessageBoxManager messageBoxManager, IWindowManager windowManager, IFileDialogManager fileDialogManager) { _fileDialogManager = fileDialogManager ?? new FileDialogManager(); _windowManager = windowManager ?? new WindowManager(); _messageBoxManager = messageBoxManager ?? new MessageBoxManager(); _tableSelectionObserver = Observable.FromEventPattern <PropertyChangedEventArgs>(this, "PropertyChanged") .Where(x => x.EventArgs.PropertyName == "TableSelection") .Throttle(TimeSpan.FromMilliseconds(750)) .Subscribe(x => Generate()); }
public ShellViewModel(IMessageBoxManager messageBoxManager, IWindowManager windowManager, IFileDialogManager fileDialogManager) { _fileDialogManager = fileDialogManager ?? new FileDialogManager(); _windowManager = windowManager ?? new WindowManager(); _messageBoxManager = messageBoxManager ?? new MessageBoxManager(); _tableSelectionObserver = Observable.FromEventPattern<PropertyChangedEventArgs>(this, "PropertyChanged") .Where(x => x.EventArgs.PropertyName == "TableSelection") .Throttle(TimeSpan.FromMilliseconds(750)) .Subscribe(x => Generate()); }
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 static BamlTabSaver TryCreate(IFileTab tab, IMessageBoxManager messageBoxManager) { var uiContext = tab.UIContext as ITextEditorUIContext; if (uiContext == null) return null; var nodes = tab.Content.Nodes.ToArray(); if (nodes.Length != 1) return null; var bamlNode = nodes[0] as BamlResourceElementNode; if (bamlNode == null) return null; return new BamlTabSaver(tab, bamlNode, uiContext, messageBoxManager); }
BreakpointManager(IFileTabManager fileTabManager, ITheDebugger theDebugger, IMessageBoxManager messageBoxManager, IModuleIdProvider moduleIdProvider, [ImportMany] IEnumerable <Lazy <IBreakpointListener> > breakpointListeners) { this.fileTabManager = fileTabManager; this.theDebugger = theDebugger; this.messageBoxManager = messageBoxManager; this.moduleIdProvider = moduleIdProvider; this.breakpointListeners = breakpointListeners.ToArray(); fileTabManager.FileCollectionChanged += FileTabManager_FileCollectionChanged; theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged; if (theDebugger.IsDebugging) { AddDebuggerBreakpoints(); } }
public void SetUp() { OnDialogShown = null; _showWindowInvoked = 0; _mockWindowManager = new Mock <IWindowManager>(MockBehavior.Strict); _mockWindowManager.Setup(m => m.ShowDialog(It.IsAny <MessageBoxViewModel>())) .Callback <object>(viewModel => { ++_showWindowInvoked; OnDialogShown?.Invoke(viewModel); }) .Returns(true); _messageBoxManager = new MessageBoxManager(_mockWindowManager.Object); }
public FolderExplorerViewModel(IMessageBus messageBus, IMessageBoxManager messageBoxManager) { _messageBus = messageBus; _messageBoxManager = messageBoxManager; Title = Resources.FolderExplorerTitle; Root = new ComputerViewModel(); RootSource = new ReadOnlyCollection <TreeNodeBase>(new[] { Root }); ReloadCommand = new Command(() => ReloadFolders()); CollapseAllCommand = new Command(() => Root.CollapseAll()); NewDirectoryCommand = new Command(() => NewNode(isDirectory: true), () => SelectedDirectory != null && CurrentInsertNode == null && CurrentRenameNode == null); NewFileCommand = new Command(() => NewNode(isDirectory: false), () => SelectedDirectory != null && CurrentInsertNode == null && CurrentRenameNode == null); ConfirmNewNodeCommand = new Command(() => ConfirmNewNode(), () => CurrentInsertNode != null); CancelNewNodeCommand = new Command(() => CancelNewNode(), () => CurrentInsertNode != null); RenameNodeCommand = new Command(() => RenameNode(), () => SelectedDirectory != null && CurrentInsertNode == null && CurrentRenameNode == null); ConfirmRenameNodeCommand = new Command(() => ConfirmRenameNode(), () => CurrentRenameNode != null); CancelRenameNodeCommand = new Command(() => CancelRenameNode(), () => CurrentRenameNode != null); DeleteNodeCommand = new Command(() => DeleteNode(), () => SelectedNode != null); ContextMenuItems.Add(new MenuItemViewModel() { Name = Resources.FolderExplorerRename, Command = RenameNodeCommand, }); ContextMenuItems.Add(new MenuItemViewModel() { Name = Resources.FolderExplorerDelete, Command = DeleteNodeCommand, }); ReloadFolders(); }
BreakpointManager(ITextLineObjectManager textLineObjectManager, IFileTabManager fileTabManager, ITheDebugger theDebugger, IMessageBoxManager messageBoxManager, ISerializedDnModuleCreator serializedDnModuleCreator) { this.textLineObjectManager = textLineObjectManager; this.fileTabManager = fileTabManager; this.theDebugger = theDebugger; this.messageBoxManager = messageBoxManager; this.serializedDnModuleCreator = serializedDnModuleCreator; textLineObjectManager.OnListModified += MarkedTextLinesManager_OnListModified; foreach (var bp in Breakpoints) { InitializeDebuggerBreakpoint(bp); } fileTabManager.FileCollectionChanged += FileTabManager_FileCollectionChanged; theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged; if (theDebugger.IsDebugging) { AddDebuggerBreakpoints(); } }
public UriMouseProcessor(IWpfTextView wpfTextView, IViewTagAggregatorFactoryService viewTagAggregatorFactoryService, IMessageBoxManager messageBoxManager) { if (wpfTextView == null) { throw new ArgumentNullException(nameof(wpfTextView)); } if (viewTagAggregatorFactoryService == null) { throw new ArgumentNullException(nameof(viewTagAggregatorFactoryService)); } if (messageBoxManager == null) { throw new ArgumentNullException(nameof(messageBoxManager)); } this.wpfTextView = wpfTextView; this.messageBoxManager = messageBoxManager; this.viewTagAggregatorFactoryService = viewTagAggregatorFactoryService; this.origCursor = wpfTextView.VisualElement.Cursor; wpfTextView.VisualElement.PreviewKeyDown += VisualElement_PreviewKeyDown; wpfTextView.VisualElement.PreviewKeyUp += VisualElement_PreviewKeyUp; wpfTextView.Closed += WpfTextView_Closed; }
public static BamlTabSaver TryCreate(IFileTab tab, IMessageBoxManager messageBoxManager) { var uiContext = tab.UIContext as IDocumentViewer; if (uiContext == null) { return(null); } var nodes = tab.Content.Nodes.ToArray(); if (nodes.Length != 1) { return(null); } var bamlNode = nodes[0] as BamlResourceElementNode; if (bamlNode == null) { return(null); } return(new BamlTabSaver(tab, bamlNode, uiContext, messageBoxManager)); }
SaveModuleToDiskModulesCtxMenuCommand(Lazy <ITheDebugger> theDebugger, Lazy <IModulesContent> modulesContent, IAppWindow appWindow, IMessageBoxManager messageBoxManager) : base(theDebugger, modulesContent) { this.appWindow = appWindow; this.messageBoxManager = messageBoxManager; }
OpenIssuesUrlCommand(IMessageBoxManager messageBoxManager) { this.messageBoxManager = messageBoxManager; }
OpenReleasesUrlCommand(IMessageBoxManager messageBoxManager) { this.messageBoxManager = messageBoxManager; }
DebugManager(IAppWindow appWindow, IFileTabManager fileTabManager, IMessageBoxManager messageBoxManager, IDebuggerSettings debuggerSettings, ITheDebugger theDebugger, IStackFrameManager stackFrameManager, Lazy<IModuleLoader> moduleLoader, Lazy<IInMemoryModuleManager> inMemoryModuleManager, ISerializedDnModuleCreator serializedDnModuleCreator) { this.appWindow = appWindow; this.fileTabManager = fileTabManager; this.messageBoxManager = messageBoxManager; this.debuggerSettings = debuggerSettings; this.theDebugger = theDebugger; this.stackFrameManager = stackFrameManager; this.moduleLoader = moduleLoader; this.inMemoryModuleManager = inMemoryModuleManager; this.serializedDnModuleCreator = serializedDnModuleCreator; stackFrameManager.PropertyChanged += StackFrameManager_PropertyChanged; theDebugger.ProcessRunning += TheDebugger_ProcessRunning; theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged; appWindow.MainWindowClosing += AppWindow_MainWindowClosing; debuggerSettings.PropertyChanged += DebuggerSettings_PropertyChanged; }
BamlTabSaverProvider(IMessageBoxManager messageBoxManager) { this.messageBoxManager = messageBoxManager; }
MessageBoxManagerLoader(IMessageBoxManager messageBoxManager) { MsgBox.Instance = messageBoxManager; }
NodeTabSaverProvider(IFileTreeNodeDecompiler fileTreeNodeDecompiler, IMessageBoxManager messageBoxManager) { this.fileTreeNodeDecompiler = fileTreeNodeDecompiler; this.messageBoxManager = messageBoxManager; }
WriteToSelectionSelectionHexBoxCtxMenuCommand(IMessageBoxManager messageBoxManager) { this.messageBoxManager = messageBoxManager; }
GetNewExceptionName(IMessageBoxManager messageBoxManager) { this.messageBoxManager = messageBoxManager; }
DeleteHistoryAsmEdCommand(Lazy<IUndoCommandManager> undoCommandManager, IMessageBoxManager messageBoxManager) { this.undoCommandManager = undoCommandManager; this.messageBoxManager = messageBoxManager; }
DeleteHistoryAsmEdCommand(Lazy <IUndoCommandManager> undoCommandManager, IMessageBoxManager messageBoxManager) { this.undoCommandManager = undoCommandManager; this.messageBoxManager = messageBoxManager; }
BreakpointManager(ITextLineObjectManager textLineObjectManager, IFileTabManager fileTabManager, ITheDebugger theDebugger, IMessageBoxManager messageBoxManager, ISerializedDnModuleCreator serializedDnModuleCreator) { this.textLineObjectManager = textLineObjectManager; this.fileTabManager = fileTabManager; this.theDebugger = theDebugger; this.messageBoxManager = messageBoxManager; this.serializedDnModuleCreator = serializedDnModuleCreator; textLineObjectManager.OnListModified += MarkedTextLinesManager_OnListModified; foreach (var bp in Breakpoints) InitializeDebuggerBreakpoint(bp); fileTabManager.FileCollectionChanged += FileTabManager_FileCollectionChanged; theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged; if (theDebugger.IsDebugging) AddDebuggerBreakpoints(); }
OpenWikiUrlCommand(IMessageBoxManager messageBoxManager) { this.messageBoxManager = messageBoxManager; }
public static NodeTabSaver TryCreate(IFileTreeNodeDecompiler fileTreeNodeDecompiler, IFileTab tab, IMessageBoxManager messageBoxManager) { if (tab.IsAsyncExecInProgress) { return(null); } var uiContext = tab.UIContext as IDocumentViewer; if (uiContext == null) { return(null); } var decompiler = (tab.Content as IDecompilerTabContent)?.Decompiler; if (decompiler == null) { return(null); } var nodes = tab.Content.Nodes.ToArray(); if (nodes.Length == 0) { return(null); } return(new NodeTabSaver(messageBoxManager, tab, fileTreeNodeDecompiler, decompiler, uiContext, nodes)); }
UndoRedoIFileListListener(Lazy<IUndoCommandManager> undoCommandManager, Lazy<IHexDocumentManager> hexDocumentManager, IMessageBoxManager messageBoxManager) { this.undoCommandManager = undoCommandManager; this.hexDocumentManager = hexDocumentManager; this.messageBoxManager = messageBoxManager; }
BamlTabSaverCreator(IMessageBoxManager messageBoxManager) { this.messageBoxManager = messageBoxManager; }
public DemoMenuProvider(IMessageBoxManager messageBoxManager) { _messageBoxManager = messageBoxManager; }
SaveDataLocalsCtxMenuCommand(Lazy <ITheDebugger> theDebugger, Lazy <ILocalsContent> localsContent, IMessageBoxManager messageBoxManager) : base(theDebugger, localsContent) { this.messageBoxManager = messageBoxManager; }
public static NodeTabSaver TryCreate(IFileTreeNodeDecompiler fileTreeNodeDecompiler, IFileTab tab, IMessageBoxManager messageBoxManager) { if (tab.IsAsyncExecInProgress) return null; var uiContext = tab.UIContext as ITextEditorUIContext; if (uiContext == null) return null; var langContent = tab.Content as ILanguageTabContent; var lang = langContent == null ? null : langContent.Language; if (lang == null) return null; var nodes = tab.Content.Nodes.ToArray(); if (nodes.Length == 0) return null; return new NodeTabSaver(messageBoxManager, tab, fileTreeNodeDecompiler, lang, uiContext, nodes); }
OpenSourceCodeUrlCommand(IMessageBoxManager messageBoxManager) { this.messageBoxManager = messageBoxManager; }
NodeTabSaverCreator(IFileTreeNodeDecompiler fileTreeNodeDecompiler, IMessageBoxManager messageBoxManager) { this.fileTreeNodeDecompiler = fileTreeNodeDecompiler; this.messageBoxManager = messageBoxManager; }
OpenLatestBuildUrlCommand(IMessageBoxManager messageBoxManager) { this.messageBoxManager = messageBoxManager; }