예제 #1
0
      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);
      }