-Refactored what zeromus wanted me to and nothing more.
-The number of watches in Ram Watch is now updated in UpdateValues instead of LoadWatchFile, meaning that it's updated every time items are added / removed. --Also noticed that separators count as watches. Filter these out and exclude them from the count, adelikat?
This commit is contained in:
parent
14b5a4204b
commit
376ffd3ba4
|
@ -88,8 +88,7 @@ namespace BizHawk.MultiClient
|
||||||
WatchListView.BlazingFast = true;
|
WatchListView.BlazingFast = true;
|
||||||
WatchListView.Refresh();
|
WatchListView.Refresh();
|
||||||
WatchListView.BlazingFast = false;
|
WatchListView.BlazingFast = false;
|
||||||
|
WatchCountLabel.Text = watchList.Count.ToString() + " watches";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddWatch(Watch w)
|
public void AddWatch(Watch w)
|
||||||
|
@ -307,7 +306,6 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
changes = false;
|
changes = false;
|
||||||
MessageLabel.Text = Path.GetFileNameWithoutExtension(path);
|
MessageLabel.Text = Path.GetFileNameWithoutExtension(path);
|
||||||
WatchCountLabel.Text = watchList.Count.ToString() + " watches";
|
|
||||||
Global.Config.RecentWatches.Add(path);
|
Global.Config.RecentWatches.Add(path);
|
||||||
SetMemoryDomain(WatchCommon.GetDomainPos(domain));
|
SetMemoryDomain(WatchCommon.GetDomainPos(domain));
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -338,6 +338,22 @@ namespace BizHawk.MultiClient
|
||||||
return ValToString(lastsearch);
|
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)
|
private int CompareAddress(Watch Other)
|
||||||
{
|
{
|
||||||
if (this.address < Other.address)
|
if (this.address < Other.address)
|
||||||
|
@ -479,22 +495,7 @@ namespace BizHawk.MultiClient
|
||||||
compare = CompareChanges(Other);
|
compare = CompareChanges(Other);
|
||||||
if (compare == 0)
|
if (compare == 0)
|
||||||
{
|
{
|
||||||
switch (previous)
|
compare = ComparePrevious(Other, 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;
|
|
||||||
}
|
|
||||||
if (compare == 0)
|
if (compare == 0)
|
||||||
compare = CompareNotes(Other);
|
compare = CompareNotes(Other);
|
||||||
}
|
}
|
||||||
|
@ -513,22 +514,7 @@ namespace BizHawk.MultiClient
|
||||||
compare = CompareChanges(Other);
|
compare = CompareChanges(Other);
|
||||||
if (compare == 0)
|
if (compare == 0)
|
||||||
{
|
{
|
||||||
switch (previous)
|
compare = ComparePrevious(Other, 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;
|
|
||||||
}
|
|
||||||
if (compare == 0)
|
if (compare == 0)
|
||||||
compare = CompareNotes(Other);
|
compare = CompareNotes(Other);
|
||||||
}
|
}
|
||||||
|
@ -538,22 +524,7 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
else if (parameter == "Prev")
|
else if (parameter == "Prev")
|
||||||
{
|
{
|
||||||
switch (previous)
|
compare = ComparePrevious(Other, 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;
|
|
||||||
}
|
|
||||||
if (compare == 0)
|
if (compare == 0)
|
||||||
{
|
{
|
||||||
compare = CompareAddress(Other);
|
compare = CompareAddress(Other);
|
||||||
|
@ -581,22 +552,7 @@ namespace BizHawk.MultiClient
|
||||||
compare = CompareValue(Other);
|
compare = CompareValue(Other);
|
||||||
if (compare == 0)
|
if (compare == 0)
|
||||||
{
|
{
|
||||||
switch (previous)
|
compare = ComparePrevious(Other, 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;
|
|
||||||
}
|
|
||||||
if (compare == 0)
|
if (compare == 0)
|
||||||
compare = CompareNotes(Other);
|
compare = CompareNotes(Other);
|
||||||
}
|
}
|
||||||
|
@ -617,19 +573,7 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
compare = CompareChanges(Other);
|
compare = CompareChanges(Other);
|
||||||
if (compare == 0)
|
if (compare == 0)
|
||||||
switch (previous)
|
compare = ComparePrevious(Other, previous);
|
||||||
{
|
|
||||||
case "Last Search":
|
|
||||||
compare = CompareLastSearch(Other);
|
|
||||||
break;
|
|
||||||
case "Original":
|
|
||||||
compare = CompareOriginal(Other);
|
|
||||||
break;
|
|
||||||
case "Last Frame":
|
|
||||||
default:
|
|
||||||
compare = ComparePrev(Other);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue