Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
        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();
        }
Ejemplo n.º 4
0
        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();
        }