Beginn des Servers

This commit is contained in:
BlubbFish 2010-07-10 18:28:46 +00:00
parent ec84451b4d
commit 60fcd47aa2
3 changed files with 9 additions and 6 deletions

View File

@ -4,6 +4,8 @@ using System.Linq;
using System.ServiceProcess; using System.ServiceProcess;
using System.Text; using System.Text;
using MailServer.Services;
namespace MailServer namespace MailServer
{ {
static class Program static class Program
@ -22,7 +24,7 @@ namespace MailServer
ServiceBase[] ServicesToRun; ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[] ServicesToRun = new ServiceBase[]
{ {
new IMAP_s() new IMAP_Service()
}; };
ServiceBase.Run(ServicesToRun); ServiceBase.Run(ServicesToRun);
/* /*

View File

@ -1,8 +1,8 @@
using MailServer.IMAP.Server; using MailServer.IMAP.Server;
namespace MailServer namespace MailServer.Services
{ {
partial class IMAP_s partial class IMAP_Service
{ {
/// <summary> /// <summary>
/// Erforderliche Designervariable. /// Erforderliche Designervariable.

View File

@ -9,13 +9,13 @@ using System.Text;
using MailServer.IMAP.Server; using MailServer.IMAP.Server;
namespace MailServer namespace MailServer.Services
{ {
public partial class IMAP_s : ServiceBase public partial class IMAP_Service : ServiceBase
{ {
private IMAP_Server server; private IMAP_Server server;
public IMAP_s() public IMAP_Service()
{ {
InitializeComponent(); InitializeComponent();
putEvents(); putEvents();
@ -55,6 +55,7 @@ namespace MailServer
protected override void OnStop() protected override void OnStop()
{ {
this.server.StopServer();
} }
} }
} }