Beispiel #1
0
        public ButtonMappingEntryControl()
        {
            ButtonProfile = new DsButtonProfile();

            InitializeComponent();

            TargetCommandComboBox.ItemsSource = ValidKeys;
        }
        public ButtonMappingEntryControl()
        {
            ButtonProfile = new DsButtonProfile();

            InitializeComponent();

            TargetCommandComboBox.ItemsSource = ValidKeys;
        }
        public ButtonMappingEntryControl()
        {
            ButtonProfile = new DsButtonProfile();

            InitializeComponent();

            CurrentCommandTypeView   = new CollectionView(AvailableCommandTypes);
            CurrentCommandTargetView = new CollectionView(AvailableKeys);

            CurrentCommandTypeView.MoveCurrentTo(AvailableCommandTypes.First());
            CurrentCommandTargetView.MoveCurrentTo(AvailableKeys.First());

            CurrentCommandTypeView.CurrentChanged   += CurrentCommandTypeOnCurrentChanged;
            CurrentCommandTargetView.CurrentChanged += CurrentCommandTargetOnCurrentChanged;
        }
Beispiel #4
0
        public ButtonMappingViewModel(DsButtonProfile profile)
        {
            CurrentButtonProfile = profile;

            CurrentCommandTypeView   = new CollectionView(AvailableCommandTypes);
            CurrentCommandTargetView = new CollectionView(AvailableKeys);

            CurrentCommandTypeView.MoveCurrentTo(AvailableCommandTypes.First());
            CurrentCommandTargetView.MoveCurrentTo(AvailableKeys.First());

            if (CurrentButtonProfile != null)
            {
                CurrentCommandTypeView.MoveCurrentTo(profile.MappingTarget.CommandType);
                CurrentCommandTargetView.MoveCurrentTo(profile.MappingTarget.CommandTarget);
            }
            else
            {
                CurrentButtonProfile = new DsButtonProfile();
            }

            CurrentCommandTypeView.CurrentChanged   += CurrentCommandTypeOnCurrentChanged;
            CurrentCommandTargetView.CurrentChanged += CurrentCommandTargetOnCurrentChanged;
        }