Ejemplo n.º 1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            int      i;
            DateTime dTime = DateTime.Now;

            for (i = 0; i < reminderSet.Tables[0].Rows.Count; i++)
            {
                DateTime dt = new DateTime();
                dt = DateTime.Now.Date;
                if (dt.CompareTo(Convert.ToDateTime(dateArr[i])) == 0)
                {
                    if (DateTime.Now.ToString("HH:mm tt") == (timeArr[i].ToString()))
                    {
                        onePing();

                        ////////////


                        try
                        {
                            frmView viewReminder = new frmView(reminderSet.Tables[0].Rows[i][0].ToString());
                            viewReminder.Show();
                        }
                        catch (Exception ew)
                        {
                            Console.Write(ew.ToString());
                        }
                        MessageBox.Show("New Reminder!", "Notification", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        //////////
                    }
                }
            }
        }
Ejemplo n.º 2
0
 private void button2_Click(object sender, EventArgs e)
 {
     try {
         string[] selectedID   = listReminder.SelectedItem.ToString().Split(':');
         frmView  viewReminder = new frmView(selectedID[0]);
         viewReminder.Show();
     }
     catch (Exception ew)
     {
         Console.Write(ew.ToString());
         MessageBox.Show("Please select any reminder to view!", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }