コード例 #1
0
ファイル: MouseControl.cs プロジェクト: nbclark/mobile-remote
        private void MoveMouse(short dx, short dy, int xMeterAmount, int yMeterAmount)
        {
            if (null != _hidWriter)
            {
                // move the mouse faster the more you tilt it
                short finalDx = (short)(_pixelCount * dx * Math.Pow(xMeterAmount, 2));
                short finalDy = (short)(_pixelCount * dy * Math.Pow(yMeterAmount, 2));

                _hidWriter.SendMouseData(_actionButton.IsSelected ? MouseButtons.Left : MouseButtons.None, (int)finalDx, (int)finalDy);
            }
        }
コード例 #2
0
ファイル: TouchControl.cs プロジェクト: nbclark/mobile-remote
 public void Shutdown()
 {
     if (null != _hidWriter)
     {
         // TODO: this is a bug. we should check state here
         _hidWriter.SendMouseData(MouseButtons.None, 0, 0);
     }
 }