Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@111 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
6 changed files with 240 additions and 3 deletions
@ -0,0 +1,222 @@ |
|||||||
|
<?xml version="1.0"?> |
||||||
|
<Template originator = "Daniel Grunwald" |
||||||
|
created = "26/04/2005" |
||||||
|
lastModified = "26/04/2005"> |
||||||
|
|
||||||
|
<!-- Template Header --> |
||||||
|
<TemplateConfiguration> |
||||||
|
<Name>${res:Templates.Project.SharpDevelopAddin.Name}</Name> |
||||||
|
<Category>C#</Category> |
||||||
|
<Icon>C#.Project.ControlLibrary</Icon> |
||||||
|
<LanguageName>C#</LanguageName> |
||||||
|
<Description>${res:Templates.Project.SharpDevelopAddin.Description}</Description> |
||||||
|
</TemplateConfiguration> |
||||||
|
|
||||||
|
<!-- Actions --> |
||||||
|
<Actions> |
||||||
|
<Open filename = "${ProjectName}.addin"/> |
||||||
|
</Actions> |
||||||
|
|
||||||
|
<Combine name = "${ProjectName}" directory = "."> |
||||||
|
<Options> |
||||||
|
<StartupProject>${ProjectName}</StartupProject> |
||||||
|
</Options> |
||||||
|
|
||||||
|
<Project name = "${ProjectName}" directory = "."> |
||||||
|
<Options OutputType = "Library" /> |
||||||
|
|
||||||
|
<References> |
||||||
|
<Reference type="Gac" refto="System" /> |
||||||
|
<Reference type="Gac" refto="System.Data" /> |
||||||
|
<Reference type="Gac" refto="System.Drawing" /> |
||||||
|
<Reference type="Gac" refto="System.Windows.Forms" /> |
||||||
|
<Reference type="Gac" refto="System.Xml" /> |
||||||
|
</References> |
||||||
|
|
||||||
|
<Files> |
||||||
|
<File name="${ProjectName}.addin"><![CDATA[<AddIn name = "${ProjectName}" |
||||||
|
author = "${USER}" |
||||||
|
copyright = "GNU General Public License" |
||||||
|
url = "" |
||||||
|
description = "TODO: Put description here" |
||||||
|
version = "1.0.0"> |
||||||
|
|
||||||
|
<Runtime> |
||||||
|
<Import assembly = "${ProjectName}.dll"/> |
||||||
|
</Runtime> |
||||||
|
|
||||||
|
<Path name = "/SharpDevelop/Workbench/Pads"> |
||||||
|
<Pad id = "${ProjectName}Pad" |
||||||
|
category = "Main" |
||||||
|
title = "${ProjectName}Pad" |
||||||
|
icon = "PadIcons.UnitTest" |
||||||
|
shortcut = "Control|Alt|T" |
||||||
|
class = "${ProjectName}.TestPad"/> |
||||||
|
</Path> |
||||||
|
</AddIn> |
||||||
|
]]></File> |
||||||
|
<File name="Resources/MyUserControl.xfrm"> |
||||||
|
<![CDATA[<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<Components version="1.0"> |
||||||
|
<System.Windows.Forms.UserControl> |
||||||
|
<Name value="MyUserControl" /> |
||||||
|
<ClientSize value="{Width=230, Height=160}" /> |
||||||
|
<Controls> |
||||||
|
<System.Windows.Forms.Button> |
||||||
|
<Name value="testButton" /> |
||||||
|
<Location value="{X=63,Y=97}" /> |
||||||
|
<Text value="A button" /> |
||||||
|
<Size value="{Width=75, Height=23}" /> |
||||||
|
<Anchor value="None" /> |
||||||
|
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> |
||||||
|
<TabIndex value="1" /> |
||||||
|
</System.Windows.Forms.Button> |
||||||
|
<System.Windows.Forms.Label> |
||||||
|
<Name value="label1" /> |
||||||
|
<Location value="{X=38,Y=19}" /> |
||||||
|
<Text value="Hello, World!" /> |
||||||
|
<Size value="{Width=100, Height=23}" /> |
||||||
|
<TabIndex value="0" /> |
||||||
|
</System.Windows.Forms.Label> |
||||||
|
</Controls> |
||||||
|
</System.Windows.Forms.UserControl> |
||||||
|
</Components> |
||||||
|
]]></File> |
||||||
|
<File name="Src/MyUserControl.cs"> |
||||||
|
<![CDATA[// Copyright (C) yyyy name of author |
||||||
|
// |
||||||
|
// This program is free software; you can redistribute it and/or |
||||||
|
// modify it under the terms of the GNU General Public License |
||||||
|
// as published by the Free Software Foundation; either version 2 |
||||||
|
// of the License, or (at your option) any later version. |
||||||
|
// |
||||||
|
// This program is distributed in the hope that it will be useful, |
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
// GNU General Public License for more details. |
||||||
|
// |
||||||
|
// You should have received a copy of the GNU General Public License |
||||||
|
// along with this program; if not, write to the Free Software |
||||||
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
||||||
|
|
||||||
|
using System; |
||||||
|
using System.Windows.Forms; |
||||||
|
using ICSharpCode.SharpDevelop.Gui.XmlForms; |
||||||
|
|
||||||
|
namespace ${ProjectName} |
||||||
|
{ |
||||||
|
public class MyUserControl : BaseSharpDevelopUserControl |
||||||
|
{ |
||||||
|
public MyUserControl() |
||||||
|
{ |
||||||
|
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("${ProjectName}.Resources.MyUserControl.xfrm")); |
||||||
|
Get<Button>("test").Click += ButtonClick; |
||||||
|
} |
||||||
|
|
||||||
|
void ButtonClick(object sender, EventArgs e) |
||||||
|
{ |
||||||
|
System.Windows.Forms.MessageBox.Show("The button was clicked!"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
]]></File> |
||||||
|
<File name="Src/TestPad.cs"> |
||||||
|
<![CDATA[// Copyright (C) yyyy name of author |
||||||
|
// |
||||||
|
// This program is free software; you can redistribute it and/or |
||||||
|
// modify it under the terms of the GNU General Public License |
||||||
|
// as published by the Free Software Foundation; either version 2 |
||||||
|
// of the License, or (at your option) any later version. |
||||||
|
// |
||||||
|
// This program is distributed in the hope that it will be useful, |
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
// GNU General Public License for more details. |
||||||
|
// |
||||||
|
// You should have received a copy of the GNU General Public License |
||||||
|
// along with this program; if not, write to the Free Software |
||||||
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
||||||
|
|
||||||
|
using System; |
||||||
|
using System.Windows.Forms; |
||||||
|
using ICSharpCode.Core; |
||||||
|
using ICSharpCode.SharpDevelop.Gui; |
||||||
|
|
||||||
|
namespace ${ProjectName} |
||||||
|
{ |
||||||
|
/// <summary> |
||||||
|
/// Description of the pad content |
||||||
|
/// </summary> |
||||||
|
public class TestPad : AbstractPadContent |
||||||
|
{ |
||||||
|
MyUserControl ctl; |
||||||
|
|
||||||
|
/// <summary> |
||||||
|
/// Creates a new TestPad object |
||||||
|
/// </summary> |
||||||
|
public TestPad() |
||||||
|
{ |
||||||
|
ctl = new MyUserControl(); |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary> |
||||||
|
/// The <see cref="System.Windows.Forms.Control"/> representing the pad |
||||||
|
/// </summary> |
||||||
|
public override Control Control { |
||||||
|
get { |
||||||
|
return ctl; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary> |
||||||
|
/// Refreshes the pad |
||||||
|
/// </summary> |
||||||
|
public override void RedrawContent() |
||||||
|
{ |
||||||
|
// TODO: Refresh the whole pad control here, renew all resource strings whatever |
||||||
|
// Note that you do not need to recreate the control. |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary> |
||||||
|
/// Cleans up all used resources |
||||||
|
/// </summary> |
||||||
|
public override void Dispose() |
||||||
|
{ |
||||||
|
ctl.Dispose(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
]]></File> |
||||||
|
<File name="Configuration/AssemblyInfo.cs"> |
||||||
|
<![CDATA[using System.Reflection; |
||||||
|
using System.Runtime.CompilerServices; |
||||||
|
|
||||||
|
// Information about this assembly is defined by the following |
||||||
|
// attributes. |
||||||
|
// |
||||||
|
// change them to the information which is associated with the assembly |
||||||
|
// you compile. |
||||||
|
|
||||||
|
[assembly: AssemblyTitle("${ProjectName}")] |
||||||
|
[assembly: AssemblyDescription("Addin for SharpDevelop 2.0")] |
||||||
|
[assembly: AssemblyConfiguration("")] |
||||||
|
[assembly: AssemblyCompany("")] |
||||||
|
[assembly: AssemblyProduct("SharpDevelop")] |
||||||
|
[assembly: AssemblyCopyright("GNU General Public Licence")] |
||||||
|
[assembly: AssemblyTrademark("")] |
||||||
|
[assembly: AssemblyCulture("")] |
||||||
|
|
||||||
|
// The assembly version has following format : |
||||||
|
// |
||||||
|
// Major.Minor.Build.Revision |
||||||
|
// |
||||||
|
// You can specify all values by your own or you can build default build and revision |
||||||
|
// numbers with the '*' character (the default): |
||||||
|
|
||||||
|
[assembly: AssemblyVersion("1.0.*")] |
||||||
|
|
||||||
|
]]></File> |
||||||
|
</Files> |
||||||
|
</Project> |
||||||
|
</Combine> |
||||||
|
</Template> |
Loading…
Reference in new issue