コード例 #1
0
		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;
		}
コード例 #2
0
        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;
        }
コード例 #3
0
			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;
     };
 }