Sheas-Cealer/Proces/BrowserProc.cs
2024-12-18 20:12:08 +08:00

23 lines
568 B
C#

using System;
using System.Windows;
using Sheas_Core;
namespace Sheas_Cealer.Proces;
internal class BrowserProc : Proc
{
private readonly bool ShutDownAppOnProcessExit;
internal BrowserProc(string browserPath, bool shutDownAppOnProcessExit) : base(browserPath)
{
ShutDownAppOnProcessExit = shutDownAppOnProcessExit;
Process_Exited(null!, null!);
}
public override void Process_Exited(object sender, EventArgs e)
{
if (ShutDownAppOnProcessExit)
Application.Current.Dispatcher.InvokeShutdown();
}
}