From f8b5055f53df07d6cbd8d9672b588984924dc246 Mon Sep 17 00:00:00 2001 From: "andres.delikat" Date: Sun, 20 Feb 2011 04:04:12 +0000 Subject: [PATCH] Ram Search - refix Undo, and implement clear change counts --- .../tools/RamSearch.Designer.cs | 4 +++- BizHawk.MultiClient/tools/RamSearch.cs | 18 ++++++++++++++++++ BizHawk.MultiClient/tools/RamSearch.resx | 6 +++--- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/BizHawk.MultiClient/tools/RamSearch.Designer.cs b/BizHawk.MultiClient/tools/RamSearch.Designer.cs index 1ff3d4d756..c444ba8d96 100644 --- a/BizHawk.MultiClient/tools/RamSearch.Designer.cs +++ b/BizHawk.MultiClient/tools/RamSearch.Designer.cs @@ -369,7 +369,7 @@ this.UndotoolStripButton}); this.toolStrip1.Location = new System.Drawing.Point(3, 25); this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Size = new System.Drawing.Size(102, 25); + this.toolStrip1.Size = new System.Drawing.Size(133, 25); this.toolStrip1.TabIndex = 1; // // NewSearchtoolStripButton @@ -401,6 +401,7 @@ this.ClearChangeCountstoolStripButton.Size = new System.Drawing.Size(23, 22); this.ClearChangeCountstoolStripButton.Text = "C"; this.ClearChangeCountstoolStripButton.ToolTipText = "Clear Change Counts"; + this.ClearChangeCountstoolStripButton.Click += new System.EventHandler(this.ClearChangeCountstoolStripButton_Click); // // UndotoolStripButton // @@ -410,6 +411,7 @@ this.UndotoolStripButton.Name = "UndotoolStripButton"; this.UndotoolStripButton.Size = new System.Drawing.Size(23, 22); this.UndotoolStripButton.Text = "Undo Search"; + this.UndotoolStripButton.Click += new System.EventHandler(this.UndotoolStripButton_Click_1); // // toolStrip2 // diff --git a/BizHawk.MultiClient/tools/RamSearch.cs b/BizHawk.MultiClient/tools/RamSearch.cs index fdf7e92c2b..9828e38553 100644 --- a/BizHawk.MultiClient/tools/RamSearch.cs +++ b/BizHawk.MultiClient/tools/RamSearch.cs @@ -356,5 +356,23 @@ namespace BizHawk.MultiClient { imageIndex = -1; } + + private void ClearChangeCounts() + { + SaveUndo(); + for (int x = 0; x < searchList.Count; x++) + searchList[x].changecount = 0; + DisplaySearchList(); + } + + private void ClearChangeCountstoolStripButton_Click(object sender, EventArgs e) + { + ClearChangeCounts(); + } + + private void UndotoolStripButton_Click_1(object sender, EventArgs e) + { + DoUndo(); + } } } diff --git a/BizHawk.MultiClient/tools/RamSearch.resx b/BizHawk.MultiClient/tools/RamSearch.resx index 5597b9c11f..70c8b2fa77 100644 --- a/BizHawk.MultiClient/tools/RamSearch.resx +++ b/BizHawk.MultiClient/tools/RamSearch.resx @@ -171,9 +171,6 @@ 259, 17 - - 358, 17 - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 @@ -205,6 +202,9 @@ s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC + + 358, 17 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8