コード例 #1
0
        /// <summary>
        /// Установка темной темы.
        /// </summary>
        private void SetDarkThem()
        {
            t1.SetTextColor(Color.White);
            t2.SetTextColor(Color.White);
            t3.SetTextColor(Color.White);
            edtLogin.SetTextColor(Color.White);
            edtPass.SetTextColor(Color.White);
            try
            {
                ((TextView)spinPass.GetChildAt(0)).SetTextColor(Color.White);
            }
            catch
            {
            }

            l.SetBackgroundColor(Color.Rgb(53, 55, 61));
            tb.SetBackgroundColor(Color.Rgb(19, 32, 97));
            btnShowPass.SetBackgroundColor(Color.Rgb(19, 32, 97));
        }
コード例 #2
0
        private void Spin_language_ItemSelected(object sender, AdapterView.ItemSelectedEventArgs e)
        {
            Spinner spinner      = (Spinner)sender;
            string  selectedItem = spinner.GetItemAtPosition(e.Position).ToString();

            if (!selectedItem.Equals(mSharedPreferencesManager.GetString(ConstantsDroid.APP_LANG_PREFERENCE, "")))
            {
                mSharedPreferencesManager.PutString(ConstantsDroid.APP_LANG_PREFERENCE, selectedItem);

                HelpMe.SetLocale(selectedItem, mActivity);
                ((TextView)spinner.GetChildAt(0)).SetTextColor(Color.White);

                StartActivity(typeof(LoginActivity));
                OverridePendingTransition(Resource.Animation.animation_enter,
                                          Resource.Animation.animation_leave);
                Finish();
            }
        }
コード例 #3
0
        private bool ValidateViews()
        {
            var validacao = true;

            if (txtCodigoNF.Length() == 0 || txtCodigoNF.Length() < 44 || txtCodigoNF.Length() > 44)
            {
                validacao         = false;
                txtCodigoNF.Error = "Código inválido! O código de barras deve ter 44 caracteres!";
            }

            if (spinnerOcorrencia.SelectedItemPosition == 0)
            {
                ((TextView)spinnerOcorrencia.GetChildAt(0)).Error = ("Por favor, selecione a ocorrência");
                validacao = false;
                Toast.MakeText(this, "Por favor, selecione a ocorrência", ToastLength.Short).Show();
            }

            //TODO: TERMINAR VALIDAÇÕES - validar o díg. verificador da NFe

            return(validacao);
        }