You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
222 lines
6.6 KiB
222 lines
6.6 KiB
<?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" /> |
|
|
|
<ProjectItems> |
|
<Reference Include="System" /> |
|
<Reference Include="System.Data" /> |
|
<Reference Include="System.Drawing" /> |
|
<Reference Include="System.Windows.Forms" /> |
|
<Reference Include="System.Xml" /> |
|
</ProjectItems> |
|
|
|
<Files> |
|
<File name="${ProjectName}.addin" copyToOutputDirectory="Always"><![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.Output" |
|
shortcut = "Control|Alt|T" |
|
class = "${ProjectName}.TestPad"/> |
|
</Path> |
|
</AddIn> |
|
]]></File> |
|
<File name="Resources/MyUserControl.xfrm" buildAction="EmbeddedResource"> |
|
<![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>
|
|
|