diff --git a/BizHawk.MultiClient/tools/RamWatch.cs b/BizHawk.MultiClient/tools/RamWatch.cs index a7c735b183..c737cea949 100644 --- a/BizHawk.MultiClient/tools/RamWatch.cs +++ b/BizHawk.MultiClient/tools/RamWatch.cs @@ -88,8 +88,7 @@ namespace BizHawk.MultiClient WatchListView.BlazingFast = true; WatchListView.Refresh(); WatchListView.BlazingFast = false; - - + WatchCountLabel.Text = watchList.Count.ToString() + " watches"; } public void AddWatch(Watch w) @@ -307,7 +306,6 @@ namespace BizHawk.MultiClient } changes = false; MessageLabel.Text = Path.GetFileNameWithoutExtension(path); - WatchCountLabel.Text = watchList.Count.ToString() + " watches"; Global.Config.RecentWatches.Add(path); SetMemoryDomain(WatchCommon.GetDomainPos(domain)); return true; diff --git a/BizHawk.MultiClient/tools/Watch.cs b/BizHawk.MultiClient/tools/Watch.cs index 13e4ceb8e4..3d3484e00b 100644 --- a/BizHawk.MultiClient/tools/Watch.cs +++ b/BizHawk.MultiClient/tools/Watch.cs @@ -338,6 +338,22 @@ namespace BizHawk.MultiClient return ValToString(lastsearch); } + private int ComparePrevious(Watch Other, string previous) + { + switch (previous) + { + case "Last Search": + return CompareLastSearch(Other); + case "Original": + return CompareOriginal(Other); + default: + case "Last Frame": + return ComparePrev(Other); + case "Last Change": + return CompareLastChange(Other); + } + } + private int CompareAddress(Watch Other) { if (this.address < Other.address) @@ -479,22 +495,7 @@ namespace BizHawk.MultiClient compare = CompareChanges(Other); if (compare == 0) { - switch (previous) - { - case "Last Search": - compare = CompareLastSearch(Other); - break; - case "Original": - compare = CompareOriginal(Other); - break; - default: - case "Last Frame": - compare = ComparePrev(Other); - break; - case "Last Change": - compare = CompareLastChange(Other); - break; - } + compare = ComparePrevious(Other, previous); if (compare == 0) compare = CompareNotes(Other); } @@ -513,22 +514,7 @@ namespace BizHawk.MultiClient compare = CompareChanges(Other); if (compare == 0) { - switch (previous) - { - case "Last Search": - compare = CompareLastSearch(Other); - break; - case "Original": - compare = CompareOriginal(Other); - break; - default: - case "Last Frame": - compare = ComparePrev(Other); - break; - case "Last Change": - compare = CompareLastChange(Other); - break; - } + compare = ComparePrevious(Other, previous); if (compare == 0) compare = CompareNotes(Other); } @@ -538,22 +524,7 @@ namespace BizHawk.MultiClient else if (parameter == "Prev") { - switch (previous) - { - case "Last Search": - compare = CompareLastSearch(Other); - break; - case "Original": - compare = CompareOriginal(Other); - break; - default: - case "Last Frame": - compare = ComparePrev(Other); - break; - case "Last Change": - compare = CompareLastChange(Other); - break; - } + compare = ComparePrevious(Other, previous); if (compare == 0) { compare = CompareAddress(Other); @@ -581,22 +552,7 @@ namespace BizHawk.MultiClient compare = CompareValue(Other); if (compare == 0) { - switch (previous) - { - case "Last Search": - compare = CompareLastSearch(Other); - break; - case "Original": - compare = CompareOriginal(Other); - break; - default: - case "Last Frame": - compare = ComparePrev(Other); - break; - case "Last Change": - compare = CompareLastChange(Other); - break; - } + compare = ComparePrevious(Other, previous); if (compare == 0) compare = CompareNotes(Other); } @@ -617,19 +573,7 @@ namespace BizHawk.MultiClient { compare = CompareChanges(Other); if (compare == 0) - switch (previous) - { - case "Last Search": - compare = CompareLastSearch(Other); - break; - case "Original": - compare = CompareOriginal(Other); - break; - case "Last Frame": - default: - compare = ComparePrev(Other); - break; - } + compare = ComparePrevious(Other, previous); } } }