예제 #1
0
        public override void ScheduleCustomNoti(string title, string message, int id, DateTime notiTime)
        {
            NotifieriOS notifier = new NotifieriOS();

            notifier.Notify(new Notification
            {
                Title      = title,
                Text       = message,
                Id         = id,
                NotifyTime = notiTime
            });
        }
예제 #2
0
        public override void TestNoti(string message = "")
        {
            NotifieriOS notifier = new NotifieriOS();

            notifier.Notify(new Notification
            {
                Title      = "Test Noti",
                Text       = message,
                Id         = 990,
                NotifyTime = DateTime.Now.AddSeconds(5)
            }, "TestNoti");
        }
예제 #3
0
        public override void Cancel <T>()
        {
            NotifieriOS   notifier   = new NotifieriOS();
            List <string> cancelList = new List <string>();

            foreach (T item in manager.GetNotiList <T>())
            {
                cancelList.Add(item.NotiId.ToString());
            }

            notifier.Cancel(cancelList.ToArray());
        }
예제 #4
0
        public override void Schedule <T>()
        {
            NotifieriOS notifier = new NotifieriOS();
            DateTime    now      = DateTime.Now;

            foreach (T item in manager.GetNotiList <T>())
            {
                if (item.NotiTime > now)
                {
                    Notification notification = new Notification
                    {
                        Title      = item.GetNotiTitle(),
                        Text       = item.GetNotiText(),
                        Id         = item.NotiId,
                        NotifyTime = item.NotiTime
                    };
                    notification.SetType <T>();

                    notifier.Notify(notification);
                }
            }
        }