From 2c057a3d1f42514e164243c1f389b296de375071 Mon Sep 17 00:00:00 2001 From: "andres.delikat" Date: Sat, 20 Aug 2011 13:39:44 +0000 Subject: [PATCH] Ram Search - refresh listview on its focus event, only turn on blazing fast option if > 8 addresses (8 being semi-arbituary) --- BizHawk.MultiClient/tools/RamSearch.Designer.cs | 5 +++-- BizHawk.MultiClient/tools/RamSearch.cs | 11 +++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/BizHawk.MultiClient/tools/RamSearch.Designer.cs b/BizHawk.MultiClient/tools/RamSearch.Designer.cs index d3eacf4b3e..020bb2c2e5 100644 --- a/BizHawk.MultiClient/tools/RamSearch.Designer.cs +++ b/BizHawk.MultiClient/tools/RamSearch.Designer.cs @@ -297,6 +297,7 @@ this.SearchListView.UseCompatibleStateImageBehavior = false; this.SearchListView.View = System.Windows.Forms.View.Details; this.SearchListView.VirtualMode = true; + this.SearchListView.Enter += new System.EventHandler(this.SearchListView_Enter); this.SearchListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.SearchListView_ColumnClick); this.SearchListView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SearchListView_MouseDoubleClick); this.SearchListView.QueryItemBkColor += new BizHawk.QueryItemBkColorHandler(this.SearchListView_QueryItemBkColor); @@ -720,9 +721,9 @@ this.toolStripSeparator10, this.UndotoolStripButton, this.RedotoolStripButton2}); - this.toolStrip1.Location = new System.Drawing.Point(221, 33); + this.toolStrip1.Location = new System.Drawing.Point(252, 33); this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Size = new System.Drawing.Size(237, 25); + this.toolStrip1.Size = new System.Drawing.Size(206, 25); this.toolStrip1.TabIndex = 5; this.toolStrip1.TabStop = true; // diff --git a/BizHawk.MultiClient/tools/RamSearch.cs b/BizHawk.MultiClient/tools/RamSearch.cs index 841e11d7b8..256f15008b 100644 --- a/BizHawk.MultiClient/tools/RamSearch.cs +++ b/BizHawk.MultiClient/tools/RamSearch.cs @@ -70,10 +70,12 @@ namespace BizHawk.MultiClient public void UpdateValues() { - SearchListView.BlazingFast = true; + if (!this.IsHandleCreated || this.IsDisposed) return; + + if (searchList.Count > 8) + SearchListView.BlazingFast = true; sortReverse = false; sortedCol = ""; - if (!this.IsHandleCreated || this.IsDisposed) return; for (int x = 0; x < searchList.Count; x++) { searchList[x].prev = searchList[x].value; @@ -2147,5 +2149,10 @@ namespace BizHawk.MultiClient { AddToRamWatch(); } + + private void SearchListView_Enter(object sender, EventArgs e) + { + SearchListView.Refresh(); + } } }