public MainWindow()
        {
            InitializeComponent();

            isSuspended = false;
            isToggledSuspended = true;

            double screenWidth = System.Windows.SystemParameters.PrimaryScreenWidth;
            double screenHeight = System.Windows.SystemParameters.PrimaryScreenHeight;

            gamepad = new Xbox360AgarIoGamepad(UserIndex.One);
            gameInputBridge = new InputBridge_InputSimulator(screenWidth / screenHeight);

            gamepad.ButtonPressed += new ButtonPressedEventHandler(handleButtonPressed);
            gamepad.ButtonReleased += new ButtonReleasedEventHandler(handleButtonReleased);
            gamepad.NewHeading += new NewHeadingEventHandler(handleNewDirection);
            gamepad.ConnectivityChanged += new GamepadConnectivityChangedHandler(handleNewConnectivityStatus);
        }
示例#2
0
        public MainWindow()
        {
            InitializeComponent();

            isSuspended        = false;
            isToggledSuspended = true;

            double screenWidth  = System.Windows.SystemParameters.PrimaryScreenWidth;
            double screenHeight = System.Windows.SystemParameters.PrimaryScreenHeight;



            gamepad         = new Xbox360AgarIoGamepad(UserIndex.One);
            gameInputBridge = new InputBridge_InputSimulator(screenWidth / screenHeight);


            gamepad.ButtonPressed       += new ButtonPressedEventHandler(handleButtonPressed);
            gamepad.ButtonReleased      += new ButtonReleasedEventHandler(handleButtonReleased);
            gamepad.NewHeading          += new NewHeadingEventHandler(handleNewDirection);
            gamepad.ConnectivityChanged += new GamepadConnectivityChangedHandler(handleNewConnectivityStatus);
        }