📄 service.cs
字号:
/*
* Easy Messaging Gateway (SMS/MMS/Mail) - Easy to use SMS/MMS Messaging Gateway
* to develop Content Delivery Platforms by GSM Operators,Content Providers
* and even non-telecom guys.
*
* Uses file system for data flow. Protocol level is based on Easy SMPP and Easy MM7 projects.
*
* Written for .NET 2.0 in C#
* Copyright (C) 2006 Balan Andrei, http://balan.name
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.gnu.org/licenses/lgpl.html
*
* For further information visit:
* http://easymessaging.sf.net/
*
*
* "Support Open Source software. What about a donation today?"
*
*
* File Name: Service.cs
*
* File Authors:
* Balan Name, http://balan.name
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.ServiceProcess;
using System.Text;
using EasySMPP;
namespace EasyMessaging.SmsGateway
{
public partial class Service : ServiceBase
{
private SmsDispatcher smsDispatcher;
private InboxWatcher inboxWatcher;
public Service()
{
smsDispatcher = new SmsDispatcher();
inboxWatcher = new InboxWatcher(smsDispatcher);
InitializeComponent();
}
public void Start()
{
OnStart(new string[0]);
}
public new void Stop()
{
OnStop();
}
protected override void OnStart(string[] args)
{
smsDispatcher.Start();
inboxWatcher.Start();
}
protected override void OnStop()
{
inboxWatcher.Stop();
smsDispatcher.Stop();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -