Пример #1
0
        private void InitComponent()
        {
            try
            {
                RegularTxt = Typeface.CreateFromAsset(Assets, "fonts/SF-UI-Display-Regular.ttf");

                //declare layouts and editText
                MEditTextEmail    = (EditText)FindViewById(Resource.Id.editTxtEmail);
                MEditTextPassword = (EditText)FindViewById(Resource.Id.editTxtPassword);

                MButtonViewSignIn         = (Button)FindViewById(Resource.Id.SignInButton); // Login
                ContinueButton            = FindViewById <Button>(Resource.Id.ContinueButton);
                ContinueButton.Visibility = ViewStates.Invisible;

                ProgressBar                  = FindViewById <ProgressBar>(Resource.Id.progressBar);
                ProgressBar.Visibility       = ViewStates.Gone;
                MButtonViewSignIn.Visibility = ViewStates.Visible;

                MEditTextEmail.SetTypeface(RegularTxt, TypefaceStyle.Normal);
                MEditTextPassword.SetTypeface(RegularTxt, TypefaceStyle.Normal);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #2
0
        //protected override void AttachBaseContext(Context @base)
        //{
        //    try
        //    {
        //        base.AttachBaseContext(@base);
        //        if (AppSettings.Lang != "")
        //            LangController.SetApplicationLang(@base, AppSettings.Lang);
        //        else
        //        {
        //            UserDetails.LangName = Resources.Configuration.Locale.DisplayLanguage.ToLower();
        //            LangController.SetAppLanguage(@base);
        //        }
        //    }
        //    catch (Exception e)
        //    {
        //        Console.WriteLine(e);
        //    }
        //}

        #endregion

        #region Functions

        private void InitComponent()
        {
            try
            {
                RegularTxt = Typeface.CreateFromAsset(Assets, "fonts/SF-UI-Display-Regular.ttf");
                //SemiboldTxt = Typeface.CreateFromAsset(Assets, "fonts/SF-UI-Display-Semibold.ttf");

                //declare layouts and editText
                MEditTextEmail    = (EditText)FindViewById(Resource.Id.editTxtEmail);
                MEditTextPassword = (EditText)FindViewById(Resource.Id.editTxtPassword);

                MTextViewSignUp   = (TextView)FindViewById(Resource.Id.tvSignUp);     // Register
                MButtonViewSignIn = (Button)FindViewById(Resource.Id.SignInButton);   // Login

                MTextViewForgotPwd = (TextView)FindViewById(Resource.Id.tvForgotPwd); // Forget password

                LayoutCreateAccount    = (LinearLayout)FindViewById(Resource.Id.layout_create_account);
                MTextViewCreateAccount = (TextView)FindViewById(Resource.Id.tvCreateAccount);

                ProgressBar                  = FindViewById <ProgressBar>(Resource.Id.progressBar);
                ProgressBar.Visibility       = ViewStates.Gone;
                MButtonViewSignIn.Visibility = ViewStates.Visible;

                MTextViewCreateAccount.SetTypeface(RegularTxt, TypefaceStyle.Normal);
                MTextViewForgotPwd.SetTypeface(RegularTxt, TypefaceStyle.Normal);
                MTextViewSignUp.SetTypeface(RegularTxt, TypefaceStyle.Normal);
                MEditTextEmail.SetTypeface(RegularTxt, TypefaceStyle.Normal);
                MEditTextPassword.SetTypeface(RegularTxt, TypefaceStyle.Normal);

                if (!AppSettings.EnableRegisterSystem)
                {
                    LayoutCreateAccount.Visibility = ViewStates.Gone;
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }