public MemoryContent(IWpfCommandService wpfCommandService, IMemoryVM memoryVM, HexEditorGroupFactoryService hexEditorGroupFactoryService) { vmMemory = memoryVM; memoryVM.UnderlyingStreamChanged += MemoryVM_UnderlyingStreamChanged; hexViewHost = hexEditorGroupFactoryService.Create(memoryVM.Buffer, PredefinedHexViewRoles.HexEditorGroup, PredefinedHexViewRoles.HexEditorGroupDebuggerMemory, new Guid(MenuConstants.GUIDOBJ_DEBUGGER_MEMORY_HEXVIEW_GUID)); memoryControl = new MemoryControl(hexViewHost.HostControl); memoryControl.DataContext = vmMemory; wpfCommandService.Add(ControlConstants.GUID_DEBUGGER_MEMORY_CONTROL, memoryControl); wpfCommandService.Add(ControlConstants.GUID_DEBUGGER_MEMORY_WPFHEXVIEWHOST, hexViewHost.HostControl); }
public MemoryContent(IWpfCommandService wpfCommandService, IMemoryVM memoryVM, ProcessHexBufferProvider processHexBufferProvider, HexEditorGroupFactoryService hexEditorGroupFactoryService) { this.memoryVM = memoryVM; hexBufferInfo = processHexBufferProvider.CreateBuffer(); hexBufferInfo.UnderlyingStreamChanged += HexBufferInfo_UnderlyingStreamChanged; hexViewHost = hexEditorGroupFactoryService.Create(hexBufferInfo.Buffer, PredefinedHexViewRoles.HexEditorGroup, PredefinedHexViewRoles.HexEditorGroupDebuggerMemory, new Guid(MenuConstants.GUIDOBJ_DEBUGGER_MEMORY_HEXVIEW_GUID)); memoryControl = new MemoryControl(hexViewHost.HostControl); memoryControl.DataContext = memoryVM; wpfCommandService.Add(ControlConstants.GUID_DEBUGGER_MEMORY_CONTROL, memoryControl); wpfCommandService.Add(ControlConstants.GUID_DEBUGGER_MEMORY_WPFHEXVIEWHOST, hexViewHost.HostControl); }
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 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); }