Пример #1
0
        private void LogOffTimer_Tick(object sender, EventArgs e)
        {
            Win32.POINT p3 = new Win32.POINT();
            p3.x = Convert.ToInt16(LogOffX.Text); //x coordinate taken from the txtbox
            p3.y = Convert.ToInt16(LogOffY.Text); //y coordinate taken from the txtbox

            Win32.ClientToScreen(this.Handle, ref p3);
            Win32.SetCursorPos(p3.x, p3.y);

            DoMouseClick(p3.x, p3.y);
            LogOffTimer.Stop();
            var userSetDelay4 = SIDValue.Value;

            SchoolIDTimer.Interval = Convert.ToInt32(userSetDelay4) * 1000;
            SchoolIDTimer.Start();
        }
Пример #2
0
        private void timer1_Tick(object sender, EventArgs e)
        {                                        //first tick
            Win32.POINT p = new Win32.POINT();
            p.x = Convert.ToInt16(XTxtBox.Text); //x coordinate taken from the txtbox
            p.y = Convert.ToInt16(YTxtBox.Text); //y coordinate taken from the txtbox

            Win32.ClientToScreen(this.Handle, ref p);
            Win32.SetCursorPos(p.x, p.y);

            DoMouseClick(p.x, p.y);
            var userSetDelay3 = LogValue.Value;

            LogOffTimer.Interval = Convert.ToInt32(userSetDelay3) * 1000;
            LogOffTimer.Start();
            //EnterTimer.Start();
            //timer2.Start();
            timer1.Stop();
        }
Пример #3
0
        private void timer2_Tick(object sender, EventArgs e)
        {
            Win32.POINT p2 = new Win32.POINT();
            p2.x = Convert.ToInt16(X2TxtBox.Text); //x coordinate taken from the txtbox
            p2.y = Convert.ToInt16(Y2TxtBox.Text); //y coordinate taken from the txtbox

            Win32.ClientToScreen(this.Handle, ref p2);
            Win32.SetCursorPos(p2.x, p2.y);

            DoMouseClick(p2.x, p2.y);

            var userSetDelay = delayValue.Value;                    //gets the delay value the user sets using the numericUpDown control

            timer1.Interval = Convert.ToInt32(userSetDelay) * 1000; //multiply by 1000 because this is supposed to be in miliseconds but we
            //use seconds on the numericUpDown to make it easier for the user.

            timer1.Start();
            timer2.Stop();
        }
Пример #4
0
        private void SchoolIDTimer_Tick(object sender, EventArgs e)
        {
            Win32.POINT p4 = new Win32.POINT();
            p4.x = Convert.ToInt16(SIDX.Text); //x coordinate taken from the txtbox
            p4.y = Convert.ToInt16(SIDY.Text); //y coordinate taken from the txtbox

            Win32.ClientToScreen(this.Handle, ref p4);
            Win32.SetCursorPos(p4.x, p4.y);

            DoMouseClick(p4.x, p4.y);
            SendKeys.Send(SIDTxtBox.Text);
            SendKeys.Send("{ENTER}");
            SchoolIDTimer.Stop();
            var userSetDelay2 = delayValue2.Value;                   //gets the delay value the user sets using the numericUpDown control

            timer2.Interval = Convert.ToInt32(userSetDelay2) * 1000; //multiply by 1000 because this is supposed to be in miliseconds but we
            //use seconds on the numericUpDown to make it easier for the user.
            timer2.Start();
        }