22 lines
573 B
C#
22 lines
573 B
C#
|
|
using ITNexusAgent.UI;
|
||
|
|
|
||
|
|
namespace ITNexusAgent;
|
||
|
|
|
||
|
|
// Läuft als User-Prozess (via schtasks), zeigt Consent-Dialog und sendet Antwort via TCP
|
||
|
|
public static class ConsentModeRunner
|
||
|
|
{
|
||
|
|
public static void Run(string portStr)
|
||
|
|
{
|
||
|
|
if (!int.TryParse(portStr, out var port) || port <= 0) return;
|
||
|
|
|
||
|
|
var app = new System.Windows.Application();
|
||
|
|
app.ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose;
|
||
|
|
|
||
|
|
var win = new RdpConsentWindow(port);
|
||
|
|
win.Topmost = true;
|
||
|
|
win.Show();
|
||
|
|
win.Activate();
|
||
|
|
app.Run();
|
||
|
|
}
|
||
|
|
}
|