예제 #1
0
        private Int64 GetAllTodayRemindersDataFromDatabase()
        {
            List <NotificationPopUp> timeList;
            TaskSer ts = new TaskSer();

            while (true)
            {
                timeList = ts.GetAllTodayNotificationTime();
                for (int i = 0; i < timeList.Count; i++)
                {
                    if (timeList[i].Time.Equals(DateTime.Now.ToString("hh:mm tt")))
                    {
                        if (cs != null)
                        {
                            if (timeList[i].Task_ID != notifyPopUp.Task_ID)
                            {
                                CustomNotifyDel ac = new CustomNotifyDel(CustomNotificationPopUp);
                                BeginInvoke(ac, timeList[i]);
                            }
                        }
                        if (cs == null)
                        {
                            CustomNotifyDel ac = new CustomNotifyDel(CustomNotificationPopUp);
                            BeginInvoke(ac, timeList[i]);
                        }
                        break;
                    }
                }
                Thread.Sleep(60000);
            }
        }