示例#1
0
        private void timeSincePoke_Tick(object sender, EventArgs e)
        {
            pokeTime++;
            CheckFullScreen checkscreen = new CheckFullScreen();

            lblRemain.Text = pokeTime.ToString();
            if (checkscreen.checkFullWindow())
            {
                pokeTime = 0;
            }
            if (pokeTime > 30)
            {
                pokeTime = 0;
                timeSincePoke.Stop();
                Application.SetSuspendState(PowerState.Suspend, true, false);
            }
        }
示例#2
0
 private void timeSincePoke_Tick(object sender, EventArgs e)
 {
     pokeTime++;
     CheckFullScreen checkscreen = new CheckFullScreen();
     lblRemain.Text= pokeTime.ToString() ;
     if (checkscreen.checkFullWindow())
     {
         pokeTime = 0;
     }
     if (pokeTime > 30)
     {
         pokeTime = 0;
         timeSincePoke.Stop();
         Application.SetSuspendState(PowerState.Suspend, true, false);
     }
 }