/// <summary> /// Scrolls the disassembly item with the specified address into view /// </summary> /// <param name="address"></param> public void ScrollToTop(ushort address) { address &= 0xFFF7; var sw = MemoryDumpListBox.GetScrollViewer(); sw?.ScrollToVerticalOffset(address / 16.0); }
public MemoryToolWindowControl() { InitializeComponent(); PreviewKeyDown += (s, e) => MemoryDumpListBox.HandleListViewKeyEvents(e); Prompt.CommandLineEntered += OnCommandLineEntered; Prompt.PreviewCommandLineInput += OnPreviewCommandLineInput; }
public MemoryToolWindowControl() { InitializeComponent(); PreviewKeyDown += (s, e) => MemoryDumpListBox.HandleListViewKeyEvents(e); PreviewKeyDown += (s, arg) => Vm.HandleDebugKeys(arg); Loaded += OnLoaded; Unloaded += OnUnloaded; Prompt.CommandLineEntered += OnCommandLineEntered; }
/// <summary> /// This method refreshes only those memory items that are visible in the /// current viewport /// </summary> private void RefreshVisibleItems() { var stack = MemoryDumpListBox.GetInnerStackPanel(); for (var i = 0; i < stack.Children.Count; i++) { if ((stack.Children[i] as FrameworkElement)?.DataContext is MemoryLineViewModel memLine) { Vm.RefreshItemIfItMayChange((ushort)memLine.BaseAddress); } } }