Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1196 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
21 changed files with 156 additions and 19 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,68 @@ |
|||||||
|
<Components version="1.0"> |
||||||
|
<System.Windows.Forms.UserControl> |
||||||
|
<Name value="ProjectAndSolutionOptionsPanel" /> |
||||||
|
<ClientSize value="{Width=352, Height=324}" /> |
||||||
|
<Controls> |
||||||
|
<System.Windows.Forms.GroupBox> |
||||||
|
<Name value="CreatedObject2" /> |
||||||
|
<Location value="{X=8,Y=8}" /> |
||||||
|
<Text value="${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.SettingsGroupBox}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
<Size value="{Width=336, Height=104}" /> |
||||||
|
<TabIndex value="0" /> |
||||||
|
<Controls> |
||||||
|
<System.Windows.Forms.Button> |
||||||
|
<Name value="selectProjectLocationButton" /> |
||||||
|
<Location value="{X=294,Y=32}" /> |
||||||
|
<Text value="..." /> |
||||||
|
<Anchor value="Top, Right" /> |
||||||
|
<Size value="{Width=32, Height=21}" /> |
||||||
|
<TabIndex value="6" /> |
||||||
|
</System.Windows.Forms.Button> |
||||||
|
<System.Windows.Forms.TextBox> |
||||||
|
<Name value="projectLocationTextBox" /> |
||||||
|
<TabIndex value="1" /> |
||||||
|
<Size value="{Width=280, Height=21}" /> |
||||||
|
<Location value="{X=8,Y=32}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
</System.Windows.Forms.TextBox> |
||||||
|
<System.Windows.Forms.Label> |
||||||
|
<Name value="label" /> |
||||||
|
<Location value="{X=8,Y=16}" /> |
||||||
|
<Text value="${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.ProjectLocationLabel}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
<TextAlign value="BottomLeft" /> |
||||||
|
<Size value="{Width=320, Height=16}" /> |
||||||
|
<TabIndex value="0" /> |
||||||
|
</System.Windows.Forms.Label> |
||||||
|
<System.Windows.Forms.CheckBox> |
||||||
|
<Name value="loadPrevProjectCheckBox" /> |
||||||
|
<Location value="{X=8,Y=56}" /> |
||||||
|
<Text value="${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.LoadPrevProjectCheckBox}" /> |
||||||
|
<TabIndex value="8" /> |
||||||
|
<Size value="{Width=320, Height=32}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
</System.Windows.Forms.CheckBox> |
||||||
|
</Controls> |
||||||
|
</System.Windows.Forms.GroupBox> |
||||||
|
<System.Windows.Forms.GroupBox> |
||||||
|
<Name value="CreatedObject27" /> |
||||||
|
<Location value="{X=8,Y=128}" /> |
||||||
|
<Text value="${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.BuildAndRunGroupBox}" /> |
||||||
|
<Anchor value="Top, Bottom, Left, Right" /> |
||||||
|
<Size value="{Width=336, Height=86}" /> |
||||||
|
<TabIndex value="1" /> |
||||||
|
<Controls> |
||||||
|
<System.Windows.Forms.CheckBox> |
||||||
|
<Name value="showErrorListCheckBox" /> |
||||||
|
<Location value="{X=8,Y=35}" /> |
||||||
|
<Text value="${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.ShowErrorListPadCheckBox}" /> |
||||||
|
<TabIndex value="10" /> |
||||||
|
<Size value="{Width=320, Height=32}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
</System.Windows.Forms.CheckBox> |
||||||
|
</Controls> |
||||||
|
</System.Windows.Forms.GroupBox> |
||||||
|
</Controls> |
||||||
|
</System.Windows.Forms.UserControl> |
||||||
|
</Components> |
||||||
@ -0,0 +1,63 @@ |
|||||||
|
// <file>
|
||||||
|
// <copyright see="prj:///doc/copyright.txt"/>
|
||||||
|
// <license see="prj:///doc/license.txt"/>
|
||||||
|
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
|
||||||
|
// <version>$Revision$</version>
|
||||||
|
// </file>
|
||||||
|
|
||||||
|
using System; |
||||||
|
using System.IO; |
||||||
|
using System.Drawing; |
||||||
|
using System.Collections; |
||||||
|
using System.Windows.Forms; |
||||||
|
|
||||||
|
using ICSharpCode.SharpDevelop.Gui; |
||||||
|
using ICSharpCode.Core; |
||||||
|
|
||||||
|
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels |
||||||
|
{ |
||||||
|
public class ProjectAndSolutionOptionsPanel : AbstractOptionPanel |
||||||
|
{ |
||||||
|
public override void LoadPanelContents() |
||||||
|
{ |
||||||
|
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.ProjectAndSolutionOptionsPanel.xfrm")); |
||||||
|
|
||||||
|
// read properties
|
||||||
|
ControlDictionary["projectLocationTextBox"].Text = PropertyService.Get("ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath", |
||||||
|
Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), |
||||||
|
"SharpDevelop Projects")).ToString(); |
||||||
|
|
||||||
|
((CheckBox)ControlDictionary["loadPrevProjectCheckBox"]).Checked = PropertyService.Get("SharpDevelop.LoadPrevProjectOnStartup", false); |
||||||
|
((CheckBox)ControlDictionary["showErrorListCheckBox"]).Checked = ErrorListPad.ShowAfterBuild; |
||||||
|
|
||||||
|
((Button)ControlDictionary["selectProjectLocationButton"]).Click += new EventHandler(SelectProjectLocationButtonClicked); |
||||||
|
} |
||||||
|
|
||||||
|
public override bool StorePanelContents() |
||||||
|
{ |
||||||
|
// check for correct settings
|
||||||
|
string projectPath = ControlDictionary["projectLocationTextBox"].Text; |
||||||
|
if (projectPath.Length > 0) { |
||||||
|
if (!FileUtility.IsValidFileName(projectPath)) { |
||||||
|
MessageService.ShowError(StringParser.Parse("${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.InvalidProjectPathSpecified}")); |
||||||
|
return false; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
// set properties
|
||||||
|
PropertyService.Set("ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath", projectPath); |
||||||
|
PropertyService.Set("SharpDevelop.LoadPrevProjectOnStartup", ((CheckBox)ControlDictionary["loadPrevProjectCheckBox"]).Checked); |
||||||
|
ErrorListPad.ShowAfterBuild = ((CheckBox)ControlDictionary["showErrorListCheckBox"]).Checked; |
||||||
|
|
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
void SelectProjectLocationButtonClicked(object sender, EventArgs e) |
||||||
|
{ |
||||||
|
FolderDialog fdiag = new FolderDialog(); |
||||||
|
if (fdiag.DisplayDialog(StringParser.Parse("${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.SelectDefaultProjectLocationDialog.Title}")) == DialogResult.OK) { |
||||||
|
ControlDictionary["projectLocationTextBox"].Text = fdiag.Path; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
Binary file not shown.
Loading…
Reference in new issue