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

namespace StarTrinity.CentralProxyService
{
	public partial class CentralProxyService : ServiceBase
	{
		public CentralProxyService()
		{
			InitializeComponent();
		}

		CentralProxyMainService centralProxiesPool;
		protected override void OnStart(string[] args)
		{
			centralProxiesPool = new CentralProxyMainService();
		}

		protected override void OnStop()
		{
			centralProxiesPool.Dispose();
		}
	}



	[System.ComponentModel.RunInstallerAttribute(true)]
	public class Installer : System.Configuration.Install.Installer
	{
		private ServiceProcessInstaller SPI;
		private ServiceInstaller SI;
		public Installer()
		{
			SPI = new ServiceProcessInstaller();
			SPI.Account = ServiceAccount.LocalSystem;
			SI = new ServiceInstaller();
			SI.ServiceName = "StarTrinity Proxy Server";
			Installers.AddRange(new System.Configuration.Install.Installer[] { SPI, SI });
		}
	}
}
