SelectUnit() public method

public SelectUnit ( string id ) : void
id string
return void
Exemplo n.º 1
0
 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);
         }
     }
 }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 3
0
 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();
 }