public AxisMappingEntryControl()
        {
            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;
        }
        /// <summary>
        ///     Initialize buttons/axes.
        /// </summary>
        private void OnCreated()
        {
            Ps = new DsButtonProfile(Ds3Button.Ps, Ds4Button.Ps);
            Circle = new DsButtonProfile(Ds3Button.Circle, Ds4Button.Circle);
            Cross = new DsButtonProfile(Ds3Button.Cross, Ds4Button.Cross);
            Square = new DsButtonProfile(Ds3Button.Square, Ds4Button.Square);
            Triangle = new DsButtonProfile(Ds3Button.Triangle, Ds4Button.Triangle);
            Select = new DsButtonProfile(Ds3Button.Select, Ds4Button.Share);
            Start = new DsButtonProfile(Ds3Button.Start, Ds4Button.Options);
            LeftShoulder = new DsButtonProfile(Ds3Button.L1, Ds4Button.L1);
            RightShoulder = new DsButtonProfile(Ds3Button.R1, Ds4Button.R1);
            LeftTrigger = new DsButtonProfile(Ds3Button.L2, Ds4Button.L2);
            RightTrigger = new DsButtonProfile(Ds3Button.R2, Ds4Button.R2);
            LeftThumb = new DsButtonProfile(Ds3Button.L3, Ds4Button.L3);
            RightThumb = new DsButtonProfile(Ds3Button.R3, Ds4Button.R3);

            // D-Pad
            Up = new DsButtonProfile(Ds3Button.Up, Ds4Button.Up);
            Right = new DsButtonProfile(Ds3Button.Right, Ds4Button.Right);
            Down = new DsButtonProfile(Ds3Button.Down, Ds4Button.Down);
            Left = new DsButtonProfile(Ds3Button.Left, Ds4Button.Left);
        }
        /// <summary>
        ///     Initialize buttons/axes.
        /// </summary>
        private void OnCreated()
        {
            Ps            = new DsButtonProfile(Ds3Button.Ps, Ds4Button.Ps);
            Circle        = new DsButtonProfile(Ds3Button.Circle, Ds4Button.Circle);
            Cross         = new DsButtonProfile(Ds3Button.Cross, Ds4Button.Cross);
            Square        = new DsButtonProfile(Ds3Button.Square, Ds4Button.Square);
            Triangle      = new DsButtonProfile(Ds3Button.Triangle, Ds4Button.Triangle);
            Select        = new DsButtonProfile(Ds3Button.Select, Ds4Button.Share);
            Start         = new DsButtonProfile(Ds3Button.Start, Ds4Button.Options);
            LeftShoulder  = new DsButtonProfile(Ds3Button.L1, Ds4Button.L1);
            RightShoulder = new DsButtonProfile(Ds3Button.R1, Ds4Button.R1);
            LeftTrigger   = new DsButtonProfile(Ds3Button.L2, Ds4Button.L2);
            RightTrigger  = new DsButtonProfile(Ds3Button.R2, Ds4Button.R2);
            LeftThumb     = new DsButtonProfile(Ds3Button.L3, Ds4Button.L3);
            RightThumb    = new DsButtonProfile(Ds3Button.R3, Ds4Button.R3);

            // D-Pad
            Up    = new DsButtonProfile(Ds3Button.Up, Ds4Button.Up);
            Right = new DsButtonProfile(Ds3Button.Right, Ds4Button.Right);
            Down  = new DsButtonProfile(Ds3Button.Down, Ds4Button.Down);
            Left  = new DsButtonProfile(Ds3Button.Left, Ds4Button.Left);
        }
Exemple #5
0
        /// <summary>
        ///     Initialize buttons/axes.
        /// </summary>
        private void OnCreated()
        {
            Ps            = new DsButtonProfile(ButtonsEnum.Ps);
            Circle        = new DsButtonProfile(ButtonsEnum.Circle);
            Cross         = new DsButtonProfile(ButtonsEnum.Cross);
            Square        = new DsButtonProfile(ButtonsEnum.Square);
            Triangle      = new DsButtonProfile(ButtonsEnum.Triangle);
            Select        = new DsButtonProfile(ButtonsEnum.Share);
            Start         = new DsButtonProfile(ButtonsEnum.Options);
            LeftShoulder  = new DsButtonProfile(ButtonsEnum.L1);
            RightShoulder = new DsButtonProfile(ButtonsEnum.R1);
            LeftTrigger   = new DsButtonProfile(ButtonsEnum.L2);
            RightTrigger  = new DsButtonProfile(ButtonsEnum.R2);
            LeftThumb     = new DsButtonProfile(ButtonsEnum.L3);
            RightThumb    = new DsButtonProfile(ButtonsEnum.R3);

            // D-Pad
            Up    = new DsButtonProfile(ButtonsEnum.Up);
            Right = new DsButtonProfile(ButtonsEnum.Right);
            Down  = new DsButtonProfile(ButtonsEnum.Down);
            Left  = new DsButtonProfile(ButtonsEnum.Left);
        }
        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;
        }