SoraV2Utils/SoraV2Utils_Agent/Program.cs
krjan02 fdf4bd22eb
All checks were successful
Build and Relase / build-release (push) Successful in 1m38s
Build and Relase / create-release (push) Successful in 25s
Version 1.0.1 (Dynamic Icon, Update Checker, Wired Support)
2025-01-13 23:25:36 +01:00

36 lines
958 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 TrayIconForm();
trayicon.Display();
}
}
}