示例#1
0
        private static void ControllerOnStickChanged(object sender, StickEventArgs stickEventArgs)
        {
            _point.X = stickEventArgs.X;
            _point.Y = stickEventArgs.Y;

            if (stickEventArgs.X != 0 || stickEventArgs.Y != 0)
                _timer.Change(25, 25);
            else
                _timer.Change(-1, -1);
        }
示例#2
0
 private void ControllerOnStickChanged(object sender, StickEventArgs stickEventArgs)
 {
     var x = stickEventArgs.X*100/32767;
     var y = stickEventArgs.Y*-100/32767;
     if (stickEventArgs.Side == Side.Left)
         Invoke((MethodInvoker) (() =>
         {
             axisControl1.X = x;
             axisControl1.Y = y;
         }));
     else
         Invoke((MethodInvoker)(() =>
         {
             axisControl2.X = x;
             axisControl2.Y = y;
         }));
 }