Exemplo n.º 1
0
 private void StopButton_Click(object sender, EventArgs e)
 {
     timer1.Stop();
     timer2.Stop();
     LogOffTimer.Stop();
     SchoolIDTimer.Stop();
 }
Exemplo n.º 2
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();
        }
Exemplo n.º 3
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();
        }