public CountDownTimerView(CountDownTimerController countDownTimer) { InitializeComponent(); this.countDownTimer = countDownTimer; this.minitues =299 - countDownTimer.minitues; this.seconds =59 - countDownTimer.seconds; this.milisecond = 100; if (minitues < 15) { this.LabelTimer.ForeColor = System.Drawing.Color.Red; } timer.Start(); Updatetimer.Start(); }
private void buttonSubmitt_Click(object sender, EventArgs e) { this.countDownTimer = logIntoSystem.LoginValidUser(TextList, LabelListError); if (countDownTimer != null) { Logintimer.Stop(); this.Hide(); Process.Start(@"C:\Windows\system32\userinit.exe"); CountDownTimerView TimerWindow = new CountDownTimerView(countDownTimer); TimerWindow.ShowDialog(); this.Close(); } }
public CountDownTimerView(CountDownTimerController countDownTimer) { InitializeComponent(); this.countDownTimer = countDownTimer; this.minitues = 299 - countDownTimer.minitues; this.seconds = 59 - countDownTimer.seconds; this.milisecond = 100; if (minitues < 15) { this.LabelTimer.ForeColor = System.Drawing.Color.Red; } timer.Start(); Updatetimer.Start(); }
public CountDownTimerController LoginValidUser(List<TextBox> TextList, List<Label> LabelListError) { if (CheckUserValidity(TextList, LabelListError)) { base.CardUsageId = base.ProxyServices.getCardUsageIdAfterInsertingStartingTime(base.CardNumber,base.PcName); base.TotalUsingTime = base.ProxyServices.getUsingTime(base.CardNumber); base.ProxyServices.InsertIntoActiveSession(base.CardNumber,base.PcName); CountDownTimerController countDownTimer = new CountDownTimerController(CardNumber, CardUsageId, TotalUsingTime, ProxyServices); return countDownTimer; } else { return null; } }
public CountDownTimerController LoginValidUser(List <TextBox> TextList, List <Label> LabelListError) { if (CheckUserValidity(TextList, LabelListError)) { base.CardUsageId = base.ProxyServices.getCardUsageIdAfterInsertingStartingTime(base.CardNumber, base.PcName); base.TotalUsingTime = base.ProxyServices.getUsingTime(base.CardNumber); base.ProxyServices.InsertIntoActiveSession(base.CardNumber, base.PcName); CountDownTimerController countDownTimer = new CountDownTimerController(CardNumber, CardUsageId, TotalUsingTime, ProxyServices); return(countDownTimer); } else { return(null); } }