Browse Source

Improve project options panels and prepare editing different configurations.

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-cef0b8235c61
shortcuts
Daniel Grunwald 21 years ago
parent
commit
faab2b4fc9
  1. 1
      src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj
  2. 122
      src/AddIns/BackendBindings/CSharpBinding/Project/Resources/AdvancedBuildOptionsDialog.xfrm
  3. 287
      src/AddIns/BackendBindings/CSharpBinding/Project/Resources/BuildOptions.xfrm
  4. 188
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptions.cs
  5. 196
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Project/CSharpProject.cs
  6. 8
      src/AddIns/BackendBindings/ILAsmBinding/Project/ILAsmBinding.addin
  7. 2
      src/AddIns/BackendBindings/ILAsmBinding/Project/Src/ILAsmProject.cs
  8. 122
      src/AddIns/BackendBindings/VBNetBinding/Project/Resources/AdvancedBuildOptionsDialog.xfrm
  9. 286
      src/AddIns/BackendBindings/VBNetBinding/Project/Resources/BuildOptions.xfrm
  10. 180
      src/AddIns/BackendBindings/VBNetBinding/Project/Src/OptionPanels/BuildOptions.cs
  11. 208
      src/AddIns/BackendBindings/VBNetBinding/Project/Src/Project/VBNetProject.cs
  12. 1
      src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.csproj
  13. 8
      src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/FormDesignerViewContent.cs
  14. 11
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  15. 26
      src/Main/Base/Project/Resources/CompileFileProjectOptions.xfrm
  16. 91
      src/Main/Base/Project/Resources/DeployFileOptions.xfrm
  17. 95
      src/Main/Base/Project/Resources/ProjectOptions/CreateKey.xfrm
  18. 150
      src/Main/Base/Project/Resources/ProjectOptions/Publish.xfrm
  19. 115
      src/Main/Base/Project/Resources/ProjectOptions/Signing.xfrm
  20. 21
      src/Main/Base/Project/Src/Dom/XmlDoc.cs
  21. 8
      src/Main/Base/Project/Src/Gui/AbstractViewContent.cs
  22. 32
      src/Main/Base/Project/Src/Gui/ContentInterfaces/ICanBeDirty.cs
  23. 18
      src/Main/Base/Project/Src/Gui/Dialogs/AbstractOptionPanel.cs
  24. 13
      src/Main/Base/Project/Src/Gui/Dialogs/FolderDialog.cs
  25. 2
      src/Main/Base/Project/Src/Gui/Dialogs/NewProjectDialog.cs
  26. 149
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AbstractBuildOptions.cs
  27. 48
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AbstractProjectOptionPanel.cs
  28. 63
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ApplicationSettings.cs
  29. 41
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/BuildEvents.cs
  30. 106
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/CreateKey.cs
  31. 73
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/DebugOptions.cs
  32. 15
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/Publish.cs
  33. 6
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ReferencePaths.cs
  34. 112
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/Signing.cs
  35. 197
      src/Main/Base/Project/Src/Gui/Dialogs/ProjectOptionsDialog.cs
  36. 32
      src/Main/Base/Project/Src/Gui/Dialogs/ProjectOptionsView.cs
  37. 17
      src/Main/Base/Project/Src/Gui/IViewContent.cs
  38. 7
      src/Main/Base/Project/Src/Gui/XmlForms/Lib/XmlForm.cs
  39. 7
      src/Main/Base/Project/Src/Gui/XmlForms/Lib/XmlUserControl.cs
  40. 121
      src/Main/Base/Project/Src/Project/AbstractProject.cs
  41. 421
      src/Main/Base/Project/Src/Project/AdvancedMSBuildProject.cs
  42. 449
      src/Main/Base/Project/Src/Project/ConfigurationGuiHelper.cs
  43. 12
      src/Main/Base/Project/Src/Project/IProject.cs
  44. 60
      src/Main/Base/Project/Src/Project/MSBuildEnums.cs
  45. 85
      src/Main/Base/Project/Src/Project/MSBuildProject.cs
  46. 3
      src/Main/Base/Project/Src/Project/PropertyGroup.cs
  47. BIN
      src/Main/StartUp/Project/Resources/StringResources.resources

1
src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj

@ -33,7 +33,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Configuration\AssemblyInfo.cs" /> <Compile Include="Configuration\AssemblyInfo.cs" />
<EmbeddedResource Include="Resources\AdvancedBuildOptionsDialog.xfrm" />
<EmbeddedResource Include="Resources\BuildOptions.xfrm" /> <EmbeddedResource Include="Resources\BuildOptions.xfrm" />
<Compile Include="Src\CSharpAmbience.cs" /> <Compile Include="Src\CSharpAmbience.cs" />
<Compile Include="Src\CSharpBindingExecutionManager.cs" /> <Compile Include="Src\CSharpBindingExecutionManager.cs" />

122
src/AddIns/BackendBindings/CSharpBinding/Project/Resources/AdvancedBuildOptionsDialog.xfrm

@ -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 &amp;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="&amp;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&amp;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&amp;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&amp;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="&amp;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="&amp;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>

287
src/AddIns/BackendBindings/CSharpBinding/Project/Resources/BuildOptions.xfrm

@ -1,189 +1,298 @@
<Components version="1.0"> <Components version="1.0">
<System.Windows.Forms.UserControl> <System.Windows.Forms.UserControl>
<Name value="XmlUserControl1" /> <Name value="XmlUserControl1" />
<DockPadding value="" /> <ClientSize value="{Width=527, Height=633}" />
<ClientSize value="{Width=432, Height=480}" /> <AutoScroll value="True" />
<Controls> <Controls>
<System.Windows.Forms.GroupBox> <System.Windows.Forms.GroupBox>
<Name value="groupBox3" /> <Name value="generalGroupBox" />
<TabIndex value="8" /> <Location value="{X=3,Y=3}" />
<Location value="{X=8,Y=288}" /> <Text value="General" />
<Size value="{Width=521, Height=152}" />
<TabIndex value="0" />
<Anchor value="Top, Left, Right" />
<Controls>
<System.Windows.Forms.CheckBox>
<Name value="noCorlibCheckBox" />
<Location value="{X=12,Y=124}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="Do not reference &amp;mscorlib.dll" />
<TabIndex value="5" />
<Size value="{Width=503, Height=24}" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.CheckBox>
<Name value="checkForOverflowCheckBox" />
<Location value="{X=12,Y=104}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="&amp;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&amp;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 &amp;Unsafe code" />
<TabIndex value="3" />
<Size value="{Width=502, Height=24}" />
<Anchor value="Top, Left, Right" /> <Anchor value="Top, Left, Right" />
<Size value="{Width=416, Height=168}" /> </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&amp;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" /> <Text value="Output" />
<Size value="{Width=521, Height=270}" />
<TabIndex value="1" />
<Anchor value="Top, Left, Right" />
<Controls> <Controls>
<System.Windows.Forms.Button> <System.Windows.Forms.GroupBox>
<Name value="advancedOptionsButton" /> <Name value="advancedOutputGroupBox" />
<Location value="{X=320,Y=142}" /> <Location value="{X=6,Y=115}" />
<Size value="{Width=84, Height=21}" /> <Text value="Advanced" />
<Text value="Ad&amp;vanced" /> <Size value="{Width=505, Height=149}" />
<Anchor value="Top, Right" /> <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="&amp;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" /> <TabIndex value="6" />
</System.Windows.Forms.Button> <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="&amp;File Alignment:" />
<TextAlign value="MiddleRight" />
<Size value="{Width=181, Height=23}" />
<TabIndex value="5" />
</System.Windows.Forms.Label>
<System.Windows.Forms.CheckBox> <System.Windows.Forms.CheckBox>
<Name value="registerCOMInteropCheckBox" /> <Name value="registerCOMInteropCheckBox" />
<Location value="{X=8,Y=123}" /> <Location value="{X=175,Y=18}" />
<Size value="{Width=308, Height=20}" /> <FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="&amp;Register for COM Interop" /> <Text value="&amp;Register for COM Interop" />
<TabIndex value="0" />
<Size value="{Width=189, Height=20}" />
<Anchor value="Top, Left, Right" /> <Anchor value="Top, Left, Right" />
<TabIndex value="5" />
</System.Windows.Forms.CheckBox> </System.Windows.Forms.CheckBox>
<System.Windows.Forms.Label>
<Name value="label2" />
<Location value="{X=6,Y=43}" />
<Text value="&amp;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 &amp;Info:" />
<TextAlign value="MiddleRight" />
<Size value="{Width=152, Height=23}" />
<TabIndex value="5" />
</System.Windows.Forms.Label>
<System.Windows.Forms.CheckBox> <System.Windows.Forms.CheckBox>
<Name value="xmlDocumentationCheckBox" /> <Name value="xmlDocumentationCheckBox" />
<Location value="{X=8,Y=73}" /> <Location value="{X=13,Y=63}" />
<Size value="{Width=400, Height=20}" /> <FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="&amp;XML Documentation File" /> <Text value="&amp;XML documentation file:" />
<Anchor value="Top, Left, Right" />
<TabIndex value="3" /> <TabIndex value="3" />
<Size value="{Width=151, Height=20}" />
</System.Windows.Forms.CheckBox> </System.Windows.Forms.CheckBox>
<System.Windows.Forms.TextBox> <System.Windows.Forms.TextBox>
<Name value="xmlDocumentationTextBox" /> <Name value="xmlDocumentationTextBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="4" /> <TabIndex value="4" />
<Location value="{X=24,Y=96}" /> <Anchor value="Top, Left, Right" />
<Size value="{Width=384, Height=21}" /> <Size value="{Width=351, Height=21}" />
<Text value="" /> <Location value="{X=164,Y=62}" />
</System.Windows.Forms.TextBox> </System.Windows.Forms.TextBox>
<System.Windows.Forms.Label> <System.Windows.Forms.Label>
<Name value="label5" /> <Name value="label5" />
<Text value="Ou&amp;tput Path:" /> <Location value="{X=6,Y=17}" />
<Text value="&amp;Output Path:" />
<TextAlign value="BottomLeft" /> <TextAlign value="BottomLeft" />
<Anchor value="Top, Left, Right" /> <Size value="{Width=505, Height=16}" />
<TabIndex value="0" /> <TabIndex value="0" />
<Size value="{Width=400, Height=16}" /> <Anchor value="Top, Left, Right" />
<Location value="{X=8,Y=27}" />
</System.Windows.Forms.Label> </System.Windows.Forms.Label>
<System.Windows.Forms.TextBox> <System.Windows.Forms.TextBox>
<Name value="outputPathTextBox" /> <Name value="outputPathTextBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="1" /> <TabIndex value="1" />
<Location value="{X=8,Y=45}" /> <Anchor value="Top, Left, Right" />
<Size value="{Width=352, Height=21}" /> <Size value="{Width=457, Height=21}" />
<Text value="" /> <Location value="{X=13,Y=36}" />
</System.Windows.Forms.TextBox> </System.Windows.Forms.TextBox>
<System.Windows.Forms.Button> <System.Windows.Forms.Button>
<Name value="outputPathBrowseButton" /> <Name value="outputPathBrowseButton" />
<Location value="{X=368,Y=45}" /> <Location value="{X=475,Y=36}" />
<Size value="{Width=40, Height=21}" />
<Text value="..." /> <Text value="..." />
<Size value="{Width=40, Height=21}" />
<Anchor value="Top, Right" /> <Anchor value="Top, Right" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="2" /> <TabIndex value="2" />
</System.Windows.Forms.Button> </System.Windows.Forms.Button>
</Controls> </Controls>
</System.Windows.Forms.GroupBox> </System.Windows.Forms.GroupBox>
<System.Windows.Forms.GroupBox> <System.Windows.Forms.GroupBox>
<Name value="groupBox2" /> <Name value="groupBox2" />
<TabIndex value="7" /> <Location value="{X=3,Y=523}" />
<Location value="{X=8,Y=184}" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=416, Height=100}" />
<Text value="Treat Warnings as Errors" /> <Text value="Treat Warnings as Errors" />
<Size value="{Width=521, Height=100}" />
<TabIndex value="3" />
<Anchor value="Top, Left, Right" />
<Controls> <Controls>
<System.Windows.Forms.TextBox> <System.Windows.Forms.TextBox>
<Name value="specificWarningsTextBox" /> <Name value="specificWarningsTextBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="2" /> <TabIndex value="2" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=377, Height=21}" />
<Location value="{X=136,Y=44}" /> <Location value="{X=136,Y=44}" />
<Size value="{Width=272, Height=21}" />
<Text value="" />
</System.Windows.Forms.TextBox> </System.Windows.Forms.TextBox>
<System.Windows.Forms.RadioButton> <System.Windows.Forms.RadioButton>
<Name value="allRadioButton" /> <Name value="allRadioButton" />
<Location value="{X=8,Y=68}" /> <Location value="{X=8,Y=68}" />
<Size value="{Width=128, Height=24}" />
<Text value="A&amp;ll" /> <Text value="A&amp;ll" />
<Size value="{Width=128, Height=24}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="3" /> <TabIndex value="3" />
</System.Windows.Forms.RadioButton> </System.Windows.Forms.RadioButton>
<System.Windows.Forms.RadioButton> <System.Windows.Forms.RadioButton>
<Name value="specificWarningsRadioButton" /> <Name value="specificWarningsRadioButton" />
<Location value="{X=8,Y=44}" /> <Location value="{X=8,Y=44}" />
<Size value="{Width=128, Height=24}" />
<Text value="Sp&amp;ecific Warnings:" /> <Text value="Sp&amp;ecific Warnings:" />
<Size value="{Width=128, Height=24}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="1" /> <TabIndex value="1" />
</System.Windows.Forms.RadioButton> </System.Windows.Forms.RadioButton>
<System.Windows.Forms.RadioButton> <System.Windows.Forms.RadioButton>
<Name value="noneRadioButton" /> <Name value="noneRadioButton" />
<Location value="{X=8,Y=20}" /> <Location value="{X=8,Y=20}" />
<Size value="{Width=128, Height=24}" />
<Text value="&amp;None" /> <Text value="&amp;None" />
<Size value="{Width=128, Height=24}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="0" /> <TabIndex value="0" />
</System.Windows.Forms.RadioButton> </System.Windows.Forms.RadioButton>
</Controls> </Controls>
</System.Windows.Forms.GroupBox> </System.Windows.Forms.GroupBox>
<System.Windows.Forms.GroupBox> <System.Windows.Forms.GroupBox>
<Name value="groupBox1" /> <Name value="groupBox1" />
<TabIndex value="6" /> <Location value="{X=3,Y=437}" />
<Location value="{X=8,Y=96}" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=416, Height=80}" />
<Text value="Errors and Warnings" /> <Text value="Errors and Warnings" />
<Size value="{Width=521, Height=80}" />
<TabIndex value="2" />
<Anchor value="Top, Left, Right" />
<Controls> <Controls>
<System.Windows.Forms.TextBox> <System.Windows.Forms.TextBox>
<Name value="suppressWarningsTextBox" /> <Name value="suppressWarningsTextBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="3" /> <TabIndex value="3" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=349, Height=21}" />
<Location value="{X=164,Y=44}" /> <Location value="{X=164,Y=44}" />
<Size value="{Width=244, Height=21}" />
<Text value="" />
</System.Windows.Forms.TextBox> </System.Windows.Forms.TextBox>
<System.Windows.Forms.Label> <System.Windows.Forms.Label>
<Name value="label4" /> <Name value="label4" />
<Location value="{X=4,Y=44}" />
<Text value="&amp;Suppress Warnings:" /> <Text value="&amp;Suppress Warnings:" />
<TextAlign value="MiddleRight" /> <TextAlign value="MiddleRight" />
<Size value="{Width=154, Height=23}" />
<TabIndex value="2" /> <TabIndex value="2" />
<Size value="{Width=160, Height=23}" />
<Location value="{X=4,Y=44}" />
</System.Windows.Forms.Label> </System.Windows.Forms.Label>
<System.Windows.Forms.ComboBox> <System.Windows.Forms.ComboBox>
<Name value="warningLevelComboBox" /> <Name value="warningLevelComboBox" />
<TabIndex value="1" /> <TabIndex value="1" />
<Location value="{X=164,Y=20}" />
<Size value="{Width=60, Height=21}" /> <Size value="{Width=60, Height=21}" />
<FormattingEnabled value="True" />
<DropDownStyle value="DropDownList" /> <DropDownStyle value="DropDownList" />
<Location value="{X=164,Y=20}" />
</System.Windows.Forms.ComboBox> </System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label> <System.Windows.Forms.Label>
<Name value="label3" /> <Name value="label3" />
<Location value="{X=4,Y=20}" />
<Text value="&amp;Warning Level:" /> <Text value="&amp;Warning Level:" />
<TextAlign value="MiddleRight" /> <TextAlign value="MiddleRight" />
<Size value="{Width=154, Height=23}" />
<TabIndex value="0" /> <TabIndex value="0" />
<Size value="{Width=160, Height=23}" />
<Location value="{X=4,Y=20}" />
</System.Windows.Forms.Label> </System.Windows.Forms.Label>
</Controls> </Controls>
</System.Windows.Forms.GroupBox> </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&amp;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 &amp;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&amp;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> </Controls>
</System.Windows.Forms.UserControl> </System.Windows.Forms.UserControl>
</Components> </Components>

188
src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptions.cs

@ -1,180 +1,50 @@
// <file> // <file>
// <copyright see="prj:///doc/copyright.txt">2002-2005 AlphaSierraPapa</copyright> // <copyright see="prj:///doc/copyright.txt">2002-2005 AlphaSierraPapa</copyright>
// <license see="prj:///doc/license.txt">GNU General Public License</license> // <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> // <version>$Revision$</version>
// </file> // </file>
using System; using System;
using System.Collections.Generic;
using System.Windows.Forms; using System.Windows.Forms;
using ICSharpCode.SharpDevelop.Internal.ExternalTool; using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Gui.XmlForms; using ICSharpCode.SharpDevelop.Gui.XmlForms;
using ICSharpCode.SharpDevelop.Gui.OptionPanels;
namespace CSharpBinding.OptionPanels using StringPair = System.Collections.Generic.KeyValuePair<string, string>;
{
public class BuildOptions : AbstractOptionPanel
{
CSharpProject project;
public BuildOptions() namespace CSharpBinding.OptionPanels
{ {
} public class BuildOptions : AbstractBuildOptions
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() public override void LoadPanelContents()
{ {
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.BuildOptions.xfrm")); SetupFromXmlResource("BuildOptions.xfrm");
this.project = (CSharpProject)((Properties)CustomizationObject).Get("Project"); InitializeHelper();
ConnectBrowseFolder("outputPathBrowseButton", "outputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}"); InitOutputPath();
Get<Button>("advancedOptions").Click += new EventHandler(ShowAdvancedOptions); InitXmlDoc();
Get<TextBox>("conditionalSymbols").Text = project.GetDefineConstants(Config, Platform); helper.BindString("conditionalSymbolsTextBox", "DefineConstants");
Get<TextBox>("conditionalSymbols").TextChanged += new EventHandler(Save); helper.BindBoolean("optimizeCodeCheckBox", "Optimize", false);
helper.BindBoolean("allowUnsafeCodeCheckBox", "AllowUnsafeBlocks", false);
helper.BindBoolean("checkForOverflowCheckBox", "CheckForOverflowUnderflow", false);
Get<CheckBox>("optimizeCode").Checked = project.GetOptimize(Config, Platform); helper.BindBoolean("noCorlibCheckBox", "NoStdLib", false);
Get<CheckBox>("optimizeCode").CheckedChanged += new EventHandler(Save);
InitAdvanced();
Get<CheckBox>("allowUnsafeCode").Checked = project.GetAllowUnsafeBlocks(Config, Platform); helper.BindStringEnum("fileAlignmentComboBox", "FileAlignment",
Get<CheckBox>("allowUnsafeCode").CheckedChanged += new EventHandler(Save); "4096",
new StringPair("512", "512"),
Get<ComboBox>("warningLevel").Items.AddRange( new object[] {0, 1, 2, 3, 4}); new StringPair("1024", "1024"),
Get<ComboBox>("warningLevel").Text = project.WarningLevel.ToString(); new StringPair("2048", "2048"),
Get<ComboBox>("warningLevel").TextChanged += new EventHandler(Save); new StringPair("4096", "4096"),
new StringPair("8192", "8192"));
Get<TextBox>("suppressWarnings").Text = project.GetNoWarn(Config, Platform); InitWarnings();
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));
} }
} }
} }

196
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Project/CSharpProject.cs

@ -24,27 +24,11 @@ using ICSharpCode.Core;
namespace CSharpBinding namespace CSharpBinding
{ {
public enum WarningsAsErrors {
None,
Specific,
All
}
/// <summary> /// <summary>
/// Description of CSharpProject. /// Description of CSharpProject.
/// </summary> /// </summary>
public class CSharpProject : AdvancedMSBuildProject public class CSharpProject : MSBuildProject
{ {
[Browsable(false)]
public int WarningLevel {
get {
return BaseConfiguration.Get("WarningLevel", 4);
}
set {
BaseConfiguration.Set("WarningLevel", 4, value);
}
}
[Browsable(false)] [Browsable(false)]
public override IAmbience Ambience { public override IAmbience Ambience {
get { get {
@ -52,184 +36,6 @@ namespace CSharpBinding
} }
} }
public bool GetDebugSymbols(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform).Get("DebugSymbols", false);
}
public void SetDebugSymbols(string configurationName, string platform, bool val)
{
GetConfiguration(configurationName, platform).Set("DebugSymbols", val);
}
public bool GetOptimize(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform).Get("Optimize", false);
}
public void SetOptimize(string configurationName, string platform, bool val)
{
GetConfiguration(configurationName, platform).Set("Optimize", false, val);
}
public bool GetAllowUnsafeBlocks(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform).Get("AllowUnsafeBlocks", false);
}
public void SetAllowUnsafeBlocks(string configurationName, string platform, bool val)
{
GetConfiguration(configurationName, platform).Set("AllowUnsafeBlocks", false, val);
}
public WarningsAsErrors GetTreatWarningsAsErrors(string configurationName, string platform)
{
PropertyGroup properties = GetConfiguration(configurationName, platform);
if (!properties.IsSet("TreatWarningsAsErrors")) {
return WarningsAsErrors.Specific;
}
bool warningAsErrors = properties.Get("TreatWarningsAsErrors", false);
return warningAsErrors ? WarningsAsErrors.All : WarningsAsErrors.None;
}
public void SetTreatWarningsAsErrors(string configurationName, string platform, WarningsAsErrors warningsAsErrors)
{
PropertyGroup properties = GetConfiguration(configurationName, platform);
switch (warningsAsErrors) {
case WarningsAsErrors.None:
properties.Set("TreatWarningsAsErrors", false, false);
break;
case WarningsAsErrors.Specific:
properties.Remove("TreatWarningsAsErrors");
break;
case WarningsAsErrors.All:
properties.Set("TreatWarningsAsErrors", false, true);
break;
}
}
public bool GetRegisterForComInterop(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform).Get("RegisterForComInterop", false);
}
public void SetRegisterForComInterop(string configurationName, string platform, bool val)
{
GetConfiguration(configurationName, platform).Set("RegisterForComInterop", false, val);
}
public string GetDefineConstants(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform)["DefineConstants"];
}
public void SetDefineConstants(string configurationName, string platform, string val)
{
GetConfiguration(configurationName, platform)["DefineConstants"] = val;
}
public string GetNoWarn(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform)["NoWarn"];
}
public void SetNoWarn(string configurationName, string platform, string val)
{
GetConfiguration(configurationName, platform)["NoWarn"] = val;
}
public string GetWarningsAsErrors(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform)["WarningsAsErrors"];
}
public void SetWarningsAsErrors(string configurationName, string platform, string val)
{
GetConfiguration(configurationName, platform)["WarningsAsErrors"] = val;
}
public string GetDocumentationFile(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform)["DocumentationFile"];
}
public void SetDocumentationFile(string configurationName, string platform, string val)
{
GetConfiguration(configurationName, platform)["DocumentationFile"] = val;
}
public string GetLangVersion(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform)["LangVersion"];
}
public void SetLangVersion(string configurationName, string platform, string val)
{
GetConfiguration(configurationName, platform)["LangVersion"] = val;
}
public string GetErrorReport(string configurationName, string platform)
{ // none, prompt, send
return GetConfiguration(configurationName, platform)["ErrorReport"];
}
public void SetErrorReport(string configurationName, string platform, string val)
{
GetConfiguration(configurationName, platform)["ErrorReport"] = val;
}
public int GetBaseAddress(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform).Get<int>("BaseAddress", 4194304);
}
public void SetBaseAddress(string configurationName, string platform, int val)
{
GetConfiguration(configurationName, platform).Set("BaseAddress", 4194304, val);
}
public int GetFileAlignment(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform).Get<int>("FileAlignment", 4096);
}
public void SetFileAlignment(string configurationName, string platform, int val)
{
GetConfiguration(configurationName, platform).Set("FileAlignment", 4096, val);
}
public string GetDebugType(string configurationName, string platform)
{ // none, full, pdbonly
return GetConfiguration(configurationName, platform)["DebugType"];
}
public void SetDebugType(string configurationName, string platform, string val)
{
GetConfiguration(configurationName, platform)["DebugType"] = val;
}
public bool GetCheckForOverflowUnderflow(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform).Get("CheckForOverflowUnderflow", false);
}
public void SetCheckForOverflowUnderflow(string configurationName, string platform, bool val)
{
GetConfiguration(configurationName, platform).Set("CheckForOverflowUnderflow", false, val);
}
public bool GetNoStdLib(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform).Get("NoStdLib", false);
}
public void SetNoStdLib(string configurationName, string platform, bool val)
{
GetConfiguration(configurationName, platform).Set("NoStdLib", false, val);
}
public CSharpProject(string fileName, string projectName) public CSharpProject(string fileName, string projectName)
{ {
this.Name = projectName; this.Name = projectName;

8
src/AddIns/BackendBindings/ILAsmBinding/Project/ILAsmBinding.addin

@ -31,9 +31,9 @@
<!--<DialogPanel id = "ReferencePaths" <!--<DialogPanel id = "ReferencePaths"
label = "Reference Paths" label = "Reference Paths"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.ReferencePaths"/>--> class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.ReferencePaths"/>-->
<DialogPanel id = "Signing" <!--<DialogPanel id = "Signing"
label = "Signing" label = "Signing"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.Signing"/> class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.Signing"/>-->
<DialogPanel id = "BuildEvents" <DialogPanel id = "BuildEvents"
label = "Build Events" label = "Build Events"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.BuildEvents"/> class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.BuildEvents"/>
@ -43,9 +43,9 @@
<DialogPanel id = "DebugOptions" <DialogPanel id = "DebugOptions"
label = "Debug" label = "Debug"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.DebugOptions"/> class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.DebugOptions"/>
<DialogPanel id = "Publish" <!--<DialogPanel id = "Publish"
label = "Publish" label = "Publish"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.Publish"/> class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.Publish"/>-->
</Path> </Path>
<Path name = "/SharpDevelop/Workbench/LanguageBindings"> <Path name = "/SharpDevelop/Workbench/LanguageBindings">

2
src/AddIns/BackendBindings/ILAsmBinding/Project/Src/ILAsmProject.cs

@ -11,7 +11,7 @@ using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.ILAsmBinding namespace ICSharpCode.ILAsmBinding
{ {
public class ILAsmProject : AdvancedMSBuildProject public class ILAsmProject : MSBuildProject
{ {
public ILAsmProject(string fileName, string projectName) public ILAsmProject(string fileName, string projectName)
{ {

122
src/AddIns/BackendBindings/VBNetBinding/Project/Resources/AdvancedBuildOptionsDialog.xfrm

@ -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 &amp;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="&amp;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&amp;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&amp;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&amp;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="&amp;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="&amp;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>

286
src/AddIns/BackendBindings/VBNetBinding/Project/Resources/BuildOptions.xfrm

@ -1,189 +1,297 @@
<Components version="1.0"> <Components version="1.0">
<System.Windows.Forms.UserControl> <System.Windows.Forms.UserControl>
<Name value="XmlUserControl1" /> <Name value="XmlUserControl1" />
<DockPadding value="" /> <ClientSize value="{Width=527, Height=633}" />
<ClientSize value="{Width=432, Height=480}" /> <AutoScroll value="True" />
<Controls> <Controls>
<System.Windows.Forms.GroupBox> <System.Windows.Forms.GroupBox>
<Name value="groupBox3" /> <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" />
<Controls>
<System.Windows.Forms.ComboBox>
<Name value="optionCompareComboBox" />
<TabIndex value="8" /> <TabIndex value="8" />
<Location value="{X=8,Y=288}" /> <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" />
<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 &amp;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&amp;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="optimizeCodeCheckBox" />
<AccessibleRole value="None" />
<Location value="{X=13,Y=64}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="O&amp;ptimize code" />
<TabIndex value="2" />
<Size value="{Width=502, Height=24}" />
<Anchor value="Top, Left, Right" /> <Anchor value="Top, Left, Right" />
<Size value="{Width=416, Height=168}" /> </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" /> <Text value="Output" />
<Size value="{Width=521, Height=248}" />
<TabIndex value="1" />
<Anchor value="Top, Left, Right" />
<Controls> <Controls>
<System.Windows.Forms.Button> <System.Windows.Forms.GroupBox>
<Name value="advancedOptionsButton" /> <Name value="advancedOutputGroupBox" />
<Location value="{X=320,Y=142}" /> <Location value="{X=6,Y=115}" />
<Size value="{Width=84, Height=21}" /> <Text value="Advanced" />
<Text value="Ad&amp;vanced" /> <Size value="{Width=505, Height=127}" />
<Anchor value="Top, Right" /> <TabIndex value="7" />
<TabIndex value="6" /> <Anchor value="Top, Bottom, Left, Right" />
</System.Windows.Forms.Button> <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="&amp;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> <System.Windows.Forms.CheckBox>
<Name value="registerCOMInteropCheckBox" /> <Name value="registerCOMInteropCheckBox" />
<Location value="{X=8,Y=123}" /> <Location value="{X=175,Y=18}" />
<Size value="{Width=308, Height=20}" /> <FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="&amp;Register for COM Interop" /> <Text value="&amp;Register for COM Interop" />
<TabIndex value="0" />
<Size value="{Width=189, Height=20}" />
<Anchor value="Top, Left, Right" /> <Anchor value="Top, Left, Right" />
<TabIndex value="5" />
</System.Windows.Forms.CheckBox> </System.Windows.Forms.CheckBox>
<System.Windows.Forms.Label>
<Name value="label2" />
<Location value="{X=6,Y=43}" />
<Text value="&amp;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 &amp;Info:" />
<TextAlign value="MiddleRight" />
<Size value="{Width=152, Height=23}" />
<TabIndex value="5" />
</System.Windows.Forms.Label>
<System.Windows.Forms.CheckBox> <System.Windows.Forms.CheckBox>
<Name value="xmlDocumentationCheckBox" /> <Name value="xmlDocumentationCheckBox" />
<Location value="{X=8,Y=73}" /> <Location value="{X=13,Y=63}" />
<Size value="{Width=400, Height=20}" /> <FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="&amp;XML Documentation File" /> <Text value="&amp;XML documentation file:" />
<Anchor value="Top, Left, Right" />
<TabIndex value="3" /> <TabIndex value="3" />
<Size value="{Width=151, Height=20}" />
</System.Windows.Forms.CheckBox> </System.Windows.Forms.CheckBox>
<System.Windows.Forms.TextBox> <System.Windows.Forms.TextBox>
<Name value="xmlDocumentationTextBox" /> <Name value="xmlDocumentationTextBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="4" /> <TabIndex value="4" />
<Location value="{X=24,Y=96}" /> <Anchor value="Top, Left, Right" />
<Size value="{Width=384, Height=21}" /> <Size value="{Width=351, Height=21}" />
<Text value="" /> <Location value="{X=164,Y=62}" />
</System.Windows.Forms.TextBox> </System.Windows.Forms.TextBox>
<System.Windows.Forms.Label> <System.Windows.Forms.Label>
<Name value="label5" /> <Name value="label5" />
<Text value="Ou&amp;tput Path:" /> <Location value="{X=6,Y=17}" />
<Text value="&amp;Output Path:" />
<TextAlign value="BottomLeft" /> <TextAlign value="BottomLeft" />
<Anchor value="Top, Left, Right" /> <Size value="{Width=505, Height=16}" />
<TabIndex value="0" /> <TabIndex value="0" />
<Size value="{Width=400, Height=16}" /> <Anchor value="Top, Left, Right" />
<Location value="{X=8,Y=27}" />
</System.Windows.Forms.Label> </System.Windows.Forms.Label>
<System.Windows.Forms.TextBox> <System.Windows.Forms.TextBox>
<Name value="outputPathTextBox" /> <Name value="outputPathTextBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="1" /> <TabIndex value="1" />
<Location value="{X=8,Y=45}" /> <Anchor value="Top, Left, Right" />
<Size value="{Width=352, Height=21}" /> <Size value="{Width=457, Height=21}" />
<Text value="" /> <Location value="{X=13,Y=36}" />
</System.Windows.Forms.TextBox> </System.Windows.Forms.TextBox>
<System.Windows.Forms.Button> <System.Windows.Forms.Button>
<Name value="outputPathBrowseButton" /> <Name value="outputPathBrowseButton" />
<Location value="{X=368,Y=45}" /> <Location value="{X=475,Y=36}" />
<Size value="{Width=40, Height=21}" />
<Text value="..." /> <Text value="..." />
<Size value="{Width=40, Height=21}" />
<Anchor value="Top, Right" /> <Anchor value="Top, Right" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="2" /> <TabIndex value="2" />
</System.Windows.Forms.Button> </System.Windows.Forms.Button>
</Controls> </Controls>
</System.Windows.Forms.GroupBox> </System.Windows.Forms.GroupBox>
<System.Windows.Forms.GroupBox> <System.Windows.Forms.GroupBox>
<Name value="groupBox2" /> <Name value="groupBox2" />
<TabIndex value="7" /> <Location value="{X=3,Y=501}" />
<Location value="{X=8,Y=184}" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=416, Height=100}" />
<Text value="Treat Warnings as Errors" /> <Text value="Treat Warnings as Errors" />
<Size value="{Width=521, Height=100}" />
<TabIndex value="3" />
<Anchor value="Top, Left, Right" />
<Controls> <Controls>
<System.Windows.Forms.TextBox> <System.Windows.Forms.TextBox>
<Name value="specificWarningsTextBox" /> <Name value="specificWarningsTextBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="2" /> <TabIndex value="2" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=377, Height=21}" />
<Location value="{X=136,Y=44}" /> <Location value="{X=136,Y=44}" />
<Size value="{Width=272, Height=21}" />
<Text value="" />
</System.Windows.Forms.TextBox> </System.Windows.Forms.TextBox>
<System.Windows.Forms.RadioButton> <System.Windows.Forms.RadioButton>
<Name value="allRadioButton" /> <Name value="allRadioButton" />
<Location value="{X=8,Y=68}" /> <Location value="{X=8,Y=68}" />
<Size value="{Width=128, Height=24}" />
<Text value="A&amp;ll" /> <Text value="A&amp;ll" />
<Size value="{Width=128, Height=24}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="3" /> <TabIndex value="3" />
</System.Windows.Forms.RadioButton> </System.Windows.Forms.RadioButton>
<System.Windows.Forms.RadioButton> <System.Windows.Forms.RadioButton>
<Name value="specificWarningsRadioButton" /> <Name value="specificWarningsRadioButton" />
<Location value="{X=8,Y=44}" /> <Location value="{X=8,Y=44}" />
<Size value="{Width=128, Height=24}" />
<Text value="Sp&amp;ecific Warnings:" /> <Text value="Sp&amp;ecific Warnings:" />
<Size value="{Width=128, Height=24}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="1" /> <TabIndex value="1" />
</System.Windows.Forms.RadioButton> </System.Windows.Forms.RadioButton>
<System.Windows.Forms.RadioButton> <System.Windows.Forms.RadioButton>
<Name value="noneRadioButton" /> <Name value="noneRadioButton" />
<Location value="{X=8,Y=20}" /> <Location value="{X=8,Y=20}" />
<Size value="{Width=128, Height=24}" />
<Text value="&amp;None" /> <Text value="&amp;None" />
<Size value="{Width=128, Height=24}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="0" /> <TabIndex value="0" />
</System.Windows.Forms.RadioButton> </System.Windows.Forms.RadioButton>
</Controls> </Controls>
</System.Windows.Forms.GroupBox> </System.Windows.Forms.GroupBox>
<System.Windows.Forms.GroupBox> <System.Windows.Forms.GroupBox>
<Name value="groupBox1" /> <Name value="groupBox1" />
<TabIndex value="6" /> <Location value="{X=3,Y=415}" />
<Location value="{X=8,Y=96}" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=416, Height=80}" />
<Text value="Errors and Warnings" /> <Text value="Errors and Warnings" />
<Size value="{Width=521, Height=80}" />
<TabIndex value="2" />
<Anchor value="Top, Left, Right" />
<Controls> <Controls>
<System.Windows.Forms.TextBox> <System.Windows.Forms.TextBox>
<Name value="suppressWarningsTextBox" /> <Name value="suppressWarningsTextBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="3" /> <TabIndex value="3" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=349, Height=21}" />
<Location value="{X=164,Y=44}" /> <Location value="{X=164,Y=44}" />
<Size value="{Width=244, Height=21}" />
<Text value="" />
</System.Windows.Forms.TextBox> </System.Windows.Forms.TextBox>
<System.Windows.Forms.Label> <System.Windows.Forms.Label>
<Name value="label4" /> <Name value="label4" />
<Location value="{X=4,Y=44}" />
<Text value="&amp;Suppress Warnings:" /> <Text value="&amp;Suppress Warnings:" />
<TextAlign value="MiddleRight" /> <TextAlign value="MiddleRight" />
<Size value="{Width=154, Height=23}" />
<TabIndex value="2" /> <TabIndex value="2" />
<Size value="{Width=160, Height=23}" />
<Location value="{X=4,Y=44}" />
</System.Windows.Forms.Label> </System.Windows.Forms.Label>
<System.Windows.Forms.ComboBox> <System.Windows.Forms.ComboBox>
<Name value="warningLevelComboBox" /> <Name value="warningLevelComboBox" />
<TabIndex value="1" /> <TabIndex value="1" />
<Location value="{X=164,Y=20}" />
<Size value="{Width=60, Height=21}" /> <Size value="{Width=60, Height=21}" />
<FormattingEnabled value="True" />
<DropDownStyle value="DropDownList" /> <DropDownStyle value="DropDownList" />
<Location value="{X=164,Y=20}" />
</System.Windows.Forms.ComboBox> </System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label> <System.Windows.Forms.Label>
<Name value="label3" /> <Name value="label3" />
<Location value="{X=4,Y=20}" />
<Text value="&amp;Warning Level:" /> <Text value="&amp;Warning Level:" />
<TextAlign value="MiddleRight" /> <TextAlign value="MiddleRight" />
<Size value="{Width=154, Height=23}" />
<TabIndex value="0" /> <TabIndex value="0" />
<Size value="{Width=160, Height=23}" />
<Location value="{X=4,Y=20}" />
</System.Windows.Forms.Label> </System.Windows.Forms.Label>
</Controls> </Controls>
</System.Windows.Forms.GroupBox> </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&amp;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 &amp;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&amp;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> </Controls>
</System.Windows.Forms.UserControl> </System.Windows.Forms.UserControl>
</Components> </Components>

180
src/AddIns/BackendBindings/VBNetBinding/Project/Src/OptionPanels/BuildOptions.cs

@ -1,180 +1,56 @@
// <file> // <file>
// <copyright see="prj:///doc/copyright.txt">2002-2005 AlphaSierraPapa</copyright> // <copyright see="prj:///doc/copyright.txt">2002-2005 AlphaSierraPapa</copyright>
// <license see="prj:///doc/license.txt">GNU General Public License</license> // <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> // <version>$Revision$</version>
// </file> // </file>
using System; using System;
using System.Collections.Generic;
using System.Windows.Forms; using System.Windows.Forms;
using ICSharpCode.SharpDevelop.Internal.ExternalTool; using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Gui.XmlForms; using ICSharpCode.SharpDevelop.Gui.XmlForms;
using ICSharpCode.SharpDevelop.Gui.OptionPanels;
using StringPair = System.Collections.Generic.KeyValuePair<string, string>;
namespace VBNetBinding.OptionPanels 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() public override void LoadPanelContents()
{ {
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.BuildOptions.xfrm")); SetupFromXmlResource("BuildOptions.xfrm");
this.project = (VBNetProject)((Properties)CustomizationObject).Get("Project"); InitializeHelper();
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}); helper.BindString("conditionalSymbolsTextBox", "DefineConstants");
Get<ComboBox>("warningLevel").Text = project.WarningLevel.ToString(); helper.BindBoolean("optimizeCodeCheckBox", "Optimize", false);
Get<ComboBox>("warningLevel").TextChanged += new EventHandler(Save); helper.BindBoolean("removeOverflowCheckBox", "RemoveIntegerChecks", false);
Get<TextBox>("suppressWarnings").Text = project.GetNoWarn(Config, Platform); helper.BindStringEnum("optionStrictComboBox", "OptionStrict", "Off",
Get<TextBox>("suppressWarnings").TextChanged += new EventHandler(Save); 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); InitOutputPath();
Get<TextBox>("specificWarnings").TextChanged += new EventHandler(Save); InitXmlDoc();
InitAdvanced();
InitWarnings();
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() public override bool StorePanelContents()
{ {
project.SetDefineConstants(Config, Platform, Get<TextBox>("conditionalSymbols").Text); ((VBNetProject)project).RefreshMyType();
project.SetOptimize(Config, Platform, Get<CheckBox>("optimizeCode").Checked); return base.StorePanelContents();
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));
} }
} }
} }

208
src/AddIns/BackendBindings/VBNetBinding/Project/Src/Project/VBNetProject.cs

@ -33,38 +33,22 @@ namespace VBNetBinding
/// <summary> /// <summary>
/// Description of CSharpProject. /// Description of CSharpProject.
/// </summary> /// </summary>
public class VBNetProject : AdvancedMSBuildProject public class VBNetProject : MSBuildProject
{ {
[Browsable(false)] public void RefreshMyType()
public int WarningLevel
{ {
get { switch (this.OutputType) {
return BaseConfiguration.Get("WarningLevel", 4);
}
set {
BaseConfiguration.Set("WarningLevel", 4, value);
}
}
public override OutputType OutputType {
get {
return base.OutputType;
}
set {
base.OutputType = value;
switch (value) {
case OutputType.WinExe: case OutputType.WinExe:
BaseConfiguration.Set("MyType", "", "WindowsForms"); SetProperty("MyType", "WindowsForms");
break; break;
case OutputType.Exe: case OutputType.Exe:
BaseConfiguration.Set("MyType", "", "Console"); SetProperty("MyType", "Console");
break; break;
default: default:
BaseConfiguration.Set("MyType", "", "Windows"); SetProperty("MyType", "Windows");
break; break;
} }
} }
}
[Browsable(false)] [Browsable(false)]
public override IAmbience Ambience { public override IAmbience Ambience {
@ -73,186 +57,6 @@ namespace VBNetBinding
} }
} }
public bool GetDebugSymbols(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform).Get("DebugSymbols", false);
}
public void SetDebugSymbols(string configurationName, string platform, bool val)
{
GetConfiguration(configurationName, platform).Set("DebugSymbols", val);
}
public bool GetOptimize(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform).Get("Optimize", false);
}
public void SetOptimize(string configurationName, string platform, bool val)
{
GetConfiguration(configurationName, platform).Set("Optimize", false, val);
}
public bool GetAllowUnsafeBlocks(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform).Get("AllowUnsafeBlocks", false);
}
public void SetAllowUnsafeBlocks(string configurationName, string platform, bool val)
{
GetConfiguration(configurationName, platform).Set("AllowUnsafeBlocks", false, val);
}
public WarningsAsErrors GetTreatWarningsAsErrors(string configurationName, string platform)
{
PropertyGroup properties = GetConfiguration(configurationName, platform);
if (!properties.IsSet("TreatWarningsAsErrors")) {
return WarningsAsErrors.Specific;
}
bool warningAsErrors = properties.Get("TreatWarningsAsErrors", false);
return warningAsErrors ? WarningsAsErrors.All : WarningsAsErrors.None;
}
public void SetTreatWarningsAsErrors(string configurationName, string platform, WarningsAsErrors warningsAsErrors)
{
PropertyGroup properties = GetConfiguration(configurationName, platform);
switch (warningsAsErrors) {
case WarningsAsErrors.None:
properties.Set("TreatWarningsAsErrors", false, false);
break;
case WarningsAsErrors.Specific:
properties.Remove("TreatWarningsAsErrors");
break;
case WarningsAsErrors.All:
properties.Set("TreatWarningsAsErrors", false, true);
break;
}
}
public bool GetRegisterForComInterop(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform).Get("RegisterForComInterop", false);
}
public void SetRegisterForComInterop(string configurationName, string platform, bool val)
{
GetConfiguration(configurationName, platform).Set("RegisterForComInterop", false, val);
}
public string GetDefineConstants(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform)["DefineConstants"];
}
public void SetDefineConstants(string configurationName, string platform, string val)
{
GetConfiguration(configurationName, platform)["DefineConstants"] = val;
}
public string GetNoWarn(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform)["NoWarn"];
}
public void SetNoWarn(string configurationName, string platform, string val)
{
GetConfiguration(configurationName, platform)["NoWarn"] = val;
}
public string GetWarningsAsErrors(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform)["WarningsAsErrors"];
}
public void SetWarningsAsErrors(string configurationName, string platform, string val)
{
GetConfiguration(configurationName, platform)["WarningsAsErrors"] = val;
}
public string GetDocumentationFile(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform)["DocumentationFile"];
}
public void SetDocumentationFile(string configurationName, string platform, string val)
{
GetConfiguration(configurationName, platform)["DocumentationFile"] = val;
}
public string GetLangVersion(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform)["LangVersion"];
}
public void SetLangVersion(string configurationName, string platform, string val)
{
GetConfiguration(configurationName, platform)["LangVersion"] = val;
}
public string GetErrorReport(string configurationName, string platform)
{ // none, prompt, send
return GetConfiguration(configurationName, platform)["ErrorReport"];
}
public void SetErrorReport(string configurationName, string platform, string val)
{
GetConfiguration(configurationName, platform)["ErrorReport"] = val;
}
public int GetBaseAddress(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform).Get<int>("BaseAddress", 4194304);
}
public void SetBaseAddress(string configurationName, string platform, int val)
{
GetConfiguration(configurationName, platform).Set("BaseAddress", 4194304, val);
}
public int GetFileAlignment(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform).Get<int>("FileAlignment", 4096);
}
public void SetFileAlignment(string configurationName, string platform, int val)
{
GetConfiguration(configurationName, platform).Set("FileAlignment", 4096, val);
}
public string GetDebugType(string configurationName, string platform)
{ // none, full, pdbonly
return GetConfiguration(configurationName, platform)["DebugType"];
}
public void SetDebugType(string configurationName, string platform, string val)
{
GetConfiguration(configurationName, platform)["DebugType"] = val;
}
public bool GetCheckForOverflowUnderflow(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform).Get("CheckForOverflowUnderflow", false);
}
public void SetCheckForOverflowUnderflow(string configurationName, string platform, bool val)
{
GetConfiguration(configurationName, platform).Set("CheckForOverflowUnderflow", false, val);
}
public bool GetNoStdLib(string configurationName, string platform)
{
return GetConfiguration(configurationName, platform).Get("NoStdLib", false);
}
public void SetNoStdLib(string configurationName, string platform, bool val)
{
GetConfiguration(configurationName, platform).Set("NoStdLib", false, val);
}
public VBNetProject(string fileName, string projectName) public VBNetProject(string fileName, string projectName)
{ {
this.Name = projectName; this.Name = projectName;

1
src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.csproj

@ -36,7 +36,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Configuration\AssemblyInfo.cs" /> <Compile Include="Configuration\AssemblyInfo.cs" />
<EmbeddedResource Include="Resources\AdvancedBuildOptionsDialog.xfrm" />
<EmbeddedResource Include="Resources\BuildOptions.xfrm" /> <EmbeddedResource Include="Resources\BuildOptions.xfrm" />
<Compile Include="Src\VBNetAmbience.cs" /> <Compile Include="Src\VBNetAmbience.cs" />
<Compile Include="Src\VBNetBindingExecutionManager.cs" /> <Compile Include="Src\VBNetBindingExecutionManager.cs" />

8
src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/FormDesignerViewContent.cs

@ -248,6 +248,14 @@ namespace ICSharpCode.FormDesigner
UpdateSelectableObjects(); UpdateSelectableObjects();
} }
public override void Dispose()
{
if (IsFormDesignerVisible) {
Deselected();
}
base.Dispose();
}
public override void Deselected() public override void Deselected()
{ {
LoggingService.Info("Deselected form designer, unloading..."); LoggingService.Info("Deselected form designer, unloading...");

11
src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

@ -187,7 +187,6 @@
<Compile Include="Src\Gui\Dialogs\NewFileDialog.cs"> <Compile Include="Src\Gui\Dialogs\NewFileDialog.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="Src\Gui\Dialogs\ProjectOptionsDialog.cs" />
<Compile Include="Src\Gui\Dialogs\SharpDevelopAboutPanels.cs"> <Compile Include="Src\Gui\Dialogs\SharpDevelopAboutPanels.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
@ -465,10 +464,8 @@
<EmbeddedResource Include="Resources\CombineStartupPanel.xfrm" /> <EmbeddedResource Include="Resources\CombineStartupPanel.xfrm" />
<EmbeddedResource Include="Resources\CommonAboutDialog.xfrm" /> <EmbeddedResource Include="Resources\CommonAboutDialog.xfrm" />
<Compile Include="Configuration\AssemblyInfo.cs" /> <Compile Include="Configuration\AssemblyInfo.cs" />
<EmbeddedResource Include="Resources\CompileFileProjectOptions.xfrm" />
<EmbeddedResource Include="Resources\EditStandardHeaderPanel.xfrm" /> <EmbeddedResource Include="Resources\EditStandardHeaderPanel.xfrm" />
<EmbeddedResource Include="Resources\EditTemplateDialog.xfrm" /> <EmbeddedResource Include="Resources\EditTemplateDialog.xfrm" />
<EmbeddedResource Include="Resources\DeployFileOptions.xfrm" />
<EmbeddedResource Include="Resources\ExternalToolOptions.xfrm" /> <EmbeddedResource Include="Resources\ExternalToolOptions.xfrm" />
<EmbeddedResource Include="Resources\FontSelectionPanel.xfrm" /> <EmbeddedResource Include="Resources\FontSelectionPanel.xfrm" />
<EmbeddedResource Include="Resources\NewFileWithNameDialog.xfrm" /> <EmbeddedResource Include="Resources\NewFileWithNameDialog.xfrm" />
@ -613,7 +610,7 @@
<Compile Include="Src\Project\MSBuildEngine.cs" /> <Compile Include="Src\Project\MSBuildEngine.cs" />
<Compile Include="Src\TextEditor\Gui\Editor\CodeCompletionBinding.cs" /> <Compile Include="Src\TextEditor\Gui\Editor\CodeCompletionBinding.cs" />
<Compile Include="Src\Gui\Pads\DefinitionViewPad.cs" /> <Compile Include="Src\Gui\Pads\DefinitionViewPad.cs" />
<Compile Include="Src\Project\AdvancedMSBuildProject.cs" /> <Compile Include="Src\Project\MSBuildEnums.cs" />
<Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\ApplicationSettings.cs"> <Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\ApplicationSettings.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
@ -686,6 +683,12 @@
<Compile Include="Src\Services\Debugger\DebuggerDoozer.cs" /> <Compile Include="Src\Services\Debugger\DebuggerDoozer.cs" />
<Compile Include="Src\Dom\HelpProvider.cs" /> <Compile Include="Src\Dom\HelpProvider.cs" />
<Compile Include="Src\Project\Solution\SolutionPreferences.cs" /> <Compile Include="Src\Project\Solution\SolutionPreferences.cs" />
<Compile Include="Src\Project\ConfigurationGuiHelper.cs" />
<Compile Include="Src\Gui\ContentInterfaces\ICanBeDirty.cs" />
<Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\AbstractProjectOptionPanel.cs" />
<Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\CreateKey.cs" />
<EmbeddedResource Include="Resources\ProjectOptions\CreateKey.xfrm" />
<Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\AbstractBuildOptions.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Libraries\DockPanel_Src\WinFormsUI\WinFormsUI.csproj"> <ProjectReference Include="..\..\..\Libraries\DockPanel_Src\WinFormsUI\WinFormsUI.csproj">

26
src/Main/Base/Project/Resources/CompileFileProjectOptions.xfrm

@ -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>

91
src/Main/Base/Project/Resources/DeployFileOptions.xfrm

@ -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>

95
src/Main/Base/Project/Resources/ProjectOptions/CreateKey.xfrm

@ -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&amp;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="&amp;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="&amp;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 &amp;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>

150
src/Main/Base/Project/Resources/ProjectOptions/Publish.xfrm

@ -1,247 +1,231 @@
<Components version="1.0"> <Components version="1.0">
<System.Windows.Forms.UserControl> <System.Windows.Forms.UserControl>
<Name value="XmlUserControl1" /> <Name value="XmlUserControl1" />
<DockPadding value="" /> <ClientSize value="{Width=592, Height=420}" />
<ClientSize value="{Width=592, Height=480}" />
<Controls> <Controls>
<System.Windows.Forms.Button> <System.Windows.Forms.Button>
<Name value="button5" /> <Name value="button5" />
<Location value="{X=472,Y=440}" /> <Location value="{X=472,Y=382}" />
<Size value="{Width=112, Height=23}" />
<Text value="Publish &amp;Now" /> <Text value="Publish &amp;Now" />
<Size value="{Width=112, Height=23}" />
<Anchor value="Top, Right" /> <Anchor value="Top, Right" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="5" /> <TabIndex value="5" />
</System.Windows.Forms.Button> </System.Windows.Forms.Button>
<System.Windows.Forms.Button> <System.Windows.Forms.Button>
<Name value="button3" /> <Name value="button3" />
<Location value="{X=352,Y=440}" /> <Location value="{X=353,Y=382}" />
<Size value="{Width=112, Height=23}" />
<Text value="Publish &amp;Wizard..." /> <Text value="Publish &amp;Wizard..." />
<Size value="{Width=112, Height=23}" />
<Anchor value="Top, Right" /> <Anchor value="Top, Right" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="3" /> <TabIndex value="3" />
</System.Windows.Forms.Button> </System.Windows.Forms.Button>
<System.Windows.Forms.GroupBox> <System.Windows.Forms.GroupBox>
<Name value="groupBox2" /> <Name value="groupBox2" />
<Location value="{X=8,Y=135}" />
<Text value="Install Mode and Settings" />
<Size value="{Width=576, Height=152}" />
<TabIndex value="1" /> <TabIndex value="1" />
<Location value="{X=8,Y=192}" />
<Anchor value="Top, Left, Right" /> <Anchor value="Top, Left, Right" />
<Size value="{Width=576, Height=152}" />
<Text value="Install Mode and Settings" />
<Controls> <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> <System.Windows.Forms.Button>
<Name value="button8" /> <Name value="button8" />
<Location value="{X=456,Y=121}" /> <Location value="{X=456,Y=121}" />
<Size value="{Width=112, Height=23}" />
<Text value="O&amp;ptions..." /> <Text value="O&amp;ptions..." />
<Size value="{Width=112, Height=23}" />
<Anchor value="Top, Right" /> <Anchor value="Top, Right" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="7" /> <TabIndex value="7" />
</System.Windows.Forms.Button> </System.Windows.Forms.Button>
<System.Windows.Forms.Button> <System.Windows.Forms.Button>
<Name value="button7" /> <Name value="button7" />
<Location value="{X=456,Y=89}" /> <Location value="{X=456,Y=89}" />
<Size value="{Width=112, Height=23}" />
<Text value="&amp;Updates..." /> <Text value="&amp;Updates..." />
<Size value="{Width=112, Height=23}" />
<Anchor value="Top, Right" /> <Anchor value="Top, Right" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="6" /> <TabIndex value="6" />
</System.Windows.Forms.Button> </System.Windows.Forms.Button>
<System.Windows.Forms.Button> <System.Windows.Forms.Button>
<Name value="button6" /> <Name value="button6" />
<Location value="{X=456,Y=57}" /> <Location value="{X=456,Y=57}" />
<Size value="{Width=112, Height=23}" />
<Text value="Pr&amp;erequisites..." /> <Text value="Pr&amp;erequisites..." />
<Size value="{Width=112, Height=23}" />
<Anchor value="Top, Right" /> <Anchor value="Top, Right" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="5" /> <TabIndex value="5" />
</System.Windows.Forms.Button> </System.Windows.Forms.Button>
<System.Windows.Forms.Button> <System.Windows.Forms.Button>
<Name value="button4" /> <Name value="button4" />
<Location value="{X=456,Y=25}" /> <Location value="{X=456,Y=25}" />
<Size value="{Width=112, Height=23}" />
<Text value="Application &amp;Files..." /> <Text value="Application &amp;Files..." />
<Size value="{Width=112, Height=23}" />
<Anchor value="Top, Right" /> <Anchor value="Top, Right" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="4" /> <TabIndex value="4" />
</System.Windows.Forms.Button> </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 &amp;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> <System.Windows.Forms.RadioButton>
<Name value="radioButton2" /> <Name value="radioButton2" />
<Location value="{X=8,Y=49}" /> <Location value="{X=8,Y=49}" />
<Text value="The application is available offline as well (launchable from Start &amp;menu)" />
<Size value="{Width=440, Height=24}" /> <Size value="{Width=440, Height=24}" />
<Text value="The application is avaiable offline as well (launchable from Start &amp;menu)" />
<Anchor value="Top, Left, Right" /> <Anchor value="Top, Left, Right" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="1" /> <TabIndex value="1" />
</System.Windows.Forms.RadioButton> </System.Windows.Forms.RadioButton>
<System.Windows.Forms.RadioButton> <System.Windows.Forms.RadioButton>
<Name value="radioButton1" /> <Name value="radioButton1" />
<Location value="{X=8,Y=25}" /> <Location value="{X=8,Y=25}" />
<Text value="The application is available &amp;online only" />
<Size value="{Width=440, Height=24}" /> <Size value="{Width=440, Height=24}" />
<Text value="The application is avaiable &amp;online only" />
<Anchor value="Top, Left, Right" /> <Anchor value="Top, Left, Right" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="0" /> <TabIndex value="0" />
</System.Windows.Forms.RadioButton> </System.Windows.Forms.RadioButton>
</Controls> </Controls>
</System.Windows.Forms.GroupBox> </System.Windows.Forms.GroupBox>
<System.Windows.Forms.GroupBox> <System.Windows.Forms.GroupBox>
<Name value="groupBox1" /> <Name value="groupBox1" />
<TabIndex value="0" />
<Location value="{X=8,Y=8}" /> <Location value="{X=8,Y=8}" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=576, Height=176}" />
<Text value="Publish Location" /> <Text value="Publish Location" />
<Controls> <Size value="{Width=576, Height=121}" />
<System.Windows.Forms.Label> <TabIndex value="0" />
<Name value="label2" />
<Text value="Documentation and &amp;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" /> <Anchor value="Top, Left, Right" />
<TabIndex value="19" /> <Controls>
<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> <System.Windows.Forms.Label>
<Name value="label1" /> <Name value="label1" />
<Location value="{X=40,Y=74}" />
<Text value="&amp;Installation URL (if different than above):" /> <Text value="&amp;Installation URL (if different than above):" />
<TextAlign value="BottomLeft" /> <TextAlign value="BottomLeft" />
<Anchor value="Top, Left, Right" />
<TabIndex value="15" />
<Size value="{Width=528, Height=16}" /> <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.Label>
<System.Windows.Forms.ComboBox> <System.Windows.Forms.ComboBox>
<Name value="comboBox1" /> <Name value="comboBox1" />
<Anchor value="Top, Left, Right" />
<TabIndex value="16" /> <TabIndex value="16" />
<Location value="{X=40,Y=90}" /> <Anchor value="Top, Left, Right" />
<Size value="{Width=480, Height=21}" /> <Size value="{Width=480, Height=21}" />
<FormattingEnabled value="True" />
<Location value="{X=40,Y=90}" />
</System.Windows.Forms.ComboBox> </System.Windows.Forms.ComboBox>
<System.Windows.Forms.Button> <System.Windows.Forms.Button>
<Name value="button1" /> <Name value="button1" />
<Location value="{X=528,Y=90}" /> <Location value="{X=528,Y=90}" />
<Size value="{Width=40, Height=21}" />
<Text value="..." /> <Text value="..." />
<Size value="{Width=40, Height=21}" />
<Anchor value="Top, Right" /> <Anchor value="Top, Right" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="17" /> <TabIndex value="17" />
</System.Windows.Forms.Button> </System.Windows.Forms.Button>
<System.Windows.Forms.Label> <System.Windows.Forms.Label>
<Name value="label5" /> <Name value="label5" />
<Location value="{X=8,Y=26}" />
<Text value="Pu&amp;blishing Location (web site, ftp server, or file path)" /> <Text value="Pu&amp;blishing Location (web site, ftp server, or file path)" />
<TextAlign value="BottomLeft" /> <TextAlign value="BottomLeft" />
<Anchor value="Top, Left, Right" />
<TabIndex value="12" />
<Size value="{Width=560, Height=16}" /> <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.Label>
<System.Windows.Forms.ComboBox> <System.Windows.Forms.ComboBox>
<Name value="applicationIconComboBox" /> <Name value="applicationIconComboBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="13" /> <TabIndex value="13" />
<Location value="{X=8,Y=42}" /> <Anchor value="Top, Left, Right" />
<Size value="{Width=512, Height=21}" /> <Size value="{Width=512, Height=21}" />
<FormattingEnabled value="True" />
<Location value="{X=8,Y=42}" />
</System.Windows.Forms.ComboBox> </System.Windows.Forms.ComboBox>
<System.Windows.Forms.Button> <System.Windows.Forms.Button>
<Name value="applicationIconBrowseButton" /> <Name value="applicationIconBrowseButton" />
<Location value="{X=528,Y=42}" /> <Location value="{X=528,Y=42}" />
<Size value="{Width=40, Height=21}" />
<Text value="..." /> <Text value="..." />
<Size value="{Width=40, Height=21}" />
<Anchor value="Top, Right" /> <Anchor value="Top, Right" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="14" /> <TabIndex value="14" />
</System.Windows.Forms.Button> </System.Windows.Forms.Button>
</Controls> </Controls>
</System.Windows.Forms.GroupBox> </System.Windows.Forms.GroupBox>
<System.Windows.Forms.GroupBox> <System.Windows.Forms.GroupBox>
<Name value="groupBox3" /> <Name value="groupBox3" />
<TabIndex value="2" /> <Location value="{X=8,Y=293}" />
<Location value="{X=8,Y=352}" />
<Size value="{Width=328, Height=112}" />
<Text value="Publish Version" /> <Text value="Publish Version" />
<Size value="{Width=328, Height=112}" />
<TabIndex value="2" />
<Controls> <Controls>
<System.Windows.Forms.CheckBox> <System.Windows.Forms.CheckBox>
<Name value="checkBox2" /> <Name value="checkBox2" />
<Location value="{X=8,Y=82}" /> <Location value="{X=8,Y=82}" />
<Size value="{Width=312, Height=24}" /> <FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="&amp;Automatically increment revision with each release" /> <Text value="&amp;Automatically increment revision with each release" />
<Anchor value="Top, Left, Right" />
<TabIndex value="8" /> <TabIndex value="8" />
<Size value="{Width=312, Height=24}" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox> </System.Windows.Forms.CheckBox>
<System.Windows.Forms.Label> <System.Windows.Forms.Label>
<Name value="label7" /> <Name value="label7" />
<Location value="{X=200,Y=24}" />
<Text value="Revision:" /> <Text value="Revision:" />
<TextAlign value="BottomCenter" /> <TextAlign value="BottomCenter" />
<TabIndex value="7" />
<Size value="{Width=56, Height=23}" /> <Size value="{Width=56, Height=23}" />
<Location value="{X=200,Y=24}" /> <TabIndex value="7" />
</System.Windows.Forms.Label> </System.Windows.Forms.Label>
<System.Windows.Forms.TextBox> <System.Windows.Forms.TextBox>
<Name value="textBox4" /> <Name value="textBox4" />
<TabIndex value="6" /> <TabIndex value="6" />
<Location value="{X=200,Y=48}" />
<Size value="{Width=56, Height=21}" /> <Size value="{Width=56, Height=21}" />
<Text value="" /> <Location value="{X=200,Y=48}" />
</System.Windows.Forms.TextBox> </System.Windows.Forms.TextBox>
<System.Windows.Forms.Label> <System.Windows.Forms.Label>
<Name value="label6" /> <Name value="label6" />
<Location value="{X=136,Y=24}" />
<Text value="Build:" /> <Text value="Build:" />
<TextAlign value="BottomCenter" /> <TextAlign value="BottomCenter" />
<TabIndex value="5" />
<Size value="{Width=56, Height=23}" /> <Size value="{Width=56, Height=23}" />
<Location value="{X=136,Y=24}" /> <TabIndex value="5" />
</System.Windows.Forms.Label> </System.Windows.Forms.Label>
<System.Windows.Forms.TextBox> <System.Windows.Forms.TextBox>
<Name value="textBox3" /> <Name value="textBox3" />
<TabIndex value="4" /> <TabIndex value="4" />
<Location value="{X=136,Y=48}" />
<Size value="{Width=56, Height=21}" /> <Size value="{Width=56, Height=21}" />
<Text value="" /> <Location value="{X=136,Y=48}" />
</System.Windows.Forms.TextBox> </System.Windows.Forms.TextBox>
<System.Windows.Forms.Label> <System.Windows.Forms.Label>
<Name value="label4" /> <Name value="label4" />
<Location value="{X=72,Y=24}" />
<Text value="Minor:" /> <Text value="Minor:" />
<TextAlign value="BottomCenter" /> <TextAlign value="BottomCenter" />
<TabIndex value="3" />
<Size value="{Width=56, Height=23}" /> <Size value="{Width=56, Height=23}" />
<Location value="{X=72,Y=24}" /> <TabIndex value="3" />
</System.Windows.Forms.Label> </System.Windows.Forms.Label>
<System.Windows.Forms.TextBox> <System.Windows.Forms.TextBox>
<Name value="textBox2" /> <Name value="textBox2" />
<TabIndex value="2" /> <TabIndex value="2" />
<Location value="{X=72,Y=48}" />
<Size value="{Width=56, Height=21}" /> <Size value="{Width=56, Height=21}" />
<Text value="" /> <Location value="{X=72,Y=48}" />
</System.Windows.Forms.TextBox> </System.Windows.Forms.TextBox>
<System.Windows.Forms.Label> <System.Windows.Forms.Label>
<Name value="label3" /> <Name value="label3" />
<Location value="{X=8,Y=24}" />
<Text value="Major:" /> <Text value="Major:" />
<TextAlign value="BottomCenter" /> <TextAlign value="BottomCenter" />
<TabIndex value="1" />
<Size value="{Width=56, Height=23}" /> <Size value="{Width=56, Height=23}" />
<Location value="{X=8,Y=24}" /> <TabIndex value="1" />
</System.Windows.Forms.Label> </System.Windows.Forms.Label>
<System.Windows.Forms.TextBox> <System.Windows.Forms.TextBox>
<Name value="textBox1" /> <Name value="textBox1" />
<TabIndex value="0" /> <TabIndex value="0" />
<Location value="{X=8,Y=48}" />
<Size value="{Width=56, Height=21}" /> <Size value="{Width=56, Height=21}" />
<Text value="" /> <Location value="{X=8,Y=48}" />
</System.Windows.Forms.TextBox> </System.Windows.Forms.TextBox>
</Controls> </Controls>
</System.Windows.Forms.GroupBox> </System.Windows.Forms.GroupBox>

115
src/Main/Base/Project/Resources/ProjectOptions/Signing.xfrm

@ -1,104 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<Components version="1.0"> <Components version="1.0">
<System.Windows.Forms.UserControl> <System.Windows.Forms.UserControl>
<Name value="XmlUserControl1" /> <Name value="XmlUserControl1" />
<ClientSize value="{Width=392, Height=312}" /> <ClientSize value="{Width=392, Height=312}" />
<Controls> <Controls>
<System.Windows.Forms.GroupBox>
<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.Label>
<Name value="label2" />
<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>
</Controls>
</System.Windows.Forms.GroupBox>
<System.Windows.Forms.GroupBox> <System.Windows.Forms.GroupBox>
<Name value="signingGroupBox" /> <Name value="signingGroupBox" />
<Location value="{X=8,Y=28}" /> <Location value="{X=3,Y=3}" />
<Text value="Key Selection" /> <Text value="Strong name signing" />
<Size value="{Width=368, Height=196}" /> <Size value="{Width=368, Height=147}" />
<TabIndex value="1" /> <TabIndex value="1" />
<Anchor value="Top, Left, Right" /> <Anchor value="Top, Left, Right" />
<Controls> <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" />
<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> <System.Windows.Forms.CheckBox>
<Name value="delaySignOnlyCheckBox" /> <Name value="delaySignOnlyCheckBox" />
<Location value="{X=4,Y=169}" /> <Location value="{X=0,Y=50}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> <FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="Dela&amp;y Sign only" /> <Text value="Dela&amp;y Sign only" />
<TabIndex value="8" /> <TabIndex value="8" />
<Size value="{Width=356, Height=24}" /> <Size value="{Width=354, Height=24}" />
<Anchor value="Top, Left, Right" /> <Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox> </System.Windows.Forms.CheckBox>
<System.Windows.Forms.ComboBox> <System.Windows.Forms.ComboBox>
<Name value="containerComboBox" /> <Name value="keyFileComboBox" />
<TabIndex value="7" /> <TabIndex value="1" />
<Anchor value="Top, Left, Right" /> <Anchor value="Top, Left, Right" />
<Size value="{Width=252, Height=21}" /> <Size value="{Width=198, Height=21}" />
<FormattingEnabled value="True" /> <FormattingEnabled value="True" />
<Location value="{X=108,Y=133}" /> <Location value="{X=0,Y=23}" />
</System.Windows.Forms.ComboBox> </System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label> <System.Windows.Forms.Label>
<Name value="label2" /> <Name value="label3" />
<Location value="{X=8,Y=128}" /> <Location value="{X=0,Y=1}" />
<Text value="&amp;Container:" /> <Text value="Choose a strong name key file:" />
<TextAlign value="MiddleRight" /> <Size value="{Width=354, Height=19}" />
<Size value="{Width=100, Height=23}" /> <TabIndex value="9" />
<TabIndex value="6" />
</System.Windows.Forms.Label>
<System.Windows.Forms.ComboBox>
<Name value="providerNameComboBox" />
<TabIndex value="5" />
<Anchor value="Top, Left, Right" /> <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 &amp;name:" />
<TextAlign value="MiddleRight" />
<Size value="{Width=100, Height=23}" />
<TabIndex value="4" />
</System.Windows.Forms.Label> </System.Windows.Forms.Label>
<System.Windows.Forms.RadioButton>
<Name value="useKeyProviderRadioButton" />
<Location value="{X=4,Y=77}" />
<Text value="Use this key &amp;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" />
<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> <System.Windows.Forms.Button>
<Name value="changePasswordButton" /> <Name value="changePasswordButton" />
<Location value="{X=212,Y=49}" /> <Location value="{X=204,Y=22}" />
<Text value="Change Pass&amp;word..." /> <Text value="Change Pass&amp;word..." />
<Size value="{Width=148, Height=21}" /> <Size value="{Width=150, Height=22}" />
<Anchor value="Top, Right" /> <Anchor value="Top, Right" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> <FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="2" /> <TabIndex value="2" />
</System.Windows.Forms.Button> </System.Windows.Forms.Button>
<System.Windows.Forms.RadioButton>
<Name value="useKeyFileRadioButton" />
<Location value="{X=4,Y=25}" />
<Text value="Use a key &amp;file:" />
<Size value="{Width=356, Height=24}" />
<Anchor value="Top, Left, Right" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="0" />
</System.Windows.Forms.RadioButton>
</Controls> </Controls>
</System.Windows.Forms.GroupBox> </System.Windows.Forms.Panel>
<System.Windows.Forms.CheckBox> <System.Windows.Forms.CheckBox>
<Name value="signAssemblyCheckBox" /> <Name value="signAssemblyCheckBox" />
<Location value="{X=8,Y=4}" /> <Location value="{X=8,Y=20}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> <FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="Sign the &amp;assembly" /> <Text value="Sign the &amp;assembly" />
<TabIndex value="0" /> <TabIndex value="0" />
<Size value="{Width=376, Height=24}" /> <Size value="{Width=352, Height=24}" />
<Anchor value="Top, Left, Right" /> <Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox> </System.Windows.Forms.CheckBox>
</Controls> </Controls>
</System.Windows.Forms.GroupBox>
</Controls>
</System.Windows.Forms.UserControl> </System.Windows.Forms.UserControl>
</Components> </Components>

21
src/Main/Base/Project/Src/Dom/XmlDoc.cs

@ -117,6 +117,7 @@ namespace ICSharpCode.SharpDevelop.Dom
fs = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read); fs = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
int len = (int)fs.Length; int len = (int)fs.Length;
loader = new BinaryReader(fs); loader = new BinaryReader(fs);
try {
if (loader.ReadInt64() != magic) { if (loader.ReadInt64() != magic) {
LoggingService.Warn("Cannot load XmlDoc: wrong magic"); LoggingService.Warn("Cannot load XmlDoc: wrong magic");
return false; return false;
@ -129,13 +130,26 @@ namespace ICSharpCode.SharpDevelop.Dom
LoggingService.Info("Not loading XmlDoc: file changed since cache was created"); LoggingService.Info("Not loading XmlDoc: file changed since cache was created");
return false; return false;
} }
fs.Position = loader.ReadInt32(); // go to start of index int indexStartPosition = loader.ReadInt32(); // go to start of index
if (indexStartPosition >= len) {
LoggingService.Error("XmlDoc: Cannot find index, cache invalid!");
return false;
}
fs.Position = indexStartPosition;
while (fs.Position < len) { while (fs.Position < len) {
string key = loader.ReadString(); string key = loader.ReadString();
int pos = loader.ReadInt32(); int pos = loader.ReadInt32();
indexDictionary.Add(key, pos); indexDictionary.Add(key, pos);
} }
if (fs.Position > len) {
LoggingService.Error("XmlDoc: Jumped over end of file, cache invalid!");
return false;
}
return true; return true;
} catch (Exception ex) {
LoggingService.Error("Cannot load from cache", ex);
return false;
}
} }
string LoadDocumentation(string key) string LoadDocumentation(string key)
@ -216,7 +230,12 @@ namespace ICSharpCode.SharpDevelop.Dom
if (doc.xmlDescription.Count > cacheLength * 2) { if (doc.xmlDescription.Count > cacheLength * 2) {
LoggingService.Debug("XmlDoc: Creating cache"); LoggingService.Debug("XmlDoc: Creating cache");
DateTime date = File.GetLastWriteTimeUtc(fileName); DateTime date = File.GetLastWriteTimeUtc(fileName);
try {
doc.Save(cacheName, date); doc.Save(cacheName, date);
} catch (Exception ex) {
LoggingService.Error("Cannot write to cache file", ex);
return doc;
}
doc.Dispose(); doc.Dispose();
doc = new XmlDoc(); doc = new XmlDoc();
doc.LoadFromBinary(cacheName, date); doc.LoadFromBinary(cacheName, date);

8
src/Main/Base/Project/Src/Gui/AbstractViewContent.cs

@ -61,6 +61,14 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
} }
public override void Dispose()
{
foreach (ISecondaryViewContent svc in secondaryViewContents) {
svc.Dispose();
}
base.Dispose();
}
public AbstractViewContent() public AbstractViewContent()
{ {
} }

32
src/Main/Base/Project/Src/Gui/ContentInterfaces/ICanBeDirty.cs

@ -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;
}
}

18
src/Main/Base/Project/Src/Gui/Dialogs/AbstractOptionPanel.cs

@ -92,6 +92,8 @@ namespace ICSharpCode.SharpDevelop.Gui
return true; return true;
} }
protected string baseDirectory;
protected void ConnectBrowseButton(string browseButton, string target) protected void ConnectBrowseButton(string browseButton, string target)
{ {
ConnectBrowseButton(browseButton, target, "${res:SharpDevelop.FileFilter.AllFiles}|*.*"); ConnectBrowseButton(browseButton, target, "${res:SharpDevelop.FileFilter.AllFiles}|*.*");
@ -130,7 +132,7 @@ namespace ICSharpCode.SharpDevelop.Gui
ControlDictionary[browseButton].Click += new EventHandler(new BrowseFolderEvent(this, target, description).Event); ControlDictionary[browseButton].Click += new EventHandler(new BrowseFolderEvent(this, target, description).Event);
} }
class BrowseButtonEvent protected class BrowseButtonEvent
{ {
AbstractOptionPanel panel; AbstractOptionPanel panel;
string target; string target;
@ -150,7 +152,11 @@ namespace ICSharpCode.SharpDevelop.Gui
fdiag.Multiselect = false; fdiag.Multiselect = false;
if(fdiag.ShowDialog() == DialogResult.OK) { if(fdiag.ShowDialog() == DialogResult.OK) {
panel.ControlDictionary[target].Text = fdiag.FileName; string file = fdiag.FileName;
if (panel.baseDirectory != null) {
file = FileUtility.GetRelativePath(panel.baseDirectory, file);
}
panel.ControlDictionary[target].Text = file;
} }
} }
} }
@ -173,7 +179,13 @@ namespace ICSharpCode.SharpDevelop.Gui
{ {
FolderDialog fdiag = new FolderDialog(); FolderDialog fdiag = new FolderDialog();
if (fdiag.DisplayDialog(description) == DialogResult.OK) { if (fdiag.DisplayDialog(description) == DialogResult.OK) {
panel.ControlDictionary[target].Text = fdiag.Path; string path = fdiag.Path;
if (panel.baseDirectory != null) {
path = FileUtility.GetRelativePath(panel.baseDirectory, path);
}
if (!path.EndsWith("\\") && !path.EndsWith("/"))
path += "\\";
panel.ControlDictionary[target].Text = path;
} }
} }
} }

13
src/Main/Base/Project/Src/Gui/Dialogs/FolderDialog.cs

@ -26,24 +26,17 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
} }
public FolderDialog()
{
}
public DialogResult DisplayDialog()
{
return DisplayDialog("Select the directory in which the project will be created.");
}
// Alain VIZZINI reminded me to try out the .NET folder browser, because // Alain VIZZINI reminded me to try out the .NET folder browser, because
// the my documents bug seemed to have gone away ... // the my documents bug seemed to have gone away ...
public DialogResult DisplayDialog(string description) public DialogResult DisplayDialog(string description)
{ {
using (FolderBrowser folderBrowser = new FolderBrowser()) { using (FolderBrowser folderBrowser = new FolderBrowser()) {
folderBrowser.Description = StringParser.Parse(description); folderBrowser.Description = StringParser.Parse(description);
DialogResult result = folderBrowser.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm); DialogResult result = folderBrowser.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm);
path = folderBrowser.DirectoryPath; path = folderBrowser.DirectoryPath;
LoggingService.Info("FolderDialog: user has choosen path " + path);
if (path == null || path.Length == 0)
return DialogResult.Cancel;
return result; return result;
} }
} }

2
src/Main/Base/Project/Src/Gui/Dialogs/NewProjectDialog.cs

@ -348,7 +348,7 @@ namespace ICSharpCode.SharpDevelop.Project.Dialogs
{ {
// Changes Shankar // Changes Shankar
FolderDialog fd = new FolderDialog(); FolderDialog fd = new FolderDialog();
if (fd.DisplayDialog() == DialogResult.OK) { if (fd.DisplayDialog("Select the directory in which the project will be created.") == DialogResult.OK) {
((TextBox)ControlDictionary["locationTextBox"]).Text = fd.Path; ((TextBox)ControlDictionary["locationTextBox"]).Text = fd.Path;
} }
// End // End

149
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AbstractBuildOptions.cs

@ -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;
}
}
}
}

48
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AbstractProjectOptionPanel.cs

@ -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();
}
}
}

63
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ApplicationSettings.cs

@ -6,6 +6,7 @@
// </file> // </file>
using System; using System;
using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
@ -17,73 +18,41 @@ using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{ {
public class ApplicationSettings : AbstractOptionPanel public class ApplicationSettings : AbstractProjectOptionPanel
{ {
AdvancedMSBuildProject project;
public ApplicationSettings()
{
}
public override void LoadPanelContents() public override void LoadPanelContents()
{ {
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.ProjectOptions.ApplicationSettings.xfrm")); SetupFromXmlResource("ProjectOptions.ApplicationSettings.xfrm");
this.project = (AdvancedMSBuildProject)((Properties)CustomizationObject).Get("Project");
InitializeHelper();
ConnectBrowseButton("applicationIconBrowseButton", "applicationIconComboBox", "${res:SharpDevelop.FileFilter.Icons}|*.ico|${res:SharpDevelop.FileFilter.AllFiles}|*.*"); ConnectBrowseButton("applicationIconBrowseButton", "applicationIconComboBox", "${res:SharpDevelop.FileFilter.Icons}|*.ico|${res:SharpDevelop.FileFilter.AllFiles}|*.*");
// TODO: Suitable file filter. // TODO: Suitable file filter.
ConnectBrowseButton("win32ResourceFileBrowseButton", "win32ResourceFileComboBox"); ConnectBrowseButton("win32ResourceFileBrowseButton", "win32ResourceFileComboBox");
Get<TextBox>("assemblyName").Text = project.AssemblyName; helper.BindString("assemblyNameTextBox", "AssemblyName");
Get<TextBox>("assemblyName").TextChanged += new EventHandler(RefreshOutputNameTextBox); Get<TextBox>("assemblyName").TextChanged += new EventHandler(RefreshOutputNameTextBox);
Get<TextBox>("assemblyName").TextChanged += new EventHandler(Save);
Get<TextBox>("rootNamespace").Text = project.RootNamespace;
Get<TextBox>("rootNamespace").TextChanged += new EventHandler(Save);
Get<ComboBox>("outputType").Items.Add(StringParser.Parse("${res:Dialog.Options.PrjOptions.Configuration.CompileTarget.Exe}")); helper.BindString("rootNamespaceTextBox", "RootNamespace");
Get<ComboBox>("outputType").Items.Add(StringParser.Parse("${res:Dialog.Options.PrjOptions.Configuration.CompileTarget.WinExe}"));
Get<ComboBox>("outputType").Items.Add(StringParser.Parse("${res:Dialog.Options.PrjOptions.Configuration.CompileTarget.Library}"));
Get<ComboBox>("outputType").Items.Add(StringParser.Parse("${res:Dialog.Options.PrjOptions.Configuration.CompileTarget.Module}"));
Get<ComboBox>("outputType").SelectedIndex = (int)project.OutputType; helper.BindEnum<OutputType>("outputTypeComboBox", "OutputType");
Get<ComboBox>("outputType").SelectedIndexChanged += new EventHandler(RefreshOutputNameTextBox); Get<ComboBox>("outputType").SelectedIndexChanged += new EventHandler(RefreshOutputNameTextBox);
Get<ComboBox>("outputType").SelectedIndexChanged += new EventHandler(Save);
Get<ComboBox>("startupObject").Text = project.StartupObject; helper.BindString("startupObjectComboBox", "StartupObject");
Get<ComboBox>("startupObject").SelectedIndexChanged += new EventHandler(Save);
Get<ComboBox>("applicationIcon").Text = project.ApplicationIcon; helper.BindString("applicationIconComboBox", "ApplicationIcon");
Get<ComboBox>("applicationIcon").TextChanged += new EventHandler(ApplicationIconComboBoxTextChanged); Get<ComboBox>("applicationIcon").TextChanged += new EventHandler(ApplicationIconComboBoxTextChanged);
Get<ComboBox>("applicationIcon").TextChanged += new EventHandler(Save);
Get<ComboBox>("win32ResourceFile").Text = project.Win32Resource; helper.BindString("win32ResourceFileComboBox", "Win32Resource");
Get<ComboBox>("win32ResourceFile").TextChanged += new EventHandler(Save);
Get<TextBox>("projectFolder").Text = project.Directory; Get<TextBox>("projectFolder").Text = project.Directory;
Get<TextBox>("projectFile").Text = Path.GetFileName(project.FileName); Get<TextBox>("projectFile").Text = Path.GetFileName(project.FileName);
Get<TextBox>("projectFile").TextChanged += new EventHandler(Save);
RefreshOutputNameTextBox(null, EventArgs.Empty); // maybe make this writable again? Needs special care when saving!
} Get<TextBox>("projectFile").ReadOnly = true;
void Save(object sender, EventArgs e)
{
StorePanelContents();
}
public override bool StorePanelContents() RefreshOutputNameTextBox(null, EventArgs.Empty);
{
project.AssemblyName = Get<TextBox>("assemblyName").Text;
project.RootNamespace = Get<TextBox>("rootNamespace").Text;
project.OutputType = (OutputType)Get<ComboBox>("outputType").SelectedIndex;
project.StartupObject = Get<ComboBox>("startupObject").Text;
project.ApplicationIcon = Get<ComboBox>("applicationIcon").Text;
project.Win32Resource = Get<ComboBox>("win32ResourceFile").Text;
project.Name = Path.GetFileNameWithoutExtension(Get<TextBox>("projectFile").Text);
project.Save();
return true;
} }
void RefreshOutputNameTextBox(object sender, EventArgs e) void RefreshOutputNameTextBox(object sender, EventArgs e)
@ -93,9 +62,11 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
void ApplicationIconComboBoxTextChanged(object sender, EventArgs e) void ApplicationIconComboBoxTextChanged(object sender, EventArgs e)
{ {
string applicationIcon = Get<ComboBox>("applicationIcon").Text; string applicationIcon = Path.Combine(baseDirectory, Get<ComboBox>("applicationIcon").Text);
if (File.Exists(applicationIcon)) { if (File.Exists(applicationIcon)) {
Get<PictureBox>("applicationIcon").Image = Image.FromFile(applicationIcon); Get<PictureBox>("applicationIcon").Image = Image.FromFile(applicationIcon);
} else {
Get<PictureBox>("applicationIcon").Image = null;
} }
} }
} }

41
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/BuildEvents.cs

@ -15,13 +15,14 @@ using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{ {
public class BuildEvents : AbstractOptionPanel public class BuildEvents : AbstractProjectOptionPanel
{ {
AdvancedMSBuildProject project;
public override void LoadPanelContents() public override void LoadPanelContents()
{ {
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.ProjectOptions.BuildEvents.xfrm")); SetupFromXmlResource("ProjectOptions.BuildEvents.xfrm");
InitializeHelper();
ConnectBrowseButton("preBuildEventBrowseButton", ConnectBrowseButton("preBuildEventBrowseButton",
"preBuildEventTextBox", "preBuildEventTextBox",
"${res:SharpDevelop.FileFilter.AllFiles}|*.*"); "${res:SharpDevelop.FileFilter.AllFiles}|*.*");
@ -29,35 +30,9 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
"postBuildEventTextBox", "postBuildEventTextBox",
"${res:SharpDevelop.FileFilter.AllFiles}|*.*"); "${res:SharpDevelop.FileFilter.AllFiles}|*.*");
this.project = (AdvancedMSBuildProject)((Properties)CustomizationObject).Get("Project"); helper.BindString("preBuildEventTextBox", "PreBuildEvent");
helper.BindString("postBuildEventTextBox", "PostBuildEvent");
Get<TextBox>("preBuildEvent").Text = project.PreBuildEvent; helper.BindEnum<RunPostBuildEvent>("runPostBuildEventComboBox", "RunPostBuildEvent");
Get<TextBox>("preBuildEvent").TextChanged += new EventHandler(Save);
Get<TextBox>("postBuildEvent").Text = project.PostBuildEvent;
Get<TextBox>("postBuildEvent").TextChanged += new EventHandler(Save);
Get<ComboBox>("runPostBuildEvent").Items.Add("Always");
Get<ComboBox>("runPostBuildEvent").Items.Add("On successful build");
Get<ComboBox>("runPostBuildEvent").Items.Add("When the build updates the project output");
Get<ComboBox>("runPostBuildEvent").SelectedIndex = (int)project.RunPostBuildEvent;
Get<ComboBox>("runPostBuildEvent").SelectedIndexChanged += new EventHandler(Save);
}
void Save(object sender, EventArgs e)
{
StorePanelContents();
}
public override bool StorePanelContents()
{
project.PreBuildEvent = Get<TextBox>("preBuildEvent").Text;
project.PostBuildEvent = Get<TextBox>("postBuildEvent").Text;
project.RunPostBuildEvent = (RunPostBuildEvent)Get<ComboBox>("runPostBuildEvent").SelectedIndex;
project.Save();
return true;
} }
} }
} }

106
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/CreateKey.cs

@ -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";
}
}
}
}

73
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/DebugOptions.cs

@ -13,83 +13,40 @@ using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Project; using ICSharpCode.SharpDevelop.Project;
using RadioBinding = System.Collections.Generic.KeyValuePair<ICSharpCode.SharpDevelop.Project.StartAction, System.Windows.Forms.RadioButton>;
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{ {
public class DebugOptions : AbstractOptionPanel public class DebugOptions : AbstractProjectOptionPanel
{ {
AdvancedMSBuildProject project;
string Config = "Debug";
string Platform = "AnyCPU";
public DebugOptions()
{
}
public override void LoadPanelContents() public override void LoadPanelContents()
{ {
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.ProjectOptions.DebugOptions.xfrm")); SetupFromXmlResource("ProjectOptions.DebugOptions.xfrm");
ConnectBrowseButton("startExternalProgramBrowseButton", "startExternalProgramTextBox", "${res:SharpDevelop.FileFilter.AllFiles}|*.*"); ConnectBrowseButton("startExternalProgramBrowseButton", "startExternalProgramTextBox", "${res:SharpDevelop.FileFilter.AllFiles}|*.*");
ConnectBrowseFolder("workingDirectoryBrowseButton", "workingDirectoryTextBox"); ConnectBrowseFolder("workingDirectoryBrowseButton", "workingDirectoryTextBox");
this.project = (AdvancedMSBuildProject)((Properties)CustomizationObject).Get("Project");
StartAction startAction = project.GetStartAction(Config, Platform);
Get<RadioButton>("startProject").Checked = startAction == StartAction.Project;
Get<RadioButton>("startProject").CheckedChanged += new EventHandler(UpdateEnabledStates);
Get<RadioButton>("startProject").CheckedChanged += new EventHandler(Save);
Get<RadioButton>("startExternalProgram").Checked = startAction == StartAction.Program;
Get<RadioButton>("startExternalProgram").CheckedChanged += new EventHandler(UpdateEnabledStates);
Get<RadioButton>("startExternalProgram").CheckedChanged += new EventHandler(Save);
Get<RadioButton>("startBrowserInURL").Checked = startAction == StartAction.StartURL;
Get<RadioButton>("startBrowserInURL").CheckedChanged += new EventHandler(UpdateEnabledStates);
Get<RadioButton>("startBrowserInURL").CheckedChanged += new EventHandler(Save);
Get<TextBox>("startExternalProgram").Text = project.GetStartProgram(Config, Platform); InitializeHelper();
Get<TextBox>("startExternalProgram").TextChanged += new EventHandler(Save);
Get<TextBox>("startBrowserInURL").Text = project.GetStartURL(Config, Platform); helper.BindRadioEnum("StartAction",
Get<TextBox>("startBrowserInURL").TextChanged += new EventHandler(Save); new RadioBinding(StartAction.Project, Get<RadioButton>("startProject")),
new RadioBinding(StartAction.Program, Get<RadioButton>("startExternalProgram")),
new RadioBinding(StartAction.StartURL, Get<RadioButton>("startBrowserInURL")));
Get<TextBox>("commandLineArguments").Text = project.GetStartArguments(Config, Platform); Get<RadioButton>("startExternalProgram").CheckedChanged += UpdateEnabledStates;
Get<TextBox>("commandLineArguments").TextChanged += new EventHandler(Save); Get<RadioButton>("startBrowserInURL").CheckedChanged += UpdateEnabledStates;
Get<TextBox>("workingDirectory").Text = project.GetStartWorkingDirectory(Config, Platform); helper.BindString("startExternalProgramTextBox", "StartProgram");
Get<TextBox>("workingDirectory").TextChanged += new EventHandler(Save); helper.BindString("startBrowserInURLTextBox", "StartURL");
helper.BindString("commandLineArgumentsTextBox", "StartArguments");
helper.BindString("workingDirectoryTextBox", "StartWorkingDirectory");
UpdateEnabledStates(this, EventArgs.Empty); UpdateEnabledStates(this, EventArgs.Empty);
} }
void Save(object sender, EventArgs e)
{
StorePanelContents();
}
void UpdateEnabledStates(object sender, EventArgs e) void UpdateEnabledStates(object sender, EventArgs e)
{ {
Get<TextBox>("startExternalProgram").Enabled = Get<Button>("startExternalProgramBrowse").Enabled = Get<RadioButton>("startExternalProgram").Checked; Get<TextBox>("startExternalProgram").Enabled = Get<Button>("startExternalProgramBrowse").Enabled = Get<RadioButton>("startExternalProgram").Checked;
Get<TextBox>("startBrowserInURL").Enabled = Get<RadioButton>("startBrowserInURL").Checked; Get<TextBox>("startBrowserInURL").Enabled = Get<RadioButton>("startBrowserInURL").Checked;
} }
public override bool StorePanelContents()
{
project.SetStartProgram(Config, Platform, Get<TextBox>("startExternalProgram").Text);
project.SetStartURL(Config, Platform, Get<TextBox>("startBrowserInURL").Text);
project.SetStartArguments(Config, Platform, Get<TextBox>("commandLineArguments").Text);
project.SetStartWorkingDirectory(Config, Platform, Get<TextBox>("workingDirectory").Text);
if (Get<RadioButton>("startProject").Checked) {
project.SetStartAction(Config, Platform, StartAction.Project);
} else if (Get<RadioButton>("startExternalProgram").Checked) {
project.SetStartAction(Config, Platform, StartAction.Program);
} else {
project.SetStartAction(Config, Platform, StartAction.StartURL);
}
project.Save();
return true;
}
} }
} }

15
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/Publish.cs

@ -15,21 +15,12 @@ using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{ {
public class Publish : AbstractOptionPanel public class Publish : AbstractProjectOptionPanel
{ {
AdvancedMSBuildProject project;
public override void LoadPanelContents() public override void LoadPanelContents()
{ {
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.ProjectOptions.Publish.xfrm")); SetupFromXmlResource("ProjectOptions.Publish.xfrm");
this.project = (AdvancedMSBuildProject)((Properties)CustomizationObject).Get("Project"); InitializeHelper();
}
public override bool StorePanelContents()
{
// TODO
return true;
} }
} }
} }

6
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ReferencePaths.cs

@ -17,12 +17,12 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{ {
public class ReferencePaths : AbstractOptionPanel public class ReferencePaths : AbstractOptionPanel
{ {
AdvancedMSBuildProject project; MSBuildProject project;
public override void LoadPanelContents() public override void LoadPanelContents()
{ {
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.ProjectOptions.ReferencePaths.xfrm")); SetupFromXmlResource("ProjectOptions.ReferencePaths.xfrm");
this.project = (AdvancedMSBuildProject)((Properties)CustomizationObject).Get("Project"); this.project = (MSBuildProject)((Properties)CustomizationObject).Get("Project");
} }
public override bool StorePanelContents() public override bool StorePanelContents()

112
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/Signing.cs

@ -6,86 +6,106 @@
// </file> // </file>
using System; using System;
using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using ICSharpCode.SharpDevelop.Internal.ExternalTool;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Project; using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{ {
public class Signing : AbstractOptionPanel public class Signing : AbstractProjectOptionPanel
{ {
AdvancedMSBuildProject project; ComboBox keyFile;
const string KeyFileExtensions = "*.snk;*.pfx;*.key";
public override void LoadPanelContents() public override void LoadPanelContents()
{ {
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.ProjectOptions.Signing.xfrm")); SetupFromXmlResource("ProjectOptions.Signing.xfrm");
this.project = (AdvancedMSBuildProject)((Properties)CustomizationObject).Get("Project"); InitializeHelper();
Get<CheckBox>("signAssembly").Checked = project.SignAssembly; helper.BindBoolean("signAssemblyCheckBox", "SignAssembly", false);
Get<CheckBox>("signAssembly").CheckedChanged += new EventHandler(UpdateEnabledStates); Get<CheckBox>("signAssembly").CheckedChanged += new EventHandler(UpdateEnabledStates);
Get<CheckBox>("signAssembly").CheckedChanged += new EventHandler(Save);
Get<RadioButton>("useKeyFile").Checked = project.AssemblyOriginatorKeyMode == AssemblyOriginatorKeyMode.File;
Get<RadioButton>("useKeyFile").CheckedChanged += new EventHandler(UpdateEnabledStates);
Get<RadioButton>("useKeyFile").CheckedChanged += new EventHandler(Save);
Get<RadioButton>("useKeyProvider").Checked = project.AssemblyOriginatorKeyMode == AssemblyOriginatorKeyMode.Provider;
Get<RadioButton>("useKeyProvider").CheckedChanged += new EventHandler(UpdateEnabledStates);
Get<RadioButton>("useKeyProvider").CheckedChanged += new EventHandler(Save);
Get<ComboBox>("keyFile").Text = project.AssemblyOriginatorKeyFile;
Get<ComboBox>("keyFile").TextChanged += new EventHandler(Save);
Get<ComboBox>("providerName").Text = project.AssemblyKeyProviderName; keyFile = Get<ComboBox>("keyFile");
Get<ComboBox>("providerName").Items.Add("TODO: GetKeyProviders()"); helper.BindString(keyFile, "AssemblyOriginatorKeyFile");
Get<ComboBox>("providerName").TextChanged += new EventHandler(Save); if (keyFile.Text.Length > 0) {
FindKeys(baseDirectory);
Get<ComboBox>("container").Text = "TODO"; if (!keyFile.Items.Contains(keyFile.Text)) {
Get<ComboBox>("container").TextChanged += new EventHandler(Save); keyFile.Items.Add(keyFile.Text);
}
}
keyFile.Items.Add(StringParser.Parse("<${res:Global.CreateButtonText}...>"));
keyFile.Items.Add(StringParser.Parse("<${res:Global.BrowseText}...>"));
keyFile.SelectedIndexChanged += delegate {
if (keyFile.SelectedIndex == keyFile.Items.Count - 1) {
BeginInvoke(new MethodInvoker(BrowseKeyFile));
}
if (keyFile.SelectedIndex == keyFile.Items.Count - 2) {
BeginInvoke(new MethodInvoker(CreateKeyFile));
}
};
Get<CheckBox>("delaySignOnly").Checked = project.DelaySign; helper.BindBoolean("delaySignOnlyCheckBox", "DelaySign", false);
Get<CheckBox>("delaySignOnly").CheckedChanged += new EventHandler(Save);
UpdateEnabledStates(this, EventArgs.Empty); UpdateEnabledStates(this, EventArgs.Empty);
} }
void FindKeys(string directory)
{
directory = Path.GetFullPath(directory);
foreach (string fileName in Directory.GetFiles(directory, "*.snk")) {
keyFile.Items.Add(FileUtility.GetRelativePath(baseDirectory, fileName));
}
foreach (string fileName in Directory.GetFiles(directory, "*.pfx")) {
keyFile.Items.Add(FileUtility.GetRelativePath(baseDirectory, fileName));
}
foreach (string fileName in Directory.GetFiles(directory, "*.key")) {
keyFile.Items.Add(FileUtility.GetRelativePath(baseDirectory, fileName));
}
if (directory.Length > 3) {
FindKeys(Path.Combine(directory, ".."));
}
}
void Save(object sender, EventArgs e) void BrowseKeyFile()
{ {
StorePanelContents(); keyFile.SelectedIndex = -1;
new BrowseButtonEvent(this, "keyFileComboBox", "${res:SharpDevelop.FileFilter.KeyFiles} (" + KeyFileExtensions + ")|" + KeyFileExtensions + "|${res:SharpDevelop.FileFilter.AllFiles}|*.*").Event(this, EventArgs.Empty);
} }
void CreateKeyFile()
{
if (File.Exists(CreateKeyForm.StrongNameTool)) {
using (CreateKeyForm createKey = new CreateKeyForm(baseDirectory)) {
createKey.KeyFile = project.Name;
if (createKey.ShowDialog(WorkbenchSingleton.MainForm) == DialogResult.OK) {
keyFile.Text = createKey.KeyFile;
return;
}
}
} else {
MessageService.ShowMessage("${res:Dialog.ProjectOptions.Signing.SNnotFound}");
}
keyFile.Text = "";
}
void UpdateEnabledStates(object sender, EventArgs e) void UpdateEnabledStates(object sender, EventArgs e)
{ {
Get<Button>("changePassword").Enabled = false; ControlDictionary["strongNameSignPanel"].Enabled = Get<CheckBox>("signAssembly").Checked;
Get<ComboBox>("providerName").Enabled = Get<ComboBox>("container").Enabled = Get<RadioButton>("useKeyProvider").Checked; Get<Button>("changePassword").Enabled = false;
Get<ComboBox>("keyFile").Enabled = Get<RadioButton>("useKeyFile").Checked;
Get<GroupBox>("signing").Enabled = Get<CheckBox>("signAssembly").Checked;
} }
public override bool StorePanelContents() public override bool StorePanelContents()
{ {
project.SignAssembly = Get<CheckBox>("signAssembly").Checked; if (IsDirty && Get<CheckBox>("signAssembly").Checked) {
project.DelaySign = Get<CheckBox>("delaySignOnly").Checked; helper.SetProperty("AssemblyOriginatorKeyMode", "File");
project.AssemblyOriginatorKeyFile = Get<ComboBox>("keyFile").Text;
project.AssemblyKeyProviderName = Get<ComboBox>("providerName").Text;
// TODO : Container ????
if (Get<RadioButton>("useKeyFile").Checked) {
project.AssemblyOriginatorKeyMode = AssemblyOriginatorKeyMode.File;
} else if (Get<RadioButton>("useKeyProvider").Checked) {
project.AssemblyOriginatorKeyMode = AssemblyOriginatorKeyMode.Provider;
} }
project.Save(); return base.StorePanelContents();
return true;
} }
} }
} }

197
src/Main/Base/Project/Src/Gui/Dialogs/ProjectOptionsDialog.cs

@ -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);
// }
// }
// }
// }
//}

32
src/Main/Base/Project/Src/Gui/Dialogs/ProjectOptionsView.cs

@ -30,16 +30,24 @@ namespace ICSharpCode.SharpDevelop.Project.Dialogs
} }
} }
public override string FileName {
get {
return project.FileName;
}
set {
throw new NotSupportedException();
}
}
public override Control Control { public override Control Control {
get { get {
return tabControl; return tabControl;
} }
} }
public ProjectOptionsView(AddInTreeNode node, IProject project) : base("a", "a") public ProjectOptionsView(AddInTreeNode node, IProject project)
{ {
this.project = project; this.project = project;
base.IsViewOnly = true;
// tabControl.Alignment = TabAlignment.Left; // tabControl.Alignment = TabAlignment.Left;
@ -76,6 +84,10 @@ namespace ICSharpCode.SharpDevelop.Project.Dialogs
if (descriptor != null && descriptor.DialogPanel != null && descriptor.DialogPanel.Control != null) { // may be null, if it is only a "path" if (descriptor != null && descriptor.DialogPanel != null && descriptor.DialogPanel.Control != null) { // may be null, if it is only a "path"
descriptor.DialogPanel.CustomizationObject = newProperties; descriptor.DialogPanel.CustomizationObject = newProperties;
descriptor.DialogPanel.ReceiveDialogMessage(DialogMessage.Activated); descriptor.DialogPanel.ReceiveDialogMessage(DialogMessage.Activated);
ICanBeDirty dirtyable = descriptor.DialogPanel as ICanBeDirty;
if (dirtyable != null) {
dirtyable.DirtyChanged += PanelDirtyChanged;
}
TabPage page = new TabPage(descriptor.Label); TabPage page = new TabPage(descriptor.Label);
page.Controls.Add(descriptor.DialogPanel.Control); page.Controls.Add(descriptor.DialogPanel.Control);
@ -88,12 +100,26 @@ namespace ICSharpCode.SharpDevelop.Project.Dialogs
} }
} }
void PanelDirtyChanged(object sender, EventArgs e)
{
bool dirty = false;
foreach (IDialogPanelDescriptor descriptor in descriptors) {
if (descriptor != null) { // may be null, if it is only a "path"
ICanBeDirty dirtyable = descriptor.DialogPanel as ICanBeDirty;
if (dirtyable != null) {
dirty |= dirtyable.IsDirty;
}
}
}
this.IsDirty = dirty;
}
public override void Save(string fileName) public override void Save(string fileName)
{ {
foreach (IDialogPanelDescriptor pane in descriptors) { foreach (IDialogPanelDescriptor pane in descriptors) {
pane.DialogPanel.ReceiveDialogMessage(DialogMessage.OK); pane.DialogPanel.ReceiveDialogMessage(DialogMessage.OK);
} }
ProjectService.SaveSolution(); project.Save();
} }
} }
} }

17
src/Main/Base/Project/Src/Gui/IViewContent.cs

@ -32,7 +32,7 @@ namespace ICSharpCode.SharpDevelop.Gui
/// IViewContent is the base interface for all editable data /// IViewContent is the base interface for all editable data
/// inside SharpDevelop. /// inside SharpDevelop.
/// </summary> /// </summary>
public interface IViewContent : IBaseViewContent public interface IViewContent : IBaseViewContent, ICanBeDirty
{ {
/// <summary> /// <summary>
/// A generic name for the file, when it does have no file name /// A generic name for the file, when it does have no file name
@ -73,15 +73,6 @@ namespace ICSharpCode.SharpDevelop.Gui
get; get;
} }
/// <summary>
/// If this property returns true the content has changed since
/// the last load/save operation.
/// </summary>
bool IsDirty {
get;
set;
}
/// <summary> /// <summary>
/// If this property returns true the content could not be altered. /// If this property returns true the content could not be altered.
/// </summary> /// </summary>
@ -123,12 +114,6 @@ namespace ICSharpCode.SharpDevelop.Gui
/// </summary> /// </summary>
event EventHandler TitleNameChanged; event EventHandler TitleNameChanged;
/// <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;
event EventHandler Saving; event EventHandler Saving;
event SaveEventHandler Saved; event SaveEventHandler Saved;
} }

7
src/Main/Base/Project/Src/Gui/XmlForms/Lib/XmlForm.cs

@ -65,6 +65,13 @@ namespace ICSharpCode.SharpDevelop.Gui.XmlForms
// } // }
// } // }
protected void SetupFromXmlResource(string resourceName)
{
Assembly caller = Assembly.GetCallingAssembly();
resourceName = "Resources." + resourceName;
SetupFromXmlStream(caller.GetManifestResourceStream(resourceName));
}
protected void SetupFromXmlStream(Stream stream) protected void SetupFromXmlStream(Stream stream)
{ {
if (stream == null) { if (stream == null) {

7
src/Main/Base/Project/Src/Gui/XmlForms/Lib/XmlUserControl.cs

@ -65,6 +65,13 @@ namespace ICSharpCode.SharpDevelop.Gui.XmlForms
// } // }
// } // }
protected void SetupFromXmlResource(string resourceName)
{
Assembly caller = Assembly.GetCallingAssembly();
resourceName = "Resources." + resourceName;
SetupFromXmlStream(caller.GetManifestResourceStream(resourceName));
}
protected void SetupFromXmlStream(Stream stream) protected void SetupFromXmlStream(Stream stream)
{ {
if (stream == null) { if (stream == null) {

121
src/Main/Base/Project/Src/Project/AbstractProject.cs

@ -162,6 +162,7 @@ namespace ICSharpCode.SharpDevelop.Project
[Browsable(false)] [Browsable(false)]
public string Configuration { public string Configuration {
get { get {
// is always stored in BaseConfiguration
return BaseConfiguration["Configuration"]; return BaseConfiguration["Configuration"];
} }
set { set {
@ -172,6 +173,7 @@ namespace ICSharpCode.SharpDevelop.Project
[Browsable(false)] [Browsable(false)]
public string Platform { public string Platform {
get { get {
// is always stored in BaseConfiguration
return BaseConfiguration["Platform"]; return BaseConfiguration["Platform"];
} }
set { set {
@ -182,17 +184,17 @@ namespace ICSharpCode.SharpDevelop.Project
[Browsable(false)] [Browsable(false)]
public virtual OutputType OutputType { public virtual OutputType OutputType {
get { get {
return BaseConfiguration.Get("OutputType", OutputType.Exe); return GetProperty("OutputType", OutputType.Exe);
} }
set { set {
BaseConfiguration.Set("OutputType", value); SetProperty("OutputType", value);
} }
} }
[Browsable(false)] [Browsable(false)]
public string OutputAssemblyFullPath { public string OutputAssemblyFullPath {
get { get {
string outputPath = ActiveConfiguration["OutputPath"]; string outputPath = GetProperty("OutputPath");
return Path.Combine(Path.Combine(Directory, outputPath), AssemblyName + GetExtension(OutputType)); return Path.Combine(Path.Combine(Directory, outputPath), AssemblyName + GetExtension(OutputType));
} }
} }
@ -214,6 +216,7 @@ namespace ICSharpCode.SharpDevelop.Project
[Browsable(false)] [Browsable(false)]
public Guid Guid { public Guid Guid {
get { get {
// is always in base config
return new Guid(BaseConfiguration["ProjectGuid"]); return new Guid(BaseConfiguration["ProjectGuid"]);
} }
} }
@ -221,30 +224,30 @@ namespace ICSharpCode.SharpDevelop.Project
[Browsable(false)] [Browsable(false)]
public string RootNamespace { public string RootNamespace {
get { get {
return BaseConfiguration["RootNamespace"]; return GetProperty("RootNamespace");
} }
set { set {
BaseConfiguration["RootNamespace"] = value; SetProperty("RootNamespace", value);
} }
} }
[Browsable(false)] [Browsable(false)]
public string AssemblyName { public string AssemblyName {
get { get {
return BaseConfiguration["AssemblyName"]; return GetProperty("AssemblyName");
} }
set { set {
BaseConfiguration["AssemblyName"] = value; SetProperty("AssemblyName", value);
} }
} }
[Browsable(false)] [Browsable(false)]
public string AppDesignerFolder { public string AppDesignerFolder {
get { get {
return BaseConfiguration["AppDesignerFolder"]; return GetProperty("AppDesignerFolder");
} }
set { set {
BaseConfiguration["AppDesignerFolder"] = value; SetProperty("AppDesignerFolder", value);
} }
} }
@ -283,6 +286,7 @@ namespace ICSharpCode.SharpDevelop.Project
} }
} }
/*
public string GetOutputPath(string configurationName, string platform) public string GetOutputPath(string configurationName, string platform)
{ {
return GetConfiguration(configurationName, platform)["OutputPath"]; return GetConfiguration(configurationName, platform)["OutputPath"];
@ -292,33 +296,108 @@ namespace ICSharpCode.SharpDevelop.Project
{ {
GetConfiguration(configurationName, platform)["OutputPath"] = val; GetConfiguration(configurationName, platform)["OutputPath"] = val;
} }
*/
public PropertyGroup GetUserConfiguration(string configurationName) public string GetProperty(string property)
{ {
return GetUserConfiguration(configurationName, null); return GetProperty(property, "");
} }
public PropertyGroup GetUserConfiguration(string configurationName, string platform) public T GetProperty<T>(string property, T defaultValue)
{
return GetProperty(this.Configuration, this.Platform, property, defaultValue);
}
public T GetProperty<T>(string configurationName, string platform, string property, T defaultValue)
{ {
string configurationKey = platform != null ? configurationName + "|" + platform : configurationName; string configurationKey = platform != null ? configurationName + "|" + platform : configurationName;
if (!userConfigurations.ContainsKey(configurationKey)) { PropertyGroup pg;
userConfigurations.Add(configurationKey, new PropertyGroup()); if (userConfigurations.TryGetValue(configurationKey, out pg)) {
if (pg.IsSet(property)) {
return pg.Get(property, defaultValue);
}
}
if (configurations.TryGetValue(configurationKey, out pg)) {
if (pg.IsSet(property)) {
return pg.Get(property, defaultValue);
}
}
if (BaseConfiguration.IsSet(property)) {
return BaseConfiguration.Get(property, defaultValue);
}
return defaultValue;
} }
return userConfigurations[configurationKey];
public void SetProperty<T>(string property, T value)
{
SetProperty(this.Configuration, this.Platform, property, value, PropertyStorageLocation.Unchanged);
} }
public PropertyGroup GetConfiguration(string configurationName) public void SetProperty<T>(string property, T value, PropertyStorageLocation location)
{ {
return GetConfiguration(configurationName, null); SetProperty(this.Configuration, this.Platform, property, value, location);
} }
public PropertyGroup GetConfiguration(string configurationName, string platform) public void SetProperty<T>(string configurationName, string platform, string property, T value, PropertyStorageLocation location)
{ {
string configurationKey = platform != null ? configurationName + "|" + platform : configurationName; string configurationKey = platform != null ? configurationName + "|" + platform : configurationName;
if (!configurations.ContainsKey(configurationKey)) { PropertyGroup pg;
configurations.Add(configurationKey, new PropertyGroup()); T defaultValue = (typeof(T) == typeof(string)) ? (T)(object)string.Empty : default(T);
switch (location) {
case PropertyStorageLocation.Unchanged:
if (userConfigurations.TryGetValue(configurationKey, out pg)) {
if (pg.IsSet(property)) {
pg.Set(property, defaultValue, value);
return;
}
}
if (configurations.TryGetValue(configurationKey, out pg)) {
if (pg.IsSet(property)) {
pg.Set(property, defaultValue, value);
return;
}
}
BaseConfiguration.Set(property, defaultValue, value);
return;
case PropertyStorageLocation.BaseConfiguration:
if (!BaseConfiguration.IsSet(property)) {
RemoveProperty(configurations, property);
RemoveProperty(userConfigurations, property);
}
BaseConfiguration.Set(property, defaultValue, value);
return;
case PropertyStorageLocation.SpecificConfiguration:
if (BaseConfiguration.IsSet(property)) {
BaseConfiguration.Remove(property);
}
RemoveProperty(userConfigurations, property);
if (!configurations.TryGetValue(configurationKey, out pg)) {
configurations[configurationKey] = pg = new PropertyGroup();
}
pg.Set(property, defaultValue, value);
return;
case PropertyStorageLocation.UserSpecificConfiguration:
if (BaseConfiguration.IsSet(property)) {
BaseConfiguration.Remove(property);
}
RemoveProperty(configurations, property);
if (!userConfigurations.TryGetValue(configurationKey, out pg)) {
userConfigurations[configurationKey] = pg = new PropertyGroup();
}
pg.Set(property, defaultValue, value);
return;
default:
throw new InvalidEnumArgumentException("location", (int)location, typeof(PropertyStorageLocation));
}
}
static void RemoveProperty(Dictionary<string, PropertyGroup> dict, string property)
{
foreach (PropertyGroup pg in dict.Values) {
if (pg.IsSet(property)) {
pg.Remove(property);
}
} }
return configurations[configurationKey];
} }
/// <summary> /// <summary>

421
src/Main/Base/Project/Src/Project/AdvancedMSBuildProject.cs

@ -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
}
}

449
src/Main/Base/Project/Src/Project/ConfigurationGuiHelper.cs

@ -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
}
}

12
src/Main/Base/Project/Src/Project/IProject.cs

@ -6,6 +6,7 @@
// </file> // </file>
using System; using System;
using System.ComponentModel;
using System.CodeDom.Compiler; using System.CodeDom.Compiler;
using System.Collections.Generic; using System.Collections.Generic;
using ICSharpCode.Core; using ICSharpCode.Core;
@ -13,9 +14,13 @@ using ICSharpCode.Core;
namespace ICSharpCode.SharpDevelop.Project namespace ICSharpCode.SharpDevelop.Project
{ {
public enum OutputType { public enum OutputType {
[Description("${res:Dialog.Options.PrjOptions.Configuration.CompileTarget.Exe}")]
Exe, Exe,
[Description("${res:Dialog.Options.PrjOptions.Configuration.CompileTarget.WinExe}")]
WinExe, WinExe,
[Description("${res:Dialog.Options.PrjOptions.Configuration.CompileTarget.Library}")]
Library, Library,
[Description("${res:Dialog.Options.PrjOptions.Configuration.CompileTarget.Module}")]
Module Module
}; };
@ -82,13 +87,6 @@ namespace ICSharpCode.SharpDevelop.Project
set; set;
} }
PropertyGroup GetConfiguration(string configurationName);
PropertyGroup GetConfiguration(string configurationName, string platform);
PropertyGroup GetUserConfiguration(string configurationName);
PropertyGroup GetUserConfiguration(string configurationName, string platform);
bool CanCompile(string fileName); bool CanCompile(string fileName);
void Save(); void Save();

60
src/Main/Base/Project/Src/Project/MSBuildEnums.cs

@ -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,
}
}

85
src/Main/Base/Project/Src/Project/MSBuildProject.cs

@ -253,18 +253,32 @@ namespace ICSharpCode.SharpDevelop.Project
} }
#endregion #endregion
#region Start / Run
public override bool IsStartable { public override bool IsStartable {
get { get {
switch (this.StartAction) {
case StartAction.Project:
return OutputType == OutputType.Exe || OutputType == OutputType.WinExe; return OutputType == OutputType.Exe || OutputType == OutputType.WinExe;
case StartAction.Program:
return this.StartProgram.Length > 0;
case StartAction.StartURL:
return this.StartUrl.Length > 0;
}
return false;
} }
} }
public override void Start(bool withDebugging) void Start(string program, bool withDebugging)
{ {
ProcessStartInfo psi = new ProcessStartInfo(); ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = OutputAssemblyFullPath; psi.FileName = Path.Combine(Directory, program);
psi.WorkingDirectory = Path.GetDirectoryName(OutputAssemblyFullPath); string workingDir = this.StartWorkingDirectory;
psi.Arguments = ""; if (workingDir.Length == 0) {
psi.WorkingDirectory = Path.GetDirectoryName(psi.FileName);
} else {
psi.WorkingDirectory = Path.Combine(Directory, workingDir);
}
psi.Arguments = this.StartArguments;
if (withDebugging) { if (withDebugging) {
DebuggerService.CurrentDebugger.Start(psi); DebuggerService.CurrentDebugger.Start(psi);
@ -273,6 +287,69 @@ namespace ICSharpCode.SharpDevelop.Project
} }
} }
public override void Start(bool withDebugging)
{
switch (this.StartAction) {
case StartAction.Project:
Start(this.OutputAssemblyFullPath, withDebugging);
break;
case StartAction.Program:
Start(this.StartProgram, withDebugging);
break;
case StartAction.StartURL:
FileService.OpenFile("browser://" + this.StartUrl);
break;
default:
throw new System.ComponentModel.InvalidEnumArgumentException("StartAction", (int)this.StartAction, typeof(StartAction));
}
}
public string StartProgram {
get {
return GetProperty("StartProgram");
}
set {
SetProperty("StartProgram", value);
}
}
public string StartUrl {
get {
return GetProperty("StartURL");
}
set {
SetProperty("StartURL", value);
}
}
public StartAction StartAction {
get {
return GetProperty("StartAction", StartAction.Project);
}
set {
SetProperty("StartAction", value);
}
}
public string StartArguments {
get {
return GetProperty("StartArguments");
}
set {
SetProperty("StartArguments", value);
}
}
public string StartWorkingDirectory {
get {
return GetProperty("StartWorkingDirectory");
}
set {
SetProperty("StartWorkingDirectory", value);
}
}
#endregion
// static void BeforeBuild() // static void BeforeBuild()
// { // {
// TaskService.NotifyTaskChange(); // TaskService.NotifyTaskChange();

3
src/Main/Base/Project/Src/Project/PropertyGroup.cs

@ -18,6 +18,7 @@ namespace ICSharpCode.SharpDevelop.Project
/// </summary> /// </summary>
public class PropertyGroup public class PropertyGroup
{ {
// TODO: Isn't MSBuild case-insensitive ???
Dictionary<string, bool> isGuardedProperty = new Dictionary<string, bool>(); Dictionary<string, bool> isGuardedProperty = new Dictionary<string, bool>();
Dictionary<string, string> properties = new Dictionary<string, string>(); Dictionary<string, string> properties = new Dictionary<string, string>();
@ -46,7 +47,7 @@ namespace ICSharpCode.SharpDevelop.Project
public void Set<T>(string property, T defaultValue, T value) public void Set<T>(string property, T defaultValue, T value)
{ {
if (value == null || defaultValue.Equals(value)) { if (value == null || value.Equals(defaultValue)) {
properties.Remove(property); properties.Remove(property);
return; return;
} }

BIN
src/Main/StartUp/Project/Resources/StringResources.resources

Binary file not shown.
Loading…
Cancel
Save