private void lbResults_MouseDoubleClick(object sender, MouseEventArgs e) { if (lbResults.SelectedIndex > -1) { string id = ((Mod.ModSearchUnitResult)lbResults.Items[lbResults.SelectedIndex]).id; AddTab(id); if (buildEditor != null && buildEditor.Visible) { buildEditor.SelectUnit(id); } } }
private void editBuildOptionsToolStripMenuItem_Click(object sender, EventArgs e) { if (buildEditor != null) { buildEditor.Close(); } buildEditor = new FormBuildEditor(); buildEditor.Mod = mod; buildEditor.TopMost = true; buildEditor.TopLevel = true; buildEditor.ReloadBuildTree(); if (lbResults.SelectedIndex > -1) { buildEditor.SelectUnit(((Mod.ModSearchUnitResult)lbResults.SelectedItem).id); } buildEditor.BuildOptionsChanged += buildEditor_BuildOptionsChanged; buildEditor.Show(); }
private void editBuildOptionsToolStripMenuItem_Click(object sender, EventArgs e) { if (buildEditor != null) buildEditor.Close(); buildEditor = new FormBuildEditor(); buildEditor.Mod = mod; buildEditor.TopMost = true; buildEditor.TopLevel = true; buildEditor.ReloadBuildTree(); if (lbResults.SelectedIndex > -1) buildEditor.SelectUnit(((Mod.ModSearchUnitResult) lbResults.SelectedItem).id); buildEditor.BuildOptionsChanged += buildEditor_BuildOptionsChanged; buildEditor.Show(); }