public ToolBarPostsStylesHolderIOS(ThemeParser <T> themeParser)
 {
     MoreButtonTheme  = themeParser.GetThemeByName <IImageButtonTheme>(_moreButtonTheme);
     TitleTheme       = themeParser.GetThemeByName <ITextViewTheme>(_titleTheme);
     ToolbarViewTheme = themeParser.GetThemeByName <IViewTheme>(_viewTheme);
     CreatePostButton = themeParser.GetThemeByName <ITextViewTheme>(_createPostTheme);
 }
Esempio n. 2
0
 public void SetCountryTextViewTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _countryLabel.SetTheme(theme);
     });
 }
Esempio n. 3
0
 public void SetPhoneTextViewTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _phoneLabel.SetTheme(theme);
     });
 }
Esempio n. 4
0
 public void SetNameTheme(ITextViewTheme theme)
 {
     Application.SynchronizationContext.Post(_ =>
     {
         _holder.NameTitleTextView.SetTheme(theme);
     }, null);
 }
Esempio n. 5
0
 public void SetHeaderLabelTheme(ITextViewTheme themeName)
 {
     (Context as Activity)?.RunOnUiThread(() =>
     {
         _holder.TitleTextView.SetTheme(themeName);
     });
 }
Esempio n. 6
0
        public void SetTitleTheme(ITextViewTheme theme)
        {
            var strAttr = new UIStringAttributes();

            strAttr.ForegroundColor            = (UIColor)theme.TextColor;
            _navigationBar.TitleTextAttributes = strAttr;
        }
Esempio n. 7
0
 public void SetFirstLastNameTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _nameLabel.SetTheme(theme);
     });
 }
Esempio n. 8
0
 public void SetSocialNetworkLabelTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         //_socialNetworksLabel.SetTheme(themeName);
     });
 }
Esempio n. 9
0
 public void SetNoAccountLabelTheme(ITextViewTheme theme)
 {
     (Context as Activity)?.RunOnUiThread(() =>
     {
         _holder.NoAccountTextView.SetTheme(theme);
     });
 }
Esempio n. 10
0
 public void SetPasswordLabelTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _passwordLabel.SetTheme(theme);
     });
 }
Esempio n. 11
0
 public void SetNoAccountLabelTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _noAccountLabel.SetTheme(theme);
     });
 }
Esempio n. 12
0
        public void SetCreatePostTheme(ITextViewTheme theme)
        {
            var strAttr = new UITextAttributes();

            strAttr.TextColor = (UIColor)theme.TextColor;
            _createPostButton.SetTitleTextAttributes(strAttr, UIControlState.Normal);
        }
Esempio n. 13
0
        public static void SetTheme(this UILabel label, ITextViewTheme mainTheme, string mainText, ITextViewTheme attrTheme, string attrText, int position)
        {
            SetTheme(label, mainTheme);

            var firstAttributes = new UIStringAttributes();

            if (mainTheme.TextColor != null)
            {
                firstAttributes.ForegroundColor = (UIColor)mainTheme.TextColor;
            }

            if (mainTheme.TextSize > 0)
            {
                firstAttributes.Font = FontStyleFromEnum(mainTheme.TextStyle, (int)mainTheme.TextSize);
            }

            var secondAttributes = new UIStringAttributes
            {
                Font            = FontStyleFromEnum(attrTheme.TextStyle, (int)attrTheme.TextSize),
                ForegroundColor = (UIColor)attrTheme.TextColor,
                UnderlineStyle  = NSUnderlineStyle.Single //_nativeTheme.UnderlineStyles[linkFontStyle]
            };

            var prettyString = new NSMutableAttributedString(mainText.Insert(position, attrText));

            prettyString.SetAttributes(firstAttributes.Dictionary, new NSRange(0, position - 1));
            prettyString.SetAttributes(firstAttributes.Dictionary, new NSRange(position + attrText.Length - 1, prettyString.Length - position - attrText.Length));
            prettyString.SetAttributes(secondAttributes.Dictionary, new NSRange(position, attrText.Length));

            label.AttributedText = prettyString;
        }
Esempio n. 14
0
        public void SetEnableCell(int index, IViewTheme viewTheme, ITextViewTheme labelTheme)
        {
            var indexPath = NSIndexPath.FromRowSection(index, 0);
            var cell      = (ToolViewCell)_toolsCollectionView.CellAt(indexPath);

            cell?.SetThemes(viewTheme, labelTheme);
        }
Esempio n. 15
0
 public void SetCurrentPriceTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _currentPriceValueLabel.SetTheme(theme);
     });
 }
 public void SetFeatureTextTheme(ITextViewTheme themeName)
 {
     InvokeOnMainThread(() =>
     {
         _featureText.SetTheme(themeName);
     });
 }
Esempio n. 17
0
 public void SetDiffValueTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _profitValueLabel.SetTheme(theme);
     });
 }
Esempio n. 18
0
 public void SetSkypeTextViewTheme(ITextViewTheme theme)
 {
     (Context as Activity)?.RunOnUiThread(() =>
     {
         _holder.SkypeTextView.SetTheme(theme);
     });
 }
Esempio n. 19
0
 public void SetDateTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _dateLabel.SetTheme(theme);
     });
 }
Esempio n. 20
0
 public void SetHeaderLabelTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _forgotPassHeaderLabel.SetTheme(theme);
     });
 }
Esempio n. 21
0
 public void SetContent(string content, string readMore, ITextViewTheme mainTheme, ITextViewTheme attrTheme, int position)
 {
     Application.SynchronizationContext.Post(_ =>
     {
         _holder.ContentTextView.SetTheme(mainTheme, content, attrTheme, readMore, position);
     }, null);
 }
 public ProfileCellStylesHolderIOS(ThemeParser <T> themeParser)
 {
     CellBackgroundTheme   = themeParser.GetThemeByName <IViewTheme>(_cellBackgroundTheme);
     AvatarImageViewTheme  = themeParser.GetThemeByName <IImageViewTheme>(_avatarImageViewTheme);
     NameLabelTheme        = themeParser.GetThemeByName <ITextViewTheme>(_nameLabelTheme);
     YourProfileLabelTheme = themeParser.GetThemeByName <ITextViewTheme>(_yourProfileLabelTheme);
 }
Esempio n. 23
0
 public void SetProfileLabelTheme(ITextViewTheme theme)
 {
     Application.SynchronizationContext.Post(_ =>
     {
         _holder.ProfileLabelTextView.SetTheme(theme);
     }, null);
 }
Esempio n. 24
0
 public void SetTextTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _optionLabel.SetTheme(theme);
     });
 }
Esempio n. 25
0
 public void SetFeatureTextTheme(ITextViewTheme themeName)
 {
     (Context as Activity)?.RunOnUiThread(() =>
     {
         _holder.FeatureTextView.SetTheme(themeName);
     });
 }
Esempio n. 26
0
 public void SetBuySellValueTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _buySellValueLabel.SetTheme(theme);
     });
 }
Esempio n. 27
0
 public void SetEmailTextViewTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _emailLabel.SetTheme(theme);
     });
 }
Esempio n. 28
0
 public void SetForecastTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _forecastTimeValueLabel.SetTheme(theme);
     });
 }
Esempio n. 29
0
 public void SetSkypeTextViewTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _skypeLabel.SetTheme(theme);
     });
 }
Esempio n. 30
0
 public void SetDiffValueTheme(ITextViewTheme theme)
 {
     Application.SynchronizationContext.Post(_ =>
     {
         _holder.DifferenceValueTextView.SetTheme(theme);
     }, null);
 }