Exemple #1
0
        public override void Update(CMSModule module)
        {
            lock (mutex)
            {
                CMSClickControlModuleStandard clickModule = module as CMSClickControlModuleStandard;

                this.DwellTime    = clickModule.DwellTime;
                this.PlaySound    = clickModule.PlaySound;
                this.Radius       = clickModule.Radius;
                this.ClickEnabled = clickModule.ClickEnabled;
            }
        }
Exemple #2
0
        private void LoadToControls()
        {
            if (trackingSuiteStandard == null)
            {
                throw new Exception("Tracking suite is null");
            }

            loadingControls = true;

            CMSTrackingModuleStandard     trackingModule     = trackingSuiteStandard.StandardTracking;
            CMSMouseControlModuleStandard mouseControlModule = trackingSuiteStandard.StandardMouseControl;
            CMSClickControlModuleStandard clickControlModule = trackingSuiteStandard.StandardClickControl;


            checkBoxReverseMouse.Checked = mouseControlModule.ReverseHorizontal;
            clicking.Checked             = clickControlModule.ClickEnabled;
            clickRadius.Enabled          = clickControlModule.ClickEnabled;
            dwell.Enabled       = clickControlModule.ClickEnabled;
            click_sound.Enabled = clickControlModule.ClickEnabled;
            click_sound.Checked = clickControlModule.PlaySound;

            comboBoxSecondsMouseInactivity.SelectedItem = togglerConfig.AutoStartDelay.ToString();
            auto_start.Checked   = togglerConfig.AutoStartControlEnabled;
            go_ctrl.Checked      = togglerConfig.CtrlStart;
            go_scroll.Checked    = togglerConfig.ScrollStart;
            stopScroll.Checked   = togglerConfig.ScrollStop;
            stop_ctrl.Checked    = togglerConfig.CtrlStop;
            stop_on_move.Checked = togglerConfig.AutoStopControlEnabled;
            notify_sound.Checked = togglerConfig.PlaySoundOnControlChanges;

            double val  = Math.Round(100.0F * mouseControlModule.EastLimit);
            string temp = ((int)(val)).ToString() + "%";

            this.exclude_E.SelectedItem = temp;

            val  = Math.Round(100.0F * mouseControlModule.WestLimit);
            temp = ((int)(val)).ToString() + "%";
            this.exclude_W.SelectedItem = temp;

            val  = Math.Round(100.0F * mouseControlModule.NorthLimit);
            temp = ((int)(val)).ToString() + "%";
            this.exclude_N.SelectedItem = temp;

            val  = Math.Round(100.0F * mouseControlModule.SouthLimit);
            temp = ((int)(val)).ToString() + "%";
            this.exclude_S.SelectedItem = temp;

            long lval = clickControlModule.DwellTime;

            if (lval == 100)
            {
                this.dwell.SelectedItem = "0.1 Sec";
            }
            else if (lval == 250)
            {
                this.dwell.SelectedItem = "0.25 Sec";
            }
            else if (lval == 500)
            {
                this.dwell.SelectedItem = "0.5 Sec";
            }
            else if (lval == 750)
            {
                this.dwell.SelectedItem = "0.75 Sec";
            }
            else if (lval == 1000)
            {
                this.dwell.SelectedItem = "1 Sec";
            }
            else if (lval == 1500)
            {
                this.dwell.SelectedItem = "1.5 Sec";
            }
            else if (lval == 2000)
            {
                this.dwell.SelectedItem = "2 Sec";
            }
            else if (lval == 3000)
            {
                this.dwell.SelectedItem = "3 Sec";
            }

            val = clickControlModule.Radius;
            if (val == 0.025)
            {
                this.clickRadius.SelectedItem = "Small";
            }
            else if (val == 0.05)
            {
                this.clickRadius.SelectedItem = "Normal";
            }
            else if (val == 0.075)
            {
                this.clickRadius.SelectedItem = "Large";
            }

            val = mouseControlModule.UserHorizontalGain;
            if (val == 3.0)
            {
                this.Horiz_gain.SelectedItem = "Very Low";
            }
            else if (val == 4.5)
            {
                this.Horiz_gain.SelectedItem = "Low";
            }
            else if (val == 6.0)
            {
                this.Horiz_gain.SelectedItem = "Med";
            }
            else if (val == 7.5)
            {
                this.Horiz_gain.SelectedItem = "Med High";
            }
            else if (val == 9.0)
            {
                this.Horiz_gain.SelectedItem = "High";
            }
            else if (val == 10.5)
            {
                this.Horiz_gain.SelectedItem = "Very High";
            }
            else if (val == 12.0)
            {
                this.Horiz_gain.SelectedItem = "Extreme";
            }

            val = mouseControlModule.UserVerticalGain;
            if (val == 3.0)
            {
                this.vert_gain.SelectedItem = "Very Low";
            }
            else if (val == 4.5)
            {
                this.vert_gain.SelectedItem = "Low";
            }
            else if (val == 6.0)
            {
                this.vert_gain.SelectedItem = "Med";
            }
            else if (val == 7.5)
            {
                this.vert_gain.SelectedItem = "Med High";
            }
            else if (val == 9.0)
            {
                this.vert_gain.SelectedItem = "High";
            }
            else if (val == 10.5)
            {
                this.vert_gain.SelectedItem = "Very High";
            }
            else if (val == 12.0)
            {
                this.vert_gain.SelectedItem = "Extreme";
            }

            val = mouseControlModule.Damping;
            if (val == 1.0)
            {
                this.smooth.SelectedItem = "Off";
            }
            else if (val == 0.95)
            {
                this.smooth.SelectedItem = "Very Low";
            }
            else if (val == 0.8)
            {
                this.smooth.SelectedItem = "Low";
            }
            else if (val == 0.65)
            {
                this.smooth.SelectedItem = "Med";
            }
            else if (val == 0.5)
            {
                this.smooth.SelectedItem = "Med High";
            }
            else if (val == 0.3)
            {
                this.smooth.SelectedItem = "High";
            }
            else if (val == 0.15)
            {
                this.smooth.SelectedItem = "Very High";
            }
            else if (val == 0.05)
            {
                this.smooth.SelectedItem = "Extreme";
            }

            this.comboBoxAutoStart.SelectedItem = trackingModule.AutoStartMode.ToString();

            loadingControls = false;
        }
 public void SetClickControl(CMSClickControlModuleStandard standardClickControl)
 {
     this.standardClickControl = standardClickControl;
     LoadFromControls();
 }