private void setCurrentClientTheme()
        {
            btnSaveAccount.BackgroundColor = IosHelper.FromHexString(GeneralSettings.ButtonBackgroundColor);
            btnSaveAccount.SetTitleColor(IosHelper.FromHexString(GeneralSettings.ButtonTextColor), UIControlState.Normal);
            this.Title = Lang.ACCOUNT_MY_ACCOUNT;
            try
            {
                if (Joyces.GeneralSettings.MainFont != null)
                {
                    lblEditAccountFirstName.Font = ThemeHelperIOS.GetThemeFont(17);
                    lblEditAccountLastName.Font  = ThemeHelperIOS.GetThemeFont(17);
                    lblEditAccountMobile.Font    = ThemeHelperIOS.GetThemeFont(17);
                    txtFirstname.Font            = ThemeHelperIOS.GetThemeFont(17);
                    txtMobileNo.Font             = ThemeHelperIOS.GetThemeFont(17);
                    txtLastname.Font             = ThemeHelperIOS.GetThemeFont(17);
                    btnSaveAccount.Font          = ThemeHelperIOS.GetThemeFont(17);
                }
                lblEditAccountFirstName.Text = Lang.EDIT_ACCOUNT_FIRSTNAME;
                lblEditAccountLastName.Text  = Lang.EDIT_ACCOUNT_LASTNAME;
                lblEditAccountMobile.Text    = Lang.ACCOUNT_MOBILE;

                btnSaveAccount.SetTitle(Lang.SAVE, UIControlState.Normal);
                setTitleTheme();
            }
            catch (Exception e)
            {
            }
            try
            {
                this.View.BackgroundColor = ColorExtensions.ToUIColor(GeneralSettings.BackgroundColor); // Color.FromHex("#00FF00").ToUIColor();
            }
            catch (Exception eee)
            {
            }
        }
        private void setCurrentClientTheme()
        {
            //btnCreateAccount.BackgroundColor = IosHelper.FromHexString(GeneralSettings.ButtonBackgroundColor);
            //btnCreateAccount.SetTitleColor(IosHelper.FromHexString(GeneralSettings.ButtonTextColor), UIControlState.Normal);

            this.Title = Lang.ID_HEADER;
            try
            {
                //var d = txtEmail;
                //d.set
                lblIdScanDescription.Text           = Lang.ID_DESCRIPTION;
                lblIdLowerDescription.Text          = Lang.ID_DESCRIPTION_NEWS;
                lblQRCodeBackground.BackgroundColor = IosHelper.FromHexString(GeneralSettings.BackgroundColorSpecific);
                if (Joyces.GeneralSettings.MainFont != null)
                {
                    lblIdScanDescription.Font  = ThemeHelperIOS.GetThemeFont(17);
                    lblIdLowerDescription.Font = ThemeHelperIOS.GetThemeFont(14);
                }
                //try
                //{
                //    this.View.BackgroundColor = ColorExtensions.ToUIColor(GeneralSettings.BackgroundColor); // Color.FromHex("#00FF00").ToUIColor();
                //}
                //catch (Exception eee)
                //{

                //}
                setTitleTheme();
            }
            catch (Exception e)
            {
            }
        }
        private void setCurrentClientTheme()
        {
            btnCreateAccount.BackgroundColor = IosHelper.FromHexString(GeneralSettings.ButtonBackgroundColor);
            btnCreateAccount.SetTitleColor(IosHelper.FromHexString(GeneralSettings.ButtonTextColor), UIControlState.Normal);

            this.Title = Lang.CREATE_ACCOUNT;
            try
            {
                //var d = txtEmail;
                //d.set
                if (Joyces.GeneralSettings.MainFont != null)
                {
                    txtEmail.Font       = ThemeHelperIOS.GetThemeFont(17);
                    txtMobileNo.Font    = ThemeHelperIOS.GetThemeFont(17);
                    txtPwd1.Font        = ThemeHelperIOS.GetThemeFont(17);
                    txtPwd2.Font        = ThemeHelperIOS.GetThemeFont(17);
                    txtPersNr.Font      = ThemeHelperIOS.GetThemeFont(17);
                    txtCountryCode.Font = ThemeHelperIOS.GetThemeFont(17);
                    lblTerms.Font       = ThemeHelperIOS.GetThemeFont(17);
                    lblTermsText.Font   = ThemeHelperIOS.GetThemeFont(14);
                    lblTermsAccept.Font = ThemeHelperIOS.GetThemeFont(14);
                }
                lblTerms.Text     = Lang.CREATE_ACCOUNT_TERMS_HEADER;
                lblTermsText.Text = Lang.CREATE_ACCOUNT_TERMS;
                // lblTermsText.TextAlignment = UITextAlignment.Left;
                lblTermsText.SizeToFit();
                lblTermsAccept.Text  = Lang.CREATE_ACCOUNT_ACCEPT_TERMS;
                txtEmail.Placeholder = Lang.EMAIL;
                if (btnCreateAccount != null)
                {
                    try
                    {
                        btnCreateAccount.SetTitle(Lang.CREATE_ACCOUNT, UIControlState.Normal);
                        btnCreateAccount.Font = ThemeHelperIOS.GetThemeFont(17);
                    }catch (Exception ee)
                    {
                    }
                }
                try
                {
                    this.View.BackgroundColor = ColorExtensions.ToUIColor(GeneralSettings.BackgroundColor); // Color.FromHex("#00FF00").ToUIColor();
                }
                catch (Exception eee)
                {
                }
                string s = this.NavigationItem.Title;
                var    x = this.NavigationItem.BackBarButtonItem;
                setTitleTheme();
                //  UIBarButtonItem buttonBack = new UIBarButtonItem("text", UIBarButtonItemStyle.Plain, (sender, args) => { });
                //  buttonBack.TintColor = UIColor.Red;
                //  buttonBack.
                //  this.NavigationItem.SetLeftBarButtonItem()

                //this.NavigationItem.SetLeftBarButtonItem(new UIBarButtonItem("text", UIBarButtonItemStyle.Plain, (sender, args) => { }), true);
            }
            catch (Exception e)
            {
            }
        }
        private void setTitleTheme()
        {
            try
            {
                //TITLE FONT
                UIStringAttributes ats = new UIStringAttributes();
                ats.Font = ThemeHelperIOS.GetThemeFont(17); //UIFont.FromName("Copperplate", 24); //ThemeHelperIOS.GetThemeFont(17);
                // ats.ForegroundColor = UIColor.Purple;
                this.NavigationController.NavigationBar.TitleTextAttributes = ats;
                //BACK BUTTON COLOR
                //this.NavigationController.NavigationBar.TintColor = IosHelper.FromHexString(GeneralSettings.ButtonTextColor);// UIColor.Magenta;


                //this.NavigationController.NavigationBar
                //UITextAttributes myTextAttrib = new UITextAttributes();
                //myTextAttrib.Font = UIFont.FromName("Copperplate", 24);
                //myTextAttrib.TextColor = UIColor.FromRGB(202, 185, 131);
                //var attr = UINavigationBar.Appearance.GetTitleTextAttributes();

                //UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes()
                // {
                //     TextColor = UIColor.White,
                //     TextShadowColor = UIColor.Clear
                // });

                //this.NavigationController.NavigationBar.TitleTextAttributes = myTextAttrib;
                //myNavController.NavigationBar.SetTitleTextAttributes(myTextAttrib);

                //HEADER BACKGROUND COLOR
                this.NavigationController.NavigationBar.BarTintColor = IosHelper.FromHexString(GeneralSettings.BackgroundColor);// UIColor.Yellow;

                // UITextAttributes icoFontAttribute = new UITextAttributes();

                // icoFontAttribute.Font = ThemeHelperIOS.GetThemeFont(17);// UIFont.FromName("icomoon", 24);
                // //icoFontAttribute.TextColor = UIColor.Red;
                // var btnMap = new UIBarButtonItem("text", UIBarButtonItemStyle.Bordered, (sender, args) => { }); //new UIBarButtonItem();
                //// btnMap.SetBackButtonBackgroundImage(UIImage.FromFile("Images/iconbackarrow.png"), new UIControlState(), new UIBarMetrics());
                // btnMap.SetBackgroundImage(UIImage.FromFile("Images/iconbackarrow.png"), new UIControlState(), new UIBarMetrics());
                // // new UIBarButtonItem ("xe620", UIBarButtonItemStyle.Done, null);
                // btnMap.SetTitleTextAttributes(icoFontAttribute, UIControlState.Application);
                // btnMap.Title = "Login";
                // btnMap.Style = UIBarButtonItemStyle.Done;
                // btnMap.TintColor = UIColor.Red;
                // this.NavigationItem.SetLeftBarButtonItem(btnMap, true);
                // var par = this.ParentViewController;
                //UIView v = new UIView()
                //v.TintColor = UIColor.Purple;

                //this.NavigationItem.TitleView = v;
            }
            catch (Exception e)
            {
            }
        }
 async override public void ViewWillAppear(bool animated)
 {
     try
     {
         base.ViewWillAppear(animated);
         NavigationItem.RightBarButtonItem.TintColor = IosHelper.FromHexString(GeneralSettings.TabBarTint);
         setCurrentClientTheme();
     }
     catch (Exception ex)
     {
     }
 }
        private void setTitleTheme()
        {
            try
            {
                //TITLE FONT
                UIStringAttributes ats = new UIStringAttributes();
                ats.Font = ThemeHelperIOS.GetThemeFont(17); //UIFont.FromName("Copperplate", 24); //ThemeHelperIOS.GetThemeFont(17);
                // ats.ForegroundColor = UIColor.Purple;
                this.NavigationController.NavigationBar.TitleTextAttributes = ats;

                this.NavigationController.NavigationBar.BarTintColor = IosHelper.FromHexString(GeneralSettings.BackgroundColor);// UIColor.Yellow;
            }
            catch (Exception e)
            {
            }
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            // Perform any additional setup after loading the view, typically from a nib.

            //var tbViewControllers = new List<UIViewController>(TabBarController.ViewControllers);
            //tbViewControllers.Insert(2, new RemvoedViewController());
            //TabBarController.ViewControllers = tbViewControllers.ToArray();

            UITabBar.Appearance.SelectedImageTintColor = IosHelper.FromHexString(GeneralSettings.TabBarTint);
            UITabBar.Appearance.TintColor = IosHelper.FromHexString(GeneralSettings.TabBarTint);
            try
            {
                this.View.BackgroundColor = ColorExtensions.ToUIColor(GeneralSettings.BackgroundColor); // Color.FromHex("#00FF00").ToUIColor();
            }
            catch (Exception eee)
            {
            }
        }
        /// <summary>
        ///
        /// </summary>
        private void setCurrentClientTheme()
        {
            btnResetPassword.BackgroundColor = IosHelper.FromHexString(GeneralSettings.ButtonBackgroundColor);
            btnResetPassword.SetTitleColor(IosHelper.FromHexString(GeneralSettings.ButtonTextColor), UIControlState.Normal);

            this.Title = Lang.FORGOT_PASSWORD;
            try
            {
                if (Joyces.GeneralSettings.MainFont != null)
                {
                    txtForgotEmail.Font = ThemeHelperIOS.GetThemeFont(17);
                }
                txtForgotEmail.Placeholder = Lang.EMAIL;
                btnResetPassword.SetTitle(Lang.RESET_PASSWORD, UIControlState.Normal);
                setTitleTheme();
            }
            catch (Exception e)
            {
            }
        }
Ejemplo n.º 9
0
        private void setCurrentClientTheme()
        {
            btnLogout.BackgroundColor = IosHelper.FromHexString(GeneralSettings.ButtonBackgroundColor);
            btnLogout.SetTitleColor(IosHelper.FromHexString(GeneralSettings.ButtonTextColor), UIControlState.Normal);
            this.Title = Lang.ACCOUNT_MY_ACCOUNT;
            try
            {
                if (Joyces.GeneralSettings.MainFont != null)
                {
                    lblAccountHeader.Font = ThemeHelperIOS.GetThemeFont(17);
                    lblAccountEmail.Font  = ThemeHelperIOS.GetThemeFont(17);
                    lblAccountMobile.Font = ThemeHelperIOS.GetThemeFont(17);
                    lblAccountName.Font   = ThemeHelperIOS.GetThemeFont(17);
                    txtEmail.Font         = ThemeHelperIOS.GetThemeFont(17);
                    txtMobileNo.Font      = ThemeHelperIOS.GetThemeFont(17);
                    txtName.Font          = ThemeHelperIOS.GetThemeFont(17);
                    btnLogout.Font        = ThemeHelperIOS.GetThemeFont(17);
                }
                lblAccountHeader.Text = Lang.ACCOUNT_PERSONAL_DETAILS;
                lblAccountEmail.Text  = Lang.EMAIL;
                lblAccountMobile.Text = Lang.ACCOUNT_MOBILE;
                lblAccountName.Text   = Lang.ACCOUNT_NAME;

                btnLogout.SetTitle(Lang.LOGOUT, UIControlState.Normal);
                setTitleTheme();
            }
            catch (Exception e)
            {
            }
            try
            {
                this.View.BackgroundColor = ColorExtensions.ToUIColor(GeneralSettings.BackgroundColor); // Color.FromHex("#00FF00").ToUIColor();
            }
            catch (Exception eee)
            {
            }
        }
        private void setCurrentClientTheme()
        {
            imageLogo.Image = UIImage.FromBundle(GeneralSettings.LogoLogin);

            UIColor backgroundColor = IosHelper.FromHexString(GeneralSettings.BackgroundColorSpecific);

            mainView.BackgroundColor          = backgroundColor;
            btnForgotPassword.BackgroundColor = IosHelper.FromHexString(GeneralSettings.ButtonBackgroundColor); //backgroundColor;
            btnForgotPassword.SetTitleColor(IosHelper.FromHexString(GeneralSettings.ButtonTextColor), UIControlState.Normal);

            btnLogin.BackgroundColor = IosHelper.FromHexString(GeneralSettings.ButtonBackgroundColor);
            btnLogin.SetTitleColor(IosHelper.FromHexString(GeneralSettings.ButtonTextColor), UIControlState.Normal);

            btnRegister.BackgroundColor = IosHelper.FromHexString(GeneralSettings.ButtonBackgroundColor);
            btnRegister.SetTitleColor(IosHelper.FromHexString(GeneralSettings.ButtonTextColor), UIControlState.Normal);
            try
            {
                if (Joyces.GeneralSettings.MainFont != null)
                {
                    btnRegister.Font       = ThemeHelperIOS.GetThemeFont(17);
                    btnLogin.Font          = ThemeHelperIOS.GetThemeFont(17);
                    btnForgotPassword.Font = ThemeHelperIOS.GetThemeFont(17);
                    lblLoginPassword.Font  = ThemeHelperIOS.GetThemeFont(17);
                    lblUsername.Font       = ThemeHelperIOS.GetThemeFont(17);
                    txtName.Font           = ThemeHelperIOS.GetThemeFont(17);
                    txtPassword.Font       = ThemeHelperIOS.GetThemeFont(17);
                }
                btnRegister.SetTitle(Lang.CREATE_ACCOUNT, UIControlState.Normal);
                btnLogin.SetTitle(Lang.LOGIN, UIControlState.Normal);
                btnForgotPassword.SetTitle(Lang.FORGOT_PASSWORD, UIControlState.Normal);
                lblLoginPassword.Text = Lang.PASSWORD;
                lblUsername.Text      = Lang.EMAIL;
            }
            catch (Exception eee)
            {
            }
        }