Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@40 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
15 changed files with 68 additions and 279 deletions
@ -1,72 +0,0 @@
@@ -1,72 +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.Reflection; |
||||
using System.IO; |
||||
using System.Drawing; |
||||
using System.Collections; |
||||
using System.ComponentModel; |
||||
using System.Windows.Forms; |
||||
|
||||
using ICSharpCode.SharpDevelop.Internal.Project; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
using ICSharpCode.Core; |
||||
|
||||
namespace ICSharpCode.ILAsmBinding |
||||
{ |
||||
public class ChooseRuntimePanel : AbstractOptionPanel |
||||
{ |
||||
ILAsmCompilerParameters config = null; |
||||
|
||||
public override void LoadPanelContents() |
||||
{ |
||||
SetupFromXmlStream(Assembly.GetCallingAssembly().GetManifestResourceStream("ChooseRuntimePanel.xfrm")); |
||||
|
||||
this.config = (ILAsmCompilerParameters)((Properties)CustomizationObject).Get("Config"); |
||||
|
||||
((RadioButton)ControlDictionary["msnetRadioButton"]).Checked = config.NetRuntime == NetRuntime.MsNet; |
||||
((RadioButton)ControlDictionary["monoRadioButton"]).Checked = config.NetRuntime == NetRuntime.Mono; |
||||
((RadioButton)ControlDictionary["mintRadioButton"]).Checked = config.NetRuntime == NetRuntime.MonoInterpreter; |
||||
|
||||
((RadioButton)ControlDictionary["cscRadioButton"]).Checked = config.ILAsmCompiler == ILAsmCompiler.Microsoft; |
||||
((RadioButton)ControlDictionary["mcsRadioButton"]).Checked = config.ILAsmCompiler == ILAsmCompiler.Mono; |
||||
|
||||
((RadioButton)ControlDictionary["cscRadioButton"]).CheckedChanged += new EventHandler(CompilerRadioButtonCheckedChanged); |
||||
|
||||
|
||||
((ComboBox)ControlDictionary["compilerVersionComboBox"]).Items.Add("Standard"); |
||||
foreach (string runtime in FileUtility.GetAvaiableRuntimeVersions()) { |
||||
((ComboBox)ControlDictionary["compilerVersionComboBox"]).Items.Add(runtime); |
||||
} |
||||
|
||||
((ComboBox)ControlDictionary["compilerVersionComboBox"]).Text = config.ILAsmCompilerVersion.Length == 0 ? "Standard" : config.ILAsmCompilerVersion; |
||||
CompilerRadioButtonCheckedChanged(this, EventArgs.Empty); |
||||
} |
||||
|
||||
void CompilerRadioButtonCheckedChanged(object sender, EventArgs e) |
||||
{ |
||||
ControlDictionary["compilerVersionLabel"].Enabled = ((RadioButton)ControlDictionary["cscRadioButton"]).Checked; |
||||
ControlDictionary["compilerVersionComboBox"].Enabled = ((RadioButton)ControlDictionary["cscRadioButton"]).Checked; |
||||
} |
||||
|
||||
public override bool StorePanelContents() |
||||
{ |
||||
if (((RadioButton)ControlDictionary["msnetRadioButton"]).Checked) { |
||||
config.NetRuntime = NetRuntime.MsNet; |
||||
} else if (((RadioButton)ControlDictionary["monoRadioButton"]).Checked) { |
||||
config.NetRuntime = NetRuntime.Mono; |
||||
} else { |
||||
config.NetRuntime = NetRuntime.MonoInterpreter; |
||||
} |
||||
config.ILAsmCompiler = ((RadioButton)ControlDictionary["cscRadioButton"]).Checked ? ILAsmCompiler.Microsoft : ILAsmCompiler.Mono; |
||||
config.ILAsmCompilerVersion = ControlDictionary["compilerVersionComboBox"].Text; |
||||
|
||||
return true; |
||||
} |
||||
} |
||||
} |
@ -1,133 +0,0 @@
@@ -1,133 +0,0 @@
|
||||
<Components version="1.0"> |
||||
<System.Windows.Forms.UserControl> |
||||
<Name value="CreatedObject01" /> |
||||
<DockPadding value="" /> |
||||
<AccessibleDescription value="" /> |
||||
<Font value="[Font: Name=Tahoma, Size=8, Units=3, GdiCharSet=1, GdiVerticalFont=False]" /> |
||||
<AccessibleName value="" /> |
||||
<ClientSize value="{Width=360, Height=272}" /> |
||||
<Tag value="" /> |
||||
<Controls> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="runtimeGroupBox" /> |
||||
<AccessibleName value="" /> |
||||
<ForeColor value="Color [ControlText]" /> |
||||
<TabIndex value="0" /> |
||||
<AccessibleDescription value="" /> |
||||
<Location value="{X=8,Y=8}" /> |
||||
<ImeMode value="NoControl" /> |
||||
<BackColor value="Color [Control]" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Tag value="" /> |
||||
<RightToLeft value="No" /> |
||||
<Size value="{Width=344, Height=100}" /> |
||||
<Text value="${res:Dialog.Options.PrjOptions.ChooseRuntimePanel.RuntimeGroupBox}" /> |
||||
<Controls> |
||||
<System.Windows.Forms.RadioButton> |
||||
<Name value="mintRadioButton" /> |
||||
<Location value="{X=8,Y=66}" /> |
||||
<Size value="{Width=328, Height=24}" /> |
||||
<Text value="Mono &Runtime Interpeter" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<RightToLeft value="No" /> |
||||
<TabIndex value="2" /> |
||||
<Tag value="" /> |
||||
<AccessibleName value="" /> |
||||
<ForeColor value="Color [ControlText]" /> |
||||
<BackColor value="Color [Control]" /> |
||||
<AccessibleDescription value="" /> |
||||
</System.Windows.Forms.RadioButton> |
||||
<System.Windows.Forms.RadioButton> |
||||
<Name value="msnetRadioButton" /> |
||||
<Location value="{X=8,Y=18}" /> |
||||
<Size value="{Width=328, Height=24}" /> |
||||
<Text value="&Microsoft .NET" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<RightToLeft value="No" /> |
||||
<TabIndex value="0" /> |
||||
<Tag value="" /> |
||||
<AccessibleName value="" /> |
||||
<ForeColor value="Color [ControlText]" /> |
||||
<BackColor value="Color [Control]" /> |
||||
<AccessibleDescription value="" /> |
||||
</System.Windows.Forms.RadioButton> |
||||
<System.Windows.Forms.RadioButton> |
||||
<Name value="monoRadioButton" /> |
||||
<Location value="{X=8,Y=42}" /> |
||||
<Size value="{Width=328, Height=24}" /> |
||||
<Text value="M&ono" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<RightToLeft value="No" /> |
||||
<TabIndex value="1" /> |
||||
<Tag value="" /> |
||||
<AccessibleName value="" /> |
||||
<ForeColor value="Color [ControlText]" /> |
||||
<BackColor value="Color [Control]" /> |
||||
<AccessibleDescription value="" /> |
||||
</System.Windows.Forms.RadioButton> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="compilerGroupBox" /> |
||||
<AccessibleName value="" /> |
||||
<ForeColor value="Color [ControlText]" /> |
||||
<TabIndex value="1" /> |
||||
<AccessibleDescription value="" /> |
||||
<Location value="{X=8,Y=120}" /> |
||||
<ImeMode value="NoControl" /> |
||||
<BackColor value="Color [Control]" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Tag value="" /> |
||||
<RightToLeft value="No" /> |
||||
<Size value="{Width=344, Height=128}" /> |
||||
<Text value="${res:Dialog.Options.PrjOptions.ChooseRuntimePanel.CompilerGroupBox}" /> |
||||
<Controls> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="compilerVersionComboBox" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="3" /> |
||||
<Location value="{X=4,Y=100}" /> |
||||
<Size value="{Width=332, Height=21}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="compilerVersionLabel" /> |
||||
<Text value="Compiler &version" /> |
||||
<TextAlign value="BottomLeft" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="2" /> |
||||
<Size value="{Width=332, Height=23}" /> |
||||
<Location value="{X=4,Y=76}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.RadioButton> |
||||
<Name value="mcsRadioButton" /> |
||||
<Location value="{X=8,Y=42}" /> |
||||
<Size value="{Width=328, Height=24}" /> |
||||
<Text value="Mono &mcs" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<RightToLeft value="No" /> |
||||
<TabIndex value="1" /> |
||||
<Tag value="" /> |
||||
<AccessibleName value="" /> |
||||
<ForeColor value="Color [ControlText]" /> |
||||
<BackColor value="Color [Control]" /> |
||||
<AccessibleDescription value="" /> |
||||
</System.Windows.Forms.RadioButton> |
||||
<System.Windows.Forms.RadioButton> |
||||
<Name value="cscRadioButton" /> |
||||
<Location value="{X=8,Y=18}" /> |
||||
<Size value="{Width=328, Height=24}" /> |
||||
<Text value="Microsoft &csc" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<RightToLeft value="No" /> |
||||
<TabIndex value="0" /> |
||||
<Tag value="" /> |
||||
<AccessibleName value="" /> |
||||
<ForeColor value="Color [ControlText]" /> |
||||
<BackColor value="Color [Control]" /> |
||||
<AccessibleDescription value="" /> |
||||
</System.Windows.Forms.RadioButton> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
</Controls> |
||||
</System.Windows.Forms.UserControl> |
||||
</Components> |
Loading…
Reference in new issue