Ram Watch - clear and update on screen drawing better
This commit is contained in:
parent
901e9f2ceb
commit
9f2ea48d2b
|
@ -897,7 +897,7 @@
|
|||
this.WatchListView.UseCustomBackground = true;
|
||||
this.WatchListView.ColumnClick += new BizHawk.Client.EmuHawk.InputRoll.ColumnClickEventHandler(this.WatchListView_ColumnClick);
|
||||
this.WatchListView.SelectedIndexChanged += new System.EventHandler(this.WatchListView_SelectedIndexChanged);
|
||||
this.WatchListView.DragDrop += new System.Windows.Forms.DragEventHandler(this.NewRamWatch_DragDrop);
|
||||
this.WatchListView.DragDrop += new System.Windows.Forms.DragEventHandler(this.RamWatch_DragDrop);
|
||||
this.WatchListView.DragEnter += new System.Windows.Forms.DragEventHandler(this.DragEnterWrapper);
|
||||
this.WatchListView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.WatchListView_KeyDown);
|
||||
this.WatchListView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.WatchListView_MouseDoubleClick);
|
||||
|
@ -916,11 +916,11 @@
|
|||
this.Name = "RamWatch";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = " RAM Watch";
|
||||
this.Activated += new System.EventHandler(this.NewRamWatch_Activated);
|
||||
this.Load += new System.EventHandler(this.NewRamWatch_Load);
|
||||
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.NewRamWatch_DragDrop);
|
||||
this.Activated += new System.EventHandler(this.RamWatch_Activated);
|
||||
this.Load += new System.EventHandler(this.RamWatch_Load);
|
||||
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.RamWatch_DragDrop);
|
||||
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.DragEnterWrapper);
|
||||
this.Enter += new System.EventHandler(this.NewRamWatch_Enter);
|
||||
this.Enter += new System.EventHandler(this.RamWatch_Enter);
|
||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.WatchListView_KeyDown);
|
||||
this.ListViewContextMenu.ResumeLayout(false);
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
|
|
|
@ -168,6 +168,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
Global.Config.RecentWatches.Add(path);
|
||||
WatchListView.RowCount = _watches.Count;
|
||||
UpdateWatchCount();
|
||||
UpdateValues();
|
||||
UpdateStatusBar();
|
||||
_watches.Changes = false;
|
||||
}
|
||||
|
@ -191,7 +192,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
UpdateWatchCount();
|
||||
Global.Config.RecentWatches.Add(_watches.CurrentFileName);
|
||||
UpdateStatusBar();
|
||||
|
||||
UpdateValues();
|
||||
PokeAddressToolBarItem.Enabled =
|
||||
FreezeAddressToolBarItem.Enabled =
|
||||
SelectedIndices.Any() &&
|
||||
|
@ -214,6 +215,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
_watches.RefreshDomains(MemoryDomains);
|
||||
_watches.Reload();
|
||||
UpdateValues();
|
||||
UpdateStatusBar();
|
||||
}
|
||||
else
|
||||
|
@ -239,6 +241,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
return;
|
||||
}
|
||||
|
||||
GlobalWin.OSD.ClearGUIText();
|
||||
if (_watches.Any())
|
||||
{
|
||||
_watches.UpdateValues();
|
||||
|
@ -520,6 +523,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
_watches.Clear();
|
||||
WatchListView.RowCount = _watches.Count;
|
||||
UpdateValues();
|
||||
UpdateWatchCount();
|
||||
UpdateStatusBar();
|
||||
_sortReverse = false;
|
||||
|
@ -1076,7 +1080,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
#region Dialog, Context Menu, and ListView Events
|
||||
|
||||
private void NewRamWatch_Load(object sender, EventArgs e)
|
||||
private void RamWatch_Load(object sender, EventArgs e)
|
||||
{
|
||||
// Hack for previous config settings
|
||||
if (Settings.Columns.Any(c => string.IsNullOrWhiteSpace(c.Text)))
|
||||
|
@ -1089,7 +1093,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
LoadConfigSettings();
|
||||
RamWatchMenu.Items.Add(WatchListView.ToColumnsMenu(ColumnToggleCallback));
|
||||
UpdateStatusBar();
|
||||
|
||||
PokeAddressToolBarItem.Enabled =
|
||||
FreezeAddressToolBarItem.Enabled =
|
||||
SelectedIndices.Any() &&
|
||||
|
@ -1101,12 +1104,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
Settings.Columns = WatchListView.AllColumns;
|
||||
}
|
||||
|
||||
private void NewRamWatch_Activated(object sender, EventArgs e)
|
||||
private void RamWatch_Activated(object sender, EventArgs e)
|
||||
{
|
||||
WatchListView.Refresh();
|
||||
}
|
||||
|
||||
private void NewRamWatch_DragDrop(object sender, DragEventArgs e)
|
||||
private void RamWatch_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
var filePaths = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
if (Path.GetExtension(filePaths[0]) == ".wch")
|
||||
|
@ -1114,10 +1117,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
_watches.Load(filePaths[0], append: false);
|
||||
Global.Config.RecentWatches.Add(_watches.CurrentFileName);
|
||||
WatchListView.RowCount = _watches.Count;
|
||||
UpdateValues();
|
||||
}
|
||||
}
|
||||
|
||||
private void NewRamWatch_Enter(object sender, EventArgs e)
|
||||
private void RamWatch_Enter(object sender, EventArgs e)
|
||||
{
|
||||
WatchListView.Focus();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue