Exemple #1
0
        protected override void ShowTooltipAction()
        {
            ShowTooltip = !ShowTooltip;
            if (ShowTooltip)
            {
                _pinFactory.HideSecureCorePins();
                _pinFactory.HideExitPins();
                ShowTooltip = true;
                _pinLineManager.HideExitLines();
                _pinLineManager.HideHomeLines();
                _pinLineManager.SetSecureCoreLinesVisibility(false);
                _pinLineManager.SetExitLinesVisibility(CountryCode, true);
                _pinLineManager.SetSecureCoreHomeLineVisibility(CountryCode, true);
            }
            else
            {
                if (!Connected)
                {
                    if (_vpnStatus.Equals(VpnStatus.Disconnected))
                    {
                        _pinLineManager.SetSecureCoreLinesVisibility(true);
                    }
                    _pinLineManager.SetSecureCoreHomeLineVisibility(CountryCode, false);
                }

                _pinFactory.HideExitNodeTooltip(this);
                _pinLineManager.SetExitLinesVisibility(CountryCode, false);
            }
        }
Exemple #2
0
        public void SetSecureCoreLinesVisibility(bool show)
        {
            if (_vpnStatus.Equals(VpnStatus.Connected) && show)
            {
                return;
            }

            var lines = GetSecureCoreLines().OfType <SecureCoreLine>();

            foreach (var line in lines)
            {
                line.Visible = show;
            }
        }
Exemple #3
0
 private bool AutoConnectRequired(bool autoLogin)
 {
     return(autoLogin && _vpnStatus.Equals(VpnStatus.Disconnected) && !string.IsNullOrEmpty(_appSettings.AutoConnect));
 }