Fix some inconsistent spelling in a Ram Watch and Search context menus, and some slight formatting cleanup on hex editor

This commit is contained in:
adelikat 2014-03-01 15:21:17 +00:00
parent 0a0f144aa8
commit 827e2c44f8
3 changed files with 34 additions and 55 deletions

View File

@ -69,12 +69,10 @@ namespace BizHawk.Client.EmuHawk
{
return _addressHighlighted;
}
else
{
return null; // Negative = no address highlighted
}
}
}
private Watch.WatchSize WatchSize
{
@ -263,15 +261,14 @@ namespace BizHawk.Client.EmuHawk
{
return '.';
}
else if (val >= 0x80)
if (val >= 0x80)
{
return '.';
}
else
{
return (char)val;
}
}
private static int? GetDomainInt(string name)
{
@ -329,12 +326,10 @@ namespace BizHawk.Client.EmuHawk
var stream = file.GetStream();
return Util.ReadAllBytes(stream);
}
else
{
return File.ReadAllBytes(path);
}
}
}
private static int GetNumDigits(int i)
{
@ -384,19 +379,19 @@ namespace BizHawk.Client.EmuHawk
{
return true;
}
else if (key >= 'a' && key <= 'f') // A-F
if (key >= 'a' && key <= 'f') // A-F
{
return true;
}
else if (key >= 'A' && key <= 'F') // A-F
if (key >= 'A' && key <= 'F') // A-F
{
return true;
}
else
{
return false;
}
}
private void HexEditor_Load(object sender, EventArgs e)
{
@ -638,8 +633,7 @@ namespace BizHawk.Client.EmuHawk
private Point GetPromptPoint()
{
return PointToScreen(
new Point(MemoryViewerBox.Location.X + 30, MemoryViewerBox.Location.Y + 30)
);
new Point(MemoryViewerBox.Location.X + 30, MemoryViewerBox.Location.Y + 30));
}
private void ClearNibbles()
@ -772,8 +766,7 @@ namespace BizHawk.Client.EmuHawk
{
// TODO: can't unfreeze address 0??
Global.CheatList.RemoveRange(
Global.CheatList.Where(x => x.Contains(address)).ToList()
);
Global.CheatList.Where(x => x.Contains(address)).ToList());
}
MemoryViewerBox.Refresh();
@ -820,11 +813,9 @@ namespace BizHawk.Client.EmuHawk
return "Binary (*" + extension + ")|*" + extension + "|All Files|*.*";
}
else
{
return "Binary (*.bin)|*.bin|All Files|*.*";
}
}
private string GetBinarySaveFileFromUser()
{
@ -1044,22 +1035,19 @@ namespace BizHawk.Client.EmuHawk
case 1:
_domain.PokeByte(
address,
(byte)(_domain.PeekByte(address) + 1)
);
(byte)(_domain.PeekByte(address) + 1));
break;
case 2:
_domain.PokeWord(
address,
(ushort)(_domain.PeekWord(address, _bigEndian) + 1),
_bigEndian
);
_bigEndian);
break;
case 4:
_domain.PokeDWord(
address,
_domain.PeekDWord(address, _bigEndian) + 1,
_bigEndian
);
_bigEndian);
break;
}
}
@ -1080,22 +1068,19 @@ namespace BizHawk.Client.EmuHawk
case 1:
_domain.PokeByte(
address,
(byte)(_domain.PeekByte(address) - 1)
);
(byte)(_domain.PeekByte(address) - 1));
break;
case 2:
_domain.PokeWord(
address,
(ushort)(_domain.PeekWord(address, _bigEndian) - 1),
_bigEndian
);
_bigEndian);
break;
case 4:
_domain.PokeDWord(
address,
_domain.PeekDWord(address, _bigEndian) - 1,
_bigEndian
);
_bigEndian);
break;
}
}
@ -1107,11 +1092,9 @@ namespace BizHawk.Client.EmuHawk
{
return string.Format(_digitFormatString, MakeValue(address)).Trim();
}
else
{
return string.Empty;
}
}
private string GetFindValues()
{
@ -1120,11 +1103,9 @@ namespace BizHawk.Client.EmuHawk
var values = ValueString(HighlightedAddress.Value);
return _secondaryHighlightedAddresses.Aggregate(values, (current, x) => current + ValueString(x));
}
else
{
return string.Empty;
}
}
private void HighlightSecondaries(string value, int found)
{
@ -1359,8 +1340,7 @@ namespace BizHawk.Client.EmuHawk
}
_secondaryHighlightedAddresses.ForEach(addr =>
GlobalWin.Tools.RamWatch.AddWatch(MakeWatch(addr))
);
GlobalWin.Tools.RamWatch.AddWatch(MakeWatch(addr)));
}
private void FreezeAddressMenuItem_Click(object sender, EventArgs e)
@ -1424,8 +1404,7 @@ namespace BizHawk.Client.EmuHawk
(Watch.WatchSize)_dataSize,
Watch.DisplayType.Hex,
string.Empty,
_bigEndian
));
_bigEndian));
poke.SetWatch(watches);
poke.ShowHawkDialog();

View File

@ -1398,12 +1398,12 @@ namespace BizHawk.Client.EmuHawk
if (allCheats)
{
FreezeContextMenuItem.Text = "&Unfreeze address";
FreezeContextMenuItem.Text = "&Unfreeze Address";
FreezeContextMenuItem.Image = Properties.Resources.Unfreeze;
}
else
{
FreezeContextMenuItem.Text = "&Freeze address";
FreezeContextMenuItem.Text = "&Freeze Address";
FreezeContextMenuItem.Image = Properties.Resources.Freeze;
}
}

View File

@ -1024,12 +1024,12 @@ namespace BizHawk.Client.EmuHawk
if (allCheats)
{
FreezeContextMenuItem.Text = "&Unfreeze address";
FreezeContextMenuItem.Text = "&Unfreeze Address";
FreezeContextMenuItem.Image = Properties.Resources.Unfreeze;
}
else
{
FreezeContextMenuItem.Text = "&Freeze address";
FreezeContextMenuItem.Text = "&Freeze Address";
FreezeContextMenuItem.Image = Properties.Resources.Freeze;
}