Esempio n. 1
0
        private void commandChange(object sender, EventArgs e)
        {
            var selectedCommandString = advancedCommandBox.SelectedItem.ToString();

            commandTypeBox.Items.Clear();
            selectedCommand = commandsList.Single(s => s.name.Equals(selectedCommandString));
            var types = selectedCommand.types.Select(s => s.variant);

            commandTypeBox.Items.AddRange(listOfEnumsToListOfStrings(types).ToArray());
            commandTypeBox.SelectedIndex = 0;
        }
 private void commandChange(object sender, EventArgs e)
 {
     var selectedCommandString = advancedCommandBox.SelectedItem.ToString();
     commandTypeBox.Items.Clear();
     selectedCommand = commandsList.Single(s => s.name.Equals(selectedCommandString));
     var types = selectedCommand.types.Select(s => s.variant);
     commandTypeBox.Items.AddRange(listOfEnumsToListOfStrings(types).ToArray());
     commandTypeBox.SelectedIndex = 0;
 }