예제 #1
0
        public static void SetCotizaciones()
        {
            Pesos.SetCotizacion(0.010526);
            Dolar.SetCotizacion(1);
            DolarBlue.SetCotizacion(1.515);
            DolarCCL.SetCotizacion(1.5568);
            DolarAhorro.SetCotizacion(1.65);

            DolarTurista.SetCotizacion(4);
        }
 public Conversor()
 {
     InitializeComponent();
     btnLock.BackgroundImage = Image.FromFile(@"C:\Users\Calidad\Desktop\Programas\Program\practicaProgramacionII\Conversor\bloqueado (1).png");
     txtCotiEuro.Text = "1,16";
     txtCotiPeso.Text = "55,93";
     txtCotiDolar.Text = "1";
     Euro.SetCotizacion(txtCotiEuro.Text);
     Dolar.SetCotizacion(txtCotiDolar.Text);
     Pesos.SetCotizacion(txtCotiPeso.Text);
 }
예제 #3
0
        private void txtCotizacionPeso_OnLeave(object sender, EventArgs e)
        {
            double aux;

            if (Double.TryParse(this.txtCotizacionPeso.Text, out aux))
            {
                Pesos.SetCotizacion(aux);
            }
            else
            {
                this.txtCotizacionEuro.Focus();
            }
        }
예제 #4
0
        private void txtCotizacionPeso_Leave(object sender, EventArgs e)
        {
            double auxPesos;

            if (!double.TryParse(txtCotizacionPeso.Text, out auxPesos) || auxPesos < 0)
            {
                txtCotizacionPeso.Focus();
            }
            else
            {
                Pesos.SetCotizacion(auxPesos);
            }
        }
예제 #5
0
        private void TxtCotizacionPesos_Leave(object sender, EventArgs e)
        {
            double aux;

            if (double.TryParse(txtCotizacionPeso.Text, out aux))
            {
                Pesos.SetCotizacion(aux);
            }
            else
            {
                txtCotizacionPeso.Focus();
            }
        }
예제 #6
0
        private void txtCotizacionPeso_Leave(object sender, EventArgs e)
        {
            double cotiz;

            if (double.TryParse(txtCotizacionPeso.Text, out cotiz))
            {
                Pesos.SetCotizacion(cotiz);
            }
            else
            {
                txtCotizacionPeso.Text = Pesos.GetCotizacion().ToString();
            }
        }
예제 #7
0
        private void TxtCotiPeso_Leave(object sender, EventArgs e)
        {
            double coti;

            if (Double.TryParse(txtCotiPeso.Text, out coti))
            {
                Pesos.SetCotizacion(coti);
            }
            else
            {
                txtCotiPeso.Focus();
            }
        }
        private void txtBCotizPeso_Leave(object sender, EventArgs e)
        {
            double n;
            bool   isNumeric = double.TryParse(txtBCotizPeso.Text, out n);

            if (isNumeric)
            {
                Pesos.SetCotizacion(n);
            }
            else
            {
                txtBCotizPeso.Select();
            }
        }
예제 #9
0
        private void txtCotizacionPeso_Leave(object sender, EventArgs e)
        {
            double cotizPeso;

            if (double.TryParse(txtCotizacionPeso.Text, out cotizPeso))
            {
                if (cotizPeso > 0)
                {
                    Pesos.SetCotizacion(cotizPeso);
                    return;
                }
            }

            txtCotizacionPeso.Focus();
        }
 private void TxtCotiPeso_Leave(object sender, EventArgs e)
 {
     Pesos.SetCotizacion(txtCotiPeso.Text);
     txtCotiPeso.Text = Pesos.GetCotizacion().ToString();
 }