private void Settings_SettingsUpdated(object sender, SettingsUpdatedEventArgs args) { if (_tilePageSettings.Contains(args.Key)) { // Delay the UI refresh in case a lot of updates arrive at the same time _updateTimer = ThreadPoolTimer.CreateTimer(UpdateApps, _updateDelay); } }
private void Settings_SettingsUpdated(object sender, SettingsUpdatedEventArgs args) { if (sender is SettingsProvider settings) { switch (args.Key) { case "SlideshowIntervalSeconds": _interval = TimeSpan.FromSeconds(settings.SlideshowIntervalSeconds); StartSlideshowTimer(); break; } } }
private void Settings_SettingsUpdated(object sender, SettingsUpdatedEventArgs args) { if (sender is SettingsProvider settings) { switch (args.Key) { case "SlideshowIntervalSeconds": _slideshowTimer?.Cancel(); _interval = TimeSpan.FromSeconds(settings.SlideshowIntervalSeconds); _slideshowTimer = ThreadPoolTimer.CreatePeriodicTimer(SlideshowTimer_Elapsed, _interval); break; } } }
private void Settings_SettingsUpdated(object sender, SettingsUpdatedEventArgs args) { switch (args.Key) { case "WeatherLocationLatitude": case "WeatherLocationLongitude": case "MapSizeExpanded": case "MapFlipEnabled": _updateSettingsTimer?.Cancel(); _updateSettingsTimer = ThreadPoolTimer.CreateTimer((t) => { InvokeOnUIThread(async() => await RefreshUiAsync()); }, TimeSpan.FromSeconds(1)); break; } }
private void Settings_SettingsUpdated(object sender, SettingsUpdatedEventArgs args) { if (sender is SettingsProvider settings) { switch (args.Key) { case "AppEnableTelemetry": TelemetryService.IsEnabled = settings.AppEnableTelemetry; break; } } // Only send one event if many updates come in at the same time _delayTimer?.Cancel(); _delayTimer = ThreadPoolTimer.CreateTimer((t) => { TelemetryService.WriteEvent("AppPreferencesSaved"); }, TimeSpan.FromSeconds(1)); }
private void Settings_SettingsUpdated(object sender, SettingsUpdatedEventArgs args) { if (sender is SettingsProvider settings) { switch (args.Key) { case "AppDefaultPage": PageService.UpdateDefaultPageIcon(settings.GetDefaultPageType().FullName); break; case "AppScaling": case "AppAutoScaling": RefreshPageSize(); break; case "ScreensaverEnabled": UpdateScreensaverEnabled(); break; } } }
private void OnSettingsUpdated(SettingsUpdatedEventArgs obj) { if (CurrentlyBuiltFilter?.FilterSectionCollection == null || !CurrentlyBuiltFilter.FilterSectionCollection.Any(x => x.ItemType == EnumFilterSectionItemType.Date && x.IsActive)) { return; } var dateFilter = FilterModelManager.FilterModelCollection.OfType <FilterDateModel>().FirstOrDefault(); if (dateFilter != null) { if (dateFilter.DateFilterType.EnumDateRange != EnumDateFiterStruct.EnumDateFiter.ThisWeek) { return; } var firstDayOfWeek = ServiceLocator.Current.GetInstance <ISettingsService>().GetSettings().GeneralSettings.StartDayOfWeek; if (firstDayOfWeek != dateFilter.FirstDayOfWeek) { UpdateDateFilter(new DateFilterChangedEventArgs(dateFilter.DateFilterType)); } } }
private void CommandIssuer_SettingsUpdated(object sender, SettingsUpdatedEventArgs e) { var timerSettings = SettingsManager.SimpleSettingsManager.Fetch(e.TimerId); this.ApplySettings(timerSettings); }
private void Settings_SettingsUpdated(object sender, SettingsUpdatedEventArgs args) { NotifyPropertyChanged(args.Key); }
private async void SettingsWindow_SettingsUpdated(object sender, SettingsUpdatedEventArgs e) { await gm.UpdateSettings(e.Settings); }
//private void TimePlanCommandIssuer_SettingsChanged(object sender, SettingsChangedEventArgs e) //{ // //this.timePlanCommandIssuer.CurrentTimerCommandIssuer.OnSettingsChanged(e.Settings); // //this.timePlanCommandIssuer.NextTimerCommandIssuer.OnSettingsChanged(e.Settings); //} private void TimePlanCommandIssuer_SettingsUpdated(object sender, SettingsUpdatedEventArgs e) { this.timePlanCommandIssuer.CurrentTimerCommandIssuer.OnSettingsUpdated(e.TimerId); this.timePlanCommandIssuer.NextTimerCommandIssuer.OnSettingsUpdated(e.TimerId); }