Пример #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);
                }
            }
        }