public override void Load() { ClientsModel.Load(); OptionsModel.Load(); WebGenerationModel.Load(); WebVisualStylesModel.Load(); ReportingModel.Load(); WebProxyModel.Load(); }
public PreferencesModel(IPreferences preferences, IAutoRunConfiguration autoRunConfiguration) { Preferences = preferences ?? new InMemoryPreferencesProvider(); ClientsModel = new ClientsModel(Preferences); OptionsModel = new OptionsModel(Preferences, autoRunConfiguration); WebGenerationModel = new WebGenerationModel(Preferences); WebVisualStylesModel = new WebVisualStylesModel(Preferences); ReportingModel = new ReportingModel(Preferences); WebProxyModel = new WebProxyModel(Preferences); }
public override bool ValidateAcceptance() { OnPropertyChanged(String.Empty); ClientsModel.ValidateAcceptance(); OptionsModel.ValidateAcceptance(); WebGenerationModel.ValidateAcceptance(); WebVisualStylesModel.ValidateAcceptance(); ReportingModel.ValidateAcceptance(); WebProxyModel.ValidateAcceptance(); return(!HasError); }
public override void Save() { ClientsModel.Save(); OptionsModel.Save(); WebGenerationModel.Save(); WebVisualStylesModel.Save(); ReportingModel.Save(); WebProxyModel.Save(); Preferences.Save(); OptionsModel.SaveAutoRunConfiguration(); }
public PreferencesDialog(IPreferenceSet prefs, IAutoRun autoRun) { if (prefs == null) throw new ArgumentNullException("prefs"); if (autoRun == null) throw new ArgumentNullException("autoRun"); _prefs = prefs; _autoRun = autoRun; InitializeComponent(); udDecimalPlaces.Minimum = 0; udDecimalPlaces.Maximum = Constants.MaxDecimalPlaces; _validatingControls = new List<IValidatingControl>[tabControl1.TabCount]; _propertyCollection = new PropertyDescriptorCollection[tabControl1.TabCount]; _models = new object[tabControl1.TabCount]; if (!Core.Application.IsRunningOnMono) { _cssSampleBrowser = new WebBrowser(); pnl1CSSSample.Controls.Add(_cssSampleBrowser); _cssSampleBrowser.Dock = DockStyle.Fill; _cssSampleBrowser.Location = new Point(0, 0); _cssSampleBrowser.MinimumSize = new Size(20, 20); _cssSampleBrowser.Name = "_cssSampleBrowser"; _cssSampleBrowser.Size = new Size(354, 208); _cssSampleBrowser.TabIndex = 0; _cssSampleBrowser.TabStop = false; } txtCollectMinutes.ErrorToolTipText = String.Format("Minutes must be a value from {0} to {1}.", Constants.MinMinutes, Constants.MaxMinutes); txtWebGenMinutes.ErrorToolTipText = String.Format("Minutes must be a value from {0} to {1}.", Constants.MinMinutes, Constants.MaxMinutes); _scheduledTasksModel = new ScheduledTasksModel(prefs); _startupAndExternalModel = new StartupAndExternalModel(prefs); _optionsModel = new OptionsModel(prefs); _reportingModel = new ReportingModel(prefs); _webSettingsModel = new WebSettingsModel(prefs); _webVisualStylesModel = new WebVisualStylesModel(prefs); }