Skip to content

Commit

Permalink
Primera versión estable
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Alz committed Dec 5, 2022
1 parent 2174e45 commit 2825309
Show file tree
Hide file tree
Showing 24 changed files with 1,049 additions and 485 deletions.
282 changes: 249 additions & 33 deletions Form1.Designer.cs

Large diffs are not rendered by default.

65 changes: 58 additions & 7 deletions Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public Form1()
InitializeComponent();
tbPoblacion.Enabled = false;
}
//TODO agregar horas de trabajo
Validate validate;
private bool condicionPoblacion = false;//infinita
private bool condicionServidor = false;//1
Expand All @@ -18,9 +19,8 @@ private void btResolver_Click(object sender, EventArgs e)
if (tbServidor.Text != "1")
condicionServidor = true; else condicionServidor = false;
validate = new Validate(tbLambda.Text,
tbMiu.Text,
tbServidor.Text,
tbN.Text, tbPoblacion.Text);
tbMiu.Text,tbServidor.Text,tbN.Text, tbPoblacion.Text,
tbCTE.Text, tbCTS.Text, tbCTSE.Text, tbCS.Text, tbTiempo.Text);

if(condicionPoblacion == false && condicionServidor == false)
{
Expand All @@ -35,8 +35,12 @@ private void btResolver_Click(object sender, EventArgs e)
else
{
FormPICS ventana = new FormPICS(validate.Lambda(),
validate.Miu(), validate.K(), validate.N());
validate.Miu(), validate.K(), validate.N(),
validate.Cte(), validate.Cts(), validate.Ctse(),
validate.Cs(), validate.Time());
//FormCostos ventanaCostos = new FormCostos();
ventana.Show();
//ventanaCostos.Show();
}

}
Expand All @@ -53,22 +57,29 @@ private void btResolver_Click(object sender, EventArgs e)
}
else
{
//double cte, double cts, double ctse, double cs
FormPICM ventana = new FormPICM(validate.Lambda(),
validate.Miu(), validate.K(), validate.N());
validate.Miu(), validate.K(), validate.N(),
validate.Cte(), validate.Cts(), validate.Ctse(),
validate.Cs(),validate.Time());
ventana.Show();
}

}
if (condicionPoblacion == true && condicionServidor == false)
{
FormPFCS ventana = new FormPFCS(validate.Lambda(),
validate.Miu(),validate.K(),validate.N(),validate.M());
validate.Miu(),validate.K(),validate.N(),validate.M(),
validate.Cte(), validate.Cts(), validate.Ctse(),
validate.Cs(), validate.Time());
ventana.Show();
}
if(condicionPoblacion == true && condicionServidor == true)
{
FormPFCM ventana = new FormPFCM(validate.Lambda(),
validate.Miu(),validate.K(),validate.N(),validate.M());
validate.Miu(),validate.K(),validate.N(),validate.M(),
validate.Cte(), validate.Cts(), validate.Ctse(),
validate.Cs(), validate.Time());
ventana.Show();
}
}
Expand Down Expand Up @@ -137,6 +148,46 @@ private void tbN_TextChanged(object sender, EventArgs e)
tbN.Clear();
}
}
private void tbCTE_TextChanged(object sender, EventArgs e)
{
//es un número decimal, no entero
if (!Regex.IsMatch(tbCTE.Text, "^[0-9]+([,])?([0-9]+)?$"))
{
tbCTE.Clear();
}
}
private void tbCTS_TextChanged(object sender, EventArgs e)
{
//es un número decimal, no entero
if (!Regex.IsMatch(tbCTS.Text, "^[0-9]+([,])?([0-9]+)?$"))
{
tbCTS.Clear();
}
}
private void tbCTSE_TextChanged(object sender, EventArgs e)
{
//es un número decimal, no entero
if (!Regex.IsMatch(tbCTSE.Text, "^[0-9]+([,])?([0-9]+)?$"))
{
tbCTSE.Clear();
}
}
private void tbCS_TextChanged(object sender, EventArgs e)
{
//es un número decimal, no entero
if (!Regex.IsMatch(tbCS.Text, "^[0-9]+([,])?([0-9]+)?$"))
{
tbCS.Clear();
}
}
private void tbTiempo_TextChanged(object sender, EventArgs e)
{
//es un número decimal, no entero
if (!Regex.IsMatch(tbTiempo.Text, "^[0-9]+([,])?([0-9]+)?$"))
{
tbTiempo.Clear();
}
}
#endregion


Expand Down
204 changes: 0 additions & 204 deletions FormCostos.Designer.cs

This file was deleted.

55 changes: 0 additions & 55 deletions FormCostos.cs

This file was deleted.

Loading

0 comments on commit 2825309

Please sign in to comment.