public override void OnActivated(string invokedArgs, NotificationUserInput userInput, string appUserModelId) { Log.Information("Activator activated with {Args}", invokedArgs); // Clear all toasts try { DesktopNotificationManagerCompat.History.Clear(); } catch (Exception) { // Ignore errors (when notification service is not available) } switch (invokedArgs) { case UpdateAllAction: Choco.UpdateAllPackages(); Environment.Exit(0); break; case UpdateAction: default: App.ShowUpdateDialog(); break; } }
private void UpdateAllPackages(object _) { // Disable button _updating = true; CommandManager.InvalidateRequerySuggested(); Choco.UpdateAllPackages(); // End app Environment.Exit(0); }