⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sharpdevelopaddin.xpt

📁 SharpDevelop2.0.0 c#开发免费工具
💻 XPT
字号:
<?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>SharpDevelop</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}"
       url         = ""
       description = "TODO: Put description here">
	
	<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[${StandardHeader.C#}

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[${StandardHeader.C#}

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("")]
[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>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -