firmwareconfig-add WarpToSystemId

This commit is contained in:
zeromus 2013-08-11 15:48:47 +00:00
parent 0eb46dd11c
commit 85f83bea30
1 changed files with 15 additions and 0 deletions

View File

@ -81,6 +81,21 @@ namespace BizHawk.MultiClient
currSelectorDir = PathManager.MakeAbsolutePath(Global.Config.FirmwaresPath); currSelectorDir = PathManager.MakeAbsolutePath(Global.Config.FirmwaresPath);
} }
//makes sure that the specified SystemId is selected in the list (and that all the firmwares for it are visible)
public void WarpToSystemId(string sysid)
{
bool selectedFirst = false;
foreach (ListViewItem lvi in lvFirmwares.Items)
{
if (lvi.SubItems[1].Text == sysid)
{
if(!selectedFirst) lvi.Selected = true;
lvi.EnsureVisible();
selectedFirst = true;
}
}
}
private void FirmwaresConfig_Load(object sender, EventArgs e) private void FirmwaresConfig_Load(object sender, EventArgs e)
{ {
//we'll use this font for displaying the hash, so they dont look all jagged in a long list //we'll use this font for displaying the hash, so they dont look all jagged in a long list