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); } }
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); } }