Sheas-Cealer/Proces/BrowserProc.cs
2025-06-05 09:27:48 +08:00

18 lines
523 B
C#

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