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; }
HexBoxDocumentTabContentCreator(Lazy <IHexDocumentService> hexDocumentService, IMenuService menuService, IHexEditorSettings hexEditorSettings, IAppSettings appSettings, Lazy <IHexBoxUndoService> hexBoxUndoService) { this.hexDocumentService = hexDocumentService; this.menuService = menuService; this.hexEditorSettings = hexEditorSettings; this.appSettings = appSettings; this.hexBoxUndoService = hexBoxUndoService; }
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 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 HexBoxDocumentTabContent(HexDocument hexDocument, IMenuService menuService, IHexEditorSettings hexEditorSettings, IAppSettings appSettings, Lazy <IHexBoxUndoService> hexBoxUndoService) { if (hexDocument == null) { throw new ArgumentNullException(nameof(hexDocument)); } this.hexDocument = hexDocument; this.menuService = menuService; this.hexEditorSettings = hexEditorSettings; this.appSettings = appSettings; this.hexBoxUndoService = hexBoxUndoService; }
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; }
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)); } }
MemoryToolWindowContentProvider(IWpfCommandService wpfCommandService, IMenuService menuService, IHexEditorSettings hexEditorSettings, Lazy <ITheDebugger> theDebugger, IAppSettings appSettings) { this.wpfCommandService = wpfCommandService; this.menuService = menuService; 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 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 HexBoxDocumentTabUIContext(HexDocument hexDocument, IMenuService menuService, IHexEditorSettings hexEditorSettings, IAppSettings appSettings, IHexBoxUndoService hexBoxUndoService) { this.hexDocument = hexDocument; this.dnHexBox = new DnHexBox(menuService, hexEditorSettings); this.dnHexBox.Document = this.hexDocument; this.dnHexBox.InitializeStartEndOffsetToDocument(); this.scrollViewer = new ScrollViewer { Content = this.dnHexBox, CanContentScroll = true, HorizontalScrollBarVisibility = ScrollBarVisibility.Auto, VerticalScrollBarVisibility = ScrollBarVisibility.Auto, Focusable = false, }; this.appSettings = appSettings; this.hexBoxUndoService = hexBoxUndoService; appSettings.PropertyChanged += AppSettings_PropertyChanged; UpdateHexBoxRenderer(appSettings.UseNewRenderer_HexEditor); hexBoxUndoService.Initialize(this.dnHexBox); }
LowerCaseHexHexBoxCtxMenuCommand(IHexEditorSettings hexEditorSettings) { this.hexEditorSettings = hexEditorSettings; }
UseHexPrefixHexBoxCtxMenuCommand(IHexEditorSettings hexEditorSettings) { this.hexEditorSettings = hexEditorSettings; }
public HexBoxFileTabUIContext(HexDocument hexDocument, IMenuManager menuManager, IHexEditorSettings hexEditorSettings, IAppSettings appSettings, IHexBoxUndoManager hexBoxUndoManager) { this.hexDocument = hexDocument; this.dnHexBox = new DnHexBox(menuManager, hexEditorSettings); this.dnHexBox.Document = this.hexDocument; this.dnHexBox.InitializeStartEndOffsetToDocument(); this.scrollViewer = new ScrollViewer { Content = this.dnHexBox, CanContentScroll = true, HorizontalScrollBarVisibility = ScrollBarVisibility.Auto, VerticalScrollBarVisibility = ScrollBarVisibility.Auto, Focusable = false, }; this.appSettings = appSettings; this.hexBoxUndoManager = hexBoxUndoManager; appSettings.PropertyChanged += AppSettings_PropertyChanged; UpdateHexBoxRenderer(appSettings.UseNewRenderer_HexEditor); hexBoxUndoManager.Initialize(this.dnHexBox); }
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, nameof(vmMemory.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); }
ShowAsciiHexBoxCtxMenuCommand(IHexEditorSettings hexEditorSettings) { this.hexEditorSettings = hexEditorSettings; }