Ejemplo n.º 1
0
 private void PopulateModes()
 {
     foreach (Mode mode in Mode.AllModes)
     {
         this.cbMode.Items.Add(mode);
     }
     CurrentMode = Mode.AllModes[0];
     this.cbMode.SelectedIndex = 0;
     foreach (GemColor color in (GemColor[])Enum.GetValues(typeof(GemColor)))
     {
         this.cbChooseColor.Items.Add(color);
     }
     foreach(GemAuxiliaryInfo aux in (GemAuxiliaryInfo[])Enum.GetValues(typeof(GemAuxiliaryInfo)))
     {
         this.cbTeachAuxiliary.Items.Add(aux);
     }
     this.cbChooseColor.SelectedIndex = 0;
     foreach(AutonomyStrategy strategy in AutonomyStrategy.AllStrategies)
     {
         this.cbAutonomousStrategy.Items.Add(strategy);
     }
     this.cbAutonomousStrategy.SelectedIndex = 0;
     foreach (RecognitionStrategy strategy in RecognitionStrategy.AllStrategies)
     {
         this.cbRecognitionStrategy.Items.Add(strategy);
     }
     this.cbRecognitionStrategy.SelectedIndex = 0;
 }
Ejemplo n.º 2
0
 private void cbMode_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cbMode.SelectedIndex != -1)
     {
         CurrentMode = (Mode)cbMode.SelectedItem;
     }
 }