Example #1
0
        private void cboxTypesString_SelectionChanged(object sender, RoutedEventArgs e)
        {
            DataType           selectedType;
            InputTypeViewModel inputTypeViewModel = ((ComboBox)sender).DataContext as InputTypeViewModel;

            if (inputTypeViewModel == null)
            {
                return;
            }
            int typeIndex = ((ComboBox)sender).SelectedIndex - 1;

            if (typeIndex >= 0)
            {
                selectedType = AllDataTypes[typeIndex];
            }
            else
            {
                selectedType = null;
            }
            inputTypeViewModel.SelectedDataType = selectedType;
        }
Example #2
0
        private void btnDeleteInputType_Click(object sender, RoutedEventArgs e)
        {
            InputTypeViewModel inputToDelete = (InputTypeViewModel)((Button)sender).DataContext;

            InputTypesViewModels.Remove(inputToDelete);
        }