public void UpdateSettings(ServiceSettingsEntity settings) { Log.Logger.Information($"Executing webservice operation \"{MethodBase.GetCurrentMethod().Name}\""); FilePersistenceAdapters.SettingsFilePersistence.Entities.Clear(); FilePersistenceAdapters.SettingsFilePersistence.Entities.Add(settings); FilePersistenceAdapters.SettingsFilePersistence.OnEntitesChanged(); }
public virtual ServiceSettingsEntity LoadSettings() { Log.Logger.Information($"Loading settings"); ServiceSettingsEntity settings = LoadSettingsImplementation(); Log.Logger.Information($"Loading settings done"); return(settings); }
protected virtual void DisplaySettingsFromDto(ServiceSettingsEntity settings) { autostartEnabledCheckbox.Checked = settings.AutoStartService; serviceEnabledcheckBox.Checked = settings.ServiceEnabled; beeperEnabledcheckBox.Checked = settings.BeeperEnabled; beepIntervalNumbericBox.Value = settings.BeeperIntervalMinutes; snoozeEnabledcheckBox.Checked = settings.SnoozeEnabled; snoozeIntervalNumbericBox.Value = settings.SnoozeIntervalMinutes; }
public virtual void UpdateSettings(ServiceSettingsEntity settings) { if (settings == null) { Log.Logger.Error($"Settings to update is null"); throw new ArgumentNullException("Settings to update is null"); } Log.Logger.Information($"Updating settings"); UpdateSettingsImplementation(settings); Log.Logger.Information($"Updating settings done"); }
protected virtual ServiceSettingsEntity CreateServiceSettingsEntity() { var settings = new ServiceSettingsEntity() { AutoStartService = autostartEnabledCheckbox.Checked, ServiceEnabled = serviceEnabledcheckBox.Checked, BeeperEnabled = beeperEnabledcheckBox.Checked, BeeperIntervalMinutes = (int)beepIntervalNumbericBox.Value, SnoozeEnabled = snoozeEnabledcheckBox.Checked, SnoozeIntervalMinutes = (int)snoozeIntervalNumbericBox.Value, Language = TranslationProvider.Language }; return(settings); }
public void UpdateSettings(ServiceSettingsEntity serviceSettingsEntity) { Log.Logger.Information("TimerScheduler updating settings"); //TODO: remove autostart from UI. Disabling service autostart would probably be feature for future (for never) as it is too complex and doesn't bring almost any value. ReminderScheduler.ConfigureSnooze(serviceSettingsEntity.SnoozeEnabled, serviceSettingsEntity.SnoozeIntervalMinutes); BeeperScheduler.Interval = serviceSettingsEntity.BeeperIntervalMinutes; BeeperScheduler.BeeperEnabledInSettings = serviceSettingsEntity.BeeperEnabled; //we are actually only disabling the this scheduler, not complete service SchedulerEnabledInSettings = serviceSettingsEntity.ServiceEnabled; Log.Logger.Information("TimerScheduler updating settings done"); }
protected virtual void UpdateSettingsImplementation(ServiceSettingsEntity settings) { Proxy.UpdateSettings(settings); }
public void UpdateSettings(ServiceSettingsEntity settings) { Channel.UpdateSettings(settings); }