mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
singleton
This commit is contained in:
+10
-3
@@ -5,9 +5,16 @@ using System.IO;
|
|||||||
|
|
||||||
namespace VRCX
|
namespace VRCX
|
||||||
{
|
{
|
||||||
public static class CefService
|
public class CefService
|
||||||
{
|
{
|
||||||
public static void Init()
|
public static CefService Instance { get; private set; }
|
||||||
|
|
||||||
|
static CefService()
|
||||||
|
{
|
||||||
|
Instance = new CefService();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void Init()
|
||||||
{
|
{
|
||||||
var cefSettings = new CefSettings
|
var cefSettings = new CefSettings
|
||||||
{
|
{
|
||||||
@@ -52,7 +59,7 @@ namespace VRCX
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Exit()
|
internal void Exit()
|
||||||
{
|
{
|
||||||
Cef.Shutdown();
|
Cef.Shutdown();
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -44,11 +44,11 @@ namespace VRCX
|
|||||||
WebApi.Instance.Init();
|
WebApi.Instance.Init();
|
||||||
LogWatcher.Instance.Init();
|
LogWatcher.Instance.Init();
|
||||||
|
|
||||||
CefService.Init();
|
CefService.Instance.Init();
|
||||||
VRCXVR.Init();
|
VRCXVR.Init();
|
||||||
Application.Run(new MainForm());
|
Application.Run(new MainForm());
|
||||||
VRCXVR.Exit();
|
VRCXVR.Exit();
|
||||||
CefService.Exit();
|
CefService.Instance.Exit();
|
||||||
|
|
||||||
LogWatcher.Instance.Exit();
|
LogWatcher.Instance.Exit();
|
||||||
WebApi.Instance.Exit();
|
WebApi.Instance.Exit();
|
||||||
|
|||||||
Reference in New Issue
Block a user