#develop (short for SharpDevelop) is a free IDE for .NET programming languages.
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.
 
 
 
 
 
 

141 lines
3.3 KiB

<?xml version="1.0"?>
<Template originator = "Mike Krueger"
created = "02/01/2003"
lastModified = "07/20/2005">
<!-- Template Header -->
<TemplateConfiguration>
<Name>${res:Templates.Project.WindowsService.Name}</Name>
<Category>C#</Category>
<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>