Some code refactoring - fix Watch Editor to use the ToolHelpers method for creating Memory Domain dropdowns

This commit is contained in:
adelikat 2013-10-11 17:26:15 +00:00
parent e12caea716
commit 400e01cc0e
1 changed files with 1 additions and 18 deletions

View File

@ -93,7 +93,7 @@ namespace BizHawk.MultiClient
_watchList.AddRange(watches);
}
_mode = mode;
DoMemoryDomainDropdown(domain ?? Global.Emulator.MainMemory);
ToolHelpers.PopulateMemoryDomainDropdown(ref DomainDropDown, domain ?? Global.Emulator.MainMemory);
SetTitle();
}
@ -114,22 +114,6 @@ namespace BizHawk.MultiClient
}
}
private void DoMemoryDomainDropdown(MemoryDomain startDomain)
{
DomainDropDown.Items.Clear();
if (Global.Emulator.MemoryDomains.Count > 0)
{
foreach (MemoryDomain domain in Global.Emulator.MemoryDomains)
{
var result = DomainDropDown.Items.Add(domain.ToString());
if (domain.Name == startDomain.Name)
{
DomainDropDown.SelectedIndex = result;
}
}
}
}
private void SetAddressBoxProperties()
{
if (!_loading)
@ -197,7 +181,6 @@ namespace BizHawk.MultiClient
var domain = Global.Emulator.MemoryDomains.FirstOrDefault(d => d.Name == DomainDropDown.SelectedItem.ToString()) ??
Global.Emulator.MainMemory;
BigEndianCheckBox.Checked = domain.Endian == Endian.Big;
}
#region Events