private void tmerTickIfClickOK_Tick(object sender, EventArgs e) { if (clsReminder.pdcDue() == true) { checkCounter = 5; ReminderPDC.reminder frm = new ReminderPDC.reminder(); clsReminder.getCntPDCdueToday(btnNotifPDC, frm.lblSpiel, frm.btnRemid); } else { //NO RECORDS btnNotifPDC.Visible = false; tmerTickIfClickOK.Stop(); } }
private void timer1_Tick(object sender, EventArgs e) { counter--; if (counter == 0) { if (clsReminder.pdcDue() == true) { //REMIND USER AGAIN AFTER THE GIVEN PERIOD OF TIME counter = 3600; timer1.Stop(); ReminderPDC.reminder frm = new ReminderPDC.reminder(); clsReminder.getCntPDCdueToday(btnNotifPDC, frm.lblSpiel, frm.btnRemid); this.Activate(); this.Show(); frm.ShowDialog(); } else { counter = 0; timer1.Stop(); } } else { if (checkCounter == 0) { //STOP 10 seconds and check in database //IF still there then reset again to 10 seconds if (clsReminder.pdcDue() == true) { checkCounter = 5; ReminderPDC.reminder frm = new ReminderPDC.reminder(); clsReminder.getCntPDCdueToday(btnNotifPDC, frm.lblSpiel, frm.btnRemid); } else { counter = 0; //NO RECORDS btnNotifPDC.Visible = false; timer1.Stop(); } } else { checkCounter--; } } }
private void Form1_Load(object sender, EventArgs e) { this.MaximizedBounds = Screen.FromHandle(this.Handle).WorkingArea; this.WindowState = FormWindowState.Maximized; //LoadName lblFullName.Text = Classes.clsUser.firstName + " " + Classes.clsUser.middleName + " " + Classes.clsUser.lastName; if (clsReminder.pdcDue() == true) { ReminderPDC.reminder frm = new ReminderPDC.reminder(); //SHOW NOTIF BUTTON clsReminder.getCntPDCdueToday(btnNotifPDC, frm.lblSpiel, frm.btnRemid); //FOR PDC MANAGEMENT frm.ShowDialog(); } else { btnNotifPDC.Visible = false; } }