public MainMenuController(IMenuRepository repository, IUnitOfWork unitOfWork, IMenuManager manager) { _repository = repository; _unitOfWork = unitOfWork; _repository.UnitOfWork = unitOfWork; _manager = manager; }
//---------------------------------------------------------------------- public clsXWCommandPopup(IMenuManager _manager) : base(_manager) { TitleLabel = new Label(Screen, "", Anchor.Start); TitleLabel.Font = Screen.Style.MediumFont; TitleLabel.AnchoredRect = AnchoredRect.CreateTopAnchored(0, 0, 0, Screen.Style.DefaultButtonHeight); AddChild(TitleLabel); { ContentGroup = new Group(Screen); ContentGroup.AnchoredRect = AnchoredRect.CreateFull(0, 60, 0, 80); AddChild(ContentGroup); MessageLabel = new Label(Screen, "MessageLabel", Anchor.Start); MessageLabel.WrapText = true; MessageLabel.Font = Screen.Style.SmallFont; // Actions mActionsGroup = new BoxGroup(Screen, Orientation.Horizontal, 0, Anchor.End); mActionsGroup.AnchoredRect = AnchoredRect.CreateBottomAnchored(0, 0, 0, Screen.Style.DefaultButtonHeight); AddChild(mActionsGroup); // Close / Cancel mCloseButton = new Button(Screen, NuclearWinter.i18n.Common.Close); mCloseButton.ClickHandler = delegate { Dismiss(); }; mCloseButton.BindPadButton(Buttons.A); //*/ } }
public DnHexBox(IMenuManager menuManager, IHexEditorSettings hexEditorSettings) { this.hexEditorSettings = hexEditorSettings; SetBinding(Control.FontFamilyProperty, new Binding("FontFamily") { Source = hexEditorSettings }); SetBinding(Control.FontSizeProperty, new Binding("FontSize") { Source = hexEditorSettings }); SetResourceReference(Control.BackgroundProperty, HexBoxThemeHelper.GetBackgroundResourceKey(ColorType.HexText)); SetResourceReference(Control.ForegroundProperty, HexBoxThemeHelper.GetForegroundResourceKey(ColorType.HexText)); SetResourceReference(HexBox.OffsetForegroundProperty, HexBoxThemeHelper.GetForegroundResourceKey(ColorType.HexOffset)); SetResourceReference(HexBox.Byte0ForegroundProperty, HexBoxThemeHelper.GetForegroundResourceKey(ColorType.HexByte0)); SetResourceReference(HexBox.Byte1ForegroundProperty, HexBoxThemeHelper.GetForegroundResourceKey(ColorType.HexByte1)); SetResourceReference(HexBox.ByteErrorForegroundProperty, HexBoxThemeHelper.GetForegroundResourceKey(ColorType.HexByteError)); SetResourceReference(HexBox.AsciiForegroundProperty, HexBoxThemeHelper.GetForegroundResourceKey(ColorType.HexAscii)); SetResourceReference(HexBox.CaretForegroundProperty, HexBoxThemeHelper.GetBackgroundResourceKey(ColorType.HexCaret)); SetResourceReference(HexBox.InactiveCaretForegroundProperty, HexBoxThemeHelper.GetBackgroundResourceKey(ColorType.HexInactiveCaret)); SetResourceReference(HexBox.SelectionBackgroundProperty, HexBoxThemeHelper.GetBackgroundResourceKey(ColorType.HexSelection)); SetResourceReference(Control.FontStyleProperty, HexBoxThemeHelper.GetFontStyleResourceKey(ColorType.HexText)); SetResourceReference(Control.FontWeightProperty, HexBoxThemeHelper.GetFontWeightResourceKey(ColorType.HexText)); menuManager.InitializeContextMenu(this, MenuConstants.GUIDOBJ_HEXBOX_GUID, null, new ContextMenuInitializer()); BytesGroupCount = null; BytesPerLine = null; UseHexPrefix = null; ShowAscii = null; LowerCaseHex = null; AsciiEncoding = null; InstallBindings(); }
HexBoxFileTabContentCreator(Lazy<IHexDocumentManager> hexDocumentManager, IMenuManager menuManager, IHexEditorSettings hexEditorSettings, IAppSettings appSettings, Lazy<IHexBoxUndoManager> hexBoxUndoManager) { this.hexDocumentManager = hexDocumentManager; this.menuManager = menuManager; this.hexEditorSettings = hexEditorSettings; this.appSettings = appSettings; this.hexBoxUndoManager = hexBoxUndoManager; }
public TabManager(IThemeManager themeManager, IMenuManager menuManager, IWpfFocusManager wpfFocusManager) { themeManager.ThemeChanged += ThemeManager_ThemeChanged; this.menuManager = menuManager; this.wpfFocusManager = wpfFocusManager; this.tabGroupManagers = new List<TabGroupManager>(); this.selectedIndex = -1; }
public MenuController(IMenuManager menuManager, ICategoryManager categoryManager, IManager<Ingredient> ingredientManager, IDataManager<Restaurant> restaurantManager) { _menuManager = menuManager; _categoryManager = categoryManager; _ingredientManager = ingredientManager; _restaurantManager = restaurantManager; }
public HexBoxFileTabContent(HexDocument hexDocument, IMenuManager menuManager, IHexEditorSettings hexEditorSettings, IAppSettings appSettings, Lazy<IHexBoxUndoManager> hexBoxUndoManager) { if (hexDocument == null) throw new ArgumentNullException(); this.hexDocument = hexDocument; this.menuManager = menuManager; this.hexEditorSettings = hexEditorSettings; this.appSettings = appSettings; this.hexBoxUndoManager = hexBoxUndoManager; }
public CustomersViewModel(IMenuManager menuManger, IDockWindowManager windowManager) { DisplayName = "Customers"; //setup the menu menuManger.WithParent("Customer") .ShowItem(new ShowCustomerAction(windowManager)) .WithScopeOf(this) .ShowItem(new AddCustomerAction()); }
static MenuManager() { if (ExcelDnaUtil.SafeIsExcelVersionPre15) { _menuManager = new ExcelPre15MenuManager(); } else { _menuManager = new Excel15MenuManager(); } }
public TabGroupManager(TabManager tabManager, IMenuManager menuManager, IWpfFocusManager wpfFocusManager, TabGroupManagerOptions options) { this.options = (options ?? new TabGroupManagerOptions()).Clone(); this.stackedContent = new StackedContent<TabGroup>(); this.tabSelectionChanged = new WeakEventList<TabSelectedEventArgs>(); this.tabGroupSelectionChanged = new WeakEventList<TabGroupSelectedEventArgs>(); this.tabGroupCollectionChanged = new WeakEventList<TabGroupCollectionChangedEventArgs>(); this.tabManager = tabManager; this.menuManager = menuManager; this.wpfFocusManager = wpfFocusManager; this._activeIndex = -1; }
MemoryToolWindowContentCreator(IWpfCommandManager wpfCommandManager, IThemeManager themeManager, IMenuManager menuManager, IHexEditorSettings hexEditorSettings, Lazy<ITheDebugger> theDebugger, IAppSettings appSettings) { this.wpfCommandManager = wpfCommandManager; this.themeManager = themeManager; this.menuManager = menuManager; this.hexEditorSettings = hexEditorSettings; this.theDebugger = theDebugger; this.appSettings = appSettings; this.contents = new TWContent[MemoryWindowsHelper.NUMBER_OF_MEMORY_WINDOWS]; for (int i = 0; i < this.contents.Length; i++) { var tmpIndex = i; this.contents[i] = new TWContent(i, () => CreateContent(tmpIndex)); } }
public void SetUp() { windowManager = MockRepository.GenerateStub<IWindowManager>(); windowManager.Stub(wm => wm.Register(Arg<string>.Is.Anything, Arg<Action>.Is.Anything, Arg<Location>.Is.Anything)) .Do((Action<string, Action, Location>)((i, a, l) => a())); menuManager = MockRepository.GenerateStub<IMenuManager>(); windowManager.Stub(wm => wm.MenuManager).Return(menuManager); var executionLogController = MockRepository.GenerateStub<IExecutionLogController>(); var optionsController = MockRepository.GenerateStub<IOptionsController>(); executionLogPackage = new ExecutionLogPackage(windowManager, executionLogController, optionsController); }
public void SetUp() { windowManager = TestWindowManager.Create(); menuManager = MockRepository.GenerateStub<IMenuManager>(); windowManager.Stub(wm => wm.MenuManager).Return(menuManager); menuManager.Stub(mm => mm.Add(Arg<string>.Is.Anything, Arg<Func<MenuCommand>>.Is.Anything)) .Do((Action<string, Func<MenuCommand>>)((m, f) => menuCommand = f())); var testExplorerController = MockRepository.GenerateStub<ITestExplorerController>(); var testExplorerModel = MockRepository.GenerateStub<ITestExplorerModel>(); package = new TestExplorerPackage(windowManager, testExplorerController, testExplorerModel); }
public void SetUp() { windowManager = MockRepository.GenerateStub<IWindowManager>(); windowManager.Stub(wm => wm.Register(Arg<string>.Is.Anything, Arg<Action>.Is.Anything, Arg<Location>.Is.Anything)) .Do((Action<string, Action, Location>)((i, a, l) => a())); menuManager = MockRepository.GenerateStub<IMenuManager>(); windowManager.Stub(wm => wm.MenuManager).Return(menuManager); menuManager.Stub(mm => mm.Add(Arg<string>.Is.Anything, Arg<Func<MenuCommand>>.Is.Anything)) .Do((Action<string, Func<MenuCommand>>)((m, f) => menuCommand = f())); var runtimeLogController = MockRepository.GenerateStub<IRuntimeLogController>(); runtimeLogPackage = new RuntimeLogPackage(windowManager, runtimeLogController); }
public TabGroup(TabGroupManager tabGroupManager, IMenuManager menuManager, IWpfFocusManager wpfFocusManager, TabGroupManagerOptions options) { this.options = options; this.tabContentAttached = new WeakEventList<TabContentAttachedEventArgs>(); this.tabGroupManager = tabGroupManager; this.wpfFocusManager = wpfFocusManager; this.tabControl = new TabControl(); this.tabControl.DataContext = this; tabControl.SetStyle(options.TabControlStyle ?? "FileTabGroupTabControlStyle"); this.tabControl.SelectionChanged += TabControl_SelectionChanged; if (options.InitializeContextMenu != null) this.contextMenuCreator = options.InitializeContextMenu(menuManager, this, this.tabControl); else if (options.TabGroupGuid != Guid.Empty) this.contextMenuCreator = menuManager.InitializeContextMenu(this.tabControl, options.TabGroupGuid, new GuidObjectsCreator(this)); }
FileTreeViewCreator(IThemeManager themeManager, ITreeViewManager treeViewManager, ILanguageManager languageManager, IFileManagerCreator fileManagerCreator, IFileTreeViewSettings fileTreeViewSettings, IMenuManager menuManager, IDotNetImageManager dotNetImageManager, IWpfCommandManager wpfCommandManager, IResourceNodeFactory resourceNodeFactory, IAppSettings appSettings, [ImportMany] IEnumerable<Lazy<IDnSpyFileNodeCreator, IDnSpyFileNodeCreatorMetadata>> dnSpyFileNodeCreators, [ImportMany] IEnumerable<Lazy<IFileTreeNodeDataFinder, IFileTreeNodeDataFinderMetadata>> mefFinders) { this.themeManager = themeManager; this.treeViewManager = treeViewManager; this.languageManager = languageManager; this.fileManagerCreator = fileManagerCreator; this.fileTreeViewSettings = fileTreeViewSettings; this.menuManager = menuManager; this.dotNetImageManager = dotNetImageManager; this.wpfCommandManager = wpfCommandManager; this.resourceNodeFactory = resourceNodeFactory; this.appSettings = appSettings; this.dnSpyFileNodeCreators = dnSpyFileNodeCreators.ToArray(); this.mefFinders = mefFinders.ToArray(); }
public void SetUp() { windowManager = MockRepository.GenerateStub<IWindowManager>(); windowManager.Stub(wm => wm.Register(Arg<string>.Is.Anything, Arg<Action>.Is.Anything, Arg<Location>.Is.Anything)) .Do((Action<string, Action, Location>)((i, a, l) => a())); menuManager = MockRepository.GenerateStub<IMenuManager>(); windowManager.Stub(wm => wm.MenuManager).Return(menuManager); annotationsController = MockRepository.GenerateStub<IAnnotationsController>(); sourceCodeController = MockRepository.GenerateStub<ISourceCodeController>(); annotationsPackage = new AnnotationsPackage(windowManager, annotationsController, sourceCodeController); }
public void SetUp() { windowManager = TestWindowManager.Create(); menuManager = MockRepository.GenerateStub<IMenuManager>(); windowManager.Stub(wm => wm.MenuManager).Return(menuManager); menuManager.Stub(mm => mm.Add(Arg<string>.Is.Anything, Arg<Common.Func<MenuCommand>>.Is.Anything)) .Do((Common.Action<string, Common.Func<MenuCommand>>)((m, f) => menuCommand = f())); var testResultsController = MockRepository.GenerateStub<ITestResultsController>(); var optionsController = MockRepository.GenerateStub<IOptionsController>(); var testTreeModel = MockRepository.GenerateStub<ITestTreeModel>(); var testStatistics = new TestStatistics(); package = new TestResultsPackage(windowManager, testResultsController, optionsController, testTreeModel, testStatistics); }
public void SetUp() { windowManager = TestWindowManager.Create(); menuManager = MockRepository.GenerateStub<IMenuManager>(); windowManager.Stub(wm => wm.MenuManager).Return(menuManager); menuManager.Stub(mm => mm.Add(Arg<string>.Is.Anything, Arg<Func<MenuCommand>>.Is.Anything)) .Do((Action<string, Func<MenuCommand>>)((m, f) => menuCommand = f())); var projectController = MockRepository.GenerateStub<IProjectController>(); var reportController = MockRepository.GenerateStub<IReportController>(); var taskManager = MockRepository.GenerateStub<ITaskManager>(); var commandFactory = MockRepository.GenerateStub<ICommandFactory>(); package = new ProjectExplorerPackage(windowManager, projectController, reportController, taskManager, commandFactory); }
public void SetUp() { windowManager = MockRepository.GenerateStub<IWindowManager>(); windowManager.Stub(wm => wm.Register(Arg<string>.Is.Anything, Arg<Action>.Is.Anything)) .Do((Action<string, Action>)((i, a) => a())); menuManager = MockRepository.GenerateStub<IMenuManager>(); windowManager.Stub(wm => wm.MenuManager).Return(menuManager); filterController = MockRepository.GenerateStub<IFilterController>(); projectController = MockRepository.GenerateStub<IProjectController>(); projectController.Stub(pc => pc.TestFilters).Return(new Observable<IList<FilterInfo>>(new List<FilterInfo>())); filtersPackage = new FiltersPackage(windowManager, filterController, projectController); }
public MemoryContent(IWpfCommandManager wpfCommandManager, IThemeManager themeManager, IMenuManager menuManager, IHexEditorSettings hexEditorSettings, IMemoryVM memoryVM, IAppSettings appSettings) { this.memoryControl = new MemoryControl(); this.vmMemory = memoryVM; this.vmMemory.SetRefreshLines(() => this.memoryControl.DnHexBox.RedrawModifiedLines()); this.memoryControl.DataContext = this.vmMemory; var dnHexBox = new DnHexBox(menuManager, hexEditorSettings) { CacheLineBytes = true, IsMemory = true, }; dnHexBox.SetBinding(HexBox.DocumentProperty, "HexDocument"); this.memoryControl.DnHexBox = dnHexBox; dnHexBox.StartOffset = 0; dnHexBox.EndOffset = IntPtr.Size == 4 ? uint.MaxValue : ulong.MaxValue; appSettings.PropertyChanged += AppSettings_PropertyChanged; UpdateHexBoxRenderer(appSettings.UseNewRenderer_HexEditor); wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_MEMORY_CONTROL, memoryControl); wpfCommandManager.Add(CommandConstants.GUID_DEBUGGER_MEMORY_HEXBOX, memoryControl.DnHexBox); }
public ReplEditorUI(ReplEditorOptions options, IThemeManager themeManager, IWpfCommandManager wpfCommandManager, IMenuManager menuManager, ITextEditorSettings textEditorSettings) { this.dispatcher = Dispatcher.CurrentDispatcher; this.options = (options ?? new ReplEditorOptions()).Clone(); this.textEditor = new NewTextEditor(themeManager, textEditorSettings); this.textEditor.TextArea.AllowDrop = false; this.textEditor.TextArea.Document = new TextDocument(); this.textEditor.TextArea.Document.UndoStack.SizeLimit = 100; this.textEditor.TextArea.LeftMargins.Insert(0, new FrameworkElement { Margin = new Thickness(LEFT_MARGIN, 0, 0, 0) }); this.textEditor.TextArea.TextEntering += TextArea_TextEntering; this.textEditor.TextArea.PreviewKeyDown += TextArea_PreviewKeyDown; AddBinding(ApplicationCommands.Paste, (s, e) => Paste(), (s, e) => e.CanExecute = CanPaste && IsAtEditingPosition); AddBinding(ApplicationCommands.Cut, (s, e) => CutSelection(), (s, e) => e.CanExecute = CanCutSelection && IsAtEditingPosition); if (this.options.TextEditorCommandGuid != null) wpfCommandManager.Add(this.options.TextEditorCommandGuid.Value, textEditor); if (this.options.TextAreaCommandGuid != null) wpfCommandManager.Add(this.options.TextAreaCommandGuid.Value, textEditor.TextArea); if (this.options.MenuGuid != null) menuManager.InitializeContextMenu(this.textEditor, this.options.MenuGuid.Value, new GuidObjectsCreator(this), new ContextMenuInitializer(textEditor, textEditor)); }
public PlatformManager(IMenuManager menuManager, IThreadManager threadManager, ILogger logger, IDependencyResolver resolver) { _menuManager = menuManager; _threadManager = threadManager; _resolver = resolver; _logger = logger; var systems = _menuManager.Systems; // populate platforms when system change systems.Changed .Skip(1) .ObserveOn(Scheduler.Default) .Subscribe(UpdatePlatforms); // populate platform when games change systems.Changed .ObserveOn(Scheduler.Default) .SelectMany(_ => systems .Select(system => system.Games.Changed.Select(__ => system)) .Merge()) .Subscribe(UpdatePlatform); }
ReplEditorCreator(IThemeManager themeManager, IWpfCommandManager wpfCommandManager, IMenuManager menuManager, ITextEditorSettings textEditorSettings) { this.themeManager = themeManager; this.wpfCommandManager = wpfCommandManager; this.menuManager = menuManager; this.textEditorSettings = textEditorSettings; }
public VenueMenuItemsController() { _menuManager = new MenuManager(); }
TabManagerCreator(IThemeManager themeManager, IMenuManager menuManager, IWpfFocusManager wpfFocusManager) { this.themeManager = themeManager; this.menuManager = menuManager; this.wpfFocusManager = wpfFocusManager; }
/// <summary> /// Create a new instance of the main menu presenter. This should /// only be called by the UI Module itself. /// </summary> /// <param name="uiModule">The parent UI module.</param> /// <param name="commandConsole">The command console of the engine</param> /// <param name="configContainer">The config container.</param> public MainMenuPresenter(IMenuManager uiModule, ICommandConsole commandConsole, IConfigContainer configContainer) : base(uiModule, commandConsole, configContainer) { }
MainMenuToolbarCommand(IMenuManager menuManager) { this.menuManager = menuManager; }
IconBarCommandManager(IMenuManager menuManager, ITextLineObjectManager textLineObjectManager, [ImportMany] IEnumerable<Lazy<IIconBarCommand>> iconBarCommands) { this.menuManager = menuManager; this.textLineObjectManager = textLineObjectManager; this.iconBarCommands = iconBarCommands.ToArray(); }
AnalyzerManager(IWpfCommandManager wpfCommandManager, IFileTabManager fileTabManager, ITreeViewManager treeViewManager, IMenuManager menuManager, IThemeManager themeManager, IAnalyzerSettings analyzerSettings, IDotNetImageManager dotNetImageManager, ILanguageManager languageManager, IFileManager fileManager) { this.fileTabManager = fileTabManager; this.context = new AnalyzerTreeNodeDataContext { DotNetImageManager = dotNetImageManager, Language = languageManager.SelectedLanguage, FileManager = fileManager, ShowToken = analyzerSettings.ShowToken, SingleClickExpandsChildren = analyzerSettings.SingleClickExpandsChildren, SyntaxHighlight = analyzerSettings.SyntaxHighlight, UseNewRenderer = analyzerSettings.UseNewRenderer, AnalyzerManager = this, }; var options = new TreeViewOptions { CanDragAndDrop = false, TreeViewListener = this, }; this.treeView = treeViewManager.Create(ANALYZER_TREEVIEW_GUID, options); fileManager.CollectionChanged += FileManager_CollectionChanged; fileTabManager.FileModified += FileTabManager_FileModified; languageManager.LanguageChanged += LanguageManager_LanguageChanged; themeManager.ThemeChanged += ThemeManager_ThemeChanged; analyzerSettings.PropertyChanged += AnalyzerSettings_PropertyChanged; menuManager.InitializeContextMenu((FrameworkElement)this.treeView.UIObject, new Guid(MenuConstants.GUIDOBJ_ANALYZER_TREEVIEW_GUID), new GuidObjectsCreator(this.treeView)); wpfCommandManager.Add(CommandConstants.GUID_ANALYZER_TREEVIEW, (UIElement)this.treeView.UIObject); var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_ANALYZER_TREEVIEW); var command = new RelayCommand(a => ActivateNode()); cmds.Add(command, ModifierKeys.Control, Key.Enter); cmds.Add(command, ModifierKeys.Shift, Key.Enter); }
public MainHeaderUserBarViewComponent(IMenuManager menuManager) { _menuManager = menuManager; }
TextEditorFactoryService(ITextBufferFactoryService textBufferFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, ICommandManager commandManager, ISmartIndentationService smartIndentationService, [ImportMany] IEnumerable <Lazy <IWpfTextViewCreationListener, IDeferrableContentTypeAndTextViewRoleMetadata> > wpfTextViewCreationListeners, IFormattedTextSourceFactoryService formattedTextSourceFactoryService, IViewClassifierAggregatorService viewClassifierAggregatorService, ITextAndAdornmentSequencerFactoryService textAndAdornmentSequencerFactoryService, IClassificationFormatMapService classificationFormatMapService, IEditorFormatMapService editorFormatMapService, IAdornmentLayerDefinitionService adornmentLayerDefinitionService, ILineTransformProviderService lineTransformProviderService, IWpfTextViewMarginProviderCollectionProvider wpfTextViewMarginProviderCollectionProvider, IMenuManager menuManager, IEditorOperationsFactoryService editorOperationsFactoryService) { this.textBufferFactoryService = textBufferFactoryService; this.editorOptionsFactoryService = editorOptionsFactoryService; this.commandManager = commandManager; this.smartIndentationService = smartIndentationService; this.wpfTextViewCreationListeners = wpfTextViewCreationListeners.ToArray(); this.formattedTextSourceFactoryService = formattedTextSourceFactoryService; this.viewClassifierAggregatorService = viewClassifierAggregatorService; this.textAndAdornmentSequencerFactoryService = textAndAdornmentSequencerFactoryService; this.classificationFormatMapService = classificationFormatMapService; this.editorFormatMapService = editorFormatMapService; this.adornmentLayerDefinitionService = adornmentLayerDefinitionService; this.lineTransformProviderService = lineTransformProviderService; this.wpfTextViewMarginProviderCollectionProvider = wpfTextViewMarginProviderCollectionProvider; this.menuManager = menuManager; this.editorOperationsFactoryService = editorOperationsFactoryService; }
AnalyzerManager(IWpfCommandManager wpfCommandManager, IFileTabManager fileTabManager, ITreeViewManager treeViewManager, IMenuManager menuManager, IThemeManager themeManager, IAnalyzerSettings analyzerSettings, IDotNetImageManager dotNetImageManager, ILanguageManager languageManager) { this.fileTabManager = fileTabManager; this.context = new AnalyzerTreeNodeDataContext { DotNetImageManager = dotNetImageManager, Language = languageManager.Language, FileManager = fileTabManager.FileTreeView.FileManager, ShowToken = analyzerSettings.ShowToken, SingleClickExpandsChildren = analyzerSettings.SingleClickExpandsChildren, SyntaxHighlight = analyzerSettings.SyntaxHighlight, UseNewRenderer = analyzerSettings.UseNewRenderer, AnalyzerManager = this, }; var options = new TreeViewOptions { CanDragAndDrop = false, TreeViewListener = this, }; this.TreeView = treeViewManager.Create(ANALYZER_TREEVIEW_GUID, options); fileTabManager.FileTreeView.FileManager.CollectionChanged += FileManager_CollectionChanged; fileTabManager.FileModified += FileTabManager_FileModified; languageManager.LanguageChanged += LanguageManager_LanguageChanged; themeManager.ThemeChanged += ThemeManager_ThemeChanged; analyzerSettings.PropertyChanged += AnalyzerSettings_PropertyChanged; menuManager.InitializeContextMenu((FrameworkElement)this.TreeView.UIObject, new Guid(MenuConstants.GUIDOBJ_ANALYZER_TREEVIEW_GUID), new GuidObjectsProvider(this.TreeView)); wpfCommandManager.Add(CommandConstants.GUID_ANALYZER_TREEVIEW, (UIElement)this.TreeView.UIObject); var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_ANALYZER_TREEVIEW); var command = new RelayCommand(a => ActivateNode()); cmds.Add(command, ModifierKeys.Control, Key.Enter); cmds.Add(command, ModifierKeys.Shift, Key.Enter); }
public Bootstrap([ImportMany] IEnumerable <IModule> modules, [Import] IMenuManager menu) { this.modules = modules; this.menu = menu; }
public MenuManager_Tests() { _menuManager = ServiceProvider.GetRequiredService <IMenuManager>(); }
public MenuViewComponent(IMenuManager menuManager) { _menuManager = menuManager; }
MemoryToolWindowContentCreator(IWpfCommandManager wpfCommandManager, IThemeManager themeManager, IMenuManager menuManager, IHexEditorSettings hexEditorSettings, Lazy <ITheDebugger> theDebugger, IAppSettings appSettings) { this.wpfCommandManager = wpfCommandManager; this.themeManager = themeManager; this.menuManager = menuManager; this.hexEditorSettings = hexEditorSettings; this.theDebugger = theDebugger; this.appSettings = appSettings; this.contents = new TWContent[MemoryWindowsHelper.NUMBER_OF_MEMORY_WINDOWS]; for (int i = 0; i < this.contents.Length; i++) { var tmpIndex = i; this.contents[i] = new TWContent(i, () => CreateContent(tmpIndex)); } }
public PageDeleted(IMenuManager menuManager) { _menuManager = menuManager; }
public LeftNavbarMenuViewComponent(IMenuManager menuManager) { _menuManager = menuManager; }
OutputManager(IEditorOperationsFactoryService editorOperationsFactoryService, ILogEditorProvider logEditorProvider, OutputManagerSettingsImpl outputManagerSettingsImpl, IPickSaveFilename pickSaveFilename, IMenuManager menuManager, [ImportMany] IEnumerable <Lazy <IOutputManagerListener, IOutputManagerListenerMetadata> > outputManagerListeners) { this.editorOperationsFactoryService = editorOperationsFactoryService; this.logEditorProvider = logEditorProvider; this.outputManagerSettingsImpl = outputManagerSettingsImpl; this.prevSelectedGuid = outputManagerSettingsImpl.SelectedGuid; this.pickSaveFilename = pickSaveFilename; this.menuManager = menuManager; this.outputBuffers = new ObservableCollection <OutputBufferVM>(); this.outputBuffers.CollectionChanged += OutputBuffers_CollectionChanged; var listeners = outputManagerListeners.OrderBy(a => a.Metadata.Order).ToArray(); Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Send, new Action(() => { foreach (var lazy in outputManagerListeners) { var l = lazy.Value; } })); }
public UserMenuViewComponent(IMenuManager menuManager) { MenuManager = menuManager; }
public RestaurantsController(IMenuManager menuManager, IMapper mapper, IRestaurantManager restaurantManager) { _menuManager = menuManager; _mapper = mapper; _restaurantManager = restaurantManager; }
public FavouriteEditorModule(IRegionManager regionManager, IMenuManager menuManager) { _regionManager = regionManager; _menuManager = menuManager; }
FileTreeView(IThemeManager themeManager, ITreeViewManager treeViewManager, ILanguageManager languageManager, IFileManager fileManager, IFileTreeViewSettings fileTreeViewSettings, IMenuManager menuManager, IDotNetImageManager dotNetImageManager, IWpfCommandManager wpfCommandManager, IResourceNodeFactory resourceNodeFactory, IAppSettings appSettings, [ImportMany] IEnumerable <Lazy <IDnSpyFileNodeProvider, IDnSpyFileNodeProviderMetadata> > dnSpyFileNodeProviders, [ImportMany] IEnumerable <Lazy <IFileTreeNodeDataFinder, IFileTreeNodeDataFinderMetadata> > mefFinders) : this(true, null, themeManager, treeViewManager, languageManager, fileManager, fileTreeViewSettings, menuManager, dotNetImageManager, wpfCommandManager, resourceNodeFactory, appSettings, dnSpyFileNodeProviders, mefFinders) { }
InitializeDataTemplateContextMenu(IMenuManager menuManager) { this.menuManager = menuManager; }
public FileTreeView(bool isGlobal, IFileTreeNodeFilter filter, IThemeManager themeManager, ITreeViewManager treeViewManager, ILanguageManager languageManager, IFileManager fileManager, IFileTreeViewSettings fileTreeViewSettings, IMenuManager menuManager, IDotNetImageManager dotNetImageManager, IWpfCommandManager wpfCommandManager, IResourceNodeFactory resourceNodeFactory, IAppSettings appSettings, [ImportMany] IEnumerable <Lazy <IDnSpyFileNodeProvider, IDnSpyFileNodeProviderMetadata> > dnSpyFileNodeProviders, [ImportMany] IEnumerable <Lazy <IFileTreeNodeDataFinder, IFileTreeNodeDataFinderMetadata> > mefFinders) { this.languageManager = languageManager; this.themeManager = themeManager; this.fileTreeViewSettings = fileTreeViewSettings; this.appSettings = appSettings; this.context = new FileTreeNodeDataContext(this, resourceNodeFactory, filter ?? FilterNothingFileTreeNodeFilter.Instance) { SyntaxHighlight = fileTreeViewSettings.SyntaxHighlight, SingleClickExpandsChildren = fileTreeViewSettings.SingleClickExpandsTreeViewChildren, ShowAssemblyVersion = fileTreeViewSettings.ShowAssemblyVersion, ShowAssemblyPublicKeyToken = fileTreeViewSettings.ShowAssemblyPublicKeyToken, ShowToken = fileTreeViewSettings.ShowToken, Language = languageManager.Language, UseNewRenderer = appSettings.UseNewRenderer_FileTreeView, DeserializeResources = fileTreeViewSettings.DeserializeResources, CanDragAndDrop = isGlobal, }; var options = new TreeViewOptions { AllowDrop = true, IsVirtualizing = true, VirtualizationMode = VirtualizationMode.Recycling, TreeViewListener = this, RootNode = new RootNode { DropNodes = OnDropNodes, DropFiles = OnDropFiles, }, }; this.fileTreeNodeGroups = new FileTreeNodeGroups(); this.dnSpyFileNodeProviders = dnSpyFileNodeProviders.OrderBy(a => a.Metadata.Order).ToArray(); this.TreeView = treeViewManager.Create(new Guid(TVConstants.FILE_TREEVIEW_GUID), options); this.TreeView.SelectionChanged += TreeView_SelectionChanged; this.FileManager = fileManager; this.DotNetImageManager = dotNetImageManager; this.dispatcher = Dispatcher.CurrentDispatcher; this.FileManager.SetDispatcher(AddAction); fileManager.CollectionChanged += FileManager_CollectionChanged; languageManager.LanguageChanged += LanguageManager_LanguageChanged; themeManager.ThemeChanged += ThemeManager_ThemeChanged; fileTreeViewSettings.PropertyChanged += FileTreeViewSettings_PropertyChanged; appSettings.PropertyChanged += AppSettings_PropertyChanged; this.WpfCommands = wpfCommandManager.GetCommands(ControlConstants.GUID_FILE_TREEVIEW); if (isGlobal) { menuManager.InitializeContextMenu((FrameworkElement)this.TreeView.UIObject, new Guid(MenuConstants.GUIDOBJ_FILES_TREEVIEW_GUID), new GuidObjectsProvider(this.TreeView)); wpfCommandManager.Add(ControlConstants.GUID_FILE_TREEVIEW, (UIElement)TreeView.UIObject); } this.nodeFinders = mefFinders.OrderBy(a => a.Metadata.Order).ToArray(); InitializeFileTreeNodeGroups(); }
public MenuAppService(IMenuManager menuManager, ILocalizationContext localizationContext) { _menuManager = menuManager; _localizationContext = localizationContext; }
public DocumentViewer(IWpfCommandManager wpfCommandManager, IDocumentViewerServiceImpl documentViewerServiceImpl, IMenuManager menuManager, DocumentViewerControl documentViewerControl) { if (wpfCommandManager == null) { throw new ArgumentNullException(nameof(wpfCommandManager)); } if (documentViewerServiceImpl == null) { throw new ArgumentNullException(nameof(documentViewerServiceImpl)); } if (menuManager == null) { throw new ArgumentNullException(nameof(menuManager)); } if (documentViewerControl == null) { throw new ArgumentNullException(nameof(documentViewerControl)); } this.wpfCommandManager = wpfCommandManager; this.documentViewerServiceImpl = documentViewerServiceImpl; this.documentViewerControl = documentViewerControl; menuManager.InitializeContextMenu(documentViewerControl.TextView.VisualElement, MenuConstants.GUIDOBJ_DOCUMENTVIEWERCONTROL_GUID, new GuidObjectsProvider(this), new ContextMenuInitializer(documentViewerControl.TextView)); // Prevent the tab control's context menu from popping up when right-clicking in the textview host margin menuManager.InitializeContextMenu(documentViewerControl, Guid.NewGuid()); wpfCommandManager.Add(ControlConstants.GUID_DOCUMENTVIEWER_UICONTEXT, documentViewerControl); documentViewerControl.TextView.Properties.AddProperty(typeof(DocumentViewer), this); documentViewerControl.TextView.TextBuffer.Properties.AddProperty(DocumentViewerExtensions.DocumentViewerTextBufferKey, this); }
SearchManager(IImageManager imageManager, ILanguageManager languageManager, IThemeManager themeManager, ISearchSettings searchSettings, IFileSearcherCreator fileSearcherCreator, IMenuManager menuManager, IWpfCommandManager wpfCommandManager, IFileTabManager fileTabManager) { this.fileTabManager = fileTabManager; this.searchControl = new SearchControl(); this.vmSearch = new SearchControlVM(imageManager, fileSearcherCreator, fileTabManager.FileTreeView, searchSettings) { Language = languageManager.Language, BackgroundType = BackgroundType.Search, }; this.searchControl.DataContext = this.vmSearch; menuManager.InitializeContextMenu(this.searchControl.ListBox, MenuConstants.GUIDOBJ_SEARCH_GUID, new GuidObjectsCreator()); wpfCommandManager.Add(CommandConstants.GUID_SEARCH_CONTROL, this.searchControl); wpfCommandManager.Add(CommandConstants.GUID_SEARCH_LISTBOX, this.searchControl.ListBox); languageManager.LanguageChanged += LanguageManager_LanguageChanged; themeManager.ThemeChanged += ThemeManager_ThemeChanged; searchSettings.PropertyChanged += SearchSettings_PropertyChanged; fileTabManager.FileTreeView.FileManager.CollectionChanged += FileManager_CollectionChanged; this.searchControl.SearchListBoxDoubleClick += (s, e) => FollowSelectedReference(); var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_SEARCH_LISTBOX); var command = new RelayCommand(a => FollowSelectedReference()); cmds.Add(command, ModifierKeys.None, Key.Enter); cmds.Add(command, ModifierKeys.Control, Key.Enter); cmds.Add(command, ModifierKeys.Shift, Key.Enter); Add(SearchType.TypeDef, Key.T); Add(SearchType.FieldDef, Key.F); Add(SearchType.MethodDef, Key.M); Add(SearchType.PropertyDef, Key.P); Add(SearchType.EventDef, Key.E); Add(SearchType.ParamDef, Key.J); Add(SearchType.Local, Key.I); Add(SearchType.ParamLocal, Key.N); Add(SearchType.Resource, Key.R); Add(SearchType.Member, Key.U); Add(SearchType.Any, Key.B); Add(SearchType.Literal, Key.L); Add(SearchLocation.AllFiles, Key.G); Add(SearchLocation.SelectedFiles, Key.S); Add(SearchLocation.AllFilesInSameDir, Key.D); Add(SearchLocation.SelectedType, Key.Q); }
public FileTreeView(bool isGlobal, IFileTreeNodeFilter filter, IThemeManager themeManager, ITreeViewManager treeViewManager, ILanguageManager languageManager, IFileManager fileManager, IFileTreeViewSettings fileTreeViewSettings, IMenuManager menuManager, IDotNetImageManager dotNetImageManager, IWpfCommandManager wpfCommandManager, IResourceNodeFactory resourceNodeFactory, IAppSettings appSettings, [ImportMany] IEnumerable <Lazy <IDnSpyFileNodeCreator, IDnSpyFileNodeCreatorMetadata> > dnSpyFileNodeCreators, [ImportMany] IEnumerable <Lazy <IFileTreeNodeDataFinder, IFileTreeNodeDataFinderMetadata> > mefFinders) { this.languageManager = languageManager; this.themeManager = themeManager; this.fileTreeViewSettings = fileTreeViewSettings; this.appSettings = appSettings; this.context = new FileTreeNodeDataContext(this, resourceNodeFactory, filter ?? FilterNothingFileTreeNodeFilter.Instance) { SyntaxHighlight = fileTreeViewSettings.SyntaxHighlight, SingleClickExpandsChildren = fileTreeViewSettings.SingleClickExpandsTreeViewChildren, ShowAssemblyVersion = fileTreeViewSettings.ShowAssemblyVersion, ShowAssemblyPublicKeyToken = fileTreeViewSettings.ShowAssemblyPublicKeyToken, ShowToken = fileTreeViewSettings.ShowToken, Language = languageManager.SelectedLanguage, UseNewRenderer = appSettings.UseNewRenderer_FileTreeView, DeserializeResources = fileTreeViewSettings.DeserializeResources, CanDragAndDrop = isGlobal, }; var options = new TreeViewOptions { AllowDrop = true, IsVirtualizing = true, VirtualizationMode = VirtualizationMode.Recycling, TreeViewListener = this, RootNode = new RootNode { DropNodes = OnDropNodes, DropFiles = OnDropFiles, }, }; this.fileTreeNodeGroups = new FileTreeNodeGroups(); this.dnSpyFileNodeCreators = dnSpyFileNodeCreators.OrderBy(a => a.Metadata.Order).ToArray(); this.treeView = treeViewManager.Create(new Guid(TVConstants.FILE_TREEVIEW_GUID), options); this.fileManager = fileManager; this.dotNetImageManager = dotNetImageManager; var dispatcher = Dispatcher.CurrentDispatcher; this.fileManager.SetDispatcher(a => { if (!dispatcher.HasShutdownFinished && !dispatcher.HasShutdownStarted) { bool callInvoke; lock (actionsToCall) { actionsToCall.Add(a); callInvoke = actionsToCall.Count == 1; } if (callInvoke) { // Always notify with a delay because adding stuff to the tree view could // cause some problems with the tree view or the list box it derives from. dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(CallActions)); } } }); fileManager.CollectionChanged += FileManager_CollectionChanged; languageManager.LanguageChanged += LanguageManager_LanguageChanged; themeManager.ThemeChanged += ThemeManager_ThemeChanged; fileTreeViewSettings.PropertyChanged += FileTreeViewSettings_PropertyChanged; appSettings.PropertyChanged += AppSettings_PropertyChanged; this.wpfCommands = wpfCommandManager.GetCommands(CommandConstants.GUID_FILE_TREEVIEW); if (isGlobal) { menuManager.InitializeContextMenu((FrameworkElement)this.treeView.UIObject, new Guid(MenuConstants.GUIDOBJ_FILES_TREEVIEW_GUID), new GuidObjectsCreator(this.treeView)); wpfCommandManager.Add(CommandConstants.GUID_FILE_TREEVIEW, (UIElement)treeView.UIObject); } this.nodeFinders = mefFinders.OrderBy(a => a.Metadata.Order).ToArray(); InitializeFileTreeNodeGroups(); }
public OperationDataController(IMenuManager menuManager) { _menuManager = menuManager; }
public SideBarViewComponent(IMenuManager menuManager) { _menuManager = menuManager; }
public WindowManager(IMenuManager menuManager) { MenuManager = menuManager; }
SearchManager(IImageManager imageManager, ILanguageManager languageManager, IThemeManager themeManager, ISearchSettings searchSettings, IFileSearcherCreator fileSearcherCreator, IMenuManager menuManager, IWpfCommandManager wpfCommandManager, IFileTabManager fileTabManager) { this.fileTabManager = fileTabManager; this.searchControl = new SearchControl(); this.vmSearch = new SearchControlVM(imageManager, fileSearcherCreator, fileTabManager.FileTreeView, searchSettings) { Language = languageManager.Language, BackgroundType = BackgroundType.Search, }; this.searchControl.DataContext = this.vmSearch; menuManager.InitializeContextMenu(this.searchControl.ListBox, MenuConstants.GUIDOBJ_SEARCH_GUID, new GuidObjectsCreator()); wpfCommandManager.Add(CommandConstants.GUID_SEARCH_CONTROL, this.searchControl); wpfCommandManager.Add(CommandConstants.GUID_SEARCH_LISTBOX, this.searchControl.ListBox); languageManager.LanguageChanged += LanguageManager_LanguageChanged; themeManager.ThemeChanged += ThemeManager_ThemeChanged; searchSettings.PropertyChanged += SearchSettings_PropertyChanged; fileTabManager.FileTreeView.FileManager.CollectionChanged += FileManager_CollectionChanged; this.searchControl.SearchListBoxDoubleClick += (s, e) => FollowSelectedReference(); var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_SEARCH_LISTBOX); var command = new RelayCommand(a => FollowSelectedReference()); cmds.Add(command, ModifierKeys.None, Key.Enter); cmds.Add(command, ModifierKeys.Control, Key.Enter); cmds.Add(command, ModifierKeys.Shift, Key.Enter); Add(SearchType.TypeDef, Key.T); Add(SearchType.FieldDef, Key.F); Add(SearchType.MethodDef, Key.M); Add(SearchType.PropertyDef, Key.P); Add(SearchType.EventDef, Key.E); Add(SearchType.ParamDef, Key.J); Add(SearchType.Local, Key.I); Add(SearchType.ParamLocal, Key.N); Add(SearchType.Resource, Key.R); Add(SearchType.Member, Key.U); Add(SearchType.Any, Key.B); Add(SearchType.Literal, Key.L); }
public MyMenuViewModelProvider(IMenuManager menuManager, IPageLayout pageLayout, IObjectMapper <AbpAspNetCoreMvcUiLeptonXLiteThemeModule> objectMapper) : base(menuManager, pageLayout, objectMapper) { }
public IndexModel(IMenuManager menuManager) { _menuManager = menuManager; }
public virtual void SetServiceProvider(IServiceProvider serviceProvider) { _serviceProvider = serviceProvider; _windowManager = (IWindowManager)serviceProvider.GetService(typeof(IWindowManager)); _projectBrowser = (IProjectBrowser)serviceProvider.GetService(typeof(IProjectBrowser)); _logView = (ILogView)serviceProvider.GetService(typeof(ILogView)); _menuManager = (IMenuManager)serviceProvider.GetService(typeof(IMenuManager)); _sidePanel.SetServiceProvider(_serviceProvider); }
public VenueMenuItemsController(IMenuManager menuManager) { _menuManager = menuManager; }
public OpenFirstMenuSystem(Contexts contexts) { _menuManager = contexts.game.menuManager.Value; }