Ejemplo n.º 1
0
        private void jiggleTimer_Tick(object sender, EventArgs e)
        {
            if (DateTime.Now.Hour > 17 || DateTime.Now.Hour < 8)
            {
                return;
            }
            // jiggle
            if (this.cbZenJiggle.Checked)
            {
                Jiggler.Jiggle(0, 0);
            }
            else
            {
                if (this.zig)
                {
                    Jiggler.Jiggle(4, 4);
                }
                else // zag
                {
                    // I really don't know why this needs to be less to stay in the same
                    // place; if I was likely to use it again, then I'd worry.
                    Jiggler.Jiggle(-4, -4);
                }
            }

            this.zig = !this.zig;
        }
Ejemplo n.º 2
0
        private void jiggleTimer_Tick(object sender, EventArgs e)
        {
            if (this.zig)
            {
                Jiggler.Jiggle(4, 4);
                this.jiggleTimer.Interval = 500;
            }
            else // zag
            {
                Jiggler.Jiggle(-4, -4);
                this.jiggleTimer.Interval = Program.JiggleInterval * 60 * 1000;
            }

            this.zig = !this.zig;
        }
Ejemplo n.º 3
0
        private void jiggleTimer_Tick(object sender, EventArgs e)
        {
            //don't jiggle if the mouse has moved lately.
            if ((DateTime.Now - lastMovement).TotalSeconds < MIN_IDLE_TIME_SECONDS)
            {
                Log.Debug("mouse movement wait period");
                return;
            }

            Log.Debug((DateTime.Now - lastMovement).TotalMinutes.ToString() + " " + TimeoutMinutes.ToString());
            //don't jiggle if we're over the timeout limit.   0 means we're not using timeout
            if (TimeoutMinutes > 0)
            {
                if ((DateTime.Now - lastMovement).TotalMinutes >= TimeoutMinutes)
                {
                    Log.Debug("time limit exceeded");
                    return;
                }
            }

            try
            {
                // jiggle
                if (this.chkZen.Checked)
                {
                    Log.Debug("Zen");
                    Jiggler.Jiggle(0, 0);
                }
                else
                {
                    Log.Debug("Jiggling");
                    Jiggler.Jiggle(4, 4);
                    System.Threading.Thread.Sleep(10);
                    Jiggler.Jiggle(-4, -4);
                }
            }
            catch (Exception)
            {
                //authorization exception might occur;  unusre why.
                //Log.Debug(ex.Message);
                //Log.Debug(ex.StackTrace);
            }
        }
Ejemplo n.º 4
0
        private void jiggleTimer_Tick(object sender, EventArgs e)
        {
            // jiggle
            if (this.cbZenJiggle.Checked)
            {
                Jiggler.Jiggle(0, 0);
            }
            else
            {
                if (this.zig)
                {
                    Jiggler.Jiggle(4, 4);
                }
                else // zag
                {
                    Jiggler.Jiggle(-4, -4);
                }
            }

            this.zig = !this.zig;
        }
Ejemplo n.º 5
0
        private void jiggleTimer_Tick(object sender, EventArgs e)
        {
            // jiggle
            if (menuZen.Checked)
            {
                Jiggler.Jiggle(0, 0);
            }
            else
            {
                if (zig)
                {
                    Jiggler.Jiggle(4, 4);
                }
                else // zag
                {
                    // I really don't know why this needs to be less to stay in the same
                    // place; if I was likely to use it again, then I'd worry.
                    Jiggler.Jiggle(-4, -4);
                }
            }

            zig = !zig;
        }