示例#1
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");
        }
示例#2
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
            });
        }
示例#3
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);
                }
            }
        }