SoraV2Utils/SoraV2Utils_Agent/Program.cs
2025-01-13 22:46:33 +01:00

36 lines
954 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();
UpdateCheck.CheckUpdate(); //Check for Updates based on Git Releases
var serviceMonitor = new ServiceMonitor("SoraV2Utils_Service");
serviceMonitor.ServiceStopped += (sender, e) =>
{
server.Stop();
System.Environment.Exit(1);
}; ;
var trayicon = new TrayIcon();
trayicon.Display();
}
}
}