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); } }
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; } }
private bool AutoConnectRequired(bool autoLogin) { return(autoLogin && _vpnStatus.Equals(VpnStatus.Disconnected) && !string.IsNullOrEmpty(_appSettings.AutoConnect)); }