Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified dist/ap.exe
Binary file not shown.
16 changes: 14 additions & 2 deletions source/AutopilotManager.Client/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class Program
private static bool _quietMode = false;
private static bool _noWait = false;
private static bool _skipHardwareHashUpload = false;
private static bool _autoCountdownEnabled = false;
private static bool _rebootEnabled = false;
private const string _updateXmlUri = "https://github.com/okieselbach/Autopilot-Manager-Client/raw/master/dist/update.xml";
private static string _version = string.Empty;
private static string _newVersion = string.Empty;
Expand Down Expand Up @@ -227,7 +229,7 @@ static async Task Main(string[] args)
var urlNoSelfService = new Url($"{_backendUrl}/Home/NoSelfService");
var qrCodeNoSelfServiceImage = QrCodeUtil.GenerateQrCode(urlNoSelfService.ToString());

var form = new QrCodeForm(qrCodeImage, qrCodeNoSelfServiceImage, _systemInformation, _backendClient, _backendUrl, _preCheckErrorMessage, _endpointsValidationResult, _skipHardwareHashUpload);
var form = new QrCodeForm(qrCodeImage, qrCodeNoSelfServiceImage, _systemInformation, _backendClient, _backendUrl, _preCheckErrorMessage, _endpointsValidationResult, _skipHardwareHashUpload, _autoCountdownEnabled, _rebootEnabled);
form.DisplayData(_quietMode, _noWait);

if (form.DialogResult == DialogResult.Retry)
Expand Down Expand Up @@ -324,9 +326,17 @@ private static string ParseCommandlineArgs(string[] args)
_skipHardwareHashUpload = true;
_logger.WriteDebug($"No Hardware Hash upload");
break;
case "a":
_autoCountdownEnabled = true;
_logger.WriteDebug($"Auto-countdown timer enabled");
break;
case "r":
_rebootEnabled = true;
_logger.WriteDebug($"Reboot after countdown enabled");
break;
case "?":
case "h":
_logger.WriteInfo($"2024 by Oliver Kieselbach (oliverkieselbach.com)");
_logger.WriteInfo($"2025 by Oliver Kieselbach (oliverkieselbach.com)");
_logger.WriteInfo("");
_logger.WriteInfo($"USAGE: {Assembly.GetExecutingAssembly().GetName().Name} <URL> [options...]");
_logger.WriteInfo("");
Expand All @@ -343,6 +353,8 @@ private static string ParseCommandlineArgs(string[] args)
_logger.WriteInfo($" deletion requests are only processed with enabled approval mode");
_logger.WriteInfo($"-g skip client version check on startup");
_logger.WriteInfo($"-u skip hardware hash harvesting and upload");
_logger.WriteInfo($"-a, --auto, /a, /auto enable auto-countdown timer (15 seconds)");
_logger.WriteInfo($"-r, --reboot, /r, /reboot enable reboot after countdown (combine with -a)");
Environment.Exit(0);
break;
default:
Expand Down
18 changes: 18 additions & 0 deletions source/AutopilotManager.Client/QrCodeForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading