public override void LoadPanelContents() {
			InitializeHelper();

			var masterSettingsFile = helper.GetProperty<string>("SourceAnalysisOverrideSettingsFile", "", true);
			if (masterSettingsFile.Length == 0) {

				helper.SetProperty<string>("SourceAnalysisOverrideSettingsFile",
				                           StyleCopWrapper.GetMasterSettingsFile(),
				                           true,
				                           PropertyStorageLocations.Base);
			}

			AnalysisProjectOptions po = new AnalysisProjectOptions();
			po.Dock = DockStyle.Fill;
			Controls.Add(po);

			ChooseStorageLocationButton btnEnable;
			ChooseStorageLocationButton btnFileLocation;
			btnEnable = helper.BindBoolean(po.EnableCheckBox, "RunSourceAnalysis", false).CreateLocationButton(po.EnableCheckBox);
			btnFileLocation = helper.BindString(po.SettingsFileTextBox, "SourceAnalysisOverrideSettingsFile", TextBoxEditMode.EditRawProperty).CreateLocationButton(po.SettingsFileTextBox);
			ConfigurationGuiBinding binding = po.CreateBinding();
			binding.RegisterLocationButton(btnEnable);
			binding.RegisterLocationButton(btnFileLocation);

			helper.AddConfigurationSelector(this);

			po.ModifyStyleCopSettingsButton.Click += ModifyStyleCopSettingsClick;
		}
        public override void LoadPanelContents()
        {
            InitializeHelper();

            var masterSettingsFile = helper.GetProperty <string>("SourceAnalysisOverrideSettingsFile", "", true);

            if (masterSettingsFile.Length == 0)
            {
                helper.SetProperty <string>("SourceAnalysisOverrideSettingsFile",
                                            StyleCopWrapper.GetMasterSettingsFile(),
                                            true,
                                            PropertyStorageLocations.Base);
            }

            AnalysisProjectOptions po = new AnalysisProjectOptions();

            po.Dock = DockStyle.Fill;
            Controls.Add(po);

            ChooseStorageLocationButton btnEnable;
            ChooseStorageLocationButton btnFileLocation;

            btnEnable       = helper.BindBoolean(po.EnableCheckBox, "RunSourceAnalysis", false).CreateLocationButton(po.EnableCheckBox);
            btnFileLocation = helper.BindString(po.SettingsFileTextBox, "SourceAnalysisOverrideSettingsFile", TextBoxEditMode.EditRawProperty).CreateLocationButton(po.SettingsFileTextBox);
            ConfigurationGuiBinding binding = po.CreateBinding();

            binding.RegisterLocationButton(btnEnable);
            binding.RegisterLocationButton(btnFileLocation);

            helper.AddConfigurationSelector(this);

            po.ModifyStyleCopSettingsButton.Click += ModifyStyleCopSettingsClick;
        }
			public ConfigBinding(AnalysisProjectOptions po)
			{
				this.po = po;
				this.TreatPropertyValueAsLiteral = false;
				po.OptionChanged += delegate {
					Helper.IsDirty = true;
				};
			}
示例#4
0
 public ConfigBinding(AnalysisProjectOptions po)
 {
     this.po = po;
     this.TreatPropertyValueAsLiteral = false;
     po.OptionChanged += delegate {
         Helper.IsDirty = true;
     };
 }