34 lines
871 B
C#
34 lines
871 B
C#
using EasyPipes;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using System.ServiceProcess;
|
|
|
|
namespace SoraV2Utils_Agent
|
|
{
|
|
internal class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
new ServiceIPC();
|
|
Server server = new Server("SoraV2UtilsNotifcation");
|
|
server.RegisterService<IToastNotification>(new NotificationSender());
|
|
server.Start();
|
|
|
|
var serviceMonitor = new ServiceMonitor("SoraV2Utils_Service");
|
|
serviceMonitor.ServiceStopped += (sender, e) =>
|
|
{
|
|
server.Stop();
|
|
System.Environment.Exit(1);
|
|
};;
|
|
|
|
var trayicon = new TrayIcon();
|
|
trayicon.Display();
|
|
}
|
|
}
|
|
}
|