Exemplo n.º 1
0
        /// <summary>
        /// Construct a new wiimote provider.
        /// </summary>
        public WiiPointerProvider()
        {
            lastpoint = new WiimoteLib.Point();
            lastpoint.X = 0;
            lastpoint.Y = 0;

            this.settingsControl = new WiiPointerProviderSettings();

            this.ScreenSize = new Vector(Util.ScreenWidth, Util.ScreenHeight);

            this.smoothingBuffer = new SmoothingBuffer(3);

            this.duoTouch = new DuoTouch(Util.ScreenBounds, 3, 1);

            this.keyMapper = new WiiKeyMapper(1);

            this.keyMapper.OnButtonDown += WiiButton_Down;
            this.keyMapper.OnButtonUp += WiiButton_Up;
            this.keyMapper.OnConfigChanged += WiiKeyMap_ConfigChanged;
            this.keyMapper.SendConfigChangedEvt();

            this.inputSimulator = new InputSimulator();

            this.showPointer = true;
            if (this.showPointer && !this.mouseMode)
            {
                this.duoTouch.enableHover();
            }
            else
            {
                this.duoTouch.disableHover();
            }

            screenPositionCalculator = new ScreenPositionCalculator();
        }
Exemplo n.º 2
0
        public CursorPositionHelper()
        {
            smoothingBuffer = new SmoothingBuffer(Settings.Default.pointer_positionSmoothing);
            screenBounds    = DeviceUtils.DeviceUtil.GetScreen(Settings.Default.primaryMonitor).Bounds;

            Settings.Default.PropertyChanged    += SettingsChanged;
            SystemEvents.DisplaySettingsChanged += SystemEvents_DisplaySettingsChanged;
        }
Exemplo n.º 3
0
        public CursorPositionHelper()
        {
            smoothingBuffer = new SmoothingBuffer(Settings.Default.pointer_positionSmoothing);
            screenBounds = DeviceUtils.DeviceUtil.GetScreen(Settings.Default.primaryMonitor).Bounds;

            Settings.Default.PropertyChanged += SettingsChanged;
            SystemEvents.DisplaySettingsChanged += SystemEvents_DisplaySettingsChanged;
        }
Exemplo n.º 4
0
        public DuoTouch(System.Drawing.Rectangle screenBounds, int smoothSize, ulong startId)
        {
            this.masterID = startId;
            this.slaveID = startId+1;
            this.startID = startId;

            this.masterPriority = (int)masterID;
            this.slavePriority = (int)slaveID;

            this.screenBounds = screenBounds;
            if (smoothSize < 1)
            {
                smoothSize = 1;
            }
            this.smoothingBuffer = new SmoothingBuffer(smoothSize);
        }
Exemplo n.º 5
0
        public DuoTouch(int smoothSize, ulong startId)
        {
            this.masterID = startId;
            this.slaveID = startId+1;
            this.startID = startId;

            this.masterPriority = (int)masterID;
            this.slavePriority = (int)slaveID;

            this.screenBounds = DeviceUtils.DeviceUtil.GetScreen(Settings.Default.primaryMonitor).Bounds;
            Settings.Default.PropertyChanged += SettingsChanged;
            SystemEvents.DisplaySettingsChanged += SystemEvents_DisplaySettingsChanged;

            if (smoothSize < 1)
            {
                smoothSize = 1;
            }
            this.smoothingBuffer = new SmoothingBuffer(smoothSize);
        }
Exemplo n.º 6
0
        public DuoTouch(int smoothSize, ulong startId)
        {
            this.masterID = startId;
            this.slaveID  = startId + 1;
            this.startID  = startId;

            this.masterPriority = (int)masterID;
            this.slavePriority  = (int)slaveID;

            this.screenBounds = DeviceUtils.DeviceUtil.GetScreen(Settings.Default.primaryMonitor).Bounds;
            Settings.Default.PropertyChanged    += SettingsChanged;
            SystemEvents.DisplaySettingsChanged += SystemEvents_DisplaySettingsChanged;


            if (smoothSize < 1)
            {
                smoothSize = 1;
            }
            this.smoothingBuffer = new SmoothingBuffer(smoothSize);
        }