private static bool HandleSquirrel(string[] args) { if (args.Any(a => a.StartsWith("--squirrel"))) { log.Info("Squirrel handling started..."); log.Info("Received events: " + string.Join(',', args.Where(a => a.StartsWith("--squirrel")))); if (args.Any(a => a == "--squirrel-firstrun")) { log.Info("First run, doing nothing"); return(false); } if (args.Any(a => a == "--squirrel-uninstall") && ExplorerIntegrationHandler.IsEnabled()) { log.Info("Trying to disable ExplorerIntegration"); try { ExplorerIntegrationHandler.Disable(); } catch (Exception e) { log.Error("Error while disabling ExplorerIntegration", e); } } log.Info("Exiting after handling Squirrel"); return(true); } return(false); }
private async void SettingsTabCtrl_TabIndexChangedAsync(object sender, EventArgs e) { if (SettingsTabCtrl.SelectedIndex == 3) { TwoFaCheckbox.CheckedChanged -= TwoFaCheckbox_CheckedChangedAsync; //account tab -> load settings TwoFaCheckbox.Checked = await clientManager.GetHasTwoFaEnabled(); //settings loaded enable buttons TwoFaCheckbox.Enabled = true; TwoFaCheckbox.CheckedChanged += TwoFaCheckbox_CheckedChangedAsync; } else { //hide the qrcode and lable picture_qr.Visible = false; scanLable.Visible = false; } if (SettingsTabCtrl.SelectedIndex == 2) { ExplorerIntegrationBox.Checked = ExplorerIntegrationHandler.IsEnabled(); autostartCheckbox.Checked = AutostartHandler.IsEnabled(); } }