Exemple #1
0
        private void CreateInputValueComboBoxConfigState(String name, ControlInputConfigState state)
        {
            DeviceAndSelectionConfigState selectionState = (DeviceAndSelectionConfigState)state;

            CreateLabelForValueConfigState(name, state);

            ComboBox comboBox = new ComboBox()
            {
                Name = inputBoxPrefix + name, Style = (Style)gridMain.FindResource("styleContentComboBox"), IsEditable = true, IsReadOnly = true
            };

            Grid.SetColumn(comboBox, state.LayoutPosition == InputConfigState.Position.LeftColumn ? 1 : 3);
            Grid.SetRow(comboBox, state.RowNumber);

            foreach (String entry in selectionState.AxisNames)
            {
                ComboBoxItem item = new ComboBoxItem();
                item.Name    = entry;
                item.Content = entry;
                comboBox.Items.Add(item);
            }

            gridCommands.Children.Add(comboBox);
            AddEventHandlersToControl(comboBox);
        }
Exemple #2
0
        private bool IsControlRecognized(String inputValue)
        {
            if (SelectedInputConfigState is DeviceAndSelectionConfigState)
            {
                DeviceAndSelectionConfigState selectionState = (DeviceAndSelectionConfigState)SelectedInputConfigState;
                if (selectionState.ControlsNotRecognized.Contains(inputValue))
                {
                    return(false);
                }
            }

            return(true);
        }