Beispiel #1
0
 //Fin de las funciones o metodos para el ejercicio 5
 //Funciones o metodos para el ejercicio 4
 private void mostrarGastos(Stack gastos)
 {
     ContGastros.Clear();
     foreach (string gasto in gastos)
     {
         ContGastros.AppendText(gasto + "\n");
     }
 }
Beispiel #2
0
 private void Registrar_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(TBGasto.Text))
     {
         gastos.Push(LB.Text + "\n Gastos: " + TBGasto.Text);
         TBGasto.Clear();
         TBGasto.Focus();
         mostrarGastos(gastos);
         if (numGastos > 30)
         {
             gastos.Clear();
             ContGastros.Clear();
             numGastos = 0;
         }
         LB.Text = "Dia " + Convert.ToString(++numGastos);
     }
 }