public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            __InitialLogoutAllBtnFrame = UIButtonLogOutAll.Frame;

            UpdateUI();

            UIButtonTryAgain.AttributedTitle = new NSAttributedString(
                LocalizedStrings.Instance.LocalizedString("Button_TryAgain", "Try again"),
                new NSStringAttributes
            {
                ForegroundColor = NSColor.FromRgb(23, 143, 230),
                Font            = UIUtils.GetSystemFontOfSize(14f),
                ParagraphStyle  = new NSMutableParagraphStyle {
                    Alignment = NSTextAlignment.Center
                }
            });

            // witching light\dark theme
            View.OnApperianceChanged += () =>
            {
                UpdateUI();
            };
        }
        public ServerFastestSelectionButton(bool isSelected) : base()
        {
            const int    constButtonHeight = 61;
            const int    constImgHeight    = 24;
            const string title             = "Fastest server";

            Title = "";

            // flag icon
            var flagView = new NSImageView();

            flagView.Frame = new CGRect(20, (constButtonHeight - constImgHeight) / 2, constImgHeight, constImgHeight);
            flagView.Image = NSImage.ImageNamed("iconAutomaticServerSelection");
            AddSubview(flagView);

            // title
            __Title       = UIUtils.NewLabel(title);
            __Title.Frame = new CGRect(49, flagView.Frame.Y + 3, 200, 18);
            __Title.Font  = UIUtils.GetSystemFontOfSize(14.0f, NSFontWeight.Semibold);
            __Title.SizeToFit();
            AddSubview(__Title);

            // image
            __Image        = new NSImageView();
            __Image.Frame  = new CGRect(__Title.Frame.X + __Title.Frame.Width, flagView.Frame.Y, 25, 25);
            __Image.Image  = NSImage.ImageNamed("iconSelected");
            __Image.Hidden = true;
            AddSubview(__Image);

            IsSelected = isSelected;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Applies the style info button.
        /// </summary>
        public static void ApplyStyleInfoButton(CustomButton button, string title = null, NSImage image = null)
        {
            if (button == null)
            {
                return;
            }

            SetBaseStyle(button, title, image);

            if (title != null)
            {
                button.TitleText = title;
            }

            button.TitleForegroundColor = Colors.BtnAccountExpireFont;
            button.TitleFont            = UIUtils.GetSystemFontOfSize(12f, NSFontWeight.Regular);

            button.CornerRadius = 12;

            button.BackgroundColor = Colors.BtnAccountExpireBackground;
            button.BorderColor     = Colors.BtnAccountExpireBorder;

            button.BorderShadow = new NSShadow
            {
                ShadowOffset = new CGSize(0, 1),
                ShadowColor  = NSColor.FromRgba(0, 0, 0, 0.25f)
            };

            button.IconLocation          = CustomButton.IconLocationEnum.Left_BeforeCenteredText;
            button.HighlitedColorOverlay = NSColor.FromRgba(0, 0, 0, 0.05f);
        }
Ejemplo n.º 4
0
 private void InitializeHopButton(CustomButton btn)
 {
     btn.CornerRadius    = 0;
     btn.BorderLineWidth = 1f;
     btn.BorderColor     = Colors.HopBtnBorderColor;
     btn.TitleFont       = UIUtils.GetSystemFontOfSize(14f, NSFontWeight.Semibold);
     SetDisabledHopButton(btn);
 }
Ejemplo n.º 5
0
        private void Initialize()
        {
            Title = "";
            CellPaddingHorisontally = 15;
            CellPaddingVertically   = 7;

            this.Font = UIUtils.GetSystemFontOfSize(14);
            this.UsesSingleLineMode = true;
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Applies the style grey button.
        /// </summary>
        public static void ApplyStyleGreyButton(CustomButton btn, string title)
        {
            NSColor ButtonBorderColor = NSColor.FromRgb(223, 223, 235);
            NSColor ButtonColor       = NSColor.FromRgb(250, 252, 255);
            NSColor ButtonTextColor   = NSColor.FromRgb(38, 57, 77);

            btn.BorderLineWidth      = 1f;
            btn.BorderColor          = ButtonBorderColor;
            btn.TitleFont            = UIUtils.GetSystemFontOfSize(14f, NSFontWeight.Semibold);
            btn.TitleText            = title;
            btn.BackgroundColor      = ButtonColor;
            btn.TitleForegroundColor = ButtonTextColor;
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Applies the style navigation button.
        /// </summary>
        public static void ApplyStyleNavigationButtonV2(CustomButton button, string title, NSImage image = null)
        {
            if (button == null)
            {
                return;
            }

            SetBaseStyle(button, title, image);

            button.TitleForegroundColor = NSColor.FromRgb(152, 170, 186);
            button.CornerRadius         = 0;
            button.BorderColor          = NSColor.FromRgb(122, 138, 153);
            button.Gradient             = null;

            button.TitleFont = UIUtils.GetSystemFontOfSize(14f, NSFontWeight.Regular);//   Thin);

            button.DoNotChangeColorWhenDisabled = true;
        }
Ejemplo n.º 8
0
        private void Initialize()
        {
            // initialize default values
            CornerRadius = 4;

            GradientAngle = 90;
            ImagePosition = NSCellImagePosition.ImageLeft;

            TitleText            = "Button";
            TitleForegroundColor = NSColor.FromRgb(255, 255, 255);
            TitleFont            = UIUtils.GetSystemFontOfSize(16f, NSFontWeight.Semibold);

            Gradient = new NSGradient(NSColor.FromRgb(58, 156, 217), NSColor.FromRgb(20, 130, 222));

            BorderColor     = NSColor.FromRgb(48, 147, 209);
            BorderLineWidth = 0.5f;

            IconLocation = IconLocationEnum.Right_BeforeCenteredText;
        }
Ejemplo n.º 9
0
        private void UpdateIntroductionApperiance()
        {
            if (Colors.IsDarkMode)
            {
                GuiIntroLogoImage.Image = NSImage.ImageNamed("iconLogoDark");
            }
            else
            {
                GuiIntroLogoImage.Image = NSImage.ImageNamed("iconLogo");
            }

            CustomButtonStyles.ApplyStyleMainButton(GuiIntroBtnWelcomeShowMe, LocalizedStrings.Instance.LocalizedString("Button_Introduction_ShowMe"));
            GuiIntroductionPanelWelcome.BackgroundColor = Colors.IntroductionBackground;
            GuiIntroLabelWelcome.StringValue            = LocalizedStrings.Instance.LocalizedString("Label_IntroWelcome");
            GuiIntroLabelWelcome.TextColor = Colors.IntroductionTextColor;

            CustomButtonStyles.ApplyStyleMainButton(GuiIntroBtnConnect, LocalizedStrings.Instance.LocalizedString("Button_Introduction_Continue"));
            GuiIntroductionPanelConnectBtn.BackgroundColor = Colors.IntroductionBackground;
            GuiIntroLabelConnectTitle.StringValue          = LocalizedStrings.Instance.LocalizedString("Label_IntroConnectTitle");
            GuiIntroLabelConnectText.StringValue           = LocalizedStrings.Instance.LocalizedString("Label_IntroConnectText");
            GuiIntroLabelConnectTitle.TextColor            = Colors.IntroductionTextColor;
            GuiIntroLabelConnectText.TextColor             = Colors.IntroductionTextColor;

            CustomButtonStyles.ApplyStyleMainButton(GuiIntroBtnFirewallContinue, LocalizedStrings.Instance.LocalizedString("Button_Introduction_Continue"));
            GuiIntroBtnFirewallContinue.TitleFont = UIUtils.GetSystemFontOfSize(16f, NSFontWeight.Medium);

            GuiIntroductionPanelFirewall.BackgroundColor = Colors.IntroductionBackground;
            GuiIntroLabelFirewallTitle.StringValue       = LocalizedStrings.Instance.LocalizedString("Label_IntroFirewallTitle");
            GuiIntroLabelFirewallText.StringValue        = LocalizedStrings.Instance.LocalizedString("Label_IntroFirewallText");
            GuiIntroLabelFirewallTitle.TextColor         = Colors.IntroductionTextColor;
            GuiIntroLabelFirewallText.TextColor          = Colors.IntroductionTextColor;

            CustomButtonStyles.ApplyStyleMainButton(GuiIntroBtnServersClose, LocalizedStrings.Instance.LocalizedString("Button_Introduction_Close"));

            GuiIntroductionPanelServers.BackgroundColor = Colors.IntroductionBackground;
            GuiIntroLabelServersTitle.StringValue       = LocalizedStrings.Instance.LocalizedString("Label_IntroServersTitle");
            GuiIntroLabelServersText.StringValue        = LocalizedStrings.Instance.LocalizedString("Label_IntroServersText");
            GuiIntroLabelServersTitle.TextColor         = Colors.IntroductionTextColor;
            GuiIntroLabelServersText.TextColor          = Colors.IntroductionTextColor;
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Applies the style title navigation button.
        /// </summary>
        public static void ApplyStyleTitleNavigationButton(CustomButton button, string title = null, NSImage image = null)
        {
            if (button == null)
            {
                return;
            }

            SetBaseStyle(button, title, image);

            if (title != null)
            {
                button.TitleText = title;
            }

            button.CornerRadius         = 4;
            button.TitleForegroundColor = Colors.HeaderNavigationBtnTextColor;
            button.TitleFont            = UIUtils.GetSystemFontOfSize(12f, NSFontWeight.Medium);

            button.BackgroundColor = Colors.HeaderNavigationBtnColor;
            button.BorderColor     = Colors.HeaderNavigationBtnBorderColor;
            button.IconLocation    = CustomButton.IconLocationEnum.Left_BeforeCenteredText;
        }
Ejemplo n.º 11
0
        public static void ApplyStyleTitleConfigureButtonPressed(CustomButton button, string title = null, NSImage image = null)
        {
            if (button == null)
            {
                return;
            }

            SetBaseStyle(button, title, image);

            if (title != null)
            {
                button.TitleText = title;
            }

            button.CornerRadius = 4;

            button.TitleForegroundColor = NSColor.FromRgb(255, 255, 255);
            button.TitleFont            = UIUtils.GetSystemFontOfSize(12f, NSFontWeight.Thin);

            button.Gradient     = new NSGradient(NSColor.FromRgb(197, 208, 217), NSColor.FromRgb(197, 208, 217));
            button.BorderColor  = NSColor.FromRgb(217, 217, 217);
            button.IconLocation = CustomButton.IconLocationEnum.Left_BeforeCenteredText;
        }
Ejemplo n.º 12
0
        public ServerSelectionButton(ServerLocation serverLocation) : base()
        {
            ServerLocation = serverLocation;

            const int constButtonHeight = 61;
            const int constFlagHeight   = 24;

            Bordered = false;
            Title    = "";
            Frame    = new CGRect(0, 0, 320, constButtonHeight);

            // flag icon
            var flagView = new NSImageView();

            flagView.Frame = new CGRect(20, (constButtonHeight - constFlagHeight) / 2, constFlagHeight, constFlagHeight);
            flagView.Image = GuiHelpers.CountryCodeToImage.GetCountryFlag(serverLocation.CountryCode);
            AddSubview(flagView);

            // server name
            __ServerName       = UIUtils.NewLabel(serverLocation.Name);
            __ServerName.Frame = new CGRect(49, flagView.Frame.Y + 1, 200, 18);
            __ServerName.Font  = UIUtils.GetSystemFontOfSize(14.0f, NSFontWeight.Semibold);
            __ServerName.SizeToFit();
            AddSubview(__ServerName);

            // check if server name is too long
            const int maxXforSelectedIcon    = 218;
            nfloat    serverNameOverlapWidth = (__ServerName.Frame.X + __ServerName.Frame.Width) - maxXforSelectedIcon;

            if (serverNameOverlapWidth > 0)
            {
                CGRect oldFrame = __ServerName.Frame;
                __ServerName.Frame = new CGRect(oldFrame.X, oldFrame.Y, oldFrame.Width - serverNameOverlapWidth, oldFrame.Height);
            }

            // selected server image
            __selectedServerImage        = new NSImageView();
            __selectedServerImage.Frame  = new CGRect(__ServerName.Frame.X + __ServerName.Frame.Width, flagView.Frame.Y - 2, 25, 25);
            __selectedServerImage.Image  = NSImage.ImageNamed("iconSelected");
            __selectedServerImage.Hidden = !ServerLocation.IsSelected;
            AddSubview(__selectedServerImage);

            // ping status image
            __pingStatusImage        = new NSImageView();
            __pingStatusImage.Frame  = new CGRect(238, flagView.Frame.Y, 24, 24);
            __pingStatusImage.Hidden = true;
            AddSubview(__pingStatusImage);
            UpdatePingStatusImage();

            // ping timeout info
            __PingView           = UIUtils.NewLabel(GetPingTimeString(ServerLocation.PingTime));
            __PingView.Alignment = NSTextAlignment.Left;
            __PingView.Font      = UIUtils.GetSystemFontOfSize(12.0f);
            __PingView.Frame     = new CGRect(260, flagView.Frame.Y + 4, 60, 18);
            __PingView.TextColor = NSColor.FromRgb(180, 193, 204);
            if (ServerLocation.PingTime == 0)
            {
                __PingView.Hidden = true;
            }
            __PingView.SizeToFit();
            AddSubview(__PingView);

            // "disabled layer" visible only if button is disabled
            __DisabledLayer       = new ColorView();
            __DisabledLayer.Frame = new CGRect(Frame.X, Frame.Y, Frame.Width, Frame.Height - 1);
            var bgClr = Colors.WindowBackground;

            __DisabledLayer.BackgroundColor = Colors.IsDarkMode ? new CGColor(bgClr.RedComponent, bgClr.GreenComponent, bgClr.BlueComponent, 0.6f) : new CGColor(1.0f, 0.6f);
            __DisabledLayer.Hidden          = true;
            AddSubview(__DisabledLayer);
        }
        private void Initialize()
        {
            _timerHideWnd.Elapsed += OnTimerHideWindowEvent;

            this.Window.OnDoubleClick += () => { OnDoubleClick?.Invoke(); };
            this.Window.OnClick       += () => { OnClick?.Invoke(); };

            Window.IsVisible  = false;
            Window.AlphaValue = 0.9f;

            // set background colors
            Window.BackgroundColor = WindowBackgroundColor;

            FirewallStatusLabel.TextColor = TextStatusColor;
            VPNStatusLabel.TextColor      = TextStatusColor;
            PauseTimeLeftLabel.TextColor  = TextStatusColor;

            FirewallLabel.TextColor = TextLabelColor;
            VPNLabel.TextColor      = TextLabelColor;
            ResumeInLabel.TextColor = TextLabelColor;

            NSImage resumeBtnImage = NSImage.ImageNamed("iconPlayWhite");

            resumeBtnImage.Size = new CoreGraphics.CGSize(9, 12);
            ResumeBtn.Image     = resumeBtnImage;
            ResumeBtn.TitleTextAttributedString = AttributedString.Create(" " + __appServices.LocalizedString("Button_Resume"), NSColor.White, null, UIUtils.GetSystemFontOfSize(12f, NSFontWeight.Semibold));
            ResumeBtn.BackgroundColor           = NSColor.Black;
            ResumeBtn.IconLocation = CustomButton.IconLocationEnum.Right;
            ResumeBtn.CornerRadius = 7;

            // locationg UI elements on right place
            // (some elements are located not on rihght places (in order to easiest view in Xcode designer during developing))
            nfloat offset = FirewallLabel.Frame.Y - ResumeInLabel.Frame.Y;

            CoreGraphics.CGRect oldFrame = Window.Frame;
            Window.SetFrame(new CoreGraphics.CGRect(oldFrame.X, oldFrame.Y + offset, oldFrame.Width, oldFrame.Height - offset), false);

            // update data according to ViewModel (on property changed)
            __viewModel = new FloatingOverlayWindowViewModel(__AppState, __service, __appServices, __MainViewModel);
            __viewModel.PropertyChanged += _viewModel_PropertyChanged;
            __viewModel.Initialize();
            __MainViewModel.PropertyChanged += MainViewModel_PropertyChanged;

            EnsureUIConsistent();
        }
        private void UpdateWiFiInfoGuiData()
        {
            if (!NSThread.IsMain)
            {
                InvokeOnMainThread(() => UpdateWiFiInfoGuiData());
                return;
            }

            try
            {
                UpdateToDoLabelHiddenStatus();

                WifiState state = __MainViewModel.WiFiState;
                if (__MainViewModel.Settings.IsNetworkActionsEnabled == false)
                {
                    GuiWiFiButton.Hidden            = true;
                    GuiNetworkActionPopUpBtn.Hidden = true;
                    return;
                }

                NSFont wifiLabelFont = UIUtils.GetSystemFontOfSize(14, NSFontWeight.Thin);

                if (state == null || string.IsNullOrEmpty(state.Network.SSID))
                {
                    GuiWiFiButton.AttributedTitle = AttributedString.Create(LocalizedStrings.Instance.LocalizedString("Label_NoWiFiConnection"), NSColor.SystemGrayColor, NSTextAlignment.Center, wifiLabelFont);
                    GuiWiFiButton.Image           = null;

                    GuiWiFiButton.Enabled           = false;
                    GuiWiFiButton.Hidden            = false;
                    GuiNetworkActionPopUpBtn.Hidden = true;
                }
                else
                {
                    if (state.ConnectedToInsecureNetwork)
                    {
                        GuiWiFiButton.Image = NSImage.ImageNamed("iconWiFiSmallRed");

                        string networkName = " " + state.Network.SSID + " ";
                        string fullText    = networkName + "(" + LocalizedStrings.Instance.LocalizedString("Label_InsecureWiFiConnection") + ") ";

                        NSMutableAttributedString attrTitle = new NSMutableAttributedString(fullText);

                        NSStringAttributes stringAttributes0 = new NSStringAttributes();
                        stringAttributes0.ForegroundColor = __ToDoDescriptionTextColor;
                        stringAttributes0.Font            = wifiLabelFont;

                        NSStringAttributes stringAttributes1 = new NSStringAttributes();
                        stringAttributes1.ForegroundColor = NSColor.SystemRedColor;
                        stringAttributes1.Font            = wifiLabelFont;

                        attrTitle.AddAttributes(stringAttributes0, new NSRange(0, networkName.Length));
                        attrTitle.AddAttributes(stringAttributes1, new NSRange(networkName.Length, fullText.Length - networkName.Length));
                        attrTitle.SetAlignment(NSTextAlignment.Center, new NSRange(0, fullText.Length));

                        GuiWiFiButton.AttributedTitle = attrTitle;
                    }
                    else
                    {
                        GuiWiFiButton.Image           = NSImage.ImageNamed("iconWiFiSmallBlue");
                        GuiWiFiButton.AttributedTitle = AttributedString.Create(" " + state.Network.SSID, __ToDoDescriptionTextColor, NSTextAlignment.Center, wifiLabelFont);
                    }

                    RecreateNetworkActionsButtonItems();

                    GuiWiFiButton.Enabled           = true;
                    GuiWiFiButton.Hidden            = false;
                    GuiNetworkActionPopUpBtn.Hidden = false;
                }
            }
            catch (Exception ex)
            {
                GuiWiFiButton.Hidden            = true;
                GuiNetworkActionPopUpBtn.Hidden = true;

                Logging.Info($"{ex}");
            }
        }
Ejemplo n.º 15
0
        public override void AwakeFromNib()
        {
            base.AwakeFromNib();

            // Disable title-bar (but keep close/minimize/expand buttons on content-view)
            // IMPORTANT! 'FullSizeContentView' implemented since OS X 10.10 !!!
            Window.TitleVisibility            = NSWindowTitleVisibility.Hidden;
            Window.TitlebarAppearsTransparent = true;
            Window.StyleMask |= NSWindowStyle.FullSizeContentView;

            // Progress indicator
            if (!__SessionStatus.IsActive)
            {
                __DaysLeft = 0;
            }

            // Normally we should show it days left <= 3
            // if '__DaysLeft' > 3 - set max value to __DaysLeft+1
            int maxValue = 3;

            if (__DaysLeft > 3)
            {
                maxValue = __DaysLeft + 1;
            }

            GuiProgressIndicator.MinValue    = 0;
            GuiProgressIndicator.MaxValue    = maxValue;
            GuiProgressIndicator.DoubleValue = maxValue - __DaysLeft;

            string cancelBtnText = LocalizedStrings.Instance.LocalizedString("Button_ContinueTrial");
            string subscriptionBtnText;

            if (__SessionStatus.IsOnFreeTrial)
            {
                subscriptionBtnText = LocalizedStrings.Instance.LocalizedString("Button_GetSubscription");
            }
            else
            {
                subscriptionBtnText = LocalizedStrings.Instance.LocalizedString("Button_RenewSubscription");
            }

            // BUTTON Continue Trial
            GuiButtonCancel.Gradient             = new NSGradient(NSColor.FromRgb(240, 244, 247), NSColor.FromRgb(240, 244, 247));
            GuiButtonCancel.BorderColor          = NSColor.SystemGrayColor;
            GuiButtonCancel.TitleForegroundColor = NSColor.Black;
            GuiButtonCancel.TitleFont            = UIUtils.GetSystemFontOfSize(13f, NSFontWeight.Medium);
            GuiButtonCancel.TitleText            = cancelBtnText;

            // BUTTON Get Subscription
            GuiButtonGoToAccount.Gradient     = new NSGradient(NSColor.FromRgb(128, 187, 249), NSColor.FromRgb(17, 130, 254));
            GuiButtonGoToAccount.BorderShadow = new NSShadow
            {
                ShadowOffset = new CoreGraphics.CGSize(0f, 1f),
                ShadowColor  = NSColor.FromRgba(0, 0, 0, 0.18f)
            };
            GuiButtonGoToAccount.TitleText            = subscriptionBtnText;
            GuiButtonGoToAccount.TitleFont            = UIUtils.GetSystemFontOfSize(13f, NSFontWeight.Medium);
            GuiButtonGoToAccount.TitleForegroundColor = NSColor.White;

            // TITLE
            if (!__SessionStatus.IsActive)
            {
                string title = LocalizedStrings.Instance.LocalizedString("Label_SubscriptionExpired");
                if (__SessionStatus.IsOnFreeTrial)
                {
                    title = LocalizedStrings.Instance.LocalizedString("Label_FreeTrialExpired");
                }

                NSMutableAttributedString attrTitle = new NSMutableAttributedString(title);

                NSStringAttributes stringAttributes0 = new NSStringAttributes();
                stringAttributes0.Font = UIUtils.GetSystemFontOfSize(20f, NSFontWeight.Medium);
                attrTitle.AddAttributes(stringAttributes0, new NSRange(0, title.Length));
                GuiLabelTitleText.AttributedStringValue = attrTitle;

                // DESCRIPTION
                string description = LocalizedStrings.Instance.LocalizedString("Label_AccountDaysLeftDescription_Expired");
                if (__SessionStatus.IsOnFreeTrial)
                {
                    description = LocalizedStrings.Instance.LocalizedString("Label_TrialDaysLeftDescription_Expired");
                }

                description = string.Format(description, __DaysLeft);
                GuiLabelDescriptionText.AttributedStringValue = AttributedString.Create(description, null, NSTextAlignment.Left);
            }
            else
            {
                string title;
                string daysStr = string.Format("{0}", __DaysLeft);
                if (__DaysLeft == 0)
                {
                    title = LocalizedStrings.Instance.LocalizedString("Label_AccountDaysLeftTitle_LastDay_PARAMETRIZED");
                    if (__SessionStatus.IsOnFreeTrial)
                    {
                        title = LocalizedStrings.Instance.LocalizedString("Label_TrialDaysLeftTitle_LastDay_PARAMETRIZED");
                    }
                    daysStr = "";
                }
                else if (__DaysLeft == 1)
                {
                    title = LocalizedStrings.Instance.LocalizedString("Label_AccountDaysLeftTitle_OneDay_PARAMETRIZED");
                    if (__SessionStatus.IsOnFreeTrial)
                    {
                        title = LocalizedStrings.Instance.LocalizedString("Label_TrialDaysLeftTitle_OneDay_PARAMETRIZED");
                    }
                }
                else
                {
                    title = LocalizedStrings.Instance.LocalizedString("Label_AccountDaysLeftTitle_PARAMETRIZED");
                    if (__SessionStatus.IsOnFreeTrial)
                    {
                        title = LocalizedStrings.Instance.LocalizedString("Label_TrialDaysLeftTitle_PARAMETRIZED");
                    }
                }

                int numberSymbolPos = title.LastIndexOf("{0}", StringComparison.Ordinal);
                title = string.Format(title, daysStr);
                NSMutableAttributedString attrTitle = new NSMutableAttributedString(title);

                NSStringAttributes stringAttributes0 = new NSStringAttributes();
                stringAttributes0.Font = UIUtils.GetSystemFontOfSize(20f, NSFontWeight.Medium);

                NSStringAttributes stringAttributes1 = new NSStringAttributes();
                stringAttributes1.ForegroundColor = TitleDaysTextColor;

                attrTitle.AddAttributes(stringAttributes0, new NSRange(0, title.Length));
                attrTitle.AddAttributes(stringAttributes1, new NSRange(numberSymbolPos, title.Length - numberSymbolPos));

                GuiLabelTitleText.AttributedStringValue = attrTitle;

                // DESCRIPTION
                string description;
                if (__DaysLeft == 0)
                {
                    description = LocalizedStrings.Instance.LocalizedString("Label_AccountDaysLeftDescription_LastDay");
                    if (__SessionStatus.IsOnFreeTrial)
                    {
                        description = LocalizedStrings.Instance.LocalizedString("Label_TrialDaysLeftDescription_LastDay");
                    }
                }
                else if (__DaysLeft == 1)
                {
                    description = LocalizedStrings.Instance.LocalizedString("Label_AccountDaysLeftDescription_OneDay");
                    if (__SessionStatus.IsOnFreeTrial)
                    {
                        description = LocalizedStrings.Instance.LocalizedString("Label_TrialDaysLeftDescription_OneDay");
                    }
                }
                else
                {
                    description = LocalizedStrings.Instance.LocalizedString("Label_AccountDaysLeftDescription_PARAMETRIZED");
                    if (__SessionStatus.IsOnFreeTrial)
                    {
                        description = LocalizedStrings.Instance.LocalizedString("Label_TrialDaysLeftDescription_PARAMETRIZED");
                    }
                }

                description = string.Format(description, __DaysLeft);
                GuiLabelDescriptionText.AttributedStringValue = AttributedString.Create(description, null, NSTextAlignment.Left);
            }
        }