private void SafeModeBlock() { if (SystemInformation.BootMode != BootMode.Normal) { ShowMessage("F4E Filtering Sysetm", "You have 1 minute to exit safe mode"); time--; if (time <= 0) { BootController.DoExitWin(BootController.EWX_REBOOT); } } }
protected override void OnStop() { base.OnStop(); if (serviceStatus == "Running") { if (shutdownOnStop) { ShowMessage("F4E Filtering Sysetm", "The system recognized that the service was unexpectedly shut down. PC REBOOT"); BootController.DoExitWin(BootController.EWX_REBOOT); } } timer.Stop(); timer.Enabled = false; }
private void PreventClosing() { if (!IsProcessOpen()) { if (processAlreadyDetected) { ShowMessage("F4E Filtering Sysetm", "The system recognized that the main process was unexpectedly shut down. PC REBOOT"); BootController.DoExitWin(BootController.EWX_REBOOT); } } else { processAlreadyDetected = true; } }