public async void Run(IBackgroundTaskInstance taskInstance) { var def = taskInstance.GetDeferral(); try { Data.data = Data.JsonToArray <Data>(await Data.Read_Data_To_String(Fixed.App_Data_File))[0]; LiveTile.Update(); Notification.Set(Data.Obavijest.All); } finally { def.Complete(); } }
private void livetile_TS_Toggled(object sender, RoutedEventArgs e) { if (ucitavam) { return; } Memory.Live_Tile = livetile_TS.IsOn; if (Memory.Live_Tile) { LiveTile.Update(); } else { LiveTile.Reset(); } Postavi_Stranicu(); }
protected override void OnNavigatedFrom(NavigationEventArgs e) { Debug.WriteLine("NAV FROM: {0} ({1})", this, e.NavigationMode); base.OnNavigatedFrom(e); if (!e.IsNavigationInitiator) { LiveTile.UpdateOrReset(Settings.Current.EnableTile, App.Tasks.Tasks); foreach (TaskModel task in App.Tasks.Tasks) { if (task.ModifiedSinceStart) { task.ModifiedSinceStart = false; LiveTile.Update(task); } } } }
protected void AppointmentsSearchCompleted(object sender, AppointmentsSearchEventArgs e) { var licenseInfo = new LicenseInformation(); if (!licenseInfo.IsTrial()) { var appointment = Calendar.GetAppointment(e); if (appointment == null) { return; } LiveTile.Update(appointment.Subject, appointment.Location, appointment.DateAndTime, Battery, AppSettings); } else { LiveTile.Update("Sample Calendar Item", "Get full version", "to display calendar items", Battery, AppSettings); } // Call NotifyComplete to let the system know the agent is done working. NotifyComplete(); }
/// <summary> /// Invoked when application execution is being suspended. Application state is saved /// without knowing whether the application will be terminated or resumed with the contents /// of memory still intact. /// </summary> /// <param name="sender">The source of the suspend request.</param> /// <param name="e">Details about the suspend request.</param> private void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); try { if (Memory.Live_Tile) /// Update / reset live tile { LiveTile.Update(); } else { LiveTile.Reset(); } Set.Group_Notifications(2, 0, false); } finally { deferral.Complete(); } }
private void livetile_TS_Toggled(object sender, RoutedEventArgs e) { Memory.Live_Tile = livetile_TS.IsOn; LiveTile.Update(); }