Refactor code for loading one tool dialog from another. Remove PCE address offset from Ram Search

This commit is contained in:
andres.delikat 2011-03-10 04:29:19 +00:00
parent ae2b97050e
commit 28dc1b9c8e
3 changed files with 6 additions and 26 deletions

View File

@ -955,7 +955,7 @@ namespace BizHawk.MultiClient
recentROMToolStripMenuItem.DropDownItems.Add(auto);
}
private void LoadRamWatch()
public void LoadRamWatch()
{
if (!RamWatch1.IsHandleCreated || RamWatch1.IsDisposed)
{
@ -968,7 +968,7 @@ namespace BizHawk.MultiClient
RamWatch1.Focus();
}
private void LoadRamSearch()
public void LoadRamSearch()
{
if (!RamSearch1.IsHandleCreated || RamSearch1.IsDisposed)
{
@ -990,7 +990,7 @@ namespace BizHawk.MultiClient
HexEditor1.Focus();
}
private void LoadNESPPU()
public void LoadNESPPU()
{
if (!NESPPU1.IsHandleCreated || NESPPU1.IsDisposed)
{

View File

@ -240,16 +240,7 @@ namespace BizHawk.MultiClient
w.bigendian = MemoryViewer.BigEndian;
w.signed = asigned.HEX;
if (!Global.MainForm.RamWatch1.IsHandleCreated || Global.MainForm.RamWatch1.IsDisposed)
{
Global.MainForm.RamWatch1 = new RamWatch();
Global.MainForm.RamWatch1.Show();
}
else
{
Global.MainForm.RamWatch1.Focus();
}
Global.MainForm.LoadRamWatch();
Global.MainForm.RamWatch1.AddWatch(w);
}
}

View File

@ -253,15 +253,7 @@ namespace BizHawk.MultiClient
if (indexes.Count > 0)
{
if (!Global.MainForm.RamWatch1.IsHandleCreated || Global.MainForm.RamWatch1.IsDisposed)
{
Global.MainForm.RamWatch1 = new RamWatch();
Global.MainForm.RamWatch1.Show();
}
else
{
Global.MainForm.RamWatch1.Focus();
}
Global.MainForm.LoadRamWatch();
for (int x = 0; x < indexes.Count; x++)
Global.MainForm.RamWatch1.AddWatch(searchList[indexes[x]]);
}
@ -321,9 +313,6 @@ namespace BizHawk.MultiClient
searchList.Clear();
undoList.Clear();
SetPlatformAndMemoryDomainLabel();
int startaddress = 0;
if (Global.Emulator.SystemId == "PCE")
startaddress = 0x1F0000; //For now, until Emulator core functionality can better handle a prefix
int count = 0;
int divisor = 1;
@ -346,7 +335,7 @@ namespace BizHawk.MultiClient
for (int x = 0; x <= ((Domain.Size / divisor)-1); x++)
{
searchList.Add(new Watch());
searchList[x].address = count + startaddress;
searchList[x].address = count;
searchList[x].type = GetDataSize();
searchList[x].bigendian = GetBigEndian();
searchList[x].signed = GetDataType();