Browse Source
Fixed bug when closing form designer while the property pad was active. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@399 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
47 changed files with 2005 additions and 2362 deletions
@ -1,122 +0,0 @@
@@ -1,122 +0,0 @@
|
||||
<Components version="1.0"> |
||||
<System.Windows.Forms.Form> |
||||
<Name value="XmlForm1" /> |
||||
<FormBorderStyle value="FixedDialog" /> |
||||
<ClientSize value="{Width=384, Height=262}" /> |
||||
<DockPadding value="" /> |
||||
<Text value="Advanced Build Settings" /> |
||||
<AcceptButton value="okButton [System.Windows.Forms.Button], Text: OK" /> |
||||
<CancelButton value="cancelButton [System.Windows.Forms.Button], Text: Cancel" /> |
||||
<Controls> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="DLLBaseAddressComboBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="11" /> |
||||
<Location value="{X=156,Y=200}" /> |
||||
<Size value="{Width=220, Height=21}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label5" /> |
||||
<Text value="DLL &Base Address:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<TabIndex value="10" /> |
||||
<Size value="{Width=148, Height=23}" /> |
||||
<Location value="{X=4,Y=200}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="fileAlignmentComboBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="9" /> |
||||
<Location value="{X=156,Y=172}" /> |
||||
<Size value="{Width=220, Height=21}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label4" /> |
||||
<Text value="&File Alignment:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<TabIndex value="8" /> |
||||
<Size value="{Width=144, Height=23}" /> |
||||
<Location value="{X=8,Y=172}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="debugInfoComboBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="7" /> |
||||
<Location value="{X=156,Y=144}" /> |
||||
<Size value="{Width=220, Height=21}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label3" /> |
||||
<Text value="D&ebug Info:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<TabIndex value="6" /> |
||||
<Size value="{Width=144, Height=23}" /> |
||||
<Location value="{X=8,Y=144}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="noMsCorLibReferenceCheckBox" /> |
||||
<Location value="{X=8,Y=116}" /> |
||||
<Size value="{Width=368, Height=20}" /> |
||||
<Text value="D&o not reference mscorlib.dll" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="5" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="checkOverUnderflowCheckBox" /> |
||||
<Location value="{X=8,Y=92}" /> |
||||
<Size value="{Width=368, Height=20}" /> |
||||
<Text value="C&heck for arithmetic overflow/underflow" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="4" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="reportCompilerErrorComboBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="3" /> |
||||
<Location value="{X=8,Y=64}" /> |
||||
<Size value="{Width=368, Height=21}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label2" /> |
||||
<Text value="&Report Compiler Errors:" /> |
||||
<TextAlign value="BottomLeft" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="2" /> |
||||
<Size value="{Width=352, Height=16}" /> |
||||
<Location value="{X=8,Y=48}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="languageVersionComboBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="1" /> |
||||
<Location value="{X=8,Y=24}" /> |
||||
<Size value="{Width=368, Height=21}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label1" /> |
||||
<Text value="&Language Version:" /> |
||||
<TextAlign value="BottomLeft" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="0" /> |
||||
<Size value="{Width=360, Height=16}" /> |
||||
<Location value="{X=8,Y=8}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="cancelButton" /> |
||||
<Location value="{X=304,Y=232}" /> |
||||
<Text value="Cancel" /> |
||||
<Anchor value="Bottom, Right" /> |
||||
<TabIndex value="12" /> |
||||
<DialogResult value="Cancel" /> |
||||
</System.Windows.Forms.Button> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="okButton" /> |
||||
<Location value="{X=216,Y=232}" /> |
||||
<Text value="OK" /> |
||||
<Anchor value="Bottom, Right" /> |
||||
<TabIndex value="12" /> |
||||
<DialogResult value="OK" /> |
||||
</System.Windows.Forms.Button> |
||||
</Controls> |
||||
</System.Windows.Forms.Form> |
||||
</Components> |
||||
@ -1,189 +1,298 @@
@@ -1,189 +1,298 @@
|
||||
<Components version="1.0"> |
||||
<System.Windows.Forms.UserControl> |
||||
<Name value="XmlUserControl1" /> |
||||
<DockPadding value="" /> |
||||
<ClientSize value="{Width=432, Height=480}" /> |
||||
<ClientSize value="{Width=527, Height=633}" /> |
||||
<AutoScroll value="True" /> |
||||
<Controls> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="groupBox3" /> |
||||
<TabIndex value="8" /> |
||||
<Location value="{X=8,Y=288}" /> |
||||
<Name value="generalGroupBox" /> |
||||
<Location value="{X=3,Y=3}" /> |
||||
<Text value="General" /> |
||||
<Size value="{Width=521, Height=152}" /> |
||||
<TabIndex value="0" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=416, Height=168}" /> |
||||
<Text value="Output" /> |
||||
<Controls> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="advancedOptionsButton" /> |
||||
<Location value="{X=320,Y=142}" /> |
||||
<Size value="{Width=84, Height=21}" /> |
||||
<Text value="Ad&vanced" /> |
||||
<Anchor value="Top, Right" /> |
||||
<TabIndex value="6" /> |
||||
</System.Windows.Forms.Button> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="registerCOMInteropCheckBox" /> |
||||
<Location value="{X=8,Y=123}" /> |
||||
<Size value="{Width=308, Height=20}" /> |
||||
<Text value="&Register for COM Interop" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Name value="noCorlibCheckBox" /> |
||||
<Location value="{X=12,Y=124}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<Text value="Do not reference &mscorlib.dll" /> |
||||
<TabIndex value="5" /> |
||||
<Size value="{Width=503, Height=24}" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="xmlDocumentationCheckBox" /> |
||||
<Location value="{X=8,Y=73}" /> |
||||
<Size value="{Width=400, Height=20}" /> |
||||
<Text value="&XML Documentation File" /> |
||||
<Name value="checkForOverflowCheckBox" /> |
||||
<Location value="{X=12,Y=104}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<Text value="&Check for arithmetic overflow/underflow" /> |
||||
<TabIndex value="4" /> |
||||
<Size value="{Width=502, Height=24}" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label1" /> |
||||
<Location value="{X=6,Y=17}" /> |
||||
<Text value="Con&ditional Compilation Symbols:" /> |
||||
<TextAlign value="BottomLeft" /> |
||||
<Size value="{Width=470, Height=16}" /> |
||||
<TabIndex value="0" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="conditionalSymbolsTextBox" /> |
||||
<TabIndex value="1" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=502, Height=21}" /> |
||||
<Location value="{X=13,Y=36}" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="allowUnsafeCodeCheckBox" /> |
||||
<Location value="{X=13,Y=84}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<Text value="Allow &Unsafe code" /> |
||||
<TabIndex value="3" /> |
||||
<Size value="{Width=502, Height=24}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="optimizeCodeCheckBox" /> |
||||
<Location value="{X=13,Y=64}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<Text value="O&ptimize code" /> |
||||
<TabIndex value="2" /> |
||||
<Size value="{Width=502, Height=24}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="groupBox3" /> |
||||
<Location value="{X=3,Y=161}" /> |
||||
<Text value="Output" /> |
||||
<Size value="{Width=521, Height=270}" /> |
||||
<TabIndex value="1" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Controls> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="advancedOutputGroupBox" /> |
||||
<Location value="{X=6,Y=115}" /> |
||||
<Text value="Advanced" /> |
||||
<Size value="{Width=505, Height=149}" /> |
||||
<TabIndex value="7" /> |
||||
<Anchor value="Top, Bottom, Left, Right" /> |
||||
<Controls> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="targetCpuComboBox" /> |
||||
<TabIndex value="4" /> |
||||
<Size value="{Width=171, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<DropDownStyle value="DropDownList" /> |
||||
<Location value="{X=193,Y=71}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label9" /> |
||||
<Location value="{X=6,Y=69}" /> |
||||
<Text value="&Target CPU:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<Size value="{Width=181, Height=23}" /> |
||||
<TabIndex value="3" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="dllBaseAddressTextBox" /> |
||||
<TabIndex value="8" /> |
||||
<Size value="{Width=121, Height=21}" /> |
||||
<Location value="{X=193,Y=125}" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label8" /> |
||||
<Location value="{X=7,Y=123}" /> |
||||
<Text value="DLL Base Address:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<Size value="{Width=180, Height=23}" /> |
||||
<TabIndex value="7" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="fileAlignmentComboBox" /> |
||||
<TabIndex value="6" /> |
||||
<Size value="{Width=171, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<DropDownStyle value="DropDownList" /> |
||||
<Location value="{X=193,Y=98}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label7" /> |
||||
<Location value="{X=6,Y=96}" /> |
||||
<Text value="&File Alignment:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<Size value="{Width=181, Height=23}" /> |
||||
<TabIndex value="5" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="registerCOMInteropCheckBox" /> |
||||
<Location value="{X=175,Y=18}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<Text value="&Register for COM Interop" /> |
||||
<TabIndex value="0" /> |
||||
<Size value="{Width=189, Height=20}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label2" /> |
||||
<Location value="{X=6,Y=43}" /> |
||||
<Text value="&Generate serialization assembly:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<Size value="{Width=181, Height=20}" /> |
||||
<TabIndex value="1" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="generateSerializationAssemblyComboBox" /> |
||||
<TabIndex value="2" /> |
||||
<Size value="{Width=171, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<DropDownStyle value="DropDownList" /> |
||||
<Location value="{X=193,Y=44}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="debugInfoComboBox" /> |
||||
<TabIndex value="6" /> |
||||
<Size value="{Width=121, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<DropDownStyle value="DropDownList" /> |
||||
<Location value="{X=164,Y=88}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label6" /> |
||||
<Location value="{X=6,Y=86}" /> |
||||
<Text value="Debug &Info:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<Size value="{Width=152, Height=23}" /> |
||||
<TabIndex value="5" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="xmlDocumentationCheckBox" /> |
||||
<Location value="{X=13,Y=63}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<Text value="&XML documentation file:" /> |
||||
<TabIndex value="3" /> |
||||
<Size value="{Width=151, Height=20}" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="xmlDocumentationTextBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="4" /> |
||||
<Location value="{X=24,Y=96}" /> |
||||
<Size value="{Width=384, Height=21}" /> |
||||
<Text value="" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=351, Height=21}" /> |
||||
<Location value="{X=164,Y=62}" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label5" /> |
||||
<Text value="Ou&tput Path:" /> |
||||
<Location value="{X=6,Y=17}" /> |
||||
<Text value="&Output Path:" /> |
||||
<TextAlign value="BottomLeft" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=505, Height=16}" /> |
||||
<TabIndex value="0" /> |
||||
<Size value="{Width=400, Height=16}" /> |
||||
<Location value="{X=8,Y=27}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="outputPathTextBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="1" /> |
||||
<Location value="{X=8,Y=45}" /> |
||||
<Size value="{Width=352, Height=21}" /> |
||||
<Text value="" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=457, Height=21}" /> |
||||
<Location value="{X=13,Y=36}" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="outputPathBrowseButton" /> |
||||
<Location value="{X=368,Y=45}" /> |
||||
<Size value="{Width=40, Height=21}" /> |
||||
<Location value="{X=475,Y=36}" /> |
||||
<Text value="..." /> |
||||
<Size value="{Width=40, Height=21}" /> |
||||
<Anchor value="Top, Right" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="2" /> |
||||
</System.Windows.Forms.Button> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="groupBox2" /> |
||||
<TabIndex value="7" /> |
||||
<Location value="{X=8,Y=184}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=416, Height=100}" /> |
||||
<Location value="{X=3,Y=523}" /> |
||||
<Text value="Treat Warnings as Errors" /> |
||||
<Size value="{Width=521, Height=100}" /> |
||||
<TabIndex value="3" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Controls> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="specificWarningsTextBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="2" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=377, Height=21}" /> |
||||
<Location value="{X=136,Y=44}" /> |
||||
<Size value="{Width=272, Height=21}" /> |
||||
<Text value="" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.RadioButton> |
||||
<Name value="allRadioButton" /> |
||||
<Location value="{X=8,Y=68}" /> |
||||
<Size value="{Width=128, Height=24}" /> |
||||
<Text value="A&ll" /> |
||||
<Size value="{Width=128, Height=24}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="3" /> |
||||
</System.Windows.Forms.RadioButton> |
||||
<System.Windows.Forms.RadioButton> |
||||
<Name value="specificWarningsRadioButton" /> |
||||
<Location value="{X=8,Y=44}" /> |
||||
<Size value="{Width=128, Height=24}" /> |
||||
<Text value="Sp&ecific Warnings:" /> |
||||
<Size value="{Width=128, Height=24}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="1" /> |
||||
</System.Windows.Forms.RadioButton> |
||||
<System.Windows.Forms.RadioButton> |
||||
<Name value="noneRadioButton" /> |
||||
<Location value="{X=8,Y=20}" /> |
||||
<Size value="{Width=128, Height=24}" /> |
||||
<Text value="&None" /> |
||||
<Size value="{Width=128, Height=24}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="0" /> |
||||
</System.Windows.Forms.RadioButton> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="groupBox1" /> |
||||
<TabIndex value="6" /> |
||||
<Location value="{X=8,Y=96}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=416, Height=80}" /> |
||||
<Location value="{X=3,Y=437}" /> |
||||
<Text value="Errors and Warnings" /> |
||||
<Size value="{Width=521, Height=80}" /> |
||||
<TabIndex value="2" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Controls> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="suppressWarningsTextBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="3" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=349, Height=21}" /> |
||||
<Location value="{X=164,Y=44}" /> |
||||
<Size value="{Width=244, Height=21}" /> |
||||
<Text value="" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label4" /> |
||||
<Location value="{X=4,Y=44}" /> |
||||
<Text value="&Suppress Warnings:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<Size value="{Width=154, Height=23}" /> |
||||
<TabIndex value="2" /> |
||||
<Size value="{Width=160, Height=23}" /> |
||||
<Location value="{X=4,Y=44}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="warningLevelComboBox" /> |
||||
<TabIndex value="1" /> |
||||
<Location value="{X=164,Y=20}" /> |
||||
<Size value="{Width=60, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<DropDownStyle value="DropDownList" /> |
||||
<Location value="{X=164,Y=20}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label3" /> |
||||
<Location value="{X=4,Y=20}" /> |
||||
<Text value="&Warning Level:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<Size value="{Width=154, Height=23}" /> |
||||
<TabIndex value="0" /> |
||||
<Size value="{Width=160, Height=23}" /> |
||||
<Location value="{X=4,Y=20}" /> |
||||
</System.Windows.Forms.Label> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="optimizeCodeCheckBox" /> |
||||
<Location value="{X=8,Y=48}" /> |
||||
<Size value="{Width=416, Height=24}" /> |
||||
<Text value="Opti&mize code" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="4" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="allowUnsafeCodeCheckBox" /> |
||||
<Location value="{X=8,Y=72}" /> |
||||
<Size value="{Width=416, Height=24}" /> |
||||
<Text value="Allow &Unsafe code" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="5" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="conditionalSymbolsTextBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="1" /> |
||||
<Location value="{X=8,Y=24}" /> |
||||
<Size value="{Width=416, Height=21}" /> |
||||
<Text value="" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label1" /> |
||||
<Text value="Con&ditional Compilation Symbols:" /> |
||||
<TextAlign value="BottomLeft" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="0" /> |
||||
<Size value="{Width=416, Height=16}" /> |
||||
<Location value="{X=8,Y=8}" /> |
||||
</System.Windows.Forms.Label> |
||||
</Controls> |
||||
</System.Windows.Forms.UserControl> |
||||
</Components> |
||||
</Components> |
||||
|
||||
@ -1,180 +1,50 @@
@@ -1,180 +1,50 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt">2002-2005 AlphaSierraPapa</copyright>
|
||||
// <license see="prj:///doc/license.txt">GNU General Public License</license>
|
||||
// <owner name="none" email=""/>
|
||||
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Windows.Forms; |
||||
|
||||
using ICSharpCode.SharpDevelop.Internal.ExternalTool; |
||||
using ICSharpCode.SharpDevelop.Project; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
using ICSharpCode.SharpDevelop.Gui.XmlForms; |
||||
using ICSharpCode.SharpDevelop.Gui.OptionPanels; |
||||
|
||||
using StringPair = System.Collections.Generic.KeyValuePair<string, string>; |
||||
|
||||
namespace CSharpBinding.OptionPanels |
||||
{ |
||||
public class BuildOptions : AbstractOptionPanel |
||||
public class BuildOptions : AbstractBuildOptions |
||||
{ |
||||
CSharpProject project; |
||||
|
||||
public BuildOptions() |
||||
{ |
||||
} |
||||
|
||||
void ShowAdvancedOptions(object sender, EventArgs e) |
||||
{ |
||||
using (AdvancedBuildOptionsDialog advancedBuildOptionsDialog = new AdvancedBuildOptionsDialog(project)) { |
||||
advancedBuildOptionsDialog.ShowDialog(WorkbenchSingleton.MainForm); |
||||
} |
||||
} |
||||
string Config = "Debug"; |
||||
string Platform = "AnyCPU"; |
||||
|
||||
public override void LoadPanelContents() |
||||
{ |
||||
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.BuildOptions.xfrm")); |
||||
this.project = (CSharpProject)((Properties)CustomizationObject).Get("Project"); |
||||
|
||||
ConnectBrowseFolder("outputPathBrowseButton", "outputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}"); |
||||
Get<Button>("advancedOptions").Click += new EventHandler(ShowAdvancedOptions); |
||||
|
||||
Get<TextBox>("conditionalSymbols").Text = project.GetDefineConstants(Config, Platform); |
||||
Get<TextBox>("conditionalSymbols").TextChanged += new EventHandler(Save); |
||||
|
||||
|
||||
Get<CheckBox>("optimizeCode").Checked = project.GetOptimize(Config, Platform); |
||||
Get<CheckBox>("optimizeCode").CheckedChanged += new EventHandler(Save); |
||||
|
||||
Get<CheckBox>("allowUnsafeCode").Checked = project.GetAllowUnsafeBlocks(Config, Platform); |
||||
Get<CheckBox>("allowUnsafeCode").CheckedChanged += new EventHandler(Save); |
||||
|
||||
Get<ComboBox>("warningLevel").Items.AddRange( new object[] {0, 1, 2, 3, 4}); |
||||
Get<ComboBox>("warningLevel").Text = project.WarningLevel.ToString(); |
||||
Get<ComboBox>("warningLevel").TextChanged += new EventHandler(Save); |
||||
|
||||
Get<TextBox>("suppressWarnings").Text = project.GetNoWarn(Config, Platform); |
||||
Get<TextBox>("suppressWarnings").TextChanged += new EventHandler(Save); |
||||
|
||||
Get<TextBox>("specificWarnings").Text = project.GetWarningsAsErrors(Config, Platform); |
||||
Get<TextBox>("specificWarnings").TextChanged += new EventHandler(Save); |
||||
|
||||
|
||||
WarningsAsErrors warningsAsErrors = project.GetTreatWarningsAsErrors(Config, Platform); |
||||
Get<RadioButton>("none").Checked = warningsAsErrors == WarningsAsErrors.None; |
||||
Get<RadioButton>("none").CheckedChanged += new EventHandler(Save); |
||||
|
||||
Get<RadioButton>("specificWarnings").Checked = warningsAsErrors == WarningsAsErrors.Specific; |
||||
Get<RadioButton>("specificWarnings").CheckedChanged += new EventHandler(UpdateEnabledStates); |
||||
Get<RadioButton>("specificWarnings").CheckedChanged += new EventHandler(Save); |
||||
|
||||
Get<RadioButton>("all").Checked = warningsAsErrors == WarningsAsErrors.All; |
||||
Get<RadioButton>("all").CheckedChanged += new EventHandler(Save); |
||||
|
||||
Get<TextBox>("outputPath").Text = project.GetOutputPath(Config, Platform); |
||||
Get<TextBox>("outputPath").TextChanged += new EventHandler(Save); |
||||
|
||||
Get<TextBox>("xmlDocumentation").Text = project.GetDocumentationFile(Config, Platform); |
||||
Get<TextBox>("xmlDocumentation").TextChanged += new EventHandler(Save); |
||||
|
||||
Get<CheckBox>("xmlDocumentation").Checked = Get<TextBox>("xmlDocumentation").Text.Length > 0; |
||||
Get<CheckBox>("xmlDocumentation").CheckedChanged += new EventHandler(UpdateEnabledStates); |
||||
|
||||
Get<CheckBox>("registerCOMInterop").Checked = project.GetRegisterForComInterop(Config, Platform); |
||||
Get<CheckBox>("registerCOMInterop").CheckedChanged += new EventHandler(Save); |
||||
|
||||
|
||||
UpdateEnabledStates(this, EventArgs.Empty); |
||||
} |
||||
|
||||
void Save(object sender, EventArgs e) |
||||
{ |
||||
StorePanelContents(); |
||||
} |
||||
|
||||
void UpdateEnabledStates(object sender, EventArgs e) |
||||
{ |
||||
Get<TextBox>("specificWarnings").Enabled = Get<RadioButton>("specificWarnings").Checked; |
||||
Get<TextBox>("xmlDocumentation").Enabled = Get<CheckBox>("xmlDocumentation").Checked; |
||||
} |
||||
public override bool StorePanelContents() |
||||
{ |
||||
project.SetDefineConstants(Config, Platform, Get<TextBox>("conditionalSymbols").Text); |
||||
project.SetOptimize(Config, Platform, Get<CheckBox>("optimizeCode").Checked); |
||||
project.SetAllowUnsafeBlocks(Config, Platform, Get<CheckBox>("allowUnsafeCode").Checked); |
||||
project.WarningLevel = Int32.Parse(Get<ComboBox>("warningLevel").Text); |
||||
project.SetNoWarn(Config, Platform, Get<TextBox>("suppressWarnings").Text); |
||||
project.SetWarningsAsErrors(Config, Platform, Get<TextBox>("specificWarnings").Text); |
||||
|
||||
if (Get<RadioButton>("none").Checked) { |
||||
project.SetTreatWarningsAsErrors(Config, Platform, WarningsAsErrors.None); |
||||
} else if (Get<RadioButton>("specificWarnings").Checked) { |
||||
project.SetTreatWarningsAsErrors(Config, Platform, WarningsAsErrors.Specific); |
||||
} else { |
||||
project.SetTreatWarningsAsErrors(Config, Platform, WarningsAsErrors.All); |
||||
} |
||||
project.SetOutputPath(Config, Platform, Get<TextBox>("outputPath").Text); |
||||
|
||||
if (Get<CheckBox>("xmlDocumentation").Checked) { |
||||
project.SetDocumentationFile(Config, Platform, Get<TextBox>("xmlDocumentation").Text); |
||||
} else { |
||||
project.SetDocumentationFile(Config, Platform, ""); |
||||
} |
||||
|
||||
project.SetRegisterForComInterop(Config, Platform, Get<CheckBox>("registerCOMInterop").Checked); |
||||
project.Save(); |
||||
|
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public class AdvancedBuildOptionsDialog : BaseSharpDevelopForm |
||||
{ |
||||
string Config = "Debug"; |
||||
string Platform = "AnyCPU"; |
||||
CSharpProject project; |
||||
|
||||
public AdvancedBuildOptionsDialog(CSharpProject project) |
||||
{ |
||||
this.project = project; |
||||
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.AdvancedBuildOptionsDialog.xfrm")); |
||||
|
||||
Get<ComboBox>("languageVersion").Text = project.GetLangVersion(Config, Platform); |
||||
Get<ComboBox>("languageVersion").Items.AddRange(new string[] { "default", "ISO-1"}); |
||||
|
||||
Get<ComboBox>("reportCompilerError").Text = project.GetErrorReport(Config, Platform); |
||||
Get<ComboBox>("reportCompilerError").Items.AddRange(new string[] { "none", "prompt", "send"}); |
||||
|
||||
|
||||
Get<CheckBox>("checkOverUnderflow").Checked = project.GetCheckForOverflowUnderflow(Config, Platform); |
||||
Get<CheckBox>("noMsCorLibReference").Checked = project.GetNoStdLib(Config, Platform); |
||||
|
||||
Get<ComboBox>("debugInfo").Text = project.GetDebugType(Config, Platform); |
||||
Get<ComboBox>("debugInfo").Items.AddRange(new string[] { "none", "full", "pdb-only"}); |
||||
Get<ComboBox>("fileAlignment").Text = project.GetFileAlignment(Config, Platform).ToString(); |
||||
Get<ComboBox>("fileAlignment").Items.AddRange(new string[] { "512", "1024", "2048", "4096", "8192"}); |
||||
|
||||
|
||||
Get<ComboBox>("DLLBaseAddress").Text = project.GetBaseAddress(Config, Platform).ToString(); |
||||
|
||||
Get<Button>("ok").Click += new EventHandler(OkButtonClick); |
||||
} |
||||
|
||||
void OkButtonClick(object sender, EventArgs e) |
||||
{ |
||||
if (Get<ComboBox>("languageVersion").Text != "default") { |
||||
project.SetLangVersion(Config, Platform, Get<ComboBox>("languageVersion").Text); |
||||
} else { |
||||
project.SetLangVersion(Config, Platform, ""); |
||||
} |
||||
|
||||
project.SetErrorReport(Config, Platform, Get<ComboBox>("reportCompilerError").Text); |
||||
project.SetCheckForOverflowUnderflow(Config, Platform, Get<CheckBox>("checkOverUnderflow").Checked); |
||||
project.SetNoStdLib(Config, Platform, Get<CheckBox>("noMsCorLibReference").Checked); |
||||
project.SetDebugType(Config, Platform, Get<ComboBox>("debugInfo").Text); |
||||
project.SetFileAlignment(Config, Platform, Int32.Parse(Get<ComboBox>("fileAlignment").Text)); |
||||
project.SetBaseAddress(Config, Platform, Int32.Parse(Get<ComboBox>("DLLBaseAddress").Text)); |
||||
SetupFromXmlResource("BuildOptions.xfrm"); |
||||
InitializeHelper(); |
||||
|
||||
InitOutputPath(); |
||||
InitXmlDoc(); |
||||
|
||||
helper.BindString("conditionalSymbolsTextBox", "DefineConstants"); |
||||
helper.BindBoolean("optimizeCodeCheckBox", "Optimize", false); |
||||
helper.BindBoolean("allowUnsafeCodeCheckBox", "AllowUnsafeBlocks", false); |
||||
helper.BindBoolean("checkForOverflowCheckBox", "CheckForOverflowUnderflow", false); |
||||
helper.BindBoolean("noCorlibCheckBox", "NoStdLib", false); |
||||
|
||||
InitAdvanced(); |
||||
helper.BindStringEnum("fileAlignmentComboBox", "FileAlignment", |
||||
"4096", |
||||
new StringPair("512", "512"), |
||||
new StringPair("1024", "1024"), |
||||
new StringPair("2048", "2048"), |
||||
new StringPair("4096", "4096"), |
||||
new StringPair("8192", "8192")); |
||||
InitWarnings(); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@ -1,122 +0,0 @@
@@ -1,122 +0,0 @@
|
||||
<Components version="1.0"> |
||||
<System.Windows.Forms.Form> |
||||
<Name value="XmlForm1" /> |
||||
<FormBorderStyle value="FixedDialog" /> |
||||
<ClientSize value="{Width=384, Height=262}" /> |
||||
<DockPadding value="" /> |
||||
<Text value="Advanced Build Settings" /> |
||||
<AcceptButton value="okButton [System.Windows.Forms.Button], Text: OK" /> |
||||
<CancelButton value="cancelButton [System.Windows.Forms.Button], Text: Cancel" /> |
||||
<Controls> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="DLLBaseAddressComboBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="11" /> |
||||
<Location value="{X=156,Y=200}" /> |
||||
<Size value="{Width=220, Height=21}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label5" /> |
||||
<Text value="DLL &Base Address:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<TabIndex value="10" /> |
||||
<Size value="{Width=148, Height=23}" /> |
||||
<Location value="{X=4,Y=200}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="fileAlignmentComboBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="9" /> |
||||
<Location value="{X=156,Y=172}" /> |
||||
<Size value="{Width=220, Height=21}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label4" /> |
||||
<Text value="&File Alignment:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<TabIndex value="8" /> |
||||
<Size value="{Width=144, Height=23}" /> |
||||
<Location value="{X=8,Y=172}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="debugInfoComboBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="7" /> |
||||
<Location value="{X=156,Y=144}" /> |
||||
<Size value="{Width=220, Height=21}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label3" /> |
||||
<Text value="D&ebug Info:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<TabIndex value="6" /> |
||||
<Size value="{Width=144, Height=23}" /> |
||||
<Location value="{X=8,Y=144}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="noMsCorLibReferenceCheckBox" /> |
||||
<Location value="{X=8,Y=116}" /> |
||||
<Size value="{Width=368, Height=20}" /> |
||||
<Text value="D&o not reference mscorlib.dll" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="5" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="checkOverUnderflowCheckBox" /> |
||||
<Location value="{X=8,Y=92}" /> |
||||
<Size value="{Width=368, Height=20}" /> |
||||
<Text value="C&heck for arithmetic overflow/underflow" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="4" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="reportCompilerErrorComboBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="3" /> |
||||
<Location value="{X=8,Y=64}" /> |
||||
<Size value="{Width=368, Height=21}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label2" /> |
||||
<Text value="&Report Compiler Errors:" /> |
||||
<TextAlign value="BottomLeft" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="2" /> |
||||
<Size value="{Width=352, Height=16}" /> |
||||
<Location value="{X=8,Y=48}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="languageVersionComboBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="1" /> |
||||
<Location value="{X=8,Y=24}" /> |
||||
<Size value="{Width=368, Height=21}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label1" /> |
||||
<Text value="&Language Version:" /> |
||||
<TextAlign value="BottomLeft" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="0" /> |
||||
<Size value="{Width=360, Height=16}" /> |
||||
<Location value="{X=8,Y=8}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="cancelButton" /> |
||||
<Location value="{X=304,Y=232}" /> |
||||
<Text value="Cancel" /> |
||||
<Anchor value="Bottom, Right" /> |
||||
<TabIndex value="12" /> |
||||
<DialogResult value="Cancel" /> |
||||
</System.Windows.Forms.Button> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="okButton" /> |
||||
<Location value="{X=216,Y=232}" /> |
||||
<Text value="OK" /> |
||||
<Anchor value="Bottom, Right" /> |
||||
<TabIndex value="12" /> |
||||
<DialogResult value="OK" /> |
||||
</System.Windows.Forms.Button> |
||||
</Controls> |
||||
</System.Windows.Forms.Form> |
||||
</Components> |
||||
@ -1,189 +1,297 @@
@@ -1,189 +1,297 @@
|
||||
<Components version="1.0"> |
||||
<System.Windows.Forms.UserControl> |
||||
<Name value="XmlUserControl1" /> |
||||
<DockPadding value="" /> |
||||
<ClientSize value="{Width=432, Height=480}" /> |
||||
<ClientSize value="{Width=527, Height=633}" /> |
||||
<AutoScroll value="True" /> |
||||
<Controls> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="groupBox3" /> |
||||
<TabIndex value="8" /> |
||||
<Location value="{X=8,Y=288}" /> |
||||
<Name value="generalGroupBox" /> |
||||
<Location value="{X=3,Y=3}" /> |
||||
<Text value="General" /> |
||||
<Size value="{Width=521, Height=152}" /> |
||||
<TabIndex value="0" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=416, Height=168}" /> |
||||
<Text value="Output" /> |
||||
<Controls> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="advancedOptionsButton" /> |
||||
<Location value="{X=320,Y=142}" /> |
||||
<Size value="{Width=84, Height=21}" /> |
||||
<Text value="Ad&vanced" /> |
||||
<Anchor value="Top, Right" /> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="optionCompareComboBox" /> |
||||
<TabIndex value="8" /> |
||||
<Size value="{Width=132, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<DropDownStyle value="DropDownList" /> |
||||
<Location value="{X=289,Y=125}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="optionStrictComboBox" /> |
||||
<TabIndex value="7" /> |
||||
<Size value="{Width=132, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<DropDownStyle value="DropDownList" /> |
||||
<Location value="{X=151,Y=125}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="optionExplicitComboBox" /> |
||||
<TabIndex value="6" /> |
||||
</System.Windows.Forms.Button> |
||||
<Size value="{Width=132, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<DropDownStyle value="DropDownList" /> |
||||
<Location value="{X=13,Y=125}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label10" /> |
||||
<Location value="{X=6,Y=111}" /> |
||||
<Text value="Default values for VB Options:" /> |
||||
<Size value="{Width=218, Height=23}" /> |
||||
<TabIndex value="5" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="removeOverflowCheckBox" /> |
||||
<Location value="{X=12,Y=84}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<Text value="Remove integer overflow &checks" /> |
||||
<TabIndex value="4" /> |
||||
<Size value="{Width=502, Height=24}" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label1" /> |
||||
<Location value="{X=6,Y=17}" /> |
||||
<Text value="Con&ditional Compilation Symbols:" /> |
||||
<TextAlign value="BottomLeft" /> |
||||
<Size value="{Width=470, Height=16}" /> |
||||
<TabIndex value="0" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="conditionalSymbolsTextBox" /> |
||||
<TabIndex value="1" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=502, Height=21}" /> |
||||
<Location value="{X=13,Y=36}" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="registerCOMInteropCheckBox" /> |
||||
<Location value="{X=8,Y=123}" /> |
||||
<Size value="{Width=308, Height=20}" /> |
||||
<Text value="&Register for COM Interop" /> |
||||
<Name value="optimizeCodeCheckBox" /> |
||||
<AccessibleRole value="None" /> |
||||
<Location value="{X=13,Y=64}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<Text value="O&ptimize code" /> |
||||
<TabIndex value="2" /> |
||||
<Size value="{Width=502, Height=24}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="5" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="groupBox3" /> |
||||
<Location value="{X=3,Y=161}" /> |
||||
<Text value="Output" /> |
||||
<Size value="{Width=521, Height=248}" /> |
||||
<TabIndex value="1" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Controls> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="advancedOutputGroupBox" /> |
||||
<Location value="{X=6,Y=115}" /> |
||||
<Text value="Advanced" /> |
||||
<Size value="{Width=505, Height=127}" /> |
||||
<TabIndex value="7" /> |
||||
<Anchor value="Top, Bottom, Left, Right" /> |
||||
<Controls> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="targetCpuComboBox" /> |
||||
<TabIndex value="4" /> |
||||
<Size value="{Width=171, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<DropDownStyle value="DropDownList" /> |
||||
<Location value="{X=193,Y=71}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label9" /> |
||||
<Location value="{X=6,Y=69}" /> |
||||
<Text value="&Target CPU:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<Size value="{Width=181, Height=23}" /> |
||||
<TabIndex value="3" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="dllBaseAddressTextBox" /> |
||||
<TabIndex value="8" /> |
||||
<Size value="{Width=171, Height=21}" /> |
||||
<Location value="{X=193,Y=98}" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label8" /> |
||||
<Location value="{X=7,Y=96}" /> |
||||
<Text value="DLL Base Address:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<Size value="{Width=180, Height=23}" /> |
||||
<TabIndex value="7" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="registerCOMInteropCheckBox" /> |
||||
<Location value="{X=175,Y=18}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<Text value="&Register for COM Interop" /> |
||||
<TabIndex value="0" /> |
||||
<Size value="{Width=189, Height=20}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label2" /> |
||||
<Location value="{X=6,Y=43}" /> |
||||
<Text value="&Generate serialization assembly:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<Size value="{Width=181, Height=20}" /> |
||||
<TabIndex value="1" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="generateSerializationAssemblyComboBox" /> |
||||
<TabIndex value="2" /> |
||||
<Size value="{Width=171, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<DropDownStyle value="DropDownList" /> |
||||
<Location value="{X=193,Y=44}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="debugInfoComboBox" /> |
||||
<TabIndex value="6" /> |
||||
<Size value="{Width=121, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<DropDownStyle value="DropDownList" /> |
||||
<Location value="{X=164,Y=88}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label6" /> |
||||
<Location value="{X=6,Y=86}" /> |
||||
<Text value="Debug &Info:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<Size value="{Width=152, Height=23}" /> |
||||
<TabIndex value="5" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="xmlDocumentationCheckBox" /> |
||||
<Location value="{X=8,Y=73}" /> |
||||
<Size value="{Width=400, Height=20}" /> |
||||
<Text value="&XML Documentation File" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Location value="{X=13,Y=63}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<Text value="&XML documentation file:" /> |
||||
<TabIndex value="3" /> |
||||
<Size value="{Width=151, Height=20}" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="xmlDocumentationTextBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="4" /> |
||||
<Location value="{X=24,Y=96}" /> |
||||
<Size value="{Width=384, Height=21}" /> |
||||
<Text value="" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=351, Height=21}" /> |
||||
<Location value="{X=164,Y=62}" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label5" /> |
||||
<Text value="Ou&tput Path:" /> |
||||
<Location value="{X=6,Y=17}" /> |
||||
<Text value="&Output Path:" /> |
||||
<TextAlign value="BottomLeft" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=505, Height=16}" /> |
||||
<TabIndex value="0" /> |
||||
<Size value="{Width=400, Height=16}" /> |
||||
<Location value="{X=8,Y=27}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="outputPathTextBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="1" /> |
||||
<Location value="{X=8,Y=45}" /> |
||||
<Size value="{Width=352, Height=21}" /> |
||||
<Text value="" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=457, Height=21}" /> |
||||
<Location value="{X=13,Y=36}" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="outputPathBrowseButton" /> |
||||
<Location value="{X=368,Y=45}" /> |
||||
<Size value="{Width=40, Height=21}" /> |
||||
<Location value="{X=475,Y=36}" /> |
||||
<Text value="..." /> |
||||
<Size value="{Width=40, Height=21}" /> |
||||
<Anchor value="Top, Right" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="2" /> |
||||
</System.Windows.Forms.Button> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="groupBox2" /> |
||||
<TabIndex value="7" /> |
||||
<Location value="{X=8,Y=184}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=416, Height=100}" /> |
||||
<Location value="{X=3,Y=501}" /> |
||||
<Text value="Treat Warnings as Errors" /> |
||||
<Size value="{Width=521, Height=100}" /> |
||||
<TabIndex value="3" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Controls> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="specificWarningsTextBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="2" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=377, Height=21}" /> |
||||
<Location value="{X=136,Y=44}" /> |
||||
<Size value="{Width=272, Height=21}" /> |
||||
<Text value="" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.RadioButton> |
||||
<Name value="allRadioButton" /> |
||||
<Location value="{X=8,Y=68}" /> |
||||
<Size value="{Width=128, Height=24}" /> |
||||
<Text value="A&ll" /> |
||||
<Size value="{Width=128, Height=24}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="3" /> |
||||
</System.Windows.Forms.RadioButton> |
||||
<System.Windows.Forms.RadioButton> |
||||
<Name value="specificWarningsRadioButton" /> |
||||
<Location value="{X=8,Y=44}" /> |
||||
<Size value="{Width=128, Height=24}" /> |
||||
<Text value="Sp&ecific Warnings:" /> |
||||
<Size value="{Width=128, Height=24}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="1" /> |
||||
</System.Windows.Forms.RadioButton> |
||||
<System.Windows.Forms.RadioButton> |
||||
<Name value="noneRadioButton" /> |
||||
<Location value="{X=8,Y=20}" /> |
||||
<Size value="{Width=128, Height=24}" /> |
||||
<Text value="&None" /> |
||||
<Size value="{Width=128, Height=24}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="0" /> |
||||
</System.Windows.Forms.RadioButton> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="groupBox1" /> |
||||
<TabIndex value="6" /> |
||||
<Location value="{X=8,Y=96}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=416, Height=80}" /> |
||||
<Location value="{X=3,Y=415}" /> |
||||
<Text value="Errors and Warnings" /> |
||||
<Size value="{Width=521, Height=80}" /> |
||||
<TabIndex value="2" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Controls> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="suppressWarningsTextBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="3" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=349, Height=21}" /> |
||||
<Location value="{X=164,Y=44}" /> |
||||
<Size value="{Width=244, Height=21}" /> |
||||
<Text value="" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label4" /> |
||||
<Location value="{X=4,Y=44}" /> |
||||
<Text value="&Suppress Warnings:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<Size value="{Width=154, Height=23}" /> |
||||
<TabIndex value="2" /> |
||||
<Size value="{Width=160, Height=23}" /> |
||||
<Location value="{X=4,Y=44}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="warningLevelComboBox" /> |
||||
<TabIndex value="1" /> |
||||
<Location value="{X=164,Y=20}" /> |
||||
<Size value="{Width=60, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<DropDownStyle value="DropDownList" /> |
||||
<Location value="{X=164,Y=20}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label3" /> |
||||
<Location value="{X=4,Y=20}" /> |
||||
<Text value="&Warning Level:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<Size value="{Width=154, Height=23}" /> |
||||
<TabIndex value="0" /> |
||||
<Size value="{Width=160, Height=23}" /> |
||||
<Location value="{X=4,Y=20}" /> |
||||
</System.Windows.Forms.Label> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="optimizeCodeCheckBox" /> |
||||
<Location value="{X=8,Y=48}" /> |
||||
<Size value="{Width=416, Height=24}" /> |
||||
<Text value="Opti&mize code" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="4" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="allowUnsafeCodeCheckBox" /> |
||||
<Location value="{X=8,Y=72}" /> |
||||
<Size value="{Width=416, Height=24}" /> |
||||
<Text value="Allow &Unsafe code" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="5" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="conditionalSymbolsTextBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="1" /> |
||||
<Location value="{X=8,Y=24}" /> |
||||
<Size value="{Width=416, Height=21}" /> |
||||
<Text value="" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label1" /> |
||||
<Text value="Con&ditional Compilation Symbols:" /> |
||||
<TextAlign value="BottomLeft" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="0" /> |
||||
<Size value="{Width=416, Height=16}" /> |
||||
<Location value="{X=8,Y=8}" /> |
||||
</System.Windows.Forms.Label> |
||||
</Controls> |
||||
</System.Windows.Forms.UserControl> |
||||
</Components> |
||||
</Components> |
||||
|
||||
@ -1,180 +1,56 @@
@@ -1,180 +1,56 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt">2002-2005 AlphaSierraPapa</copyright>
|
||||
// <license see="prj:///doc/license.txt">GNU General Public License</license>
|
||||
// <owner name="none" email=""/>
|
||||
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Windows.Forms; |
||||
|
||||
using ICSharpCode.SharpDevelop.Internal.ExternalTool; |
||||
using ICSharpCode.SharpDevelop.Project; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
using ICSharpCode.SharpDevelop.Gui.XmlForms; |
||||
using ICSharpCode.SharpDevelop.Gui.OptionPanels; |
||||
|
||||
using StringPair = System.Collections.Generic.KeyValuePair<string, string>; |
||||
|
||||
namespace VBNetBinding.OptionPanels |
||||
{ |
||||
public class BuildOptions : AbstractOptionPanel |
||||
public class BuildOptions : AbstractBuildOptions |
||||
{ |
||||
VBNetProject project; |
||||
|
||||
public BuildOptions() |
||||
{ |
||||
} |
||||
|
||||
void ShowAdvancedOptions(object sender, EventArgs e) |
||||
{ |
||||
using (AdvancedBuildOptionsDialog advancedBuildOptionsDialog = new AdvancedBuildOptionsDialog(project)) { |
||||
advancedBuildOptionsDialog.ShowDialog(WorkbenchSingleton.MainForm); |
||||
} |
||||
} |
||||
string Config = "Debug"; |
||||
string Platform = "AnyCPU"; |
||||
|
||||
public override void LoadPanelContents() |
||||
{ |
||||
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.BuildOptions.xfrm")); |
||||
this.project = (VBNetProject)((Properties)CustomizationObject).Get("Project"); |
||||
|
||||
ConnectBrowseFolder("outputPathBrowseButton", "outputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}"); |
||||
Get<Button>("advancedOptions").Click += new EventHandler(ShowAdvancedOptions); |
||||
|
||||
Get<TextBox>("conditionalSymbols").Text = project.GetDefineConstants(Config, Platform); |
||||
Get<TextBox>("conditionalSymbols").TextChanged += new EventHandler(Save); |
||||
|
||||
|
||||
Get<CheckBox>("optimizeCode").Checked = project.GetOptimize(Config, Platform); |
||||
Get<CheckBox>("optimizeCode").CheckedChanged += new EventHandler(Save); |
||||
|
||||
Get<CheckBox>("allowUnsafeCode").Checked = project.GetAllowUnsafeBlocks(Config, Platform); |
||||
Get<CheckBox>("allowUnsafeCode").CheckedChanged += new EventHandler(Save); |
||||
SetupFromXmlResource("BuildOptions.xfrm"); |
||||
InitializeHelper(); |
||||
|
||||
Get<ComboBox>("warningLevel").Items.AddRange( new object[] {0, 1, 2, 3, 4}); |
||||
Get<ComboBox>("warningLevel").Text = project.WarningLevel.ToString(); |
||||
Get<ComboBox>("warningLevel").TextChanged += new EventHandler(Save); |
||||
helper.BindString("conditionalSymbolsTextBox", "DefineConstants"); |
||||
helper.BindBoolean("optimizeCodeCheckBox", "Optimize", false); |
||||
helper.BindBoolean("removeOverflowCheckBox", "RemoveIntegerChecks", false); |
||||
|
||||
Get<TextBox>("suppressWarnings").Text = project.GetNoWarn(Config, Platform); |
||||
Get<TextBox>("suppressWarnings").TextChanged += new EventHandler(Save); |
||||
helper.BindStringEnum("optionStrictComboBox", "OptionStrict", "Off", |
||||
new StringPair("Off", "Strict Off"), |
||||
new StringPair("On", "Strict On")); |
||||
helper.BindStringEnum("optionExplicitComboBox", "OptionExplicit", "On", |
||||
new StringPair("Off", "Explicit Off"), |
||||
new StringPair("On", "Explicit On")); |
||||
helper.BindStringEnum("optionCompareComboBox", "OptionCompare", "Binary", |
||||
new StringPair("Binary", "Compare Binary"), |
||||
new StringPair("Text", "Compare Text")); |
||||
|
||||
Get<TextBox>("specificWarnings").Text = project.GetWarningsAsErrors(Config, Platform); |
||||
Get<TextBox>("specificWarnings").TextChanged += new EventHandler(Save); |
||||
|
||||
|
||||
WarningsAsErrors warningsAsErrors = project.GetTreatWarningsAsErrors(Config, Platform); |
||||
Get<RadioButton>("none").Checked = warningsAsErrors == WarningsAsErrors.None; |
||||
Get<RadioButton>("none").CheckedChanged += new EventHandler(Save); |
||||
|
||||
Get<RadioButton>("specificWarnings").Checked = warningsAsErrors == WarningsAsErrors.Specific; |
||||
Get<RadioButton>("specificWarnings").CheckedChanged += new EventHandler(UpdateEnabledStates); |
||||
Get<RadioButton>("specificWarnings").CheckedChanged += new EventHandler(Save); |
||||
|
||||
Get<RadioButton>("all").Checked = warningsAsErrors == WarningsAsErrors.All; |
||||
Get<RadioButton>("all").CheckedChanged += new EventHandler(Save); |
||||
|
||||
Get<TextBox>("outputPath").Text = project.GetOutputPath(Config, Platform); |
||||
Get<TextBox>("outputPath").TextChanged += new EventHandler(Save); |
||||
|
||||
Get<TextBox>("xmlDocumentation").Text = project.GetDocumentationFile(Config, Platform); |
||||
Get<TextBox>("xmlDocumentation").TextChanged += new EventHandler(Save); |
||||
|
||||
Get<CheckBox>("xmlDocumentation").Checked = Get<TextBox>("xmlDocumentation").Text.Length > 0; |
||||
Get<CheckBox>("xmlDocumentation").CheckedChanged += new EventHandler(UpdateEnabledStates); |
||||
|
||||
Get<CheckBox>("registerCOMInterop").Checked = project.GetRegisterForComInterop(Config, Platform); |
||||
Get<CheckBox>("registerCOMInterop").CheckedChanged += new EventHandler(Save); |
||||
|
||||
|
||||
UpdateEnabledStates(this, EventArgs.Empty); |
||||
} |
||||
|
||||
void Save(object sender, EventArgs e) |
||||
{ |
||||
StorePanelContents(); |
||||
InitOutputPath(); |
||||
InitXmlDoc(); |
||||
InitAdvanced(); |
||||
InitWarnings(); |
||||
} |
||||
|
||||
void UpdateEnabledStates(object sender, EventArgs e) |
||||
{ |
||||
Get<TextBox>("specificWarnings").Enabled = Get<RadioButton>("specificWarnings").Checked; |
||||
Get<TextBox>("xmlDocumentation").Enabled = Get<CheckBox>("xmlDocumentation").Checked; |
||||
} |
||||
public override bool StorePanelContents() |
||||
{ |
||||
project.SetDefineConstants(Config, Platform, Get<TextBox>("conditionalSymbols").Text); |
||||
project.SetOptimize(Config, Platform, Get<CheckBox>("optimizeCode").Checked); |
||||
project.SetAllowUnsafeBlocks(Config, Platform, Get<CheckBox>("allowUnsafeCode").Checked); |
||||
project.WarningLevel = Int32.Parse(Get<ComboBox>("warningLevel").Text); |
||||
project.SetNoWarn(Config, Platform, Get<TextBox>("suppressWarnings").Text); |
||||
project.SetWarningsAsErrors(Config, Platform, Get<TextBox>("specificWarnings").Text); |
||||
|
||||
if (Get<RadioButton>("none").Checked) { |
||||
project.SetTreatWarningsAsErrors(Config, Platform, WarningsAsErrors.None); |
||||
} else if (Get<RadioButton>("specificWarnings").Checked) { |
||||
project.SetTreatWarningsAsErrors(Config, Platform, WarningsAsErrors.Specific); |
||||
} else { |
||||
project.SetTreatWarningsAsErrors(Config, Platform, WarningsAsErrors.All); |
||||
} |
||||
project.SetOutputPath(Config, Platform, Get<TextBox>("outputPath").Text); |
||||
|
||||
if (Get<CheckBox>("xmlDocumentation").Checked) { |
||||
project.SetDocumentationFile(Config, Platform, Get<TextBox>("xmlDocumentation").Text); |
||||
} else { |
||||
project.SetDocumentationFile(Config, Platform, ""); |
||||
} |
||||
|
||||
project.SetRegisterForComInterop(Config, Platform, Get<CheckBox>("registerCOMInterop").Checked); |
||||
project.Save(); |
||||
|
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public class AdvancedBuildOptionsDialog : BaseSharpDevelopForm |
||||
{ |
||||
string Config = "Debug"; |
||||
string Platform = "AnyCPU"; |
||||
VBNetProject project; |
||||
|
||||
public AdvancedBuildOptionsDialog(VBNetProject project) |
||||
{ |
||||
this.project = project; |
||||
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.AdvancedBuildOptionsDialog.xfrm")); |
||||
|
||||
Get<ComboBox>("languageVersion").Text = project.GetLangVersion(Config, Platform); |
||||
Get<ComboBox>("languageVersion").Items.AddRange(new string[] { "default", "ISO-1"}); |
||||
|
||||
Get<ComboBox>("reportCompilerError").Text = project.GetErrorReport(Config, Platform); |
||||
Get<ComboBox>("reportCompilerError").Items.AddRange(new string[] { "none", "prompt", "send"}); |
||||
|
||||
|
||||
Get<CheckBox>("checkOverUnderflow").Checked = project.GetCheckForOverflowUnderflow(Config, Platform); |
||||
Get<CheckBox>("noMsCorLibReference").Checked = project.GetNoStdLib(Config, Platform); |
||||
|
||||
Get<ComboBox>("debugInfo").Text = project.GetDebugType(Config, Platform); |
||||
Get<ComboBox>("debugInfo").Items.AddRange(new string[] { "none", "full", "pdb-only"}); |
||||
Get<ComboBox>("fileAlignment").Text = project.GetFileAlignment(Config, Platform).ToString(); |
||||
Get<ComboBox>("fileAlignment").Items.AddRange(new string[] { "512", "1024", "2048", "4096", "8192"}); |
||||
|
||||
|
||||
Get<ComboBox>("DLLBaseAddress").Text = project.GetBaseAddress(Config, Platform).ToString(); |
||||
|
||||
Get<Button>("ok").Click += new EventHandler(OkButtonClick); |
||||
} |
||||
|
||||
void OkButtonClick(object sender, EventArgs e) |
||||
{ |
||||
if (Get<ComboBox>("languageVersion").Text != "default") { |
||||
project.SetLangVersion(Config, Platform, Get<ComboBox>("languageVersion").Text); |
||||
} else { |
||||
project.SetLangVersion(Config, Platform, ""); |
||||
} |
||||
|
||||
project.SetErrorReport(Config, Platform, Get<ComboBox>("reportCompilerError").Text); |
||||
project.SetCheckForOverflowUnderflow(Config, Platform, Get<CheckBox>("checkOverUnderflow").Checked); |
||||
project.SetNoStdLib(Config, Platform, Get<CheckBox>("noMsCorLibReference").Checked); |
||||
project.SetDebugType(Config, Platform, Get<ComboBox>("debugInfo").Text); |
||||
project.SetFileAlignment(Config, Platform, Int32.Parse(Get<ComboBox>("fileAlignment").Text)); |
||||
project.SetBaseAddress(Config, Platform, Int32.Parse(Get<ComboBox>("DLLBaseAddress").Text)); |
||||
((VBNetProject)project).RefreshMyType(); |
||||
return base.StorePanelContents(); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@ -1,26 +0,0 @@
@@ -1,26 +0,0 @@
|
||||
<Components version="1.0"> |
||||
<System.Windows.Forms.UserControl> |
||||
<Name value="CreatedObject0" /> |
||||
<DockPadding value="" /> |
||||
<Size value="{Width=344, Height=296}" /> |
||||
<Controls> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label" /> |
||||
<Text value="${res:Dialog.Options.PrjOptions.CompileFile.IncludeGroupBox}" /> |
||||
<TextAlign value="MiddleLeft" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="2" /> |
||||
<Size value="{Width=328, Height=24}" /> |
||||
<Location value="{X=8,Y=0}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.CheckedListBox> |
||||
<Name value="IncludeFilesCheckedListBox" /> |
||||
<Location value="{X=8,Y=24}" /> |
||||
<Size value="{Width=328, Height=256}" /> |
||||
<Anchor value="Top, Bottom, Left, Right" /> |
||||
<TabIndex value="1" /> |
||||
<IntegralHeight value="False" /> |
||||
</System.Windows.Forms.CheckedListBox> |
||||
</Controls> |
||||
</System.Windows.Forms.UserControl> |
||||
</Components> |
||||
@ -1,91 +0,0 @@
@@ -1,91 +0,0 @@
|
||||
<Components version="1.0"> |
||||
<System.Windows.Forms.UserControl> |
||||
<Name value="CreatedObject0" /> |
||||
<GridSize value="{Width=8, Height=6}" /> |
||||
<DockPadding value="" /> |
||||
<Size value="{Width=368, Height=336}" /> |
||||
<Controls> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="CreatedObject2" /> |
||||
<TabIndex value="0" /> |
||||
<Location value="{X=8,Y=8}" /> |
||||
<Anchor value="Top, Bottom, Left, Right" /> |
||||
<Size value="{Width=352, Height=288}" /> |
||||
<Text value="${res:Dialog.Options.PrjOptions.DeployFile.DeployGroupBox}" /> |
||||
<Controls> |
||||
<System.Windows.Forms.RadioButton> |
||||
<Name value="projectFileRadioButton" /> |
||||
<Location value="{X=8,Y=16}" /> |
||||
<Size value="{Width=328, Height=24}" /> |
||||
<Text value="${res:Dialog.Options.PrjOptions.DeployFile.ProjectFilesRadioButton}" /> |
||||
<TabIndex value="0" /> |
||||
</System.Windows.Forms.RadioButton> |
||||
<System.Windows.Forms.CheckedListBox> |
||||
<Name value="projectFilesCheckedListBox" /> |
||||
<Location value="{X=8,Y=45}" /> |
||||
<Size value="{Width=336, Height=148}" /> |
||||
<Anchor value="Top, Bottom, Left, Right" /> |
||||
<TabIndex value="1" /> |
||||
</System.Windows.Forms.CheckedListBox> |
||||
<System.Windows.Forms.RadioButton> |
||||
<Name value="compiledAssemblyRadioButton" /> |
||||
<Location value="{X=8,Y=201}" /> |
||||
<Size value="{Width=336, Height=24}" /> |
||||
<Text value="${res:Dialog.Options.PrjOptions.DeployFile.CompilationTargetRadioButton}" /> |
||||
<Anchor value="Bottom, Left, Right" /> |
||||
<TabIndex value="2" /> |
||||
</System.Windows.Forms.RadioButton> |
||||
<System.Windows.Forms.RadioButton> |
||||
<Name value="scriptFileRadioButton" /> |
||||
<Location value="{X=8,Y=227}" /> |
||||
<Size value="{Width=336, Height=24}" /> |
||||
<Text value="${res:Dialog.Options.PrjOptions.DeployFile.ScriptFileRadioButton}" /> |
||||
<Anchor value="Bottom, Left, Right" /> |
||||
<TabIndex value="3" /> |
||||
</System.Windows.Forms.RadioButton> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="deployScriptTextBox" /> |
||||
<Anchor value="Bottom, Left, Right" /> |
||||
<TabIndex value="4" /> |
||||
<Location value="{X=24,Y=256}" /> |
||||
<Size value="{Width=272, Height=21}" /> |
||||
<Text value="" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="selectScriptFileButton" /> |
||||
<Location value="{X=304,Y=256}" /> |
||||
<Size value="{Width=32, Height=21}" /> |
||||
<Text value="..." /> |
||||
<Anchor value="Bottom, Right" /> |
||||
<TabIndex value="5" /> |
||||
</System.Windows.Forms.Button> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="CreatedObject9" /> |
||||
<Text value="${res:Dialog.Options.PrjOptions.DeployFile.DeployTargetLabel}" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<Anchor value="Bottom, Left" /> |
||||
<TabIndex value="1" /> |
||||
<Size value="{Width=88, Height=23}" /> |
||||
<Location value="{X=8,Y=304}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="deployTargetTextBox" /> |
||||
<Anchor value="Bottom, Left, Right" /> |
||||
<TabIndex value="2" /> |
||||
<Location value="{X=96,Y=304}" /> |
||||
<Size value="{Width=208, Height=21}" /> |
||||
<Text value="" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="selectTargetButton" /> |
||||
<Location value="{X=312,Y=304}" /> |
||||
<Size value="{Width=32, Height=21}" /> |
||||
<Text value="..." /> |
||||
<Anchor value="Bottom, Right" /> |
||||
<TabIndex value="3" /> |
||||
</System.Windows.Forms.Button> |
||||
</Controls> |
||||
</System.Windows.Forms.UserControl> |
||||
</Components> |
||||
@ -0,0 +1,95 @@
@@ -0,0 +1,95 @@
|
||||
<Components version="1.0"> |
||||
<System.Windows.Forms.Form> |
||||
<Name value="CreateKey" /> |
||||
<AcceptButton value="okButton [System.Windows.Forms.Button], Text: ${Global.OK}" /> |
||||
<MinimizeBox value="False" /> |
||||
<FormBorderStyle value="FixedDialog" /> |
||||
<Text value="Create Strong Name Key" /> |
||||
<MaximizeBox value="False" /> |
||||
<ClientSize value="{Width=416, Height=206}" /> |
||||
<CancelButton value="cancelButton [System.Windows.Forms.Button], Text: ${Global.Cancel}" /> |
||||
<Controls> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="cancelButton" /> |
||||
<Location value="{X=329,Y=177}" /> |
||||
<Text value="${res:Global.CancelButtonText}" /> |
||||
<Size value="{Width=75, Height=23}" /> |
||||
<Anchor value="Bottom, Right" /> |
||||
<TabIndex value="5" /> |
||||
<DialogResult value="Cancel" /> |
||||
</System.Windows.Forms.Button> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="okButton" /> |
||||
<Location value="{X=248,Y=177}" /> |
||||
<Text value="${res:Global.OKButtonText}" /> |
||||
<Size value="{Width=75, Height=23}" /> |
||||
<Anchor value="Bottom, Right" /> |
||||
<TabIndex value="4" /> |
||||
</System.Windows.Forms.Button> |
||||
<System.Windows.Forms.Panel> |
||||
<Name value="passwordPanel" /> |
||||
<Location value="{X=12,Y=87}" /> |
||||
<Size value="{Width=392, Height=84}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Enabled value="False"/> |
||||
<TabIndex value="3" /> |
||||
<Controls> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="confirmPasswordTextBox" /> |
||||
<TabIndex value="3" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=372, Height=21}" /> |
||||
<UseSystemPasswordChar value="True" /> |
||||
<Location value="{X=17,Y=60}" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label3" /> |
||||
<Location value="{X=8,Y=41}" /> |
||||
<Text value="Con&firm password:" /> |
||||
<Size value="{Width=381, Height=19}" /> |
||||
<TabIndex value="2" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="passwordTextBox" /> |
||||
<TabIndex value="1" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=372, Height=21}" /> |
||||
<UseSystemPasswordChar value="True" /> |
||||
<Location value="{X=17,Y=17}" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label2" /> |
||||
<Location value="{X=8,Y=0}" /> |
||||
<Text value="&Enter password:" /> |
||||
<Size value="{Width=381, Height=23}" /> |
||||
<TabIndex value="0" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.Label> |
||||
</Controls> |
||||
</System.Windows.Forms.Panel> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="usePasswordCheckBox" /> |
||||
<Location value="{X=12,Y=57}" /> |
||||
<Text value="&Protect my key file with a password" /> |
||||
<TabIndex value="2" /> |
||||
<Size value="{Width=392, Height=24}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="keyFileTextBox" /> |
||||
<TabIndex value="1" /> |
||||
<Size value="{Width=384, Height=21}" /> |
||||
<Location value="{X=20,Y=28}" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label1" /> |
||||
<Location value="{X=12,Y=9}" /> |
||||
<Text value="Key file &name:" /> |
||||
<Size value="{Width=392, Height=23}" /> |
||||
<TabIndex value="0" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.Label> |
||||
</Controls> |
||||
</System.Windows.Forms.Form> |
||||
</Components> |
||||
@ -1,250 +1,234 @@
@@ -1,250 +1,234 @@
|
||||
<Components version="1.0"> |
||||
<System.Windows.Forms.UserControl> |
||||
<Name value="XmlUserControl1" /> |
||||
<DockPadding value="" /> |
||||
<ClientSize value="{Width=592, Height=480}" /> |
||||
<ClientSize value="{Width=592, Height=420}" /> |
||||
<Controls> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="button5" /> |
||||
<Location value="{X=472,Y=440}" /> |
||||
<Size value="{Width=112, Height=23}" /> |
||||
<Location value="{X=472,Y=382}" /> |
||||
<Text value="Publish &Now" /> |
||||
<Size value="{Width=112, Height=23}" /> |
||||
<Anchor value="Top, Right" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="5" /> |
||||
</System.Windows.Forms.Button> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="button3" /> |
||||
<Location value="{X=352,Y=440}" /> |
||||
<Size value="{Width=112, Height=23}" /> |
||||
<Location value="{X=353,Y=382}" /> |
||||
<Text value="Publish &Wizard..." /> |
||||
<Size value="{Width=112, Height=23}" /> |
||||
<Anchor value="Top, Right" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="3" /> |
||||
</System.Windows.Forms.Button> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="groupBox2" /> |
||||
<Location value="{X=8,Y=135}" /> |
||||
<Text value="Install Mode and Settings" /> |
||||
<Size value="{Width=576, Height=152}" /> |
||||
<TabIndex value="1" /> |
||||
<Location value="{X=8,Y=192}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=576, Height=152}" /> |
||||
<Text value="Install Mode and Settings" /> |
||||
<Controls> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label2" /> |
||||
<Location value="{X=22,Y=88}" /> |
||||
<Text value="The publish panel is just a dummy, nothing you see here is implemented!" /> |
||||
<Size value="{Width=404, Height=24}" /> |
||||
<ForeColor value="Color [Red]" /> |
||||
<TabIndex value="8" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="button8" /> |
||||
<Location value="{X=456,Y=121}" /> |
||||
<Size value="{Width=112, Height=23}" /> |
||||
<Text value="O&ptions..." /> |
||||
<Size value="{Width=112, Height=23}" /> |
||||
<Anchor value="Top, Right" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="7" /> |
||||
</System.Windows.Forms.Button> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="button7" /> |
||||
<Location value="{X=456,Y=89}" /> |
||||
<Size value="{Width=112, Height=23}" /> |
||||
<Text value="&Updates..." /> |
||||
<Size value="{Width=112, Height=23}" /> |
||||
<Anchor value="Top, Right" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="6" /> |
||||
</System.Windows.Forms.Button> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="button6" /> |
||||
<Location value="{X=456,Y=57}" /> |
||||
<Size value="{Width=112, Height=23}" /> |
||||
<Text value="Pr&erequisites..." /> |
||||
<Size value="{Width=112, Height=23}" /> |
||||
<Anchor value="Top, Right" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="5" /> |
||||
</System.Windows.Forms.Button> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="button4" /> |
||||
<Location value="{X=456,Y=25}" /> |
||||
<Size value="{Width=112, Height=23}" /> |
||||
<Text value="Application &Files..." /> |
||||
<Size value="{Width=112, Height=23}" /> |
||||
<Anchor value="Top, Right" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="4" /> |
||||
</System.Windows.Forms.Button> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="checkBox1" /> |
||||
<Location value="{X=8,Y=121}" /> |
||||
<Size value="{Width=440, Height=24}" /> |
||||
<Text value="For &CD installations, automatically start Setup when CD is inserted" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="2" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.RadioButton> |
||||
<Name value="radioButton2" /> |
||||
<Location value="{X=8,Y=49}" /> |
||||
<Text value="The application is available offline as well (launchable from Start &menu)" /> |
||||
<Size value="{Width=440, Height=24}" /> |
||||
<Text value="The application is avaiable offline as well (launchable from Start &menu)" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="1" /> |
||||
</System.Windows.Forms.RadioButton> |
||||
<System.Windows.Forms.RadioButton> |
||||
<Name value="radioButton1" /> |
||||
<Location value="{X=8,Y=25}" /> |
||||
<Text value="The application is available &online only" /> |
||||
<Size value="{Width=440, Height=24}" /> |
||||
<Text value="The application is avaiable &online only" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="0" /> |
||||
</System.Windows.Forms.RadioButton> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="groupBox1" /> |
||||
<TabIndex value="0" /> |
||||
<Location value="{X=8,Y=8}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=576, Height=176}" /> |
||||
<Text value="Publish Location" /> |
||||
<Size value="{Width=576, Height=121}" /> |
||||
<TabIndex value="0" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Controls> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label2" /> |
||||
<Text value="Documentation and &support URL:" /> |
||||
<TextAlign value="BottomLeft" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="18" /> |
||||
<Size value="{Width=560, Height=16}" /> |
||||
<Location value="{X=8,Y=122}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="comboBox2" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="19" /> |
||||
<Location value="{X=8,Y=138}" /> |
||||
<Size value="{Width=512, Height=21}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="button2" /> |
||||
<Location value="{X=528,Y=138}" /> |
||||
<Size value="{Width=40, Height=21}" /> |
||||
<Text value="..." /> |
||||
<Anchor value="Top, Right" /> |
||||
<TabIndex value="20" /> |
||||
</System.Windows.Forms.Button> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label1" /> |
||||
<Location value="{X=40,Y=74}" /> |
||||
<Text value="&Installation URL (if different than above):" /> |
||||
<TextAlign value="BottomLeft" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="15" /> |
||||
<Size value="{Width=528, Height=16}" /> |
||||
<Location value="{X=40,Y=74}" /> |
||||
<TabIndex value="15" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="comboBox1" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="16" /> |
||||
<Location value="{X=40,Y=90}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=480, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<Location value="{X=40,Y=90}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="button1" /> |
||||
<Location value="{X=528,Y=90}" /> |
||||
<Size value="{Width=40, Height=21}" /> |
||||
<Text value="..." /> |
||||
<Size value="{Width=40, Height=21}" /> |
||||
<Anchor value="Top, Right" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="17" /> |
||||
</System.Windows.Forms.Button> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label5" /> |
||||
<Location value="{X=8,Y=26}" /> |
||||
<Text value="Pu&blishing Location (web site, ftp server, or file path)" /> |
||||
<TextAlign value="BottomLeft" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="12" /> |
||||
<Size value="{Width=560, Height=16}" /> |
||||
<Location value="{X=8,Y=26}" /> |
||||
<TabIndex value="12" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="applicationIconComboBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="13" /> |
||||
<Location value="{X=8,Y=42}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=512, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<Location value="{X=8,Y=42}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="applicationIconBrowseButton" /> |
||||
<Location value="{X=528,Y=42}" /> |
||||
<Size value="{Width=40, Height=21}" /> |
||||
<Text value="..." /> |
||||
<Size value="{Width=40, Height=21}" /> |
||||
<Anchor value="Top, Right" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="14" /> |
||||
</System.Windows.Forms.Button> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="groupBox3" /> |
||||
<TabIndex value="2" /> |
||||
<Location value="{X=8,Y=352}" /> |
||||
<Size value="{Width=328, Height=112}" /> |
||||
<Location value="{X=8,Y=293}" /> |
||||
<Text value="Publish Version" /> |
||||
<Size value="{Width=328, Height=112}" /> |
||||
<TabIndex value="2" /> |
||||
<Controls> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="checkBox2" /> |
||||
<Location value="{X=8,Y=82}" /> |
||||
<Size value="{Width=312, Height=24}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<Text value="&Automatically increment revision with each release" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="8" /> |
||||
<Size value="{Width=312, Height=24}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label7" /> |
||||
<Location value="{X=200,Y=24}" /> |
||||
<Text value="Revision:" /> |
||||
<TextAlign value="BottomCenter" /> |
||||
<TabIndex value="7" /> |
||||
<Size value="{Width=56, Height=23}" /> |
||||
<Location value="{X=200,Y=24}" /> |
||||
<TabIndex value="7" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="textBox4" /> |
||||
<TabIndex value="6" /> |
||||
<Location value="{X=200,Y=48}" /> |
||||
<Size value="{Width=56, Height=21}" /> |
||||
<Text value="" /> |
||||
<Location value="{X=200,Y=48}" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label6" /> |
||||
<Location value="{X=136,Y=24}" /> |
||||
<Text value="Build:" /> |
||||
<TextAlign value="BottomCenter" /> |
||||
<TabIndex value="5" /> |
||||
<Size value="{Width=56, Height=23}" /> |
||||
<Location value="{X=136,Y=24}" /> |
||||
<TabIndex value="5" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="textBox3" /> |
||||
<TabIndex value="4" /> |
||||
<Location value="{X=136,Y=48}" /> |
||||
<Size value="{Width=56, Height=21}" /> |
||||
<Text value="" /> |
||||
<Location value="{X=136,Y=48}" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label4" /> |
||||
<Location value="{X=72,Y=24}" /> |
||||
<Text value="Minor:" /> |
||||
<TextAlign value="BottomCenter" /> |
||||
<TabIndex value="3" /> |
||||
<Size value="{Width=56, Height=23}" /> |
||||
<Location value="{X=72,Y=24}" /> |
||||
<TabIndex value="3" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="textBox2" /> |
||||
<TabIndex value="2" /> |
||||
<Location value="{X=72,Y=48}" /> |
||||
<Size value="{Width=56, Height=21}" /> |
||||
<Text value="" /> |
||||
<Location value="{X=72,Y=48}" /> |
||||
</System.Windows.Forms.TextBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label3" /> |
||||
<Location value="{X=8,Y=24}" /> |
||||
<Text value="Major:" /> |
||||
<TextAlign value="BottomCenter" /> |
||||
<TabIndex value="1" /> |
||||
<Size value="{Width=56, Height=23}" /> |
||||
<Location value="{X=8,Y=24}" /> |
||||
<TabIndex value="1" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.TextBox> |
||||
<Name value="textBox1" /> |
||||
<TabIndex value="0" /> |
||||
<Location value="{X=8,Y=48}" /> |
||||
<Size value="{Width=56, Height=21}" /> |
||||
<Text value="" /> |
||||
<Location value="{X=8,Y=48}" /> |
||||
</System.Windows.Forms.TextBox> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
</Controls> |
||||
</System.Windows.Forms.UserControl> |
||||
</Components> |
||||
</Components> |
||||
|
||||
@ -1,104 +1,95 @@
@@ -1,104 +1,95 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Components version="1.0"> |
||||
<System.Windows.Forms.UserControl> |
||||
<Name value="XmlUserControl1" /> |
||||
<ClientSize value="{Width=392, Height=312}" /> |
||||
<Controls> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="signingGroupBox" /> |
||||
<Location value="{X=8,Y=28}" /> |
||||
<Text value="Key Selection" /> |
||||
<Size value="{Width=368, Height=196}" /> |
||||
<TabIndex value="1" /> |
||||
<Name value="clickOnceGroupBox" /> |
||||
<Location value="{X=3,Y=156}" /> |
||||
<Text value="ClickOnce signing" /> |
||||
<Size value="{Width=368, Height=48}" /> |
||||
<TabIndex value="2" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Controls> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="delaySignOnlyCheckBox" /> |
||||
<Location value="{X=4,Y=169}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<Text value="Dela&y Sign only" /> |
||||
<TabIndex value="8" /> |
||||
<Size value="{Width=356, Height=24}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="containerComboBox" /> |
||||
<TabIndex value="7" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=252, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<Location value="{X=108,Y=133}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label2" /> |
||||
<Location value="{X=8,Y=128}" /> |
||||
<Text value="&Container:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<Size value="{Width=100, Height=23}" /> |
||||
<TabIndex value="6" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="providerNameComboBox" /> |
||||
<TabIndex value="5" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=252, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<Location value="{X=108,Y=105}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label1" /> |
||||
<Location value="{X=8,Y=100}" /> |
||||
<Text value="Provider &name:" /> |
||||
<TextAlign value="MiddleRight" /> |
||||
<Size value="{Width=100, Height=23}" /> |
||||
<TabIndex value="4" /> |
||||
<Location value="{X=8,Y=17}" /> |
||||
<Text value="ClickOnce signing is currently not supported." /> |
||||
<Size value="{Width=352, Height=23}" /> |
||||
<TabIndex value="0" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.RadioButton> |
||||
<Name value="useKeyProviderRadioButton" /> |
||||
<Location value="{X=4,Y=77}" /> |
||||
<Text value="Use this key &provider:" /> |
||||
<Size value="{Width=356, Height=24}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="3" /> |
||||
</System.Windows.Forms.RadioButton> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="keyFileComboBox" /> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="signingGroupBox" /> |
||||
<Location value="{X=3,Y=3}" /> |
||||
<Text value="Strong name signing" /> |
||||
<Size value="{Width=368, Height=147}" /> |
||||
<TabIndex value="1" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Controls> |
||||
<System.Windows.Forms.Panel> |
||||
<Name value="strongNameSignPanel" /> |
||||
<Location value="{X=7,Y=41}" /> |
||||
<Size value="{Width=353, Height=100}" /> |
||||
<Anchor value="Top, Bottom, Left, Right" /> |
||||
<TabIndex value="1" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=184, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<Location value="{X=20,Y=49}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="changePasswordButton" /> |
||||
<Location value="{X=212,Y=49}" /> |
||||
<Text value="Change Pass&word..." /> |
||||
<Size value="{Width=148, Height=21}" /> |
||||
<Anchor value="Top, Right" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="2" /> |
||||
</System.Windows.Forms.Button> |
||||
<System.Windows.Forms.RadioButton> |
||||
<Name value="useKeyFileRadioButton" /> |
||||
<Location value="{X=4,Y=25}" /> |
||||
<Text value="Use a key &file:" /> |
||||
<Size value="{Width=356, Height=24}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Controls> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label1" /> |
||||
<Location value="{X=0,Y=77}" /> |
||||
<Text value="When delay signed, the project will not run or be debuggable." /> |
||||
<Size value="{Width=354, Height=23}" /> |
||||
<TabIndex value="10" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="delaySignOnlyCheckBox" /> |
||||
<Location value="{X=0,Y=50}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<Text value="Dela&y Sign only" /> |
||||
<TabIndex value="8" /> |
||||
<Size value="{Width=354, Height=24}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="keyFileComboBox" /> |
||||
<TabIndex value="1" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=198, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<Location value="{X=0,Y=23}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label3" /> |
||||
<Location value="{X=0,Y=1}" /> |
||||
<Text value="Choose a strong name key file:" /> |
||||
<Size value="{Width=354, Height=19}" /> |
||||
<TabIndex value="9" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.Button> |
||||
<Name value="changePasswordButton" /> |
||||
<Location value="{X=204,Y=22}" /> |
||||
<Text value="Change Pass&word..." /> |
||||
<Size value="{Width=150, Height=22}" /> |
||||
<Anchor value="Top, Right" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<TabIndex value="2" /> |
||||
</System.Windows.Forms.Button> |
||||
</Controls> |
||||
</System.Windows.Forms.Panel> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="signAssemblyCheckBox" /> |
||||
<Location value="{X=8,Y=20}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<Text value="Sign the &assembly" /> |
||||
<TabIndex value="0" /> |
||||
</System.Windows.Forms.RadioButton> |
||||
<Size value="{Width=352, Height=24}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="signAssemblyCheckBox" /> |
||||
<Location value="{X=8,Y=4}" /> |
||||
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||
<Text value="Sign the &assembly" /> |
||||
<TabIndex value="0" /> |
||||
<Size value="{Width=376, Height=24}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
</Controls> |
||||
</System.Windows.Forms.UserControl> |
||||
</Components> |
||||
|
||||
@ -0,0 +1,32 @@
@@ -0,0 +1,32 @@
|
||||
/* |
||||
* Created by SharpDevelop. |
||||
* User: Daniel Grunwald |
||||
* Date: 19.08.2005 |
||||
* Time: 18:25 |
||||
*/ |
||||
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Gui |
||||
{ |
||||
/// <summary>
|
||||
/// Description of ICanBeDirty.
|
||||
/// </summary>
|
||||
public interface ICanBeDirty |
||||
{ |
||||
/// <summary>
|
||||
/// If this property returns true the content has changed since
|
||||
/// the last load/save operation.
|
||||
/// </summary>
|
||||
bool IsDirty { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Is called when the content is changed after a save/load operation
|
||||
/// and this signals that changes could be saved.
|
||||
/// </summary>
|
||||
event EventHandler DirtyChanged; |
||||
} |
||||
} |
||||
@ -0,0 +1,149 @@
@@ -0,0 +1,149 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt">2002-2005 AlphaSierraPapa</copyright>
|
||||
// <license see="prj:///doc/license.txt">GNU General Public License</license>
|
||||
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Windows.Forms; |
||||
|
||||
using ICSharpCode.SharpDevelop.Project; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
using ICSharpCode.SharpDevelop.Gui.XmlForms; |
||||
|
||||
using StringPair = System.Collections.Generic.KeyValuePair<string, string>; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels |
||||
{ |
||||
public class AbstractBuildOptions : AbstractProjectOptionPanel |
||||
{ |
||||
protected void InitOutputPath() |
||||
{ |
||||
helper.BindString("outputPathTextBox", "OutputPath"); |
||||
ConnectBrowseFolder("outputPathBrowseButton", "outputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}"); |
||||
} |
||||
|
||||
protected void InitXmlDoc() |
||||
{ |
||||
helper.BindString("xmlDocumentationTextBox", "DocumentationFile"); |
||||
Get<CheckBox>("xmlDocumentation").Checked = Get<TextBox>("xmlDocumentation").Text.Length > 0; |
||||
Get<CheckBox>("xmlDocumentation").CheckedChanged += new EventHandler(UpdateXmlEnabled); |
||||
Get<TextBox>("xmlDocumentation").Enabled = Get<CheckBox>("xmlDocumentation").Checked; |
||||
} |
||||
|
||||
void UpdateXmlEnabled(object sender, EventArgs e) |
||||
{ |
||||
Get<TextBox>("xmlDocumentation").Enabled = Get<CheckBox>("xmlDocumentation").Checked; |
||||
if (Get<CheckBox>("xmlDocumentation").Checked && Get<TextBox>("xmlDocumentation").Text.Length == 0) { |
||||
Get<TextBox>("xmlDocumentation").Text = FileUtility.GetRelativePath(baseDirectory, project.OutputAssemblyFullPath) + ".xml"; |
||||
} else { |
||||
Get<TextBox>("xmlDocumentation").Text = ""; |
||||
} |
||||
} |
||||
|
||||
protected void InitWarnings() |
||||
{ |
||||
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")); |
||||
helper.BindString("suppressWarningsTextBox", "NoWarn"); |
||||
|
||||
helper.AddBinding("TreatWarningsAsErrors", new WarningsAsErrorsBinding(this)); |
||||
helper.BindString("specificWarningsTextBox", "WarningsAsErrors"); // must be saved AFTER TreatWarningsAsErrors
|
||||
|
||||
Get<RadioButton>("specificWarnings").CheckedChanged += new EventHandler(UpdateWarningChecked); |
||||
|
||||
UpdateWarningChecked(this, EventArgs.Empty); |
||||
} |
||||
|
||||
void UpdateWarningChecked(object sender, EventArgs e) |
||||
{ |
||||
Get<TextBox>("specificWarnings").Enabled = Get<RadioButton>("specificWarnings").Checked; |
||||
} |
||||
|
||||
protected class WarningsAsErrorsBinding : ConfigurationGuiBinding |
||||
{ |
||||
RadioButton none, specific, all; |
||||
Control specificWarningsTextBox; |
||||
|
||||
public WarningsAsErrorsBinding(AbstractProjectOptionPanel panel) |
||||
{ |
||||
this.none = panel.Get<RadioButton>("none"); |
||||
this.specific = panel.Get<RadioButton>("specificWarnings"); |
||||
this.all = panel.Get<RadioButton>("all"); |
||||
specificWarningsTextBox = panel.ControlDictionary["specificWarningsTextBox"]; |
||||
} |
||||
|
||||
public override void Load() |
||||
{ |
||||
if (bool.Parse(Get("false"))) { |
||||
all.Checked = true; |
||||
} else { |
||||
if (this.Helper.GetProperty("WarningsAsErrors", "").Length > 0) { |
||||
specific.Checked = true; |
||||
} else { |
||||
none.Checked = true; |
||||
} |
||||
} |
||||
} |
||||
|
||||
public override bool Save() |
||||
{ |
||||
if (none.Checked) { |
||||
specificWarningsTextBox.Text = ""; |
||||
} |
||||
if (all.Checked) { |
||||
Set("true"); |
||||
} else { |
||||
Set("false"); |
||||
} |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
protected void InitAdvanced() |
||||
{ |
||||
helper.BindEnum<DebugSymbolType>("debugInfoComboBox", "DebugType"); |
||||
helper.BindBoolean("registerCOMInteropCheckBox", "RegisterForComInterop", false); |
||||
helper.BindStringEnum("generateSerializationAssemblyComboBox", "GenerateSerializationAssemblies", |
||||
"Auto", |
||||
new StringPair("Off", "Off"), |
||||
new StringPair("On", "On"), |
||||
new StringPair("Auto", "Auto")); |
||||
helper.BindStringEnum("generateSerializationAssemblyComboBox", "GenerateSerializationAssemblies", |
||||
"Auto", |
||||
new StringPair("Off", "Off"), |
||||
new StringPair("On", "On"), |
||||
new StringPair("Auto", "Auto")); |
||||
helper.BindHexadecimal(Get<TextBox>("dllBaseAddress"), "BaseAddress", 0x400000); |
||||
helper.BindStringEnum("targetCpuComboBox", "PlatformTarget", |
||||
"AnyCPU", |
||||
new StringPair("AnyCPU", "${res:Dialog.ProjectOptions.Build.TargetCPU.Any}"), |
||||
new StringPair("x86", "${res:Dialog.ProjectOptions.Build.TargetCPU.x86}"), |
||||
new StringPair("x64", "${res:Dialog.ProjectOptions.Build.TargetCPU.x64}"), |
||||
new StringPair("Itanium", "${res:Dialog.ProjectOptions.Build.TargetCPU.Itanium}")); |
||||
} |
||||
|
||||
public override bool StorePanelContents() |
||||
{ |
||||
if (base.StorePanelContents()) { |
||||
if ((DebugSymbolType)Get<ComboBox>("debugInfo").SelectedIndex == DebugSymbolType.Full) { |
||||
helper.SetProperty("DebugSymbols", "true"); |
||||
} else { |
||||
helper.SetProperty("DebugSymbols", "false"); |
||||
} |
||||
return true; |
||||
} else { |
||||
return false; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,48 @@
@@ -0,0 +1,48 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt">2002-2005 AlphaSierraPapa</copyright>
|
||||
// <license see="prj:///doc/license.txt">GNU General Public License</license>
|
||||
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Windows.Forms; |
||||
|
||||
using ICSharpCode.SharpDevelop.Internal.ExternalTool; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
using ICSharpCode.SharpDevelop.Project; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels |
||||
{ |
||||
/// <summary>
|
||||
/// Base class for project option panels that are using the <see cref="ConfigurationGuiHelper"/>.
|
||||
/// </summary>
|
||||
public abstract class AbstractProjectOptionPanel : AbstractOptionPanel, ICanBeDirty |
||||
{ |
||||
protected ConfigurationGuiHelper helper; |
||||
protected MSBuildProject project; |
||||
|
||||
protected void InitializeHelper() |
||||
{ |
||||
project = (MSBuildProject)((Properties)CustomizationObject).Get("Project"); |
||||
baseDirectory = project.Directory; |
||||
helper = new ConfigurationGuiHelper(project, this.ControlDictionary); |
||||
} |
||||
|
||||
public bool IsDirty { |
||||
get { return helper.IsDirty; } |
||||
set { helper.IsDirty = value; } |
||||
} |
||||
|
||||
public event EventHandler DirtyChanged { |
||||
add { helper.DirtyChanged += value; } |
||||
remove { helper.DirtyChanged -= value; } |
||||
} |
||||
|
||||
public override bool StorePanelContents() |
||||
{ |
||||
return helper.Save(); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,106 @@
@@ -0,0 +1,106 @@
|
||||
/* |
||||
* Created by SharpDevelop. |
||||
* User: Daniel Grunwald |
||||
* Date: 20.08.2005 |
||||
* Time: 10:47 |
||||
*/ |
||||
|
||||
using System; |
||||
using System.Drawing; |
||||
using System.Diagnostics; |
||||
using System.IO; |
||||
using System.Windows.Forms; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop.Gui.XmlForms; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels |
||||
{ |
||||
public class CreateKeyForm : BaseSharpDevelopForm |
||||
{ |
||||
string baseDirectory; |
||||
|
||||
public CreateKeyForm(string baseDirectory) |
||||
{ |
||||
this.baseDirectory = baseDirectory; |
||||
SetupFromXmlResource("ProjectOptions.CreateKey.xfrm"); |
||||
Get<CheckBox>("usePassword").CheckedChanged += delegate { |
||||
ControlDictionary["passwordPanel"].Enabled = Get<CheckBox>("usePassword").Checked; |
||||
}; |
||||
ControlDictionary["okButton"].Click += OkButtonClick; |
||||
} |
||||
|
||||
void OkButtonClick(object sender, EventArgs e) |
||||
{ |
||||
KeyFile = KeyFile.Trim(); |
||||
if (KeyFile.Length == 0) { |
||||
MessageService.ShowMessage("${res:Dialog.ProjectOptions.Signing.EnterKeyName}"); |
||||
return; |
||||
} |
||||
bool usePassword = Get<CheckBox>("usePassword").Checked; |
||||
if (usePassword) { |
||||
if (!CheckPassword(ControlDictionary["passwordTextBox"], |
||||
ControlDictionary["confirmPasswordTextBox"])) |
||||
{ |
||||
return; |
||||
} |
||||
MessageService.ShowMessage("Creating a key file with a password is currently not supported."); |
||||
return; |
||||
} |
||||
if (!KeyFile.EndsWith(".snk") && !KeyFile.EndsWith(".pfx")) |
||||
KeyFile += ".snk"; |
||||
if (CreateKey(Path.Combine(baseDirectory, KeyFile))) { |
||||
this.DialogResult = DialogResult.OK; |
||||
Close(); |
||||
} |
||||
} |
||||
|
||||
public static bool CreateKey(string keyPath) |
||||
{ |
||||
if (File.Exists(keyPath)) { |
||||
string question = "${res:ICSharpCode.SharpDevelop.Internal.Templates.ProjectDescriptor.OverwriteQuestion}"; |
||||
question = StringParser.Parse(question, new string[,] {{"fileName", keyPath}}); |
||||
if (!MessageService.AskQuestion(question, "${res:ICSharpCode.SharpDevelop.Internal.Templates.ProjectDescriptor.OverwriteQuestion.InfoName}")) { |
||||
return false; |
||||
} |
||||
} |
||||
Process p = Process.Start(StrongNameTool, "-k \"" + keyPath + "\""); |
||||
p.WaitForExit(); |
||||
if (p.ExitCode != 0) { |
||||
MessageService.ShowMessage("${res:Dialog.ProjectOptions.Signing.ErrorCreatingKey}"); |
||||
return false; |
||||
} |
||||
return true; |
||||
} |
||||
|
||||
public string KeyFile { |
||||
get { |
||||
return ControlDictionary["keyFileTextBox"].Text; |
||||
} |
||||
set { |
||||
ControlDictionary["keyFileTextBox"].Text = value; |
||||
} |
||||
} |
||||
|
||||
public static bool CheckPassword(Control password, Control confirm) |
||||
{ |
||||
password.Text = password.Text.Trim(); |
||||
confirm.Text = confirm.Text.Trim(); |
||||
if (password.Text.Length < 6) { |
||||
MessageService.ShowMessage("${res:Dialog.ProjectOptions.Signing.PasswordTooShort}"); |
||||
password.Focus(); |
||||
return false; |
||||
} |
||||
if (password.Text != confirm.Text) { |
||||
MessageService.ShowMessage("${res:Dialog.ProjectOptions.Signing.PasswordsDontMatch}"); |
||||
return false; |
||||
} |
||||
return true; |
||||
} |
||||
|
||||
public static string StrongNameTool { |
||||
get { |
||||
return FileUtility.NetSdkInstallRoot + "bin\\sn.exe"; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
@ -1,197 +0,0 @@
@@ -1,197 +0,0 @@
|
||||
//// <file>
|
||||
//// <copyright see="prj:///doc/copyright.txt"/>
|
||||
//// <license see="prj:///doc/license.txt"/>
|
||||
//// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
|
||||
//// <version value="$version"/>
|
||||
//// </file>
|
||||
//
|
||||
//using System;
|
||||
//using System.Drawing;
|
||||
//using System.Collections;
|
||||
//using System.ComponentModel;
|
||||
//using System.Windows.Forms;
|
||||
//using System.Xml;
|
||||
//
|
||||
//using ICSharpCode.Core;
|
||||
//using ICSharpCode.Core;
|
||||
//using ICSharpCode.Core;
|
||||
//using ICSharpCode.Core;
|
||||
//using ICSharpCode.SharpDevelop.Project;
|
||||
//using ICSharpCode.Core;
|
||||
//namespace ICSharpCode.SharpDevelop.Gui {
|
||||
// /// <summary>
|
||||
// /// Dialog for viewing the project options (plain treeview isn't good enough :/)
|
||||
// /// </summary>
|
||||
// public class ProjectOptionsDialog : TreeViewOptions
|
||||
// {
|
||||
// IProject project;
|
||||
// TreeNode configurationTreeNode;
|
||||
//
|
||||
// AddInTreeNode configurationNode;
|
||||
//
|
||||
// public ProjectOptionsDialog(IProject project, AddInTreeNode node, AddInTreeNode configurationNode) : base(null, null)
|
||||
// {
|
||||
// this.project = project;
|
||||
// this.configurationNode = configurationNode;
|
||||
// this.Text = StringParser.Parse("${res:Dialog.Options.ProjectOptions.DialogName}");
|
||||
//
|
||||
// ((TreeView)ControlDictionary["optionsTreeView"]).MouseUp += new MouseEventHandler(TreeViewMouseUp);
|
||||
// ((TreeView)ControlDictionary["optionsTreeView"]).AfterLabelEdit += new NodeLabelEditEventHandler(AfterLabelEdit);
|
||||
//
|
||||
// ((TreeView)ControlDictionary["optionsTreeView"]).Font = boldFont;
|
||||
//
|
||||
// properties = new Properties();
|
||||
// properties.Set("Project", project);
|
||||
//
|
||||
// AddNodes(properties, ((TreeView)ControlDictionary["optionsTreeView"]).Nodes, node.BuildChildItems(this));
|
||||
//
|
||||
// configurationTreeNode = new TreeNode(StringParser.Parse("${res:Dialog.Options.ProjectOptions.ConfigurationsNodeName}"));
|
||||
// configurationTreeNode.NodeFont = plainFont;
|
||||
//
|
||||
// foreach (IConfiguration config in project.Configurations) {
|
||||
// TreeNode newNode = new TreeNode(config.Name);
|
||||
// newNode.Tag = config;
|
||||
// if (config == project.ActiveConfiguration) {
|
||||
// newNode.NodeFont = boldFont;
|
||||
// } else {
|
||||
// newNode.NodeFont = plainFont;
|
||||
// }
|
||||
// Properties configNodeProperties = new Properties();
|
||||
// configNodeProperties.Set("Project", project);
|
||||
// configNodeProperties.Set("Config", config);
|
||||
// AddNodes(configNodeProperties, newNode.Nodes, configurationNode.BuildChildItems(this));
|
||||
// configurationTreeNode.Nodes.Add(newNode);
|
||||
// }
|
||||
// ((TreeView)ControlDictionary["optionsTreeView"]).Nodes.Add(configurationTreeNode);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// public void AddProjectConfiguration()
|
||||
// {
|
||||
// int number = -1;
|
||||
// string name = "New Configuration"; // don't localize this project configs should have per default an english name
|
||||
// string newName = name;
|
||||
// bool duplicateNumber;
|
||||
// do {
|
||||
// duplicateNumber = false;
|
||||
// foreach (IConfiguration config in project.Configurations) {
|
||||
// newName = number >= 0 ? name + number : name;
|
||||
// if (newName == config.Name) {
|
||||
// ++number;
|
||||
// duplicateNumber = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// } while (duplicateNumber);
|
||||
//
|
||||
// TreeNode newNode = new TreeNode(newName);
|
||||
// IConfiguration newConfig = project.CloneConfiguration(project.ActiveConfiguration);
|
||||
// newConfig.Name = newName;
|
||||
//
|
||||
// newNode.Tag = newConfig;
|
||||
// newNode.NodeFont = plainFont;
|
||||
// project.Configurations.Add(newConfig);
|
||||
//
|
||||
// Properties newProperties = new Properties();
|
||||
// newProperties.Set("Project", project);
|
||||
// newProperties.Set("Config", newConfig);
|
||||
// AddNodes(newProperties, newNode.Nodes, configurationNode.BuildChildItems(newConfig));
|
||||
//
|
||||
// configurationTreeNode.Nodes.Add(newNode);
|
||||
// ((TreeView)ControlDictionary["optionsTreeView"]).SelectedNode = newNode;
|
||||
// ((TreeView)ControlDictionary["optionsTreeView"]).LabelEdit = true;
|
||||
// newNode.BeginEdit();
|
||||
// }
|
||||
//
|
||||
// public void RemoveProjectConfiguration()
|
||||
// {
|
||||
// IConfiguration config = (IConfiguration)((TreeView)ControlDictionary["optionsTreeView"]).SelectedNode.Tag;
|
||||
// if (project.Configurations.Count > 1) {
|
||||
// bool newActiveConfig = project.ActiveConfiguration == config;
|
||||
// project.Configurations.Remove(config);
|
||||
// project.ActiveConfiguration = (IConfiguration)project.Configurations[0];
|
||||
// ((TreeView)ControlDictionary["optionsTreeView"]).Nodes.Remove(((TreeView)ControlDictionary["optionsTreeView"]).SelectedNode);
|
||||
// UpdateBoldConfigurationNode();
|
||||
// configurationTreeNode.Expand();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// void UpdateBoldConfigurationNode()
|
||||
// {
|
||||
// foreach (TreeNode node in configurationTreeNode.Nodes) {
|
||||
// if (node == ((TreeView)ControlDictionary["optionsTreeView"]).SelectedNode) {
|
||||
// node.NodeFont = boldFont;
|
||||
// } else {
|
||||
// node.NodeFont = plainFont;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public void SetSelectedConfigurationAsStartup()
|
||||
// {
|
||||
// IConfiguration config = ((TreeView)ControlDictionary["optionsTreeView"]).SelectedNode.Tag as IConfiguration;
|
||||
// if (config != null) {
|
||||
// project.ActiveConfiguration = config;
|
||||
// UpdateBoldConfigurationNode();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public void RenameProjectConfiguration()
|
||||
// {
|
||||
// ((TreeView)ControlDictionary["optionsTreeView"]).LabelEdit = true;
|
||||
// ((TreeView)ControlDictionary["optionsTreeView"]).SelectedNode.BeginEdit();
|
||||
// }
|
||||
//
|
||||
// void AfterLabelEdit(object sender, NodeLabelEditEventArgs e)
|
||||
// {
|
||||
// ((TreeView)ControlDictionary["optionsTreeView"]).LabelEdit = false;
|
||||
//
|
||||
// // canceled edit (or empty name)
|
||||
// if (e.Label == null || e.Label.Length == 0) {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// bool duplicateLabel = false;
|
||||
// foreach (IConfiguration config in project.Configurations) {
|
||||
// if (e.Label == config.Name) {
|
||||
// duplicateLabel = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// e.CancelEdit = true;
|
||||
//
|
||||
// if (!duplicateLabel) {
|
||||
// e.Node.Text = e.Label;
|
||||
// ((IConfiguration)e.Node.Tag).Name = e.Label;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// static string configNodeMenu = "/SharpDevelop/Workbench/ProjectOptions/ConfigNodeMenu";
|
||||
// static string selectConfigNodeMenu = "/SharpDevelop/Workbench/ProjectOptions/SelectedConfigMenu";
|
||||
//
|
||||
// void TreeViewMouseUp(object sender, MouseEventArgs e)
|
||||
// {
|
||||
// TreeNode clickedNode = ((TreeView)ControlDictionary["optionsTreeView"]).GetNodeAt(e.X, e.Y);
|
||||
//
|
||||
// if(clickedNode == null) {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (e.Button == MouseButtons.Right) {
|
||||
// MenuService MenuService = (MenuService)ICSharpCode.Core.ServiceManager.Services.GetService(typeof(MenuService));
|
||||
// if (clickedNode == configurationTreeNode) {
|
||||
// b = false;
|
||||
// ((TreeView)ControlDictionary["optionsTreeView"]).SelectedNode = clickedNode;
|
||||
// b = true;
|
||||
// MenuService.ShowContextMenu(this, configNodeMenu, this, e.X, e.Y);
|
||||
// }
|
||||
// if (clickedNode.Parent == configurationTreeNode) {
|
||||
// b = false;
|
||||
// ((TreeView)ControlDictionary["optionsTreeView"]).SelectedNode = clickedNode;
|
||||
// b = true;
|
||||
// MenuService.ShowContextMenu(this, selectConfigNodeMenu, this, e.X, e.Y);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
@ -1,421 +0,0 @@
@@ -1,421 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt">2002-2005 AlphaSierraPapa</copyright>
|
||||
// <license see="prj:///doc/license.txt">GNU General Public License</license>
|
||||
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.ComponentModel; |
||||
using System.Diagnostics; |
||||
using System.IO; |
||||
using ICSharpCode.Core; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Project |
||||
{ |
||||
public enum AssemblyOriginatorKeyMode { |
||||
None, |
||||
File, |
||||
Provider |
||||
} |
||||
|
||||
public enum RunPostBuildEvent { |
||||
Always, |
||||
OnSuccessfulBuild, |
||||
OnOutputUpdated |
||||
} |
||||
|
||||
public enum StartAction { |
||||
Project, |
||||
Program, |
||||
StartURL |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Common base of C# and VB.NET projects.
|
||||
/// Any AdvancedMSBuildProject can use the common option panels.
|
||||
/// </summary>
|
||||
public class AdvancedMSBuildProject : MSBuildProject |
||||
{ |
||||
#region Application
|
||||
[Browsable(false)] |
||||
public string ApplicationIcon { |
||||
get { |
||||
return BaseConfiguration["ApplicationIcon"]; |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("ApplicationIcon", value); |
||||
} |
||||
} |
||||
|
||||
[Browsable(false)] |
||||
public string StartupObject { |
||||
get { |
||||
return BaseConfiguration["StartupObject"]; |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("StartupObject", value); |
||||
} |
||||
} |
||||
|
||||
[Browsable(false)] |
||||
public string Win32Resource { |
||||
get { |
||||
return BaseConfiguration["Win32Resource"]; |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("Win32Resource", value); |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
#region Signing
|
||||
[Browsable(false)] |
||||
public bool SignAssembly { |
||||
get { |
||||
return BaseConfiguration.Get("SignAssembly", false); |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("SignAssembly", false, value); |
||||
} |
||||
} |
||||
|
||||
[Browsable(false)] |
||||
public bool DelaySign { |
||||
get { |
||||
return BaseConfiguration.Get("DelaySign", false); |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("DelaySign", false, value); |
||||
} |
||||
} |
||||
|
||||
[Browsable(false)] |
||||
public string AssemblyOriginatorKeyFile { |
||||
get { |
||||
return BaseConfiguration["AssemblyOriginatorKeyFile"]; |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("AssemblyOriginatorKeyFile", value); |
||||
} |
||||
} |
||||
|
||||
[Browsable(false)] |
||||
public string AssemblyKeyProviderName { |
||||
get { |
||||
return BaseConfiguration["AssemblyKeyProviderName"]; |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("AssemblyKeyProviderName", value); |
||||
} |
||||
} |
||||
|
||||
[Browsable(false)] |
||||
public AssemblyOriginatorKeyMode AssemblyOriginatorKeyMode { |
||||
get { |
||||
return BaseConfiguration.Get("AssemblyOriginatorKeyMode", AssemblyOriginatorKeyMode.None); |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("AssemblyOriginatorKeyMode", AssemblyOriginatorKeyMode.None, value); |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
#region Build events
|
||||
[Browsable(false)] |
||||
public RunPostBuildEvent RunPostBuildEvent { |
||||
get { |
||||
return BaseConfiguration.Get("RunPostBuildEvent", RunPostBuildEvent.OnSuccessfulBuild); |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("RunPostBuildEvent", RunPostBuildEvent.OnSuccessfulBuild, value); |
||||
} |
||||
} |
||||
|
||||
[Browsable(false)] |
||||
public string PreBuildEvent { |
||||
get { |
||||
return BaseConfiguration["PreBuildEvent"]; |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("PreBuildEvent", value); |
||||
} |
||||
} |
||||
|
||||
[Browsable(false)] |
||||
public string PostBuildEvent { |
||||
get { |
||||
return BaseConfiguration["PostBuildEvent"]; |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("PostBuildEvent", value); |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
#region Publishing
|
||||
[Browsable(false)] |
||||
public string PublishUrl { |
||||
get { |
||||
return BaseConfiguration["PublishUrl"]; |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("PublishUrl", value); |
||||
} |
||||
} |
||||
|
||||
[Browsable(false)] |
||||
public bool Install { |
||||
get { |
||||
return BaseConfiguration.Get("Install", false); |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("Install", false, value); |
||||
} |
||||
} |
||||
|
||||
[Browsable(false)] |
||||
public bool UpdateEnabled { |
||||
get { |
||||
return BaseConfiguration.Get("UpdateEnabled", false); |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("UpdateEnabled", false, value); |
||||
} |
||||
} |
||||
|
||||
[Browsable(false)] |
||||
public bool UpdatePeriodically { |
||||
get { |
||||
return BaseConfiguration.Get("UpdatePeriodically", false); |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("UpdatePeriodically", false, value); |
||||
} |
||||
} |
||||
|
||||
[Browsable(false)] |
||||
public bool UpdateRequired { |
||||
get { |
||||
return BaseConfiguration.Get("UpdateRequired", false); |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("UpdateRequired", false, value); |
||||
} |
||||
} |
||||
|
||||
[Browsable(false)] |
||||
public bool UpdateUrlEnabled { |
||||
get { |
||||
return BaseConfiguration.Get("UpdateUrlEnabled", false); |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("UpdateUrlEnabled", value); |
||||
} |
||||
} |
||||
|
||||
[Browsable(false)] |
||||
public bool BootstrapperEnabled { |
||||
get { |
||||
return BaseConfiguration.Get("BootstrapperEnabled", false); |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("BootstrapperEnabled", false, value); |
||||
} |
||||
} |
||||
|
||||
[Browsable(false)] |
||||
public string InstallFrom { |
||||
get { |
||||
return BaseConfiguration["InstallFrom"]; |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("InstallFrom", value); |
||||
} |
||||
} |
||||
[Browsable(false)] |
||||
public string FallbackCulture { |
||||
get { |
||||
return BaseConfiguration["FallbackCulture"]; |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("FallbackCulture", value); |
||||
} |
||||
} |
||||
[Browsable(false)] |
||||
public string UpdateMode { |
||||
get { |
||||
return BaseConfiguration["UpdateMode"]; |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("UpdateMode", value); |
||||
} |
||||
} |
||||
[Browsable(false)] |
||||
public string UpdateIntervalUnits { |
||||
get { |
||||
return BaseConfiguration["UpdateIntervalUnits"]; |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("UpdateIntervalUnits", value); |
||||
} |
||||
} |
||||
|
||||
[Browsable(false)] |
||||
public string ApplicationVersion { |
||||
get { |
||||
return BaseConfiguration["ApplicationVersion"]; |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("ApplicationVersion", value); |
||||
} |
||||
} |
||||
[Browsable(false)] |
||||
public int UpdateInterval { |
||||
get { |
||||
return BaseConfiguration.Get("UpdateInterval", 0); |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("UpdateInterval", 0, value); |
||||
} |
||||
} |
||||
[Browsable(false)] |
||||
public int ApplicationRevision { |
||||
get { |
||||
return BaseConfiguration.Get("ApplicationRevision", 0); |
||||
} |
||||
set { |
||||
BaseConfiguration.Set("ApplicationRevision", 0, value); |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
#region Debug Options
|
||||
const string runConfiguration = "Debug"; |
||||
const string runProcessor = "AnyCPU"; |
||||
|
||||
public override bool IsStartable { |
||||
get { |
||||
StartAction action = GetStartAction(runConfiguration, runProcessor); |
||||
switch (action) { |
||||
case StartAction.Project: |
||||
return base.IsStartable; |
||||
case StartAction.Program: |
||||
return GetStartProgram(runConfiguration, runProcessor).Length > 0; |
||||
case StartAction.StartURL: |
||||
return GetStartURL(runConfiguration, runProcessor).Length > 0; |
||||
} |
||||
return false; |
||||
} |
||||
} |
||||
|
||||
void StartProgram(string program, bool withDebugging) |
||||
{ |
||||
ProcessStartInfo psi = new ProcessStartInfo(); |
||||
psi.FileName = Path.Combine(Directory, program); |
||||
string workingDir = GetStartWorkingDirectory(runConfiguration, runProcessor); |
||||
if (workingDir.Length == 0) { |
||||
psi.WorkingDirectory = Path.GetDirectoryName(psi.FileName); |
||||
} else { |
||||
psi.WorkingDirectory = Path.Combine(Directory, workingDir); |
||||
} |
||||
psi.Arguments = GetStartArguments(runConfiguration, runProcessor); |
||||
|
||||
if (withDebugging) { |
||||
DebuggerService.CurrentDebugger.Start(psi); |
||||
} else { |
||||
DebuggerService.CurrentDebugger.StartWithoutDebugging(psi); |
||||
} |
||||
} |
||||
|
||||
public override void Start(bool withDebugging) |
||||
{ |
||||
StartAction action = GetStartAction(runConfiguration, runProcessor); |
||||
switch (action) { |
||||
case StartAction.Project: |
||||
StartProgram(this.OutputAssemblyFullPath, withDebugging); |
||||
break; |
||||
case StartAction.Program: |
||||
StartProgram(GetStartProgram(runConfiguration, runProcessor), withDebugging); |
||||
break; |
||||
case StartAction.StartURL: |
||||
FileService.OpenFile("browser://" + GetStartURL(runConfiguration, runProcessor)); |
||||
break; |
||||
default: |
||||
throw new ApplicationException("Unknown start action: " + action); |
||||
} |
||||
} |
||||
|
||||
public string GetStartProgram(string configurationName, string platform) |
||||
{ |
||||
return GetUserConfiguration(configurationName, platform)["StartProgram"]; |
||||
} |
||||
|
||||
public void SetStartProgram(string configurationName, string platform, string val) |
||||
{ |
||||
GetUserConfiguration(configurationName, platform)["StartProgram"] = val; |
||||
} |
||||
|
||||
public string GetStartURL(string configurationName, string platform) |
||||
{ |
||||
return GetUserConfiguration(configurationName, platform)["StartURL"]; |
||||
} |
||||
|
||||
public void SetStartURL(string configurationName, string platform, string val) |
||||
{ |
||||
GetUserConfiguration(configurationName, platform)["StartURL"] = val; |
||||
} |
||||
|
||||
public StartAction GetStartAction(string configurationName, string platform) |
||||
{ |
||||
return GetUserConfiguration(configurationName, platform).Get("StartAction", StartAction.Project); |
||||
} |
||||
|
||||
public void SetStartAction(string configurationName, string platform, StartAction val) |
||||
{ |
||||
GetUserConfiguration(configurationName, platform).Set("StartAction", StartAction.Project, val); |
||||
} |
||||
|
||||
public string GetStartArguments(string configurationName, string platform) |
||||
{ |
||||
return GetUserConfiguration(configurationName, platform)["StartArguments"]; |
||||
} |
||||
|
||||
public void SetStartArguments(string configurationName, string platform, string val) |
||||
{ |
||||
GetUserConfiguration(configurationName, platform)["StartArguments"] = val; |
||||
} |
||||
|
||||
public string GetStartWorkingDirectory(string configurationName, string platform) |
||||
{ |
||||
return GetUserConfiguration(configurationName, platform)["StartWorkingDirectory"]; |
||||
} |
||||
|
||||
public void SetStartWorkingDirectory(string configurationName, string platform, string val) |
||||
{ |
||||
GetUserConfiguration(configurationName, platform)["StartWorkingDirectory"] = val; |
||||
} |
||||
|
||||
|
||||
public bool GetRemoteDebugEnabled(string configurationName, string platform) |
||||
{ |
||||
return GetUserConfiguration(configurationName, platform).Get("RemoteDebugEnabled", false); |
||||
} |
||||
|
||||
public void SetRemoteDebugEnabled(string configurationName, string platform, bool val) |
||||
{ |
||||
GetUserConfiguration(configurationName, platform).Set("RemoteDebugEnabled", false, val); |
||||
} |
||||
|
||||
public string GetRemoteDebugMachine(string configurationName, string platform) |
||||
{ |
||||
return GetUserConfiguration(configurationName, platform)["RemoteDebugMachine"]; |
||||
} |
||||
|
||||
public void SetRemoteDebugMachine(string configurationName, string platform, string val) |
||||
{ |
||||
GetUserConfiguration(configurationName, platform)["RemoteDebugMachine"] = val; |
||||
} |
||||
#endregion
|
||||
} |
||||
} |
||||
@ -0,0 +1,449 @@
@@ -0,0 +1,449 @@
|
||||
/* |
||||
* Created by SharpDevelop. |
||||
* User: Daniel Grunwald |
||||
* Date: 19.08.2005 |
||||
* Time: 15:12 |
||||
*/ |
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.ComponentModel; |
||||
using System.Globalization; |
||||
using System.Windows.Forms; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Project |
||||
{ |
||||
public abstract class ConfigurationGuiBinding |
||||
{ |
||||
ConfigurationGuiHelper helper; |
||||
string property; |
||||
|
||||
public MSBuildProject Project { |
||||
get { |
||||
return helper.Project; |
||||
} |
||||
} |
||||
|
||||
public ConfigurationGuiHelper Helper { |
||||
get { |
||||
return helper; |
||||
} |
||||
internal set { |
||||
helper = value; |
||||
} |
||||
} |
||||
|
||||
public string Property { |
||||
get { |
||||
return property; |
||||
} |
||||
internal set { |
||||
property = value; |
||||
} |
||||
} |
||||
|
||||
public T Get<T>(T defaultValue) |
||||
{ |
||||
return helper.GetProperty(property, defaultValue); |
||||
} |
||||
|
||||
public void Set<T>(T value) |
||||
{ |
||||
helper.SetProperty(property, value); |
||||
} |
||||
|
||||
public abstract void Load(); |
||||
public abstract bool Save(); |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Class that helps connecting configuration GUI controls to MsBuild properties.
|
||||
/// </summary>
|
||||
public class ConfigurationGuiHelper : ICanBeDirty |
||||
{ |
||||
MSBuildProject project; |
||||
Dictionary<string, Control> controlDictionary; |
||||
List<ConfigurationGuiBinding> bindings = new List<ConfigurationGuiBinding>(); |
||||
|
||||
public ConfigurationGuiHelper(MSBuildProject project, Dictionary<string, Control> controlDictionary) |
||||
{ |
||||
this.project = project; |
||||
this.controlDictionary = controlDictionary; |
||||
configuration = project.Configuration; |
||||
platform = project.Platform; |
||||
} |
||||
|
||||
public MSBuildProject Project { |
||||
get { |
||||
return project; |
||||
} |
||||
} |
||||
|
||||
public T GetProperty<T>(string property, T defaultValue) |
||||
{ |
||||
return project.GetProperty(configuration, platform, property, defaultValue); |
||||
} |
||||
|
||||
public void SetProperty<T>(string property, T value) |
||||
{ |
||||
project.SetProperty(configuration, platform, property, value, PropertyStorageLocation.Unchanged); |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Initializes the Property and Project properties on the binding and calls the load method on it.
|
||||
/// Registers the binding so that Save is called on it when Save is called on the ConfigurationGuiHelper.
|
||||
/// </summary>
|
||||
public void AddBinding(string property, ConfigurationGuiBinding binding) |
||||
{ |
||||
binding.Property = property; |
||||
binding.Helper = this; |
||||
binding.Load(); |
||||
bindings.Add(binding); |
||||
} |
||||
|
||||
public bool Save() |
||||
{ |
||||
foreach (ConfigurationGuiBinding binding in bindings) { |
||||
if (!binding.Save()) { |
||||
return false; |
||||
} |
||||
} |
||||
IsDirty = false; |
||||
return true; |
||||
} |
||||
|
||||
void ControlValueChanged(object sender, EventArgs e) |
||||
{ |
||||
IsDirty = true; |
||||
} |
||||
|
||||
bool dirty; |
||||
|
||||
public bool IsDirty { |
||||
get { |
||||
return dirty; |
||||
} |
||||
set { |
||||
if (dirty != value) { |
||||
dirty = value; |
||||
if (DirtyChanged != null) { |
||||
DirtyChanged(this, EventArgs.Empty); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
public event EventHandler DirtyChanged; |
||||
|
||||
string configuration; |
||||
|
||||
public string Configuration { |
||||
get { |
||||
return configuration; |
||||
} |
||||
set { |
||||
configuration = value; |
||||
} |
||||
} |
||||
|
||||
string platform; |
||||
|
||||
public string Platform { |
||||
get { |
||||
return platform; |
||||
} |
||||
set { |
||||
platform = value; |
||||
} |
||||
} |
||||
|
||||
#region Bind bool to CheckBox
|
||||
public void BindBoolean(string control, string property, bool defaultValue) |
||||
{ |
||||
BindBoolean(controlDictionary[control], property, defaultValue); |
||||
} |
||||
|
||||
public void BindBoolean(Control control, string property, bool defaultValue) |
||||
{ |
||||
CheckBox checkBox = control as CheckBox; |
||||
if (checkBox != null) { |
||||
AddBinding(property, new CheckBoxBinding(checkBox, defaultValue)); |
||||
checkBox.CheckedChanged += ControlValueChanged; |
||||
} else { |
||||
throw new ApplicationException("Cannot bind " + control.GetType().Name + " to bool property."); |
||||
} |
||||
} |
||||
|
||||
class CheckBoxBinding : ConfigurationGuiBinding |
||||
{ |
||||
CheckBox control; |
||||
bool defaultValue; |
||||
|
||||
public CheckBoxBinding(CheckBox control, bool defaultValue) |
||||
{ |
||||
this.control = control; |
||||
this.defaultValue = defaultValue; |
||||
} |
||||
|
||||
public override void Load() |
||||
{ |
||||
control.Checked = Get(defaultValue); |
||||
} |
||||
|
||||
public override bool Save() |
||||
{ |
||||
Set(control.Checked ? "true" : "false"); |
||||
return true; |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
#region Bind string to TextBox or ComboBox
|
||||
public void BindString(string control, string property) |
||||
{ |
||||
BindString(controlDictionary[control], property); |
||||
} |
||||
|
||||
public void BindString(Control control, string property) |
||||
{ |
||||
if (control is TextBoxBase || control is ComboBox) { |
||||
AddBinding(property, new SimpleTextBinding(control)); |
||||
control.TextChanged += ControlValueChanged; |
||||
if (control is ComboBox) { |
||||
control.KeyDown += ComboBoxKeyDown; |
||||
} |
||||
} else { |
||||
throw new ApplicationException("Cannot bind " + control.GetType().Name + " to string property."); |
||||
} |
||||
} |
||||
|
||||
void ComboBoxKeyDown(object sender, KeyEventArgs e) |
||||
{ |
||||
if (e.KeyData == (Keys.Control | Keys.S)) { |
||||
e.Handled = true; |
||||
new ICSharpCode.SharpDevelop.Commands.SaveFile().Run(); |
||||
} |
||||
} |
||||
|
||||
class SimpleTextBinding : ConfigurationGuiBinding |
||||
{ |
||||
Control control; |
||||
|
||||
public SimpleTextBinding(Control control) |
||||
{ |
||||
this.control = control; |
||||
} |
||||
|
||||
public override void Load() |
||||
{ |
||||
control.Text = Get(""); |
||||
} |
||||
|
||||
public override bool Save() |
||||
{ |
||||
Set(control.Text); |
||||
return true; |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
#region Bind hex number to TextBox
|
||||
public void BindHexadecimal(TextBoxBase textBox, string property, int defaultValue) |
||||
{ |
||||
AddBinding(property, new HexadecimalBinding(textBox, defaultValue)); |
||||
textBox.TextChanged += ControlValueChanged; |
||||
} |
||||
|
||||
class HexadecimalBinding : ConfigurationGuiBinding |
||||
{ |
||||
TextBoxBase textBox; |
||||
int defaultValue; |
||||
|
||||
public HexadecimalBinding(TextBoxBase textBox, int defaultValue) |
||||
{ |
||||
this.textBox = textBox; |
||||
this.defaultValue = defaultValue; |
||||
} |
||||
|
||||
public override void Load() |
||||
{ |
||||
int val; |
||||
if (!int.TryParse(Get(defaultValue.ToString(NumberFormatInfo.InvariantInfo)), NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out val)) { |
||||
val = defaultValue; |
||||
} |
||||
textBox.Text = "0x" + val.ToString("x", NumberFormatInfo.InvariantInfo); |
||||
} |
||||
|
||||
public override bool Save() |
||||
{ |
||||
string txt = textBox.Text.Trim(); |
||||
NumberStyles style = NumberStyles.Integer; |
||||
if (txt.StartsWith("0x")) { |
||||
txt = txt.Substring(2); |
||||
style = NumberStyles.HexNumber; |
||||
} |
||||
int val; |
||||
if (!int.TryParse(txt, style, NumberFormatInfo.InvariantInfo, out val)) { |
||||
textBox.Focus(); |
||||
MessageService.ShowMessage("Please enter a valid number."); |
||||
return false; |
||||
} |
||||
Set(val.ToString(NumberFormatInfo.InvariantInfo)); |
||||
return true; |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
#region Bind enum to ComboBox
|
||||
/// <summary>
|
||||
/// Bind enum to ComboBox
|
||||
/// </summary>
|
||||
public void BindEnum<T>(string control, string property, params T[] values) where T : struct |
||||
{ |
||||
BindEnum(controlDictionary[control], property, values); |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Bind enum to ComboBox
|
||||
/// </summary>
|
||||
public void BindEnum<T>(Control control, string property, params T[] values) where T : struct |
||||
{ |
||||
Type type = typeof(T); |
||||
if (values == null || values.Length == 0) { |
||||
values = (T[])Enum.GetValues(type); |
||||
} |
||||
ComboBox comboBox = control as ComboBox; |
||||
if (comboBox != null) { |
||||
foreach (T element in values) { |
||||
object[] attr = type.GetField(Enum.GetName(type, element)).GetCustomAttributes(typeof(DescriptionAttribute), false); |
||||
string description; |
||||
if (attr.Length > 0) { |
||||
description = StringParser.Parse((attr[0] as DescriptionAttribute).Description); |
||||
} else { |
||||
description = Enum.GetName(type, element); |
||||
} |
||||
comboBox.Items.Add(description); |
||||
} |
||||
string[] valueNames = new string[values.Length]; |
||||
for (int i = 0; i < values.Length; i++) |
||||
valueNames[i] = values[i].ToString(); |
||||
AddBinding(property, new ComboBoxBinding(comboBox, valueNames, valueNames[0])); |
||||
comboBox.SelectedIndexChanged += ControlValueChanged; |
||||
comboBox.KeyDown += ComboBoxKeyDown; |
||||
} else { |
||||
throw new ApplicationException("Cannot bind " + control.GetType().Name + " to enum property."); |
||||
} |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Bind list of strings to ComboBox.
|
||||
/// entries: value -> Description
|
||||
/// </summary>
|
||||
public void BindStringEnum(string control, string property, string defaultValue, params KeyValuePair<string, string>[] entries) |
||||
{ |
||||
BindStringEnum(controlDictionary[control], property, defaultValue, entries); |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Bind list of strings to ComboBox.
|
||||
/// entries: value -> Description
|
||||
/// </summary>
|
||||
public void BindStringEnum(Control control, string property, string defaultValue, params KeyValuePair<string, string>[] entries) |
||||
{ |
||||
ComboBox comboBox = control as ComboBox; |
||||
if (comboBox != null) { |
||||
string[] valueNames = new string[entries.Length]; |
||||
for (int i = 0; i < entries.Length; i++) { |
||||
valueNames[i] = entries[i].Key; |
||||
comboBox.Items.Add(StringParser.Parse(entries[i].Value)); |
||||
} |
||||
AddBinding(property, new ComboBoxBinding(comboBox, valueNames, defaultValue)); |
||||
comboBox.SelectedIndexChanged += ControlValueChanged; |
||||
comboBox.KeyDown += ComboBoxKeyDown; |
||||
} else { |
||||
throw new ApplicationException("Cannot bind " + control.GetType().Name + " to enum property."); |
||||
} |
||||
} |
||||
|
||||
class ComboBoxBinding : ConfigurationGuiBinding |
||||
{ |
||||
ComboBox control; |
||||
string[] values; |
||||
string defaultValue; |
||||
|
||||
public ComboBoxBinding(ComboBox control, string[] values, string defaultValue) |
||||
{ |
||||
this.control = control; |
||||
this.values = values; |
||||
this.defaultValue = defaultValue; |
||||
} |
||||
|
||||
public override void Load() |
||||
{ |
||||
string val = Get(defaultValue); |
||||
int i; |
||||
for (i = 0; i < values.Length; i++) { |
||||
if (val.Equals(values[i], StringComparison.OrdinalIgnoreCase)) |
||||
break; |
||||
} |
||||
if (i == values.Length) i = 0; |
||||
control.SelectedIndex = i; |
||||
} |
||||
|
||||
public override bool Save() |
||||
{ |
||||
Set(values[control.SelectedIndex]); |
||||
return true; |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
#region Bind enum to RadioButtons
|
||||
/// <summary>
|
||||
/// Bind enum to RadioButtons
|
||||
/// </summary>
|
||||
public void BindRadioEnum<T>(string property, params KeyValuePair<T, RadioButton>[] values) where T : struct |
||||
{ |
||||
AddBinding(property, new RadioEnumBinding<T>(values)); |
||||
foreach (KeyValuePair<T, RadioButton> pair in values) { |
||||
pair.Value.CheckedChanged += ControlValueChanged; |
||||
} |
||||
} |
||||
|
||||
class RadioEnumBinding<T> : ConfigurationGuiBinding where T : struct |
||||
{ |
||||
KeyValuePair<T, RadioButton>[] values; |
||||
|
||||
internal RadioEnumBinding(KeyValuePair<T, RadioButton>[] values) |
||||
{ |
||||
this.values = values; |
||||
} |
||||
|
||||
public override void Load() |
||||
{ |
||||
T val = Get(values[0].Key); |
||||
int i; |
||||
for (i = 0; i < values.Length; i++) { |
||||
if (val.Equals(values[i].Key)) |
||||
break; |
||||
} |
||||
if (i == values.Length) i = 0; |
||||
values[i].Value.Checked = true; |
||||
} |
||||
|
||||
public override bool Save() |
||||
{ |
||||
foreach (KeyValuePair<T, RadioButton> pair in values) { |
||||
if (pair.Value.Checked) { |
||||
Set(pair.Key); |
||||
break; |
||||
} |
||||
} |
||||
return true; |
||||
} |
||||
} |
||||
#endregion
|
||||
} |
||||
} |
||||
@ -0,0 +1,60 @@
@@ -0,0 +1,60 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt">2002-2005 AlphaSierraPapa</copyright>
|
||||
// <license see="prj:///doc/license.txt">GNU General Public License</license>
|
||||
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.ComponentModel; |
||||
using System.Diagnostics; |
||||
using System.IO; |
||||
using ICSharpCode.Core; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Project |
||||
{ |
||||
public enum RunPostBuildEvent { |
||||
[Description("${res:Dialog.ProjectOptions.RunPostBuildEvent.Always}")] |
||||
Always, |
||||
[Description("${res:Dialog.ProjectOptions.RunPostBuildEvent.OnSuccessfulBuild}")] |
||||
OnSuccessfulBuild, |
||||
[Description("${res:Dialog.ProjectOptions.RunPostBuildEvent.OnOutputUpdated}")] |
||||
OnOutputUpdated |
||||
} |
||||
|
||||
public enum DebugSymbolType { |
||||
None, |
||||
Full, |
||||
PdbOnly |
||||
} |
||||
|
||||
public enum StartAction { |
||||
Project, |
||||
Program, |
||||
StartURL |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Specifies the possible locations where a property can be stored.
|
||||
/// </summary>
|
||||
public enum PropertyStorageLocation |
||||
{ |
||||
Unchanged, |
||||
/// <summary>
|
||||
/// Store the property globally for all configurations in the project file.
|
||||
/// </summary>
|
||||
BaseConfiguration, |
||||
/// <summary>
|
||||
/// Store the property in the configuration-specific section(s) in the project file.
|
||||
/// </summary>
|
||||
SpecificConfiguration, |
||||
///// <summary>
|
||||
///// Store the property globally for all configurations in the user file.
|
||||
///// </summary>
|
||||
//UserBaseConfiguration,
|
||||
/// <summary>
|
||||
/// Store the property in the configuration-specific section(s) in the user file.
|
||||
/// </summary>
|
||||
UserSpecificConfiguration, |
||||
} |
||||
} |
||||
Binary file not shown.
Loading…
Reference in new issue