private bool TryConnectToSecureCoreFromNonSecureCoreMode(bool secureCore) { if (!secureCore || _appSettings.SecureCore) { return(false); } var result = _dialogs.ShowQuestion(StringResources.Get("Servers_msg_EnableSecureCoreConfirm")); if (result.HasValue && result.Value) { _appSettings.SecureCore = true; return(false); } return(true); }
public void RequestExit() { if (_vpnStatus != VpnStatus.Disconnected && _vpnStatus != VpnStatus.Disconnecting) { var result = _dialogs.ShowQuestion(Translation.Get("App_msg_ExitConnectedConfirm")); if (result == false) { return; } } PendingExit = true; Application.Current.Shutdown(); }
protected override void OnClosing(CancelEventArgs e) { e.Cancel = true; if (_networkBlocked) { var result = _dialogs.ShowQuestion(StringResources.Get("Login_msg_ExitKillSwitchConfirm")); if (!result.HasValue || !result.Value) { return; } } base.OnClosing(e); Application.Current.Shutdown(); }
public void RequestExit() { if (_vpnStatus != VpnStatus.Disconnected && _vpnStatus != VpnStatus.Disconnecting) { var result = _dialogs.ShowQuestion(StringResources.Get("App_msg_ExitConnectedConfirm")); if (result == false) { return; } } PendingExit = true; _vpnService.Stop(); _appUpdateService.Stop(); _trayIcon.Hide(); Application.Current.Shutdown(); }