Пример #1
0
        protected void InitWarnings()
        {
            ConfigurationGuiBinding b;

            b = helper.BindStringEnum("warningLevelComboBox", "WarningLevel",
                                      "4",
                                      new StringPair("0", "0"),
                                      new StringPair("1", "1"),
                                      new StringPair("2", "2"),
                                      new StringPair("3", "3"),
                                      new StringPair("4", "4"));
            ChooseStorageLocationButton locationButton = b.CreateLocationButtonInPanel("warningsGroupBox");

            b = helper.BindString("suppressWarningsTextBox", "NoWarn", TextBoxEditMode.EditEvaluatedProperty);
            b.RegisterLocationButton(locationButton);

            b = new WarningsAsErrorsBinding(this);
            helper.AddBinding("TreatWarningsAsErrors", b);
            locationButton = b.CreateLocationButtonInPanel("treatWarningsAsErrorsGroupBox");
            b = helper.BindString("specificWarningsTextBox", "WarningsAsErrors", TextBoxEditMode.EditEvaluatedProperty);             // must be saved AFTER TreatWarningsAsErrors
            b.RegisterLocationButton(locationButton);

            EventHandler setDirty = delegate {
                helper.IsDirty = true;
            };

            Get <RadioButton>("none").CheckedChanged             += setDirty;
            Get <RadioButton>("specificWarnings").CheckedChanged += setDirty;
            Get <RadioButton>("all").CheckedChanged += setDirty;

            Get <RadioButton>("specificWarnings").CheckedChanged += new EventHandler(UpdateWarningChecked);

            UpdateWarningChecked(this, EventArgs.Empty);
        }
Пример #2
0
		protected void InitWarnings()
		{
			ConfigurationGuiBinding b;
			b = helper.BindStringEnum("warningLevelComboBox", "WarningLevel",
			                          "4",
			                          new StringPair("0", "0"),
			                          new StringPair("1", "1"),
			                          new StringPair("2", "2"),
			                          new StringPair("3", "3"),
			                          new StringPair("4", "4"));
			ChooseStorageLocationButton locationButton = b.CreateLocationButtonInPanel("warningsGroupBox");
			b = helper.BindString("suppressWarningsTextBox", "NoWarn", TextBoxEditMode.EditEvaluatedProperty);
			b.RegisterLocationButton(locationButton);
			
			b = new WarningsAsErrorsBinding(this);
			helper.AddBinding("TreatWarningsAsErrors", b);
			locationButton = b.CreateLocationButtonInPanel("treatWarningsAsErrorsGroupBox");
			b = helper.BindString("specificWarningsTextBox", "WarningsAsErrors", TextBoxEditMode.EditEvaluatedProperty); // must be saved AFTER TreatWarningsAsErrors
			b.RegisterLocationButton(locationButton);
			
			EventHandler setDirty = delegate {
				helper.IsDirty = true;
			};
			Get<RadioButton>("none").CheckedChanged += setDirty;
			Get<RadioButton>("specificWarnings").CheckedChanged += setDirty;
			Get<RadioButton>("all").CheckedChanged += setDirty;
			
			Get<RadioButton>("specificWarnings").CheckedChanged  += new EventHandler(UpdateWarningChecked);
			
			UpdateWarningChecked(this, EventArgs.Empty);
		}