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()
        {
            SetupFromManifestResource("ICSharpCode.PythonBinding.Resources.ApplicationSettingsPanel.xfrm");
            InitializeHelper();

            ConfigurationGuiBinding b = BindString(AssemblyTextBoxName, "AssemblyName", TextBoxEditMode.EditEvaluatedProperty);

            CreateLocationButton(b, AssemblyTextBoxName);
            AssemblyNameTextBox.TextChanged += AssemblyNameTextBoxTextChanged;

            b = BindString(RootNamespaceTextBoxName, "RootNamespace", TextBoxEditMode.EditEvaluatedProperty);
            CreateLocationButton(b, RootNamespaceTextBoxName);

            b = BindEnum <OutputType>(OutputTypeComboBoxName, "OutputType");
            CreateLocationButton(b, OutputTypeComboBoxName);
            OutputTypeComboBox.SelectedIndexChanged += OutputTypeComboBoxSelectedIndexChanged;

            b = BindString(MainFileComboBoxName, "MainFile", TextBoxEditMode.EditEvaluatedProperty);
            CreateLocationButton(b, MainFileComboBoxName);
            ConnectBrowseButtonControl("mainFileBrowseButton", "mainFileComboBox",
                                       "${res:SharpDevelop.FileFilter.AllFiles}|*.*",
                                       TextBoxEditMode.EditEvaluatedProperty);

            Get <TextBox>("projectFolder").Text   = project.Directory;
            Get <TextBox>("projectFile").Text     = Path.GetFileName(project.FileName);
            Get <TextBox>("projectFile").ReadOnly = true;

            RefreshOutputNameTextBox();
            AddConfigurationSelector(this);
        }
Exemple #3
0
 protected void InitDebugInfo()
 {
     debugInfoBinding = helper.BindEnum <DebugSymbolType>("debugInfoComboBox", "DebugType");
     debugInfoBinding.CreateLocationButton("debugInfoLabel");
     DebugSymbolsLoaded(null, null);
     helper.Loaded += DebugSymbolsLoaded;
     helper.Saved  += DebugSymbolsSave;
 }
Exemple #4
0
        public override void LoadPanelContents()
        {
            SetupFromXmlResource("ProjectOptions.Signing.xfrm");
            InitializeHelper();

            ConfigurationGuiBinding     b;
            ChooseStorageLocationButton locationButton;

            signAssemblyBinding = helper.BindBoolean("signAssemblyCheckBox", "SignAssembly", false);
            locationButton      = signAssemblyBinding.CreateLocationButtonInPanel("signingGroupBox");
            Get <CheckBox>("signAssembly").CheckedChanged += new EventHandler(UpdateEnabledStates);


            keyFile = Get <ComboBox>("keyFile");
            b       = helper.BindString(keyFile, "AssemblyOriginatorKeyFile");
            b.RegisterLocationButton(locationButton);
            FindKeys(baseDirectory);
            if (keyFile.Text.Length > 0)
            {
                if (!keyFile.Items.Contains(keyFile.Text))
                {
                    keyFile.Items.Add(keyFile.Text);
                }
            }
            keyFile.Items.Add(StringParser.Parse("<${res:Global.CreateButtonText}...>"));
            keyFile.Items.Add(StringParser.Parse("<${res:Global.BrowseText}...>"));
            keyFile.SelectedIndexChanged += delegate {
                if (keyFile.SelectedIndex == keyFile.Items.Count - 1)
                {
                    BeginInvoke(new MethodInvoker(BrowseKeyFile));
                }
                if (keyFile.SelectedIndex == keyFile.Items.Count - 2)
                {
                    BeginInvoke(new MethodInvoker(CreateKeyFile));
                }
            };

            b = helper.BindBoolean("delaySignOnlyCheckBox", "DelaySign", false);
            b.RegisterLocationButton(locationButton);

            UpdateEnabledStates(this, EventArgs.Empty);

            helper.AddConfigurationSelector(this);

            helper.Saved += delegate {
                if (Get <CheckBox>("signAssembly").Checked)
                {
                    helper.SetProperty("AssemblyOriginatorKeyMode", "File", true, signAssemblyBinding.Location);
                }
            };
        }
        protected void InitIntermediateOutputPath()
        {
            ConfigurationGuiBinding binding = helper.BindString(
                Get <TextBox>("intermediateOutputPath"),
                "IntermediateOutputPath",
                delegate {
                return(Path.Combine(helper.GetProperty("BaseIntermediateOutputPath", @"obj\", true),
                                    helper.Configuration));
            }
                );

            binding.DefaultLocation = PropertyStorageLocations.ConfigurationSpecific;
            binding.CreateLocationButton("intermediateOutputPathTextBox");
            ConnectBrowseFolder("intermediateOutputPathBrowseButton", "intermediateOutputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}");
        }
Exemple #6
0
		public override void LoadPanelContents()
		{
			SetupFromXmlResource("ProjectOptions.Signing.xfrm");
			InitializeHelper();
			
			ConfigurationGuiBinding b;
			ChooseStorageLocationButton locationButton;
			
			signAssemblyBinding = helper.BindBoolean("signAssemblyCheckBox", "SignAssembly", false);
			locationButton = signAssemblyBinding.CreateLocationButtonInPanel("signingGroupBox");
			Get<CheckBox>("signAssembly").CheckedChanged += new EventHandler(UpdateEnabledStates);
			
			
			keyFile = Get<ComboBox>("keyFile");
			b = helper.BindString(keyFile, "AssemblyOriginatorKeyFile", TextBoxEditMode.EditRawProperty);
			b.RegisterLocationButton(locationButton);
			FindKeys(baseDirectory);
			if (keyFile.Text.Length > 0) {
				if (!keyFile.Items.Contains(keyFile.Text)) {
					keyFile.Items.Add(keyFile.Text);
				}
			}
			keyFile.Items.Add(StringParser.Parse("<${res:Global.CreateButtonText}...>"));
			keyFile.Items.Add(StringParser.Parse("<${res:Global.BrowseText}...>"));
			keyFile.SelectedIndexChanged += delegate {
				if (keyFile.SelectedIndex == keyFile.Items.Count - 1) {
					BeginInvoke(new MethodInvoker(BrowseKeyFile));
				}
				if (keyFile.SelectedIndex == keyFile.Items.Count - 2) {
					BeginInvoke(new MethodInvoker(CreateKeyFile));
				}
			};
			
			b = helper.BindBoolean("delaySignOnlyCheckBox", "DelaySign", false);
			b.RegisterLocationButton(locationButton);
			
			UpdateEnabledStates(this, EventArgs.Empty);
			
			helper.AddConfigurationSelector(this);
			
			helper.Saved += delegate {
				if (Get<CheckBox>("signAssembly").Checked) {
					helper.SetProperty("AssemblyOriginatorKeyMode", "File", true, signAssemblyBinding.Location);
				}
			};
		}
        public override void LoadPanelContents()
        {
            SetupFromManifestResource("ICSharpCode.PythonBinding.Resources.CompilingOptionsPanel.xfrm");
            InitializeHelper();

            ConfigurationGuiBinding b = BindString("outputPathTextBox", "OutputPath", TextBoxEditMode.EditRawProperty);

            CreateLocationButton(b, "outputPathTextBox");
            ConnectBrowseFolderButtonControl("outputPathBrowseButton", "outputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}", TextBoxEditMode.EditRawProperty);

            b = BindBoolean("debugInfoCheckBox", "DebugInfo", false);
            CreateLocationButton(b, "debugInfoCheckBox");

            b = CreatePlatformTargetComboBox();
            CreateLocationButton(b, "targetCpuComboBox");

            AddConfigurationSelector(this);
        }
Exemple #8
0
        public override void LoadPanelContents()
        {
            InitializeHelper();

            AnalysisProjectOptions po = new AnalysisProjectOptions();

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

            ChooseStorageLocationButton btn;

            btn = helper.BindBoolean(po.EnableCheckBox, "RunCodeAnalysis", false).CreateLocationButton(po.EnableCheckBox);
            ConfigurationGuiBinding binding = po.CreateBinding();

            binding.RegisterLocationButton(btn);
            helper.AddBinding("CodeAnalysisRules", binding);

            Control ctl = helper.CreateConfigurationSelector();

            ctl.Dock = DockStyle.Top;
            Controls.Add(ctl);
        }
 /// <summary>
 /// Called when associating a location button with a property.
 /// </summary>
 protected override ChooseStorageLocationButton CreateLocationButton(ConfigurationGuiBinding binding, string controlName)
 {
     locationButtonsCreated.Add(controlName);
     return(base.CreateLocationButton(binding, controlName));
 }
		protected void InitDebugInfo()
		{
			debugInfoBinding = helper.BindEnum<DebugSymbolType>("debugInfoComboBox", "DebugType");
			debugInfoBinding.CreateLocationButton("debugInfoLabel");
			DebugSymbolsLoaded(null, null);
			helper.Loaded += DebugSymbolsLoaded;
			helper.Saved += DebugSymbolsSave;
		}
 /// <summary>
 /// Associates a location button with a control.
 /// </summary>
 protected virtual ChooseStorageLocationButton CreateLocationButton(ConfigurationGuiBinding binding, string controlName)
 {
     return(binding.CreateLocationButton(controlName));
 }
		/// <summary>
		/// Called when associating a location button with a property.
		/// </summary>
		protected override ChooseStorageLocationButton CreateLocationButton(ConfigurationGuiBinding binding, string controlName)
		{
			locationButtonsCreated.Add(controlName);
			return base.CreateLocationButton(binding, controlName);
		}
		/// <summary>
		/// Associates a location button with a control.
		/// </summary>
		protected virtual ChooseStorageLocationButton CreateLocationButton(ConfigurationGuiBinding binding, string controlName)
		{
			return binding.CreateLocationButton(controlName);
		}