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

📄 service.xpt

📁 SharpDevelop2.0.0 c#开发免费工具
💻 XPT
字号:
<?xml version="1.0"?>
<Template originator   = "Mike Krueger"
          created      = "02/01/2003"
          lastModified = "14/01/2006">
	
	<!-- Template Header -->
	<TemplateConfiguration>
		<Name>${res:Templates.Project.WindowsService.Name}</Name>
		<Category>C#</Category>
		<Subcategory>${res:Templates.File.Categories.WindowsApplications}</Subcategory>
		<Icon>C#.Project.ServiceProject</Icon>
		<LanguageName>C#</LanguageName>
		<Description>${res:Templates.Project.WindowsService.Description}</Description>
	</TemplateConfiguration>
	
	<!-- Actions -->
	<Actions>
		<Open filename = "${ProjectName}.cs"/>
	</Actions>

	<!-- Template Content -->
	<Combine name = "${ProjectName}" directory = ".">
		<Options>
			<StartupProject>${ProjectName}</StartupProject>
		</Options>
		
		<Project name = "${ProjectName}" directory = ".">
			<Options />

			<ProjectItems>
				<Reference Include="System" />
				<Reference Include="System.Data" />
				<Reference Include="System.ServiceProcess" />
				<Reference Include="System.Xml" />
			</ProjectItems>

			<Files>
				<File name="${ProjectName}.cs"><![CDATA[${StandardHeader.C#}

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;
using System.Text;

namespace ${StandardNamespace}
{
	public class ${ProjectName} : ServiceBase
	{
		public ${ProjectName}()
		{
			InitializeComponent();
		}
		
		private void InitializeComponent()
		{
			this.ServiceName = "${ProjectName}";
		}
		
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose(bool disposing)
		{
			// TODO: Add cleanup code here (if required)
			base.Dispose(disposing);
		}
		
		/// <summary>
		/// Start this service.
		/// </summary>
		protected override void OnStart(string[] args)
		{
			// TODO: Add start code here (if required) to start your service.
		}
		
		/// <summary>
		/// Stop this service.
		/// </summary>
		protected override void OnStop()
		{
			// TODO: Add tear-down code here (if required) to stop your service.
		}
	}
}
]]></File>
				<File name="Program.cs"><![CDATA[${StandardHeader.C#}

using System;
using System.Collections.Generic;
using System.ServiceProcess;
using System.Text;

namespace ${ProjectName}
{
	static class Program
	{
		/// <summary>
		/// This method starts the service.
		/// </summary>
		static void Main()
		{
			// To run more than one service you have to add them here
			ServiceBase.Run(new ServiceBase[] { new ${ProjectName}() });
		}
	}
}
]]></File>
				<File name="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("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[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 + -