示例#1
0
 public CalibrationForm(string chosenDevice)
 {
     InitializeComponent();
     this.label1.Text   = this.textAxis;
     this.axisCount     = -1;
     this.axisIndexSign = new int[4];
     this.axisIndex     = new int[4];
     this.axisFRSign    = new int[4];
     this.trainButton   = "";
     this.jStick        = new ZalJoystick(this);
     this.jStick.InitDirectInput(chosenDevice);
 }
示例#2
0
        public Form1()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            myJStick = new ZalJoystick(this, JOYSTICK_MAX);
            myJStick.InitDirectInput();
            this.gamepadThold = 50;
            this.axisCount    = 0;
            this.axisFRSign   = new int[4];
            this.socket       = new UDPClientASocket();

            this.x           = this.Width / 2;
            this.y           = this.Height / 2;
            this.guiCircle   = new ZalCircle(this.ClientSize.Width / 2, this.ClientSize.Height / 2, this.ClientSize.Width / 2);
            this.limitCircle = new ZalCircle(0, 0, JOYSTICK_MAX);
            rad45            = (Math.PI / 180) * 45;
        }