Example #1
0
 private void CreateControl(String name, InputConfigState state)
 {
     if (state is KeyboardAndDeviceInputConfigState || state is KeyboardInputConfigState || state is DeviceInputConfigState)
     {
         CreateInputValueTextBoxConfigState(name, (ControlInputConfigState)state);
     }
     else if (state is DeviceAndSelectionConfigState)
     {
         CreateInputValueComboBoxConfigState(name, (ControlInputConfigState)state);
     }
     else if (state is InputConfigHeader)
     {
         CreateInputConfigHeaderState(name, (InputConfigHeader)state);
     }
 }
Example #2
0
        private void CreateControlsForSelectedDevice()
        {
            if (selectedDevice != null)
            {
                InputConfig config = selectedDevice.InputConfig;

                gridCommands.Children.Clear();
                CreateGridDefinitions(config.MaxRowNumber);

                foreach (KeyValuePair <String, InputConfigState> entry in config.States)
                {
                    String           name  = entry.Key;
                    InputConfigState state = entry.Value;

                    CreateControl(name, state);
                }
            }
            else
            {
                CreateControlsForNoDevice();
            }
        }