Inheritance: IToastNotifier
        public ToastNotificationService(IDataContext dataContext, ITimeProvider timeProvider)
        {
            _dataContext = dataContext;
            _timeProvider = timeProvider;
            _toastNotificationManager = ToastNotificationManager.CreateToastNotifier();

            RescheduleAllEventNotifications();
        }
示例#2
0
        public LiveTiles() {
            tileUpdater = TileUpdateManager.CreateTileUpdaterForApplication();
            tileUpdater.EnableNotificationQueue(true);

            badgeUpdater = BadgeUpdateManager.CreateBadgeUpdaterForApplication();

            toastNotifier = ToastNotificationManager.CreateToastNotifier();
        }
        public NotificationsImpl()
        {
            this.badgeUpdater = BadgeUpdateManager.CreateBadgeUpdaterForApplication();
            this.toastNotifier = ToastNotificationManager.CreateToastNotifier();

            this.badgeXml = BadgeUpdateManager.GetTemplateContent(BadgeTemplateType.BadgeNumber);
            this.badgeEl = (XmlElement)this.badgeXml.SelectSingleNode("/badge");
        }
 public NotificationsService()
 {
     _notifier = ToastNotificationManager.CreateToastNotifier();
 }
        public static void Initialize(string rpShortcutName, string rpShortcutTargetPath, string rpAppUserModelID)
        {
            ShellUtil.InstallShortcutInStartScreen(rpShortcutName, rpShortcutTargetPath, rpAppUserModelID);

            r_Notifier = ToastNotificationManager.CreateToastNotifier(rpAppUserModelID);
        }
示例#6
0
 static ToastWin8Helper() {
     ToastNotifier = File.Exists(AppShortcut.ShortcutLocation) ? ToastNotificationManager.CreateToastNotifier(AppShortcut.AppUserModelId)
             : ToastNotificationManager.CreateToastNotifier();
 }
示例#7
0
        public void ScheduleReminderNotifications(ToastNotifier notifier, string userId)
        {
            foreach (var reminder in Reminders)
            {
                if (reminder.UserId != userId)
                {
                    continue;
                }
                var toast = ToastContentFactory.CreateToastText04();
                toast.TextHeading.Text = Title;
                toast.TextBody2.Text = Location;

                var reminderTime = Utilities.UnixTimeStampToDateTime(StartTime - reminder.Interval);
                var timeString = IntervalToString(StartDateTime - reminderTime);
                toast.TextBody1.Text = timeString;

                toast.Duration = ToastDuration.Long;
                toast.Audio.Loop = false;
                toast.Audio.Content = ToastAudioContent.Reminder;

                if (reminderTime < DateTime.Now)
                {
                    continue;
                }
                var scheduled = new ScheduledToastNotification(toast.CreateNotification().Content, reminderTime);
                
                notifier.AddToSchedule(scheduled);
            }
        }
示例#8
0
 public ToastService() {
     this.notifier = ToastNotificationManager.CreateToastNotifier();
 }
示例#9
0
 public void Notify(Toast toast)
 {
     if( _notifier == null )
         _notifier = ToastNotificationManager.CreateToastNotifier(_appId);
     var toastNotification = new ToastNotification(FormatXml(toast));
     if (toast.OnActivated != null)
     {
         toastNotification.Activated += (s, e) => toast.OnActivated();
     }
     _notifier.Show(toastNotification);
 }
 public async Task Initialize()
 {
     Notifier = ToastNotificationManager.CreateToastNotifier();
 }
 public ToastNotificationService()
 {
     _toastNotifier = ToastNotificationManager.CreateToastNotifier();
 }
示例#12
0
 public Toaster(String APP_ID)
 {
     this.APP_ID = APP_ID;
     notifier = ToastNotificationManager.CreateToastNotifier(APP_ID);
 }