public override void LoadPageConfig() { if (!IsCreationMode) { if (string.IsNullOrEmpty(InputConfigurationXml)) { return; } try { SchedulerSettingsConfig config = XmlHelper.Deserialize(InputConfigurationXml, typeof(SchedulerSettingsConfig), true) as SchedulerSettingsConfig; daysOfWeek = config.DaysOfWeekMask; txtIntervalSeconds.Value = config.IntervalSeconds; cmbTimes.SelectedIndex = 0; txtSyncTime.Text = config.SyncTime; txtStartTime.Text = config.StartDay; txtEndTime.Text = config.EndDay; SetSharedUserData(); } catch (ArgumentNullException exception) { return; } catch (InvalidOperationException exception2) { return; } } IsConfigValid = ValidatePageConfiguration(); base.LoadPageConfig(); }
public override bool SavePageConfig() { IsConfigValid = ValidatePageConfiguration(); if (!IsConfigValid) { return(false); } SchedulerSettingsConfig config = new SchedulerSettingsConfig(); config.DaysOfWeekMask = getDayOfMask(); config.IntervalSeconds = GetIntervalSeconds(); config.SyncTime = txtSyncTime.Text; config.StartDay = txtStartTime.Text; config.EndDay = txtEndTime.Text; OutputConfigurationXml = XmlHelper.Serialize(config, true); SetSharedUserData(); return(true); }