Esempio n. 1
0
 public Numero(Numero n)
 {
     n0 = n.n0;
     n1 = n.n1;
     n2 = n.n2;
     n3 = n.n3;
 }
Esempio n. 2
0
        public static bool EsValido(string numero, out Numero numer)
        {
            numer = null;
            int num;
            var esValido = !string.IsNullOrEmpty(numero) && numero.Length == 4 && int.TryParse(numero, out num);
            if (esValido)
            {
                var n0 = numero[0];
                var n1 = numero[1];
                var n2 = numero[2];
                var n3 = numero[3];

                esValido &= n0 != n1 && n0 != n2 && n0 != n3 && n1 != n2 && n1 != n3 && n2 != n3;
                numer = new Numero(int.Parse(n0.ToString()), int.Parse(n1.ToString()), int.Parse(n2.ToString()),
                                   int.Parse(n3.ToString()));
            }

            return esValido;
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            Numero n1 = new Numero(5);

            Numero n2 = new Numero(4);

            if (n1 == n2)
            {
                Console.WriteLine("son iguales");
            }

            if (n1 != n2)
            {
                Console.WriteLine("son distintos");
            }

            if (n1 == 5)
            {
                Console.WriteLine("son iguales");
            }

            if (n1 != 8)
            {
                Console.WriteLine("son distintos");
            }

            Numero res = n1 + n2;

            Console.WriteLine("suma = {0}", res.valor);

            res = n1 - n2;

            Console.WriteLine("resta = {0}", res.valor);

            Console.ReadLine();
        }
Esempio n. 4
0
    public static double Operar(Numero num1, Numero num2, string operador)
    {
        double tot = 0;

        switch (ValidarOperador(Convert.ToChar(operador)))
        {
        case "+":
            tot = num1 + num2;
            break;

        case "-":
            tot = num1 - num2;
            break;

        case "*":
            tot = num1 * num2;
            break;

        case "/":
            tot = num1 / num2;
            break;
        }
        return(tot);
    }
        /// <summary>
        /// Inicia la conversion de un valor binario a decimal
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnConvertirADecimal_Click(object sender, EventArgs e)
        {
            string valor = label1.Text, resultado;

            if (valor == "")
            {
                resultado = Numero.BinarioDecimal(textBox1.Text);
            }
            else
            {
                resultado = Numero.BinarioDecimal(label1.Text);
            }


            if (resultado == "Valor invalido")
            {
                label1.Text = "";
                label2.Text = resultado;
            }
            else
            {
                label1.Text = resultado;
            }
        }
        public Numero OperadorBinario(char elOperador, Numero elPrimerNumero, Numero elSegundoNumero, Numero Resultado)
        {
            Numero elResultado = null;

            switch (elOperador)
            {
            case '+': var accionSuma = new Acciones.Suma();
                elResultado = accionSuma.Operar(elPrimerNumero, elSegundoNumero, Resultado);
                break;

            case '-': var accionResta = new Acciones.Resta();
                elResultado = accionResta.OperarResta(elPrimerNumero, elSegundoNumero, Resultado);
                break;

            case '*': var accionMultiplicacion = new Acciones.Multiplicacion();
                elResultado = accionMultiplicacion.OperarMultiplicacion(elPrimerNumero, elSegundoNumero, Resultado);
                break;

            case '/': var accionDivision = new Acciones.Division();
                elResultado = accionDivision.OperarDivision(elPrimerNumero, elSegundoNumero, Resultado);
                break;
            }
            return(elResultado);
        }
        private void btnBinario_Click(object sender, EventArgs e)
        {
            Numero num = new Numero(this.lblResultado.Text);

            lblResultado.Text = num.DecimalBinario(this.lblResultado.Text);
        }
Esempio n. 8
0
 protected override int GetHashCodeCore()
 {
     return(Numero.GetHashCode());
 }
Esempio n. 9
0
        private void BtnConvDec_Click(object sender, EventArgs e)
        {
            Numero num = new Numero(this.Lbl.Text);

            this.Lbl.Text = num.DecimalBinario(num.GetNumero);
        }
Esempio n. 10
0
        private void btnConvertirADecimal_Click(object sender, EventArgs e)
        {
            Numero resultado = new Numero();

            lblResultado.Text = Numero.BinaroDecimal(lblResultado.Text);
        }
Esempio n. 11
0
 private void FormCalculadora_Load(object sender, EventArgs e)
 {
     n1 = new Numero();
     n2 = new Numero();
     this.lblResultado.Text = "0";
 }
Esempio n. 12
0
 private void btnConvertirABinario_Click(object sender, EventArgs e)
 {
     lblResultado.Text = Numero.DecimalBinario(lblResultado.Text);
 }
Esempio n. 13
0
 public override int GetHashCode()
 {
     return(-1449941195 + Numero.GetHashCode());
 }
 public Numero(int valor, Numero pai)
 {
     this.Valor = valor;
     this.Pai = pai;
 }
 public void Salvar(ConsumidorDTO dto)
 {
     if (!String.IsNullOrWhiteSpace(dto.Nome))
     {
         Nome.Limpar().PreencherCampo(dto.Nome);
     }
     if (dto.Sexo > 0)
     {
         Sexo.Find(el => el.ObterValor() == dto.Sexo.ToString()).Clicar();
     }
     if (!String.IsNullOrWhiteSpace(dto.NomeSocial))
     {
         NomeSocial.PreencherCampo(dto.NomeSocial);
     }
     if (!String.IsNullOrWhiteSpace(dto.DataNascimento))
     {
         DataNascimento.PreencherCampo(dto.DataNascimento);
     }
     if (!String.IsNullOrWhiteSpace(dto.CPF))
     {
         CPF.PreencherCampo(dto.CPF);
     }
     if (!String.IsNullOrWhiteSpace(dto.RG))
     {
         RG.PreencherCampo(dto.RG);
     }
     if (!String.IsNullOrWhiteSpace(dto.OrgaoEmissorUF))
     {
         OrgaoEmissorUF.SelecionarItemDropDown(dto.OrgaoEmissorUF);
     }
     if (!String.IsNullOrWhiteSpace(dto.OrgaoEmissor))
     {
         OrgaoEmissor.PreencherCampo(dto.OrgaoEmissor);
     }
     if (dto.TemDeficiencia)
     {
         ChkDeficiencia.PreencherCampo(1);
         if (!String.IsNullOrWhiteSpace(dto.IdTipoDeficiencia))
         {
             IdTipoDeficiencia.PreencherCampo(dto.IdTipoDeficiencia);
         }
         if (!String.IsNullOrWhiteSpace(dto.OutroTipoDeficiencia))
         {
             OutroTipoDeficiencia.PreencherCampo(dto.OutroTipoDeficiencia);
         }
     }
     if (!String.IsNullOrWhiteSpace(dto.CEP))
     {
         CEP.PreencherCampo(dto.CEP);
         Complemento.ClicarEAguardar(tempoEspera);
     }
     if (!String.IsNullOrWhiteSpace(dto.Logradouro))
     {
         Logradouro.PreencherCampo(dto.Logradouro);
     }
     if (!String.IsNullOrWhiteSpace(dto.Numero))
     {
         Numero.PreencherCampo(dto.Numero);
     }
     if (!String.IsNullOrWhiteSpace(dto.Cidade))
     {
         Cidade.PreencherCampo(dto.Cidade);
     }
     if (!String.IsNullOrWhiteSpace(dto.Estado))
     {
         Estado.PreencherCampo(dto.Estado);
     }
     if (!String.IsNullOrWhiteSpace(dto.Telefone))
     {
         Telefone.PreencherCampo(dto.Telefone);
     }
     if (!String.IsNullOrWhiteSpace(dto.Celular))
     {
         Celular.PreencherCampo(dto.Celular);
     }
     if (!String.IsNullOrWhiteSpace(dto.Preferencias_TipoNotificacao))
     {
         Preferencias_TipoNotificacao.PreencherCampo(dto.Preferencias_TipoNotificacao);
     }
     CapturarTela();
     BtnSalvar.Clicar();
 }
 /// <summary>
 /// Convierte el resultado decimal a binario. Solo la parte entera y positiva.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDecimalABinario_Click(object sender, EventArgs e)
 {
     this.lblResultado.Text          = Numero.DecimalBinario(this.lblResultado.Text);
     this.btnDecimalABinario.Enabled = false;
     this.btnBinarioADecimal.Enabled = true;
 }
Esempio n. 17
0
 public NumeroAdivinado(Numero n, int bien, int regular)
     : base(n)
 {
     Bien = bien;
     Regular = regular;
 }
        public static string ToExtenso(this float v)
        {
            Numero numero = new Numero( (decimal) v);

            return numero.ToString();
        }
        public static string ToExtenso(this decimal v)
        {
            Numero numero = new Numero(v);

            return numero.ToString();
        }
Esempio n. 20
0
        public string ToNFCeIni()
        {
            var vendaIni = new ACBrIniFile();

            // InfNFe
            vendaIni["infNFe"]["versao"] = "4.0";

            //Identificação
            vendaIni["Identificacao"]["natOp"]      = "Venda de Mercadoria";
            vendaIni["Identificacao"]["indPag"]     = "0";
            vendaIni["Identificacao"]["mod"]        = "65";
            vendaIni["Identificacao"]["serie"]      = Serie.ToString();
            vendaIni["Identificacao"]["nNF"]        = Numero.ToString();
            vendaIni["Identificacao"]["dEmi"]       = Data.ToString("dd/MM/yyyy HH:mm:ss");
            vendaIni["Identificacao"]["tpNF"]       = "1";
            vendaIni["Identificacao"]["Finalidade"] = "0";
            vendaIni["Identificacao"]["idDest"]     = "1";
            vendaIni["Identificacao"]["indFinal"]   = "1";
            vendaIni["Identificacao"]["indPres"]    = "1";
            vendaIni["Identificacao"]["tpimp"]      = "4";
            vendaIni["Identificacao"]["tpAmb"]      = "2";

            //Emitente
            vendaIni["Emitente"]["CRT"]         = ((int)Configuracao.Instance.Emitente.CRT).ToString();
            vendaIni["Emitente"]["CNPJ"]        = Configuracao.Instance.Emitente.CNPJ.OnlyNumbers();
            vendaIni["Emitente"]["IE"]          = Configuracao.Instance.Emitente.IE.OnlyNumbers();
            vendaIni["Emitente"]["Razao"]       = Configuracao.Instance.Emitente.Razao;
            vendaIni["Emitente"]["Fantasia"]    = Configuracao.Instance.Emitente.Fantasia;
            vendaIni["Emitente"]["Fone"]        = Configuracao.Instance.Emitente.Fone;
            vendaIni["Emitente"]["CEP"]         = Configuracao.Instance.Emitente.CEP;
            vendaIni["Emitente"]["Logradouro"]  = Configuracao.Instance.Emitente.Logradouro;
            vendaIni["Emitente"]["Numero"]      = Configuracao.Instance.Emitente.Numero;
            vendaIni["Emitente"]["Complemento"] = Configuracao.Instance.Emitente.Complemento;
            vendaIni["Emitente"]["Bairro"]      = Configuracao.Instance.Emitente.Bairro;
            vendaIni["Emitente"]["CidadeCod"]   = Configuracao.Instance.Emitente.CidadeCod;
            vendaIni["Emitente"]["Cidade"]      = Configuracao.Instance.Emitente.Cidade;
            vendaIni["Emitente"]["UF"]          = Configuracao.Instance.Emitente.UF;

            //Destinatario
            vendaIni["Destinatario"]["indIEDest"] = "9";
            if (!string.IsNullOrEmpty(Cliente.Documento))
            {
                vendaIni["Destinatario"]["CNPJCPF"] = Cliente.Documento;
            }
            if (!string.IsNullOrEmpty(Cliente.Nome))
            {
                vendaIni["Destinatario"]["xNome"] = Cliente.Nome;
            }

            for (var i = 0; i < Items.Count; i++)
            {
                var item = Items[i];
                if (item.Cancelado)
                {
                    continue;
                }
                var sessaoProduto = $"Produto{i + 1:000}";
                var sessaoICMS    = $"ICMS{i + 1:000}";
                var sessaoPIS     = $"PIS{i + 1:000}";
                var sessaoCOFINS  = $"COFINS{i + 1:000}";
                var sessaoIPI     = $"IPI{i + 1:000}";

                vendaIni[sessaoProduto]["CFOP"]          = "5.102";
                vendaIni[sessaoProduto]["Codigo"]        = item.Produto.Codigo;
                vendaIni[sessaoProduto]["cEAN"]          = "SEM GTIN";
                vendaIni[sessaoProduto]["Descricao"]     = item.Produto.Descricao;
                vendaIni[sessaoProduto]["NCM"]           = "84719012";
                vendaIni[sessaoProduto]["Unidade"]       = item.Produto.Unidade;
                vendaIni[sessaoProduto]["Quantidade"]    = item.Quantidade.ToString("N4");
                vendaIni[sessaoProduto]["ValorUnitario"] = item.Produto.Valor.ToString("N10");
                vendaIni[sessaoProduto]["ValorTotal"]    = item.ValorTotal.ToString("N2");
                vendaIni[sessaoProduto]["ValorDesconto"] = "0,00";
                vendaIni[sessaoProduto]["vFrete"]        = "0,00";
                vendaIni[sessaoProduto]["vSeg"]          = "0,00";
                vendaIni[sessaoProduto]["vOutro"]        = "0,00";
                vendaIni[sessaoProduto]["indEscala"]     = "N";
                vendaIni[sessaoProduto]["CNPJFab"]       = "05481336000137";
                vendaIni[sessaoProduto]["uTrib"]         = item.Produto.Unidade;
                vendaIni[sessaoProduto]["cEANTrib"]      = "SEM GTIN";

                vendaIni[sessaoICMS]["CSOSN"]             = "900";
                vendaIni[sessaoICMS]["Origem"]            = "0";
                vendaIni[sessaoICMS]["ValorBase"]         = "100";
                vendaIni[sessaoICMS]["Aliquota"]          = "10";
                vendaIni[sessaoICMS]["Valor"]             = "10";
                vendaIni[sessaoICMS]["pCredSN"]           = "0,00";
                vendaIni[sessaoICMS]["vCredICMSSN"]       = "0,00";
                vendaIni[sessaoICMS]["ModalidadeST"]      = "4";
                vendaIni[sessaoICMS]["ValorBaseST"]       = "0,00";
                vendaIni[sessaoICMS]["AliquotaST"]        = "0,00";
                vendaIni[sessaoICMS]["ValorST"]           = "0,00";
                vendaIni[sessaoICMS]["PercentualReducao"] = "0,00";
                vendaIni[sessaoICMS]["vBCFCP"]            = "0";
                vendaIni[sessaoICMS]["pFCP"] = "0";
                vendaIni[sessaoICMS]["vFCP"] = "0";

                vendaIni[sessaoPIS]["CST"]       = "01";
                vendaIni[sessaoPIS]["ValorBase"] = "0,00";
                vendaIni[sessaoPIS]["Aliquota"]  = "0,00";
                vendaIni[sessaoPIS]["Valor"]     = "0,00";

                vendaIni[sessaoCOFINS]["CST"]       = "01";
                vendaIni[sessaoCOFINS]["ValorBase"] = "0,00";
                vendaIni[sessaoCOFINS]["Aliquota"]  = "0,00";
                vendaIni[sessaoCOFINS]["Valor"]     = "0,00";

                vendaIni[sessaoIPI]["CST"]       = "53";
                vendaIni[sessaoIPI]["ValorBase"] = "0,00";
                vendaIni[sessaoIPI]["Aliquota"]  = "0,00";
                vendaIni[sessaoIPI]["Valor"]     = "0,00";
            }

            vendaIni["Total"]["BaseICMS"]              = (100 * Items.Count).ToString("N2");
            vendaIni["Total"]["ValorICMS"]             = (10 * Items.Count).ToString("N2");
            vendaIni["Total"]["vICMSDeson"]            = "0,00";
            vendaIni["Total"]["BaseICMSSubstituicao"]  = "0,00";
            vendaIni["Total"]["ValorICMSSubstituicao"] = "0,00";
            vendaIni["Total"]["ValorProduto"]          = Items.Sum(x => x.ValorTotal).RoundABNT().ToString("N2");
            vendaIni["Total"]["ValorFrete"]            = "0,00";
            vendaIni["Total"]["ValorSeguro"]           = "0,00";
            vendaIni["Total"]["ValorDesconto"]         = "0,00";
            vendaIni["Total"]["ValorIPI"]              = "0,00";
            vendaIni["Total"]["ValorPIS"]              = "0,00";
            vendaIni["Total"]["ValorCOFINS"]           = "0,00";
            vendaIni["Total"]["ValorOutrasDespesas"]   = "0,00";
            vendaIni["Total"]["ValorNota"]             = Items.Sum(x => x.ValorTotal).RoundABNT().ToString("N2");
            vendaIni["Total"]["vFCP"] = "0";

            vendaIni["DadosAdicionais"]["Complemento"] = "";

            vendaIni["Transportador"]["modFrete"] = "9";

            for (var i = 0; i < Pagamentos.Count; i++)
            {
                var item            = Pagamentos[i];
                var sessaoPagamento = $"pag{i + 1:000}";

                vendaIni[sessaoPagamento]["tPag"] = item.TipoNFe.ToString("00");
                vendaIni[sessaoPagamento]["vPag"] = item.Valor.ToString("N2");
                if (i == 0 && Troco > 0)
                {
                    vendaIni[sessaoPagamento]["vTroco"] = Troco.ToString("N2");
                }
            }

            return(vendaIni.ToString());
        }
Esempio n. 21
0
        /// <summary>
        /// Establece pasaje de Decimal a Binario
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button1_Click(object sender, EventArgs e)
        {
            string num = TxtResult.Text;

            this.TxtResult.Text = Numero.DecimalBinario(num);
        }
Esempio n. 22
0
        private void btnConvertirABinario_Click(object sender, EventArgs e)
        {
            Numero resultado = new Numero();

            lblResultado.Text = Numero.DecimalBinario(Convert.ToDouble(lblResultado.Text));
        }
Esempio n. 23
0
        /// <summary>
        /// Establece pasaje de Binario a Decimal
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button2_Click(object sender, EventArgs e)
        {
            string bin = TxtResult.Text;

            this.TxtResult.Text = Numero.BinarioDecimal(bin);
        }
Esempio n. 24
0
        public virtual void Validar()
        {
            int[] multiplicador1 = new int[12] {
                5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2
            };
            int[] multiplicador2 = new int[13] {
                6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2
            };
            int    soma;
            int    resto;
            string digito;
            string tempCnpj;

            if (Numero.Length != 14)
            {
                throw new ExcecaoCNPJNaoPossuiQuatorzeNumeros();
            }

            if (Numero == "00000000000000" || Numero == "11111111111111" ||
                Numero == "22222222222222" || Numero == "33333333333333" ||
                Numero == "44444444444444" || Numero == "55555555555555" ||
                Numero == "66666666666666" || Numero == "77777777777777" ||
                Numero == "88888888888888" || Numero == "99999999999999")
            {
                throw new ExcecaoNumeroCNPJInvalido();
            }

            tempCnpj = Numero.Substring(0, 12);
            soma     = 0;
            for (int i = 0; i < 12; i++)
            {
                soma += int.Parse(tempCnpj[i].ToString()) * multiplicador1[i];
            }
            resto = (soma % 11);
            if (resto < 2)
            {
                resto = 0;
            }
            else
            {
                resto = 11 - resto;
            }
            digito   = resto.ToString();
            tempCnpj = tempCnpj + digito;
            soma     = 0;
            for (int i = 0; i < 13; i++)
            {
                soma += int.Parse(tempCnpj[i].ToString()) * multiplicador2[i];
            }
            resto = (soma % 11);
            if (resto < 2)
            {
                resto = 0;
            }
            else
            {
                resto = 11 - resto;
            }
            digito = digito + resto.ToString();

            if (Numero.EndsWith(digito) == false)
            {
                throw new ExcecaoNumeroCNPJInvalido();
            }
        }
Esempio n. 25
0
        /// <summary>
        /// Llama al medtodo que convierte n numero Decimal a Binario.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ConvertirAbinario_Click(object sender, EventArgs e)
        {
            Numero num = new Numero(label1.Text);

            label1.Text = num.DecimalBinario(label1.Text);
        }
Esempio n. 26
0
        /// <summary>
        /// convierte en binario el valor del lblResultado.text o entrega un
        /// mensaje de error si el valor es invalido
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void btnConvertirABinario_Click_1(object sender, EventArgs e)
        {
            this.lblResultado.Text = Numero.DecimalBinario(lblResultado.Text).ToString();
        }
Esempio n. 27
0
        /// <summary>
        /// Cálculos para la comprobación del Cif (Entidad jurídica)
        /// </summary>
        private bool CompruebaCif()
        {
            string[] letrasCodigo = { "J", "A", "B", "C", "D", "E", "F", "G", "H", "I" };

            string n           = Numero.ToString("0000000");
            Int32  sumaPares   = 0;
            Int32  sumaImpares = 0;
            Int32  sumaTotal   = 0;
            Int32  i           = 0;
            bool   retVal      = false;

            // Recorrido por todos los dígitos del número
            for (i = 0; i < n.Length; i++)
            {
                Int32 aux;
                Int32.TryParse(n[i].ToString(), out aux);

                if ((i + 1) % 2 == 0)
                {
                    // Si es una posición par, se suman los dígitos
                    sumaPares += aux;
                }
                else
                {
                    // Si es una posición impar, se multiplican los dígitos por 2
                    aux = aux * 2;

                    // se suman los dígitos de la suma
                    sumaImpares += SumaDigitos(aux);
                }
            }
            // Se suman los resultados de los números pares e impares
            sumaTotal += sumaPares + sumaImpares;

            // Se obtiene el dígito de las unidades
            Int32 unidades = sumaTotal % 10;

            // Si las unidades son distintas de 0, se restan de 10
            if (unidades != 0)
            {
                unidades = 10 - unidades;
            }

            switch (LetraInicial)
            {
            // Sólo números
            case "A":
            case "B":
            case "E":
            case "H":
                retVal = DigitoControl == unidades.ToString();
                break;

            // Sólo letras
            case "K":
            case "P":
            case "Q":
            case "S":
                retVal = DigitoControl == letrasCodigo[unidades];
                break;

            default:
                retVal = (DigitoControl == unidades.ToString()) ||
                         (DigitoControl == letrasCodigo[unidades]);
                break;
            }

            return(retVal);
        }
Esempio n. 28
0
 private void btnConvertirADecimal_Click(object sender, EventArgs e)
 {
     this.lblResultado.Text = Numero.BinarioDecimal(this.lblResultado.Text);
 }
Esempio n. 29
0
 private void btnConvertirADecimal_Click(object sender, EventArgs e)
 {
     lblResultado.Text            = Numero.BinarioADecimal(lblResultado.Text);
     btnConvertirABinario.Enabled = true;
     btnConvertirADecimal.Enabled = false;
 }
Esempio n. 30
0
        async void Continuar_Clicked(object sender, EventArgs e)
        {
            if (Settings.session_MetodoPago.Equals("tarjeta"))
            {
                if (String.IsNullOrEmpty(Nombre.Text))
                {
                    await DisplayAlert("", "Por favor, indique el nombre que aparece en su tarjeta", "Aceptar");

                    Nombre.Focus();
                    return;
                }

                if (String.IsNullOrEmpty(Numero.Text))
                {
                    await DisplayAlert("", "Por favor, indique el número de su tarjeta", "Aceptar");

                    Numero.Focus();
                    return;
                }
                else if (!IsValidNumber(Regex.Replace(Numero.Text.Trim(), @"\s+", "")))
                {
                    await DisplayAlert("Número inválido", "Verifique el número de su tarjeta", "Aceptar");

                    Numero.Focus();
                    return;
                }
                if (String.IsNullOrEmpty(Vencimiento.Text))
                {
                    await DisplayAlert("", "Por favor, indique la fecha de expiración de su tarjeta", "Aceptar");

                    Vencimiento.Focus();
                    return;
                }
                else if (!IsValidExpiration(Regex.Replace(Vencimiento.Text.Trim(), @"\s+", "")))
                {
                    await DisplayAlert("Fecha inválida", "Verifique la fecha de expiración de su tarjeta", "Aceptar");

                    Vencimiento.Focus();
                    return;
                }
                if (String.IsNullOrEmpty(CVV.Text))
                {
                    await DisplayAlert("", "Por favor, indique el código CVV de su tarjeta", "Aceptar");

                    CVV.Focus();
                    return;
                }
                else if (CVV.Text.Trim().Length < 3)
                {
                    await DisplayAlert("Código CVV inválido", "Verifique el código CVV de su tarjeta", "Aceptar");

                    CVV.Focus();
                    return;
                }
            }
            else
            {
            }
            PopupPage pagar = new Pagar();
            //pagar.bac
            await Navigation.PushPopupAsync(pagar);
        }
Esempio n. 31
0
 public void Calificar(Numero numero, out int bien, out int regular)
 {
     Calificar(numero.n0, numero.n1, numero.n2, numero.n3, out bien, out regular);
 }
 public void ImprimeNumero(Numero numero)
 {
     Console.Write(numero.Valor);
 }
Esempio n. 33
0
 public Diccionario()
 {
     Lista_ClaveValor = new List <ClaveValor>();
     ClaveDefault     = new Numero(0);
 }
Esempio n. 34
0
        private void btnConvertirABinario_Click(object sender, EventArgs e)
        {
            Numero numeroaux = new Numero();

            lblResultado.Text = numeroaux.DecimalBinario(lblResultado.Text);
        }
Esempio n. 35
0
 /// <summary>
 /// Botón que convierte el número binario a decimal.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDecimal_Click(object sender, EventArgs e)
 {
     labelResultado.Text = Numero.BinarioDecimal(labelResultado.Text);
     btnBinario.Enabled  = true;
     btnDecimal.Enabled  = false;
 }
Esempio n. 36
0
        private void BtnConvertirADecimal_Click(object sender, EventArgs e)
        {
            Numero num = new Numero();

            lblResultado.Text = num.BinarioDecimal(lblResultado.Text);
        }
Esempio n. 37
0
 public void Calificar(Numero numero, out int bien, out int regular)
 {
     Calificar(numero.n0, numero.n1, numero.n2, numero.n3, out bien, out regular);
 }