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); }
private void btnCovertDolar_Click(object sender, EventArgs e) { if (Double.TryParse(txtDolar.Text, out double equivalenteEuro)) { Dolar.SetCotizacion(equivalenteEuro); Dolar dolar = new Dolar(equivalenteEuro); ((Euro)dolar).GetCantidad(); txtDolarAEuro.Text = ((Euro)dolar).GetCantidad().ToString(); txtDolarAPeso.Text = ((Pesos)dolar).GetCantidad().ToString(); txtDolarADolar.Text = dolar.GetCantidad().ToString(); } }
private void txtCotizacionDolar_OnLeave(object sender, EventArgs e) { double aux; if (Double.TryParse(this.txtCotizacionDolar.Text, out aux)) { Dolar.SetCotizacion(aux); } else { this.txtCotizacionEuro.Focus(); } }
private void txtCotizacionDolar_Leave(object sender, EventArgs e) { double auxDolares; if (!double.TryParse(txtCotizacionDolar.Text, out auxDolares) || auxDolares < 0) { txtCotizacionDolar.Focus(); } else { Dolar.SetCotizacion(auxDolares); } }
private void TxtCotizacionDolar_Leave(object sender, EventArgs e) { double aux; if (double.TryParse(txtCotizacionDolar.Text, out aux)) { Dolar.SetCotizacion(aux); } else { txtCotizacionDolar.Focus(); } }
private void txtCotizacionDolar_Leave(object sender, EventArgs e) { double cotiz; if (double.TryParse(txtCotizacionDolar.Text, out cotiz)) { Dolar.SetCotizacion(cotiz); } else { txtCotizacionDolar.Text = Dolar.GetCotizacion().ToString(); } }
private void TxtCotiDolar_Leave(object sender, EventArgs e) { double coti; if (Double.TryParse(txtCotiDolar.Text, out coti)) { Dolar.SetCotizacion(coti); } else { txtCotiDolar.Focus(); } }
private void txtCotizacionDolar_leave(object sender, EventArgs e) { double aux; if (double.TryParse(txtCotizacionDolar.Text, out aux)) { Dolar.SetCotizacion(aux); } else { MessageBox.Show("Ingrese datos Validos!"); txtCotizacionDolar.Focus(); } }
private void txtCotizacionDolar_Leave(object sender, EventArgs e) { double cotizDolar; if (double.TryParse(txtCotizacionDolar.Text, out cotizDolar)) { if (cotizDolar > 0) { Dolar.SetCotizacion(cotizDolar); return; } } txtCotizacionDolar.Focus(); }
private void btnCandado_Click(object sender, EventArgs e) { if (btnCandado.ImageIndex == 1) { btnCandado.ImageIndex = 0; Peso.SetCotizacion((double.Parse)(txtCotizacionPeso.Text)); Euro.SetCotizacion((double.Parse)(txtCotizacionEuro.Text)); Dolar.SetCotizacion((double.Parse)(txtCotizacionDolar.Text)); txtCotizacionEuro.Enabled = false; txtCotizacionDolar.Enabled = false; txtCotizacionPeso.Enabled = false; } else { btnCandado.ImageIndex = 1; txtCotizacionEuro.Enabled = true; txtCotizacionDolar.Enabled = true; txtCotizacionPeso.Enabled = true; } ; }
private void TxtCotiDolar_Leave(object sender, EventArgs e) { Dolar.SetCotizacion(txtDolarDolar.Text); txtCotiDolar.Text = Dolar.GetCotizacion().ToString(); }