diff --git a/BizHawk.Client.Common/tools/RamSearchEngine/RamSearchEngine.cs b/BizHawk.Client.Common/tools/RamSearchEngine/RamSearchEngine.cs index 732824ce39..d5890b39db 100644 --- a/BizHawk.Client.Common/tools/RamSearchEngine/RamSearchEngine.cs +++ b/BizHawk.Client.Common/tools/RamSearchEngine/RamSearchEngine.cs @@ -312,7 +312,7 @@ namespace BizHawk.Client.Common.RamSearchEngine _isSorted = false; switch (column) { - case WatchList.ADDRESS: + case WatchList.Address: if (!reverse) { _isSorted = true; @@ -320,13 +320,13 @@ namespace BizHawk.Client.Common.RamSearchEngine _watchList = _watchList.OrderBy(w => w.Address, reverse).ToList(); break; - case WatchList.VALUE: + case WatchList.Value: _watchList = _watchList.OrderBy(w => GetValue(w.Address), reverse).ToList(); break; - case WatchList.PREV: + case WatchList.Prev: _watchList = _watchList.OrderBy(w => w.Previous, reverse).ToList(); break; - case WatchList.CHANGES: + case WatchList.ChangesCol: if (_settings.IsDetailed()) { _watchList = _watchList @@ -336,7 +336,7 @@ namespace BizHawk.Client.Common.RamSearchEngine } break; - case WatchList.DIFF: + case WatchList.Diff: _watchList = _watchList.OrderBy(w => GetValue(w.Address) - w.Previous, reverse).ToList(); break; } diff --git a/BizHawk.Client.Common/tools/Watch/WatchList/WatchList.cs b/BizHawk.Client.Common/tools/Watch/WatchList/WatchList.cs index 6ef180ebd2..a54d4e407e 100644 --- a/BizHawk.Client.Common/tools/Watch/WatchList/WatchList.cs +++ b/BizHawk.Client.Common/tools/Watch/WatchList/WatchList.cs @@ -21,14 +21,14 @@ namespace BizHawk.Client.Common { #region Fields - public const string ADDRESS = "AddressColumn"; - public const string VALUE = "ValueColumn"; - public const string PREV = "PrevColumn"; - public const string CHANGES = "ChangesColumn"; - public const string DIFF = "DiffColumn"; - public const string TYPE = "TypeColumn"; - public const string DOMAIN = "DomainColumn"; - public const string NOTES = "NotesColumn"; + public const string Address = "AddressColumn"; + public const string Value = "ValueColumn"; + public const string Prev = "PrevColumn"; + public const string ChangesCol = "ChangesColumn"; + public const string Diff = "DiffColumn"; + public const string Type = "TypeColumn"; + public const string Domain = "DomainColumn"; + public const string Notes = "NotesColumn"; private static readonly Dictionary> WatchComparers; @@ -48,14 +48,14 @@ namespace BizHawk.Client.Common // Initialize mapping of columns to comparers for sorting. WatchComparers = new Dictionary> { - { ADDRESS, new WatchAddressComparer() }, - { VALUE, new WatchValueComparer() }, - { PREV, new WatchPreviousValueComparer() }, - { CHANGES, new WatchChangeCountComparer() }, - { DIFF, new WatchValueDifferenceComparer() }, - { TYPE, new WatchFullDisplayTypeComparer() }, - { DOMAIN, new WatchDomainComparer() }, - { NOTES, new WatchNoteComparer() } + { Address, new WatchAddressComparer() }, + { Value, new WatchValueComparer() }, + { Prev, new WatchPreviousValueComparer() }, + { ChangesCol, new WatchChangeCountComparer() }, + { Diff, new WatchValueDifferenceComparer() }, + { Type, new WatchFullDisplayTypeComparer() }, + { Domain, new WatchDomainComparer() }, + { Notes, new WatchNoteComparer() } }; } diff --git a/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs b/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs index df1d3caa82..d2f8d8a169 100644 --- a/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs +++ b/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs @@ -201,19 +201,19 @@ namespace BizHawk.Client.EmuHawk var columnName = column.Name; switch (columnName) { - case WatchList.ADDRESS: + case WatchList.Address: text = _searches[index].AddressString; break; - case WatchList.VALUE: + case WatchList.Value: text = _searches[index].ValueString; break; - case WatchList.PREV: + case WatchList.Prev: text = _searches[index].PreviousStr; break; - case WatchList.CHANGES: + case WatchList.ChangesCol: text = _searches[index].ChangeCount.ToString(); break; - case WatchList.DIFF: + case WatchList.Diff: text = _searches[index].Diff; break; } @@ -772,7 +772,7 @@ namespace BizHawk.Client.EmuHawk DifferentByBox.Enabled = true; ClearChangeCountsToolBarItem.Enabled = true; - WatchListView.AllColumns[WatchList.CHANGES].Visible = true; + WatchListView.AllColumns[WatchList.ChangesCol].Visible = true; ChangesMenuItem.Checked = true; ColumnToggleCallback(); @@ -788,7 +788,7 @@ namespace BizHawk.Client.EmuHawk .Single(t => t.Name == "GeneratedColumnsSubMenu"); // TODO - make name a constant return subMenu.DropDownItems .Cast() - .Single(t => t.Name == WatchList.CHANGES); + .Single(t => t.Name == WatchList.ChangesCol); } } @@ -811,7 +811,7 @@ namespace BizHawk.Client.EmuHawk PreviousValueRadio.Checked = true; } - WatchListView.AllColumns[WatchList.CHANGES].Visible = false; + WatchListView.AllColumns[WatchList.ChangesCol].Visible = false; ChangesMenuItem.Checked = false; ColumnToggleCallback(); @@ -964,11 +964,11 @@ namespace BizHawk.Client.EmuHawk { Columns = new List { - new RollColumn { Text = "Address", Name = WatchList.ADDRESS, Visible = true, UnscaledWidth = 60, Type = ColumnType.Text }, - new RollColumn { Text = "Value", Name = WatchList.VALUE, Visible = true, UnscaledWidth = 59, Type = ColumnType.Text }, - new RollColumn { Text = "Prev", Name = WatchList.PREV, Visible = true, UnscaledWidth = 59, Type = ColumnType.Text }, - new RollColumn { Text = "Changes", Name = WatchList.CHANGES, Visible = true, UnscaledWidth = 60, Type = ColumnType.Text }, - new RollColumn { Text = "Diff", Name = WatchList.DIFF, Visible = false, UnscaledWidth = 59, Type = ColumnType.Text }, + new RollColumn { Text = "Address", Name = WatchList.Address, Visible = true, UnscaledWidth = 60, Type = ColumnType.Text }, + new RollColumn { Text = "Value", Name = WatchList.Value, Visible = true, UnscaledWidth = 59, Type = ColumnType.Text }, + new RollColumn { Text = "Prev", Name = WatchList.Prev, Visible = true, UnscaledWidth = 59, Type = ColumnType.Text }, + new RollColumn { Text = "Changes", Name = WatchList.ChangesCol, Visible = true, UnscaledWidth = 60, Type = ColumnType.Text }, + new RollColumn { Text = "Diff", Name = WatchList.Diff, Visible = false, UnscaledWidth = 59, Type = ColumnType.Text }, }; PreviewMode = true; diff --git a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs index 76f077bd42..a9b6368eda 100644 --- a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs +++ b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs @@ -79,14 +79,14 @@ namespace BizHawk.Client.EmuHawk { Columns = new List { - new RollColumn { Text = "Address", Name = WatchList.ADDRESS, Visible = true, UnscaledWidth = 60, Type = ColumnType.Text }, - new RollColumn { Text = "Value", Name = WatchList.VALUE, Visible = true, UnscaledWidth = 59, Type = ColumnType.Text }, - new RollColumn { Text = "Prev", Name = WatchList.PREV, Visible = false, UnscaledWidth = 59, Type = ColumnType.Text }, - new RollColumn { Text = "Changes", Name = WatchList.CHANGES, Visible = true, UnscaledWidth = 60, Type = ColumnType.Text }, - new RollColumn { Text = "Diff", Name = WatchList.DIFF, Visible = false, UnscaledWidth = 59, Type = ColumnType.Text }, - new RollColumn { Text = "Type", Name = WatchList.TYPE, Visible = false, UnscaledWidth = 55, Type = ColumnType.Text }, - new RollColumn { Text = "Domain", Name = WatchList.DOMAIN, Visible = true, UnscaledWidth = 55, Type = ColumnType.Text }, - new RollColumn { Text = "Notes", Name = WatchList.NOTES, Visible = true, UnscaledWidth = 128, Type = ColumnType.Text } + new RollColumn { Text = "Address", Name = WatchList.Address, Visible = true, UnscaledWidth = 60, Type = ColumnType.Text }, + new RollColumn { Text = "Value", Name = WatchList.Value, Visible = true, UnscaledWidth = 59, Type = ColumnType.Text }, + new RollColumn { Text = "Prev", Name = WatchList.Prev, Visible = false, UnscaledWidth = 59, Type = ColumnType.Text }, + new RollColumn { Text = "Changes", Name = WatchList.ChangesCol, Visible = true, UnscaledWidth = 60, Type = ColumnType.Text }, + new RollColumn { Text = "Diff", Name = WatchList.Diff, Visible = false, UnscaledWidth = 59, Type = ColumnType.Text }, + new RollColumn { Text = "Type", Name = WatchList.Type, Visible = false, UnscaledWidth = 55, Type = ColumnType.Text }, + new RollColumn { Text = "Domain", Name = WatchList.Domain, Visible = true, UnscaledWidth = 55, Type = ColumnType.Text }, + new RollColumn { Text = "Notes", Name = WatchList.Notes, Visible = true, UnscaledWidth = 128, Type = ColumnType.Text } }; } @@ -599,7 +599,7 @@ namespace BizHawk.Client.EmuHawk if (_watches[index].IsSeparator) { - if (column.Name == WatchList.ADDRESS) + if (column.Name == WatchList.Address) { text = _watches[index].Notes; } @@ -609,32 +609,32 @@ namespace BizHawk.Client.EmuHawk switch (column.Name) { - case WatchList.ADDRESS: + case WatchList.Address: text = _watches[index].AddressString; break; - case WatchList.VALUE: + case WatchList.Value: text = _watches[index].ValueString; break; - case WatchList.PREV: + case WatchList.Prev: text = _watches[index].PreviousStr; break; - case WatchList.CHANGES: + case WatchList.ChangesCol: if (!_watches[index].IsSeparator) { text = _watches[index].ChangeCount.ToString(); } break; - case WatchList.DIFF: + case WatchList.Diff: text = _watches[index].Diff; break; - case WatchList.TYPE: + case WatchList.Type: text = ComputeDisplayType(_watches[index]); break; - case WatchList.DOMAIN: + case WatchList.Domain: text = _watches[index].Domain.Name; break; - case WatchList.NOTES: + case WatchList.Notes: text = _watches[index].Notes; break; }