diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..408f3cd
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,26 @@
+name: CI C#
+
+on: [push, pull_request]
+
+jobs:
+ build-test:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: ?? Checkout do c�digo
+ uses: actions/checkout@v4
+
+ - name: ?? Setup .NET
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: '8.0.x'
+
+ - name: ?? Restaurar depend�ncias
+ run: dotnet restore
+
+ - name: ??? Compilar projeto
+ run: dotnet build --no-restore --configuration Release
+
+ - name: ?? Rodar testes
+ run: dotnet test --no-build --verbosity normal
+ continue-on-error: true
diff --git "a/TelaConfigura\303\247\303\265es.cs" "b/TelaConfigura\303\247\303\265es.cs"
index 97f9ed1..a6b7efa 100644
--- "a/TelaConfigura\303\247\303\265es.cs"
+++ "b/TelaConfigura\303\247\303\265es.cs"
@@ -134,7 +134,7 @@ private async void btnTesteConexao_Click(object sender, EventArgs e)
else
{
MessageBox.Show("Falha na conexão com a API Groq. Verifique sua conexão com a internet e a chave inserida e tente novamente.", "Erro",
- MessageBoxButtons.OK, MessageBoxIcon.Error);
+ MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
catch (Exception ex)
diff --git a/TelaInicial.Designer.cs b/TelaInicial.Designer.cs
index cd8e903..22f846e 100644
--- a/TelaInicial.Designer.cs
+++ b/TelaInicial.Designer.cs
@@ -34,6 +34,8 @@ private void InitializeComponent()
pnBoasVindas = new ReaLTaiizor.Controls.Panel();
picUser = new PictureBox();
pnTelaInicial = new Panel();
+ panel4 = new ReaLTaiizor.Controls.Panel();
+ label3 = new Label();
panel3 = new ReaLTaiizor.Controls.Panel();
button3 = new Button();
button2 = new Button();
@@ -49,18 +51,16 @@ private void InitializeComponent()
picChapeuGraduacao = new PictureBox();
picYoutube = new PictureBox();
lblLinks = new Label();
- panel4 = new ReaLTaiizor.Controls.Panel();
- label3 = new Label();
pnBoasVindas.SuspendLayout();
((System.ComponentModel.ISupportInitialize)picUser).BeginInit();
pnTelaInicial.SuspendLayout();
+ panel4.SuspendLayout();
panel3.SuspendLayout();
pnLinks.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureBox2).BeginInit();
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
((System.ComponentModel.ISupportInitialize)picChapeuGraduacao).BeginInit();
((System.ComponentModel.ISupportInitialize)picYoutube).BeginInit();
- panel4.SuspendLayout();
SuspendLayout();
//
// lblSubTitulo
@@ -122,6 +122,31 @@ private void InitializeComponent()
pnTelaInicial.Size = new Size(1190, 730);
pnTelaInicial.TabIndex = 10;
//
+ // panel4
+ //
+ panel4.BackColor = Color.WhiteSmoke;
+ panel4.Controls.Add(label3);
+ panel4.EdgeColor = Color.FromArgb(32, 41, 50);
+ panel4.Location = new Point(616, 488);
+ panel4.Name = "panel4";
+ panel4.Padding = new Padding(5);
+ panel4.Size = new Size(525, 199);
+ panel4.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
+ panel4.TabIndex = 15;
+ panel4.Text = "-+";
+ //
+ // label3
+ //
+ label3.Font = new Font("Segoe UI", 18F, FontStyle.Bold);
+ label3.ForeColor = Color.FromArgb(26, 31, 52);
+ label3.Location = new Point(11, 8);
+ label3.Margin = new Padding(0);
+ label3.Name = "label3";
+ label3.Size = new Size(179, 30);
+ label3.TabIndex = 12;
+ label3.Text = "Vazio";
+ label3.TextAlign = ContentAlignment.MiddleLeft;
+ //
// panel3
//
panel3.BackColor = Color.WhiteSmoke;
@@ -171,6 +196,7 @@ private void InitializeComponent()
button1.Text = "\r\nEstatística Paramétrica\r\n";
button1.TextAlign = ContentAlignment.BottomCenter;
button1.UseVisualStyleBackColor = true;
+ button1.Click += button1_Click;
//
// label2
//
@@ -304,31 +330,6 @@ private void InitializeComponent()
lblLinks.Text = "Links úteis:";
lblLinks.TextAlign = ContentAlignment.MiddleLeft;
//
- // panel4
- //
- panel4.BackColor = Color.WhiteSmoke;
- panel4.Controls.Add(label3);
- panel4.EdgeColor = Color.FromArgb(32, 41, 50);
- panel4.Location = new Point(616, 488);
- panel4.Name = "panel4";
- panel4.Padding = new Padding(5);
- panel4.Size = new Size(525, 199);
- panel4.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
- panel4.TabIndex = 15;
- panel4.Text = "-+";
- //
- // label3
- //
- label3.Font = new Font("Segoe UI", 18F, FontStyle.Bold);
- label3.ForeColor = Color.FromArgb(26, 31, 52);
- label3.Location = new Point(11, 8);
- label3.Margin = new Padding(0);
- label3.Name = "label3";
- label3.Size = new Size(179, 30);
- label3.TabIndex = 12;
- label3.Text = "Vazio";
- label3.TextAlign = ContentAlignment.MiddleLeft;
- //
// TelaInicial
//
AutoScaleDimensions = new SizeF(7F, 15F);
@@ -340,13 +341,13 @@ private void InitializeComponent()
pnBoasVindas.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)picUser).EndInit();
pnTelaInicial.ResumeLayout(false);
+ panel4.ResumeLayout(false);
panel3.ResumeLayout(false);
pnLinks.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)pictureBox2).EndInit();
((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
((System.ComponentModel.ISupportInitialize)picChapeuGraduacao).EndInit();
((System.ComponentModel.ISupportInitialize)picYoutube).EndInit();
- panel4.ResumeLayout(false);
ResumeLayout(false);
}
diff --git a/TelaInicial.cs b/TelaInicial.cs
index 7c5417c..44477c6 100644
--- a/TelaInicial.cs
+++ b/TelaInicial.cs
@@ -118,5 +118,10 @@ private void TituloBoasVindas_Click(object sender, EventArgs e)
{
}
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ _gerenciadorTelas.MostrarTela("Média de Posição Central");
+ }
}
}
diff --git a/TelaInicial.resx b/TelaInicial.resx
index 068b58b..b71376d 100644
--- a/TelaInicial.resx
+++ b/TelaInicial.resx
@@ -121,7 +121,7 @@
iVBORw0KGgoAAAANSUhEUgAAA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uANaEF+zmspdbFa+C1dBv/C1oRufxM2XiEAAAAAElFTkSuQmCC
\ No newline at end of file
diff --git a/TelaMediaPosicaoCentral.Designer.cs b/TelaMediaPosicaoCentral.Designer.cs
index 79bd844..9439340 100644
--- a/TelaMediaPosicaoCentral.Designer.cs
+++ b/TelaMediaPosicaoCentral.Designer.cs
@@ -29,18 +29,13 @@ protected override void Dispose(bool disposing)
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TelaMediaPosicaoCentral));
- TituloEstatPar = new Label();
- label1 = new Label();
- label2 = new Label();
- label3 = new Label();
- label4 = new Label();
- PanelFilaExpandida = new Panel();
- FilaExpandidaLabel = new Label();
- PanelListaXiFi = new Panel();
+ lblTituloEstatPar = new Label();
+ lblDescTela = new Label();
+ lblFilaExpandida = new Label();
Fi1 = new TextBox();
Xi1 = new TextBox();
AdicionarFila = new Button();
- ResultadosEstatisticos = new Label();
+ lblResultadosEstatisticos = new Label();
lbPassosGeral = new Label();
lbResultadoGeral = new Label();
BotaoProximoPassoVAC = new Button();
@@ -48,129 +43,120 @@ private void InitializeComponent()
btnAntTxt = new Button();
btnProxTxt = new Button();
lbTituloGeral = new Label();
- btnListaOuFila = new ReaLTaiizor.Controls.HopeToggle();
- PanelFilaExpandida.SuspendLayout();
- PanelListaXiFi.SuspendLayout();
+ TglBtnListaOuFila = new ReaLTaiizor.Controls.HopeToggle();
+ lblModoFilaExpandida = new Label();
+ flowLayoutPanelPares = new FlowLayoutPanel();
+ Par0 = new Panel();
+ Xi0 = new TextBox();
+ Fi0 = new TextBox();
+ Par1 = new Panel();
+ btnRmvPar1 = new ReaLTaiizor.Controls.Button();
+ Par2 = new Panel();
+ btnRmvPar2 = new ReaLTaiizor.Controls.Button();
+ Xi2 = new TextBox();
+ Fi2 = new TextBox();
+ Par3 = new Panel();
+ btnRmvPar3 = new ReaLTaiizor.Controls.Button();
+ Xi3 = new TextBox();
+ Fi3 = new TextBox();
+ Par4 = new Panel();
+ btnRmvPar4 = new ReaLTaiizor.Controls.Button();
+ Xi4 = new TextBox();
+ Fi4 = new TextBox();
+ btnAdicionarNovoPar = new Button();
+ chkParesAuto = new CheckBox();
+ txtboxFilaExp = new ReaLTaiizor.Controls.DungeonRichTextBox();
+ btnValidarFilaExp = new Button();
+ txtBoxCvReverso = new TextBox();
+ lblChaveAPI = new Label();
+ label1 = new Label();
+ txtBoxMediaReverso = new TextBox();
+ lblMediaReverso = new Label();
+ txtBoxDesvioReverso = new TextBox();
+ lblDesvioReverso = new Label();
+ txtBoxVarianciaReverso = new TextBox();
+ lblVarianciaReverso = new Label();
+ btnCalcReverso = new ReaLTaiizor.Controls.HopeRoundButton();
+ hopeBtnMetodoReverso = new ReaLTaiizor.Controls.HopeRoundButton();
+ hopeBtnMetodoPadrao = new ReaLTaiizor.Controls.HopeRoundButton();
+ pnModoReverso = new ReaLTaiizor.Controls.Panel();
+ pnSubModoReverso = new ReaLTaiizor.Controls.Panel();
+ lblCampoObrigatorio = new Label();
+ label4 = new Label();
+ pnModoPadrao = new ReaLTaiizor.Controls.Panel();
+ pnSubModoPadrao = new ReaLTaiizor.Controls.Panel();
+ label2 = new Label();
+ label3 = new Label();
pnResultadosEstatisticos.SuspendLayout();
+ flowLayoutPanelPares.SuspendLayout();
+ Par0.SuspendLayout();
+ Par1.SuspendLayout();
+ Par2.SuspendLayout();
+ Par3.SuspendLayout();
+ Par4.SuspendLayout();
+ pnModoReverso.SuspendLayout();
+ pnSubModoReverso.SuspendLayout();
+ pnModoPadrao.SuspendLayout();
+ pnSubModoPadrao.SuspendLayout();
SuspendLayout();
//
- // TituloEstatPar
- //
- TituloEstatPar.Font = new Font("Berlin Sans FB Demi", 25F, FontStyle.Bold);
- TituloEstatPar.ForeColor = Color.White;
- TituloEstatPar.Location = new Point(63, 53);
- TituloEstatPar.Margin = new Padding(0);
- TituloEstatPar.Name = "TituloEstatPar";
- TituloEstatPar.Size = new Size(608, 43);
- TituloEstatPar.TabIndex = 6;
- TituloEstatPar.Text = "Cálculo da Estatística Paramétrica";
- TituloEstatPar.TextAlign = ContentAlignment.MiddleLeft;
- //
- // label1
- //
- label1.Font = new Font("Berlin Sans FB", 14F);
- label1.ForeColor = Color.White;
- label1.Location = new Point(69, 100);
- label1.Margin = new Padding(0);
- label1.Name = "label1";
- label1.Size = new Size(614, 28);
- label1.TabIndex = 7;
- label1.Text = "Insira os valores da Frequência Acumulada (Xi) e Frequência Absoluta (Fi):";
- label1.TextAlign = ContentAlignment.MiddleLeft;
- //
- // label2
- //
- label2.Font = new Font("Berlin Sans FB", 14F);
- label2.ForeColor = Color.White;
- label2.Location = new Point(91, 138);
- label2.Margin = new Padding(0);
- label2.Name = "label2";
- label2.Size = new Size(37, 28);
- label2.TabIndex = 8;
- label2.Text = "Xi";
- label2.TextAlign = ContentAlignment.MiddleCenter;
- //
- // label3
- //
- label3.Font = new Font("Berlin Sans FB", 14F);
- label3.ForeColor = Color.White;
- label3.Location = new Point(191, 138);
- label3.Margin = new Padding(0);
- label3.Name = "label3";
- label3.Size = new Size(29, 28);
- label3.TabIndex = 9;
- label3.Text = "Fi";
- label3.TextAlign = ContentAlignment.MiddleCenter;
- //
- // label4
- //
- label4.Font = new Font("Berlin Sans FB", 14F);
- label4.ForeColor = Color.White;
- label4.Location = new Point(302, 138);
- label4.Margin = new Padding(0);
- label4.Name = "label4";
- label4.Size = new Size(150, 28);
- label4.TabIndex = 12;
- label4.Text = "Fila Expandida:";
- label4.TextAlign = ContentAlignment.MiddleCenter;
- //
- // PanelFilaExpandida
- //
- PanelFilaExpandida.BackColor = Color.FromArgb(40, 0, 0, 0);
- PanelFilaExpandida.Controls.Add(FilaExpandidaLabel);
- PanelFilaExpandida.Location = new Point(307, 168);
- PanelFilaExpandida.Margin = new Padding(3, 2, 3, 2);
- PanelFilaExpandida.Name = "PanelFilaExpandida";
- PanelFilaExpandida.Size = new Size(308, 172);
- PanelFilaExpandida.TabIndex = 13;
- //
- // FilaExpandidaLabel
- //
- FilaExpandidaLabel.Anchor = AnchorStyles.Left | AnchorStyles.Right;
- FilaExpandidaLabel.BackColor = Color.FromArgb(0, 0, 0, 0);
- FilaExpandidaLabel.Font = new Font("Berlin Sans FB", 14F);
- FilaExpandidaLabel.ForeColor = Color.White;
- FilaExpandidaLabel.Location = new Point(11, 9);
- FilaExpandidaLabel.Name = "FilaExpandidaLabel";
- FilaExpandidaLabel.Size = new Size(282, 21);
- FilaExpandidaLabel.TabIndex = 0;
- FilaExpandidaLabel.Text = "Valores aqui";
- FilaExpandidaLabel.TextAlign = ContentAlignment.MiddleLeft;
- //
- // PanelListaXiFi
- //
- PanelListaXiFi.BackColor = Color.FromArgb(40, 0, 0, 0);
- PanelListaXiFi.Controls.Add(Fi1);
- PanelListaXiFi.Controls.Add(Xi1);
- PanelListaXiFi.Location = new Point(73, 168);
- PanelListaXiFi.Margin = new Padding(3, 2, 3, 2);
- PanelListaXiFi.Name = "PanelListaXiFi";
- PanelListaXiFi.Size = new Size(169, 172);
- PanelListaXiFi.TabIndex = 14;
+ // lblTituloEstatPar
+ //
+ lblTituloEstatPar.Font = new Font("Berlin Sans FB Demi", 25F, FontStyle.Bold);
+ lblTituloEstatPar.ForeColor = Color.White;
+ lblTituloEstatPar.Location = new Point(63, 53);
+ lblTituloEstatPar.Margin = new Padding(0);
+ lblTituloEstatPar.Name = "lblTituloEstatPar";
+ lblTituloEstatPar.Size = new Size(608, 43);
+ lblTituloEstatPar.TabIndex = 6;
+ lblTituloEstatPar.Text = "Cálculo da Estatística Paramétrica";
+ lblTituloEstatPar.TextAlign = ContentAlignment.MiddleLeft;
+ //
+ // lblDescTela
+ //
+ lblDescTela.Font = new Font("Berlin Sans FB", 14F);
+ lblDescTela.ForeColor = Color.White;
+ lblDescTela.Location = new Point(69, 100);
+ lblDescTela.Margin = new Padding(0);
+ lblDescTela.Name = "lblDescTela";
+ lblDescTela.Size = new Size(614, 28);
+ lblDescTela.TabIndex = 7;
+ lblDescTela.Text = "Insira os valores da Frequência Acumulada (Xi) e Frequência Absoluta (Fi):";
+ lblDescTela.TextAlign = ContentAlignment.MiddleLeft;
+ //
+ // lblFilaExpandida
+ //
+ lblFilaExpandida.Font = new Font("Berlin Sans FB", 14F);
+ lblFilaExpandida.ForeColor = Color.White;
+ lblFilaExpandida.Location = new Point(192, 91);
+ lblFilaExpandida.Margin = new Padding(0);
+ lblFilaExpandida.Name = "lblFilaExpandida";
+ lblFilaExpandida.Size = new Size(33, 28);
+ lblFilaExpandida.TabIndex = 12;
+ lblFilaExpandida.Text = "ou";
+ lblFilaExpandida.TextAlign = ContentAlignment.MiddleCenter;
//
// Fi1
//
Fi1.Cursor = Cursors.IBeam;
- Fi1.Location = new Point(108, 7);
+ Fi1.Location = new Point(116, 7);
Fi1.Margin = new Padding(3, 2, 3, 2);
Fi1.Name = "Fi1";
- Fi1.Size = new Size(49, 23);
+ Fi1.PlaceholderText = "Fi";
+ Fi1.Size = new Size(35, 23);
Fi1.TabIndex = 13;
- Fi1.TextChanged += VerificacaoNovoPar;
- Fi1.KeyDown += XiFi_KeyDown;
- Fi1.KeyPress += XiFi_KeyPress;
+ Fi1.TextAlign = HorizontalAlignment.Center;
//
// Xi1
//
Xi1.Cursor = Cursors.IBeam;
- Xi1.Location = new Point(12, 7);
+ Xi1.Location = new Point(21, 7);
Xi1.Margin = new Padding(3, 2, 3, 2);
Xi1.Name = "Xi1";
- Xi1.Size = new Size(49, 23);
+ Xi1.PlaceholderText = "Xi";
+ Xi1.Size = new Size(35, 23);
Xi1.TabIndex = 12;
- Xi1.TextChanged += VerificacaoNovoPar;
- Xi1.KeyDown += XiFi_KeyDown;
- Xi1.KeyPress += XiFi_KeyPress;
+ Xi1.TextAlign = HorizontalAlignment.Center;
//
// AdicionarFila
//
@@ -179,38 +165,40 @@ private void InitializeComponent()
AdicionarFila.FlatAppearance.BorderColor = Color.FromArgb(79, 55, 139);
AdicionarFila.FlatAppearance.BorderSize = 0;
AdicionarFila.FlatStyle = FlatStyle.Flat;
- AdicionarFila.Font = new Font("Segoe UI", 20F, FontStyle.Bold);
+ AdicionarFila.Font = new Font("Berlin Sans FB", 12F);
AdicionarFila.ForeColor = Color.White;
- AdicionarFila.Location = new Point(260, 227);
+ AdicionarFila.Location = new Point(231, 224);
AdicionarFila.Margin = new Padding(0);
AdicionarFila.Name = "AdicionarFila";
- AdicionarFila.Size = new Size(26, 52);
+ AdicionarFila.Size = new Size(156, 37);
AdicionarFila.TabIndex = 15;
- AdicionarFila.Text = ">";
+ AdicionarFila.Text = "Realizar Cálculos";
AdicionarFila.UseVisualStyleBackColor = false;
AdicionarFila.Click += AdicionarFila_Click;
//
- // ResultadosEstatisticos
+ // lblResultadosEstatisticos
//
- ResultadosEstatisticos.Font = new Font("Berlin Sans FB Demi", 25F, FontStyle.Bold);
- ResultadosEstatisticos.ForeColor = Color.White;
- ResultadosEstatisticos.Location = new Point(812, 53);
- ResultadosEstatisticos.Margin = new Padding(0);
- ResultadosEstatisticos.Name = "ResultadosEstatisticos";
- ResultadosEstatisticos.Size = new Size(383, 43);
- ResultadosEstatisticos.TabIndex = 17;
- ResultadosEstatisticos.Text = "Resultados Estatísticos";
- ResultadosEstatisticos.TextAlign = ContentAlignment.MiddleCenter;
+ lblResultadosEstatisticos.Font = new Font("Berlin Sans FB Demi", 25F, FontStyle.Bold);
+ lblResultadosEstatisticos.ForeColor = Color.White;
+ lblResultadosEstatisticos.Location = new Point(812, 53);
+ lblResultadosEstatisticos.Margin = new Padding(0);
+ lblResultadosEstatisticos.Name = "lblResultadosEstatisticos";
+ lblResultadosEstatisticos.Size = new Size(383, 43);
+ lblResultadosEstatisticos.TabIndex = 17;
+ lblResultadosEstatisticos.Text = "Resultados Estatísticos";
+ lblResultadosEstatisticos.TextAlign = ContentAlignment.MiddleCenter;
//
// lbPassosGeral
//
lbPassosGeral.BackColor = Color.FromArgb(0, 0, 0, 0);
- lbPassosGeral.Font = new Font("Segoe UI", 12F);
+ lbPassosGeral.Font = new Font("Berlin Sans FB", 10F);
lbPassosGeral.ForeColor = Color.White;
- lbPassosGeral.Location = new Point(34, 24);
+ lbPassosGeral.ImageAlign = ContentAlignment.MiddleLeft;
+ lbPassosGeral.Location = new Point(46, 48);
lbPassosGeral.Name = "lbPassosGeral";
- lbPassosGeral.Size = new Size(469, 525);
+ lbPassosGeral.Size = new Size(443, 491);
lbPassosGeral.TabIndex = 1;
+ lbPassosGeral.TextAlign = ContentAlignment.TopCenter;
//
// lbResultadoGeral
//
@@ -244,20 +232,19 @@ private void InitializeComponent()
//
// pnResultadosEstatisticos
//
- pnResultadosEstatisticos.BackColor = Color.FromArgb(39, 51, 63);
+ pnResultadosEstatisticos.BackColor = Color.FromArgb(57, 45, 120);
pnResultadosEstatisticos.Controls.Add(btnAntTxt);
pnResultadosEstatisticos.Controls.Add(btnProxTxt);
pnResultadosEstatisticos.Controls.Add(lbTituloGeral);
pnResultadosEstatisticos.Controls.Add(lbResultadoGeral);
pnResultadosEstatisticos.Controls.Add(lbPassosGeral);
pnResultadosEstatisticos.EdgeColor = Color.FromArgb(32, 41, 50);
- pnResultadosEstatisticos.Location = new Point(724, 112);
+ pnResultadosEstatisticos.Location = new Point(739, 112);
pnResultadosEstatisticos.Name = "pnResultadosEstatisticos";
pnResultadosEstatisticos.Padding = new Padding(5);
- pnResultadosEstatisticos.Size = new Size(536, 574);
+ pnResultadosEstatisticos.Size = new Size(521, 574);
pnResultadosEstatisticos.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
pnResultadosEstatisticos.TabIndex = 27;
- pnResultadosEstatisticos.Text = "panel1";
//
// btnAntTxt
//
@@ -287,7 +274,7 @@ private void InitializeComponent()
btnProxTxt.Font = new Font("Segoe UI", 20F, FontStyle.Bold);
btnProxTxt.ForeColor = Color.White;
btnProxTxt.Image = (Image)resources.GetObject("btnProxTxt.Image");
- btnProxTxt.Location = new Point(505, 259);
+ btnProxTxt.Location = new Point(492, 259);
btnProxTxt.Margin = new Padding(0);
btnProxTxt.Name = "btnProxTxt";
btnProxTxt.Size = new Size(25, 24);
@@ -297,76 +284,666 @@ private void InitializeComponent()
//
// lbTituloGeral
//
- lbTituloGeral.Font = new Font("Segoe UI", 15F, FontStyle.Bold);
+ lbTituloGeral.Font = new Font("Segoe UI", 14F, FontStyle.Bold);
lbTituloGeral.ForeColor = Color.White;
- lbTituloGeral.Location = new Point(111, 5);
+ lbTituloGeral.Location = new Point(34, 5);
lbTituloGeral.Margin = new Padding(0);
lbTituloGeral.Name = "lbTituloGeral";
- lbTituloGeral.Size = new Size(268, 30);
+ lbTituloGeral.Size = new Size(345, 30);
lbTituloGeral.TabIndex = 28;
lbTituloGeral.TextAlign = ContentAlignment.MiddleLeft;
//
- // btnListaOuFila
- //
- btnListaOuFila.AutoSize = true;
- btnListaOuFila.BackColor = Color.FromArgb(30, 33, 34);
- btnListaOuFila.BaseColor = Color.FromArgb(30, 33, 34);
- btnListaOuFila.BaseColorA = Color.FromArgb(220, 223, 230);
- btnListaOuFila.BaseColorB = Color.FromArgb(100, 64, 158, 255);
- btnListaOuFila.HeadColorA = Color.FromArgb(220, 223, 230);
- btnListaOuFila.HeadColorB = Color.White;
- btnListaOuFila.HeadColorC = Color.FromArgb(64, 158, 255);
- btnListaOuFila.HeadColorD = Color.FromArgb(64, 158, 255);
- btnListaOuFila.Location = new Point(253, 146);
- btnListaOuFila.Name = "btnListaOuFila";
- btnListaOuFila.Size = new Size(48, 20);
- btnListaOuFila.TabIndex = 28;
- btnListaOuFila.Text = "hopeToggle1";
- btnListaOuFila.UseVisualStyleBackColor = false;
- btnListaOuFila.CheckedChanged += btnListaOuFila_CheckedChanged;
+ // TglBtnListaOuFila
+ //
+ TglBtnListaOuFila.BackColor = Color.FromArgb(26, 31, 52);
+ TglBtnListaOuFila.BaseColor = Color.FromArgb(26, 31, 52);
+ TglBtnListaOuFila.BaseColorA = Color.FromArgb(220, 223, 230);
+ TglBtnListaOuFila.BaseColorB = Color.FromArgb(100, 64, 158, 255);
+ TglBtnListaOuFila.HeadColorA = Color.FromArgb(220, 223, 230);
+ TglBtnListaOuFila.HeadColorB = Color.White;
+ TglBtnListaOuFila.HeadColorC = Color.FromArgb(64, 158, 255);
+ TglBtnListaOuFila.HeadColorD = Color.FromArgb(64, 158, 255);
+ TglBtnListaOuFila.Location = new Point(216, 185);
+ TglBtnListaOuFila.Name = "TglBtnListaOuFila";
+ TglBtnListaOuFila.Size = new Size(48, 20);
+ TglBtnListaOuFila.TabIndex = 28;
+ TglBtnListaOuFila.UseVisualStyleBackColor = false;
+ TglBtnListaOuFila.CheckedChanged += TglBtnListaOuFila_CheckedChanged;
+ //
+ // lblModoFilaExpandida
+ //
+ lblModoFilaExpandida.BackColor = Color.FromArgb(0, 0, 0, 0);
+ lblModoFilaExpandida.Font = new Font("Berlin Sans FB", 10F);
+ lblModoFilaExpandida.ForeColor = Color.White;
+ lblModoFilaExpandida.Location = new Point(261, 186);
+ lblModoFilaExpandida.Name = "lblModoFilaExpandida";
+ lblModoFilaExpandida.Size = new Size(130, 18);
+ lblModoFilaExpandida.TabIndex = 1;
+ lblModoFilaExpandida.Text = "Modo Fila Expandida";
+ lblModoFilaExpandida.TextAlign = ContentAlignment.MiddleLeft;
+ //
+ // flowLayoutPanelPares
+ //
+ flowLayoutPanelPares.Controls.Add(Par0);
+ flowLayoutPanelPares.Controls.Add(Par1);
+ flowLayoutPanelPares.Controls.Add(Par2);
+ flowLayoutPanelPares.Controls.Add(Par3);
+ flowLayoutPanelPares.Controls.Add(Par4);
+ flowLayoutPanelPares.Controls.Add(btnAdicionarNovoPar);
+ flowLayoutPanelPares.Location = new Point(10, 9);
+ flowLayoutPanelPares.Name = "flowLayoutPanelPares";
+ flowLayoutPanelPares.Size = new Size(174, 237);
+ flowLayoutPanelPares.TabIndex = 29;
+ //
+ // Par0
+ //
+ Par0.BackColor = Color.FromArgb(40, 0, 0, 0);
+ Par0.Controls.Add(Xi0);
+ Par0.Controls.Add(Fi0);
+ Par0.Location = new Point(3, 2);
+ Par0.Margin = new Padding(3, 2, 3, 2);
+ Par0.Name = "Par0";
+ Par0.Size = new Size(169, 36);
+ Par0.TabIndex = 35;
+ //
+ // Xi0
+ //
+ Xi0.Cursor = Cursors.IBeam;
+ Xi0.Location = new Point(21, 7);
+ Xi0.Margin = new Padding(3, 2, 3, 2);
+ Xi0.Name = "Xi0";
+ Xi0.PlaceholderText = "Xi";
+ Xi0.Size = new Size(35, 23);
+ Xi0.TabIndex = 10;
+ Xi0.TextAlign = HorizontalAlignment.Center;
+ //
+ // Fi0
+ //
+ Fi0.Cursor = Cursors.IBeam;
+ Fi0.Location = new Point(116, 7);
+ Fi0.Margin = new Padding(3, 2, 3, 2);
+ Fi0.Name = "Fi0";
+ Fi0.PlaceholderText = "Fi";
+ Fi0.Size = new Size(35, 23);
+ Fi0.TabIndex = 11;
+ Fi0.TextAlign = HorizontalAlignment.Center;
+ //
+ // Par1
+ //
+ Par1.BackColor = Color.FromArgb(40, 0, 0, 0);
+ Par1.Controls.Add(btnRmvPar1);
+ Par1.Controls.Add(Xi1);
+ Par1.Controls.Add(Fi1);
+ Par1.Enabled = false;
+ Par1.Location = new Point(3, 42);
+ Par1.Margin = new Padding(3, 2, 3, 2);
+ Par1.Name = "Par1";
+ Par1.Size = new Size(169, 36);
+ Par1.TabIndex = 34;
+ Par1.Visible = false;
+ //
+ // btnRmvPar1
+ //
+ btnRmvPar1.BackColor = Color.Transparent;
+ btnRmvPar1.BorderColor = Color.FromArgb(32, 34, 37);
+ btnRmvPar1.Enabled = false;
+ btnRmvPar1.EnteredBorderColor = Color.FromArgb(165, 37, 37);
+ btnRmvPar1.EnteredColor = Color.FromArgb(32, 34, 37);
+ btnRmvPar1.Font = new Font("Microsoft Sans Serif", 12F);
+ btnRmvPar1.Image = (Image)resources.GetObject("btnRmvPar1.Image");
+ btnRmvPar1.ImageAlign = ContentAlignment.MiddleCenter;
+ btnRmvPar1.InactiveColor = Color.FromArgb(165, 37, 37);
+ btnRmvPar1.Location = new Point(72, 4);
+ btnRmvPar1.Name = "btnRmvPar1";
+ btnRmvPar1.PressedBorderColor = Color.FromArgb(165, 37, 37);
+ btnRmvPar1.PressedColor = Color.FromArgb(165, 37, 37);
+ btnRmvPar1.Size = new Size(28, 28);
+ btnRmvPar1.TabIndex = 32;
+ btnRmvPar1.TextAlignment = StringAlignment.Center;
+ btnRmvPar1.Visible = false;
+ btnRmvPar1.Click += BtnRmvPar_Click;
+ //
+ // Par2
+ //
+ Par2.BackColor = Color.FromArgb(40, 0, 0, 0);
+ Par2.Controls.Add(btnRmvPar2);
+ Par2.Controls.Add(Xi2);
+ Par2.Controls.Add(Fi2);
+ Par2.Enabled = false;
+ Par2.Location = new Point(3, 82);
+ Par2.Margin = new Padding(3, 2, 3, 2);
+ Par2.Name = "Par2";
+ Par2.Size = new Size(169, 36);
+ Par2.TabIndex = 35;
+ Par2.Visible = false;
+ //
+ // btnRmvPar2
+ //
+ btnRmvPar2.BackColor = Color.Transparent;
+ btnRmvPar2.BorderColor = Color.FromArgb(32, 34, 37);
+ btnRmvPar2.Enabled = false;
+ btnRmvPar2.EnteredBorderColor = Color.FromArgb(165, 37, 37);
+ btnRmvPar2.EnteredColor = Color.FromArgb(32, 34, 37);
+ btnRmvPar2.Font = new Font("Microsoft Sans Serif", 12F);
+ btnRmvPar2.Image = (Image)resources.GetObject("btnRmvPar2.Image");
+ btnRmvPar2.ImageAlign = ContentAlignment.MiddleCenter;
+ btnRmvPar2.InactiveColor = Color.FromArgb(165, 37, 37);
+ btnRmvPar2.Location = new Point(72, 4);
+ btnRmvPar2.Name = "btnRmvPar2";
+ btnRmvPar2.PressedBorderColor = Color.FromArgb(165, 37, 37);
+ btnRmvPar2.PressedColor = Color.FromArgb(165, 37, 37);
+ btnRmvPar2.Size = new Size(28, 28);
+ btnRmvPar2.TabIndex = 33;
+ btnRmvPar2.TextAlignment = StringAlignment.Center;
+ btnRmvPar2.Visible = false;
+ btnRmvPar2.Click += BtnRmvPar_Click;
+ //
+ // Xi2
+ //
+ Xi2.Cursor = Cursors.IBeam;
+ Xi2.Location = new Point(21, 7);
+ Xi2.Margin = new Padding(3, 2, 3, 2);
+ Xi2.Name = "Xi2";
+ Xi2.PlaceholderText = "Xi";
+ Xi2.Size = new Size(35, 23);
+ Xi2.TabIndex = 14;
+ Xi2.TextAlign = HorizontalAlignment.Center;
+ //
+ // Fi2
+ //
+ Fi2.Cursor = Cursors.IBeam;
+ Fi2.Location = new Point(116, 7);
+ Fi2.Margin = new Padding(3, 2, 3, 2);
+ Fi2.Name = "Fi2";
+ Fi2.PlaceholderText = "Fi";
+ Fi2.Size = new Size(35, 23);
+ Fi2.TabIndex = 15;
+ Fi2.TextAlign = HorizontalAlignment.Center;
+ //
+ // Par3
+ //
+ Par3.BackColor = Color.FromArgb(40, 0, 0, 0);
+ Par3.Controls.Add(btnRmvPar3);
+ Par3.Controls.Add(Xi3);
+ Par3.Controls.Add(Fi3);
+ Par3.Enabled = false;
+ Par3.Location = new Point(3, 122);
+ Par3.Margin = new Padding(3, 2, 3, 2);
+ Par3.Name = "Par3";
+ Par3.Size = new Size(169, 36);
+ Par3.TabIndex = 37;
+ Par3.Visible = false;
+ //
+ // btnRmvPar3
+ //
+ btnRmvPar3.BackColor = Color.Transparent;
+ btnRmvPar3.BorderColor = Color.FromArgb(32, 34, 37);
+ btnRmvPar3.Enabled = false;
+ btnRmvPar3.EnteredBorderColor = Color.FromArgb(165, 37, 37);
+ btnRmvPar3.EnteredColor = Color.FromArgb(32, 34, 37);
+ btnRmvPar3.Font = new Font("Microsoft Sans Serif", 12F);
+ btnRmvPar3.Image = (Image)resources.GetObject("btnRmvPar3.Image");
+ btnRmvPar3.ImageAlign = ContentAlignment.MiddleCenter;
+ btnRmvPar3.InactiveColor = Color.FromArgb(165, 37, 37);
+ btnRmvPar3.Location = new Point(72, 4);
+ btnRmvPar3.Name = "btnRmvPar3";
+ btnRmvPar3.PressedBorderColor = Color.FromArgb(165, 37, 37);
+ btnRmvPar3.PressedColor = Color.FromArgb(165, 37, 37);
+ btnRmvPar3.Size = new Size(28, 28);
+ btnRmvPar3.TabIndex = 34;
+ btnRmvPar3.TextAlignment = StringAlignment.Center;
+ btnRmvPar3.Visible = false;
+ btnRmvPar3.Click += BtnRmvPar_Click;
+ //
+ // Xi3
+ //
+ Xi3.Cursor = Cursors.IBeam;
+ Xi3.Location = new Point(21, 7);
+ Xi3.Margin = new Padding(3, 2, 3, 2);
+ Xi3.Name = "Xi3";
+ Xi3.PlaceholderText = "Xi";
+ Xi3.Size = new Size(35, 23);
+ Xi3.TabIndex = 16;
+ Xi3.TextAlign = HorizontalAlignment.Center;
+ //
+ // Fi3
+ //
+ Fi3.Cursor = Cursors.IBeam;
+ Fi3.Location = new Point(116, 7);
+ Fi3.Margin = new Padding(3, 2, 3, 2);
+ Fi3.Name = "Fi3";
+ Fi3.PlaceholderText = "Fi";
+ Fi3.Size = new Size(35, 23);
+ Fi3.TabIndex = 17;
+ Fi3.TextAlign = HorizontalAlignment.Center;
+ //
+ // Par4
+ //
+ Par4.BackColor = Color.FromArgb(40, 0, 0, 0);
+ Par4.Controls.Add(btnRmvPar4);
+ Par4.Controls.Add(Xi4);
+ Par4.Controls.Add(Fi4);
+ Par4.Enabled = false;
+ Par4.Location = new Point(3, 162);
+ Par4.Margin = new Padding(3, 2, 3, 2);
+ Par4.Name = "Par4";
+ Par4.Size = new Size(169, 36);
+ Par4.TabIndex = 36;
+ Par4.Visible = false;
+ //
+ // btnRmvPar4
+ //
+ btnRmvPar4.BackColor = Color.Transparent;
+ btnRmvPar4.BorderColor = Color.FromArgb(32, 34, 37);
+ btnRmvPar4.Enabled = false;
+ btnRmvPar4.EnteredBorderColor = Color.FromArgb(165, 37, 37);
+ btnRmvPar4.EnteredColor = Color.FromArgb(32, 34, 37);
+ btnRmvPar4.Font = new Font("Microsoft Sans Serif", 12F);
+ btnRmvPar4.Image = (Image)resources.GetObject("btnRmvPar4.Image");
+ btnRmvPar4.ImageAlign = ContentAlignment.MiddleCenter;
+ btnRmvPar4.InactiveColor = Color.FromArgb(165, 37, 37);
+ btnRmvPar4.Location = new Point(72, 4);
+ btnRmvPar4.Name = "btnRmvPar4";
+ btnRmvPar4.PressedBorderColor = Color.FromArgb(165, 37, 37);
+ btnRmvPar4.PressedColor = Color.FromArgb(165, 37, 37);
+ btnRmvPar4.Size = new Size(28, 28);
+ btnRmvPar4.TabIndex = 35;
+ btnRmvPar4.TextAlignment = StringAlignment.Center;
+ btnRmvPar4.Visible = false;
+ btnRmvPar4.Click += BtnRmvPar_Click;
+ //
+ // Xi4
+ //
+ Xi4.Cursor = Cursors.IBeam;
+ Xi4.Location = new Point(21, 7);
+ Xi4.Margin = new Padding(3, 2, 3, 2);
+ Xi4.Name = "Xi4";
+ Xi4.PlaceholderText = "Xi";
+ Xi4.Size = new Size(35, 23);
+ Xi4.TabIndex = 18;
+ Xi4.TextAlign = HorizontalAlignment.Center;
+ //
+ // Fi4
+ //
+ Fi4.Cursor = Cursors.IBeam;
+ Fi4.Location = new Point(116, 7);
+ Fi4.Margin = new Padding(3, 2, 3, 2);
+ Fi4.Name = "Fi4";
+ Fi4.PlaceholderText = "Fi";
+ Fi4.Size = new Size(35, 23);
+ Fi4.TabIndex = 19;
+ Fi4.TextAlign = HorizontalAlignment.Center;
+ //
+ // btnAdicionarNovoPar
+ //
+ btnAdicionarNovoPar.BackColor = Color.FromArgb(60, 190, 60);
+ btnAdicionarNovoPar.ForeColor = Color.White;
+ btnAdicionarNovoPar.Image = (Image)resources.GetObject("btnAdicionarNovoPar.Image");
+ btnAdicionarNovoPar.Location = new Point(0, 200);
+ btnAdicionarNovoPar.Margin = new Padding(0);
+ btnAdicionarNovoPar.Name = "btnAdicionarNovoPar";
+ btnAdicionarNovoPar.Size = new Size(172, 31);
+ btnAdicionarNovoPar.TabIndex = 31;
+ btnAdicionarNovoPar.UseVisualStyleBackColor = false;
+ btnAdicionarNovoPar.Click += btnAdicionarNovoPar_Click;
+ //
+ // chkParesAuto
+ //
+ chkParesAuto.Checked = true;
+ chkParesAuto.CheckState = CheckState.Checked;
+ chkParesAuto.Font = new Font("Berlin Sans FB", 10F);
+ chkParesAuto.ForeColor = Color.White;
+ chkParesAuto.Location = new Point(15, 251);
+ chkParesAuto.Name = "chkParesAuto";
+ chkParesAuto.Size = new Size(111, 20);
+ chkParesAuto.TabIndex = 31;
+ chkParesAuto.Text = "Adicionar auto";
+ chkParesAuto.UseVisualStyleBackColor = true;
+ //
+ // txtboxFilaExp
+ //
+ txtboxFilaExp.AutoWordSelection = false;
+ txtboxFilaExp.BackColor = Color.Transparent;
+ txtboxFilaExp.BorderColor = Color.FromArgb(180, 180, 180);
+ txtboxFilaExp.EdgeColor = Color.White;
+ txtboxFilaExp.Enabled = false;
+ txtboxFilaExp.Font = new Font("Tahoma", 10F);
+ txtboxFilaExp.ForeColor = Color.FromArgb(76, 76, 76);
+ txtboxFilaExp.Location = new Point(231, 11);
+ txtboxFilaExp.Name = "txtboxFilaExp";
+ txtboxFilaExp.ReadOnly = false;
+ txtboxFilaExp.Size = new Size(155, 131);
+ txtboxFilaExp.TabIndex = 32;
+ txtboxFilaExp.TextBackColor = Color.White;
+ txtboxFilaExp.WordWrap = true;
+ //
+ // btnValidarFilaExp
+ //
+ btnValidarFilaExp.Location = new Point(231, 149);
+ btnValidarFilaExp.Name = "btnValidarFilaExp";
+ btnValidarFilaExp.Size = new Size(155, 27);
+ btnValidarFilaExp.TabIndex = 33;
+ btnValidarFilaExp.Text = "Validar Lista";
+ btnValidarFilaExp.UseVisualStyleBackColor = true;
+ btnValidarFilaExp.Click += btnValidarFilaExp_Click;
+ //
+ // txtBoxCvReverso
+ //
+ txtBoxCvReverso.Location = new Point(150, 38);
+ txtBoxCvReverso.Name = "txtBoxCvReverso";
+ txtBoxCvReverso.Size = new Size(32, 23);
+ txtBoxCvReverso.TabIndex = 37;
+ //
+ // lblChaveAPI
+ //
+ lblChaveAPI.Font = new Font("Berlin Sans FB", 12F);
+ lblChaveAPI.ForeColor = Color.White;
+ lblChaveAPI.Location = new Point(26, 29);
+ lblChaveAPI.Margin = new Padding(0);
+ lblChaveAPI.Name = "lblChaveAPI";
+ lblChaveAPI.Size = new Size(109, 36);
+ lblChaveAPI.TabIndex = 36;
+ lblChaveAPI.Text = "Coeficiente de Variação:";
+ lblChaveAPI.TextAlign = ContentAlignment.MiddleLeft;
+ //
+ // label1
+ //
+ label1.Font = new Font("Berlin Sans FB", 12.5F);
+ label1.ForeColor = Color.White;
+ label1.Location = new Point(11, 84);
+ label1.Margin = new Padding(0);
+ label1.Name = "label1";
+ label1.Size = new Size(150, 21);
+ label1.TabIndex = 38;
+ label1.Text = "Campos Opcionais:";
+ label1.TextAlign = ContentAlignment.MiddleLeft;
+ //
+ // txtBoxMediaReverso
+ //
+ txtBoxMediaReverso.Location = new Point(150, 138);
+ txtBoxMediaReverso.Name = "txtBoxMediaReverso";
+ txtBoxMediaReverso.PlaceholderText = "x̄";
+ txtBoxMediaReverso.Size = new Size(32, 23);
+ txtBoxMediaReverso.TabIndex = 40;
+ txtBoxMediaReverso.TextAlign = HorizontalAlignment.Center;
+ //
+ // lblMediaReverso
+ //
+ lblMediaReverso.Font = new Font("Berlin Sans FB", 12F);
+ lblMediaReverso.ForeColor = Color.White;
+ lblMediaReverso.Location = new Point(26, 140);
+ lblMediaReverso.Margin = new Padding(0);
+ lblMediaReverso.Name = "lblMediaReverso";
+ lblMediaReverso.Size = new Size(109, 18);
+ lblMediaReverso.TabIndex = 39;
+ lblMediaReverso.Text = "Média:";
+ lblMediaReverso.TextAlign = ContentAlignment.MiddleLeft;
+ //
+ // txtBoxDesvioReverso
+ //
+ txtBoxDesvioReverso.Location = new Point(150, 204);
+ txtBoxDesvioReverso.Name = "txtBoxDesvioReverso";
+ txtBoxDesvioReverso.PlaceholderText = "s";
+ txtBoxDesvioReverso.Size = new Size(32, 23);
+ txtBoxDesvioReverso.TabIndex = 42;
+ txtBoxDesvioReverso.TextAlign = HorizontalAlignment.Center;
+ //
+ // lblDesvioReverso
+ //
+ lblDesvioReverso.Font = new Font("Berlin Sans FB", 12F);
+ lblDesvioReverso.ForeColor = Color.White;
+ lblDesvioReverso.Location = new Point(26, 206);
+ lblDesvioReverso.Margin = new Padding(0);
+ lblDesvioReverso.Name = "lblDesvioReverso";
+ lblDesvioReverso.Size = new Size(109, 18);
+ lblDesvioReverso.TabIndex = 41;
+ lblDesvioReverso.Text = "Desvio Padrão:";
+ lblDesvioReverso.TextAlign = ContentAlignment.MiddleLeft;
+ //
+ // txtBoxVarianciaReverso
+ //
+ txtBoxVarianciaReverso.Location = new Point(150, 171);
+ txtBoxVarianciaReverso.Name = "txtBoxVarianciaReverso";
+ txtBoxVarianciaReverso.PlaceholderText = "s²";
+ txtBoxVarianciaReverso.Size = new Size(32, 23);
+ txtBoxVarianciaReverso.TabIndex = 44;
+ txtBoxVarianciaReverso.TextAlign = HorizontalAlignment.Center;
+ //
+ // lblVarianciaReverso
+ //
+ lblVarianciaReverso.Font = new Font("Berlin Sans FB", 12F);
+ lblVarianciaReverso.ForeColor = Color.White;
+ lblVarianciaReverso.Location = new Point(26, 173);
+ lblVarianciaReverso.Margin = new Padding(0);
+ lblVarianciaReverso.Name = "lblVarianciaReverso";
+ lblVarianciaReverso.Size = new Size(109, 18);
+ lblVarianciaReverso.TabIndex = 43;
+ lblVarianciaReverso.Text = "Variância:";
+ lblVarianciaReverso.TextAlign = ContentAlignment.MiddleLeft;
+ //
+ // btnCalcReverso
+ //
+ btnCalcReverso.BorderColor = Color.FromArgb(220, 223, 230);
+ btnCalcReverso.ButtonType = ReaLTaiizor.Util.HopeButtonType.Primary;
+ btnCalcReverso.DangerColor = Color.FromArgb(245, 108, 108);
+ btnCalcReverso.DefaultColor = Color.FromArgb(255, 255, 255);
+ btnCalcReverso.Font = new Font("Berlin Sans FB", 12F);
+ btnCalcReverso.HoverTextColor = Color.FromArgb(48, 49, 51);
+ btnCalcReverso.InfoColor = Color.FromArgb(144, 147, 153);
+ btnCalcReverso.Location = new Point(98, 243);
+ btnCalcReverso.Margin = new Padding(10);
+ btnCalcReverso.Name = "btnCalcReverso";
+ btnCalcReverso.PrimaryColor = Color.FromArgb(79, 55, 139);
+ btnCalcReverso.Size = new Size(108, 34);
+ btnCalcReverso.SuccessColor = Color.FromArgb(103, 194, 58);
+ btnCalcReverso.TabIndex = 46;
+ btnCalcReverso.Text = "Realizar cálculos";
+ btnCalcReverso.TextColor = Color.White;
+ btnCalcReverso.WarningColor = Color.FromArgb(230, 162, 60);
+ btnCalcReverso.Click += btnCalcReverso_Click;
+ //
+ // hopeBtnMetodoReverso
+ //
+ hopeBtnMetodoReverso.BorderColor = Color.FromArgb(220, 223, 230);
+ hopeBtnMetodoReverso.ButtonType = ReaLTaiizor.Util.HopeButtonType.Primary;
+ hopeBtnMetodoReverso.DangerColor = Color.FromArgb(245, 108, 108);
+ hopeBtnMetodoReverso.DefaultColor = Color.FromArgb(255, 255, 255);
+ hopeBtnMetodoReverso.Font = new Font("Berlin Sans FB Demi", 16F, FontStyle.Bold);
+ hopeBtnMetodoReverso.HoverTextColor = Color.FromArgb(48, 49, 51);
+ hopeBtnMetodoReverso.InfoColor = Color.FromArgb(144, 147, 153);
+ hopeBtnMetodoReverso.Location = new Point(72, 473);
+ hopeBtnMetodoReverso.Margin = new Padding(10);
+ hopeBtnMetodoReverso.Name = "hopeBtnMetodoReverso";
+ hopeBtnMetodoReverso.PrimaryColor = Color.FromArgb(79, 55, 139);
+ hopeBtnMetodoReverso.Size = new Size(207, 44);
+ hopeBtnMetodoReverso.SuccessColor = Color.FromArgb(103, 194, 58);
+ hopeBtnMetodoReverso.TabIndex = 47;
+ hopeBtnMetodoReverso.Text = "Método Reverso";
+ hopeBtnMetodoReverso.TextColor = Color.White;
+ hopeBtnMetodoReverso.WarningColor = Color.FromArgb(230, 162, 60);
+ hopeBtnMetodoReverso.Click += hopeBtnMetodoReverso_Click;
+ //
+ // hopeBtnMetodoPadrao
+ //
+ hopeBtnMetodoPadrao.BorderColor = Color.FromArgb(220, 223, 230);
+ hopeBtnMetodoPadrao.ButtonType = ReaLTaiizor.Util.HopeButtonType.Primary;
+ hopeBtnMetodoPadrao.DangerColor = Color.FromArgb(245, 108, 108);
+ hopeBtnMetodoPadrao.DefaultColor = Color.FromArgb(255, 255, 255);
+ hopeBtnMetodoPadrao.Font = new Font("Berlin Sans FB Demi", 16F, FontStyle.Bold);
+ hopeBtnMetodoPadrao.HoverTextColor = Color.FromArgb(48, 49, 51);
+ hopeBtnMetodoPadrao.InfoColor = Color.FromArgb(144, 147, 153);
+ hopeBtnMetodoPadrao.Location = new Point(72, 146);
+ hopeBtnMetodoPadrao.Margin = new Padding(10);
+ hopeBtnMetodoPadrao.Name = "hopeBtnMetodoPadrao";
+ hopeBtnMetodoPadrao.PrimaryColor = Color.FromArgb(79, 55, 139);
+ hopeBtnMetodoPadrao.Size = new Size(207, 44);
+ hopeBtnMetodoPadrao.SuccessColor = Color.FromArgb(103, 194, 58);
+ hopeBtnMetodoPadrao.TabIndex = 48;
+ hopeBtnMetodoPadrao.Text = "Método Padrão";
+ hopeBtnMetodoPadrao.TextColor = Color.White;
+ hopeBtnMetodoPadrao.WarningColor = Color.FromArgb(230, 162, 60);
+ hopeBtnMetodoPadrao.Click += hopeBtnMetodoPadrao_Click;
+ //
+ // pnModoReverso
+ //
+ pnModoReverso.BackColor = Color.FromArgb(57, 45, 120);
+ pnModoReverso.Controls.Add(pnSubModoReverso);
+ pnModoReverso.EdgeColor = Color.FromArgb(32, 41, 50);
+ pnModoReverso.Location = new Point(295, 473);
+ pnModoReverso.Name = "pnModoReverso";
+ pnModoReverso.Padding = new Padding(5);
+ pnModoReverso.Size = new Size(308, 288);
+ pnModoReverso.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
+ pnModoReverso.TabIndex = 30;
+ //
+ // pnSubModoReverso
+ //
+ pnSubModoReverso.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ pnSubModoReverso.BackColor = Color.FromArgb(26, 31, 52);
+ pnSubModoReverso.Controls.Add(lblCampoObrigatorio);
+ pnSubModoReverso.Controls.Add(label4);
+ pnSubModoReverso.Controls.Add(lblChaveAPI);
+ pnSubModoReverso.Controls.Add(txtBoxDesvioReverso);
+ pnSubModoReverso.Controls.Add(txtBoxCvReverso);
+ pnSubModoReverso.Controls.Add(lblDesvioReverso);
+ pnSubModoReverso.Controls.Add(label1);
+ pnSubModoReverso.Controls.Add(lblVarianciaReverso);
+ pnSubModoReverso.Controls.Add(btnCalcReverso);
+ pnSubModoReverso.Controls.Add(txtBoxMediaReverso);
+ pnSubModoReverso.Controls.Add(lblMediaReverso);
+ pnSubModoReverso.Controls.Add(txtBoxVarianciaReverso);
+ pnSubModoReverso.EdgeColor = Color.FromArgb(32, 41, 50);
+ pnSubModoReverso.Location = new Point(3, 3);
+ pnSubModoReverso.Name = "pnSubModoReverso";
+ pnSubModoReverso.Padding = new Padding(5);
+ pnSubModoReverso.Size = new Size(302, 282);
+ pnSubModoReverso.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
+ pnSubModoReverso.TabIndex = 47;
+ //
+ // lblCampoObrigatorio
+ //
+ lblCampoObrigatorio.Font = new Font("Berlin Sans FB", 12.5F);
+ lblCampoObrigatorio.ForeColor = Color.White;
+ lblCampoObrigatorio.Location = new Point(12, 5);
+ lblCampoObrigatorio.Margin = new Padding(0);
+ lblCampoObrigatorio.Name = "lblCampoObrigatorio";
+ lblCampoObrigatorio.Size = new Size(159, 21);
+ lblCampoObrigatorio.TabIndex = 48;
+ lblCampoObrigatorio.Text = "Campo Obrigatório:";
+ lblCampoObrigatorio.TextAlign = ContentAlignment.MiddleLeft;
+ //
+ // label4
+ //
+ label4.Font = new Font("Berlin Sans FB", 9F);
+ label4.ForeColor = Color.White;
+ label4.Location = new Point(13, 105);
+ label4.Margin = new Padding(0);
+ label4.Name = "label4";
+ label4.Size = new Size(123, 30);
+ label4.TabIndex = 47;
+ label4.Text = "Informe ao menos um dos parâmetros:";
+ label4.TextAlign = ContentAlignment.MiddleLeft;
+ //
+ // pnModoPadrao
+ //
+ pnModoPadrao.BackColor = Color.FromArgb(57, 45, 120);
+ pnModoPadrao.Controls.Add(pnSubModoPadrao);
+ pnModoPadrao.EdgeColor = Color.FromArgb(32, 41, 50);
+ pnModoPadrao.Location = new Point(292, 146);
+ pnModoPadrao.Name = "pnModoPadrao";
+ pnModoPadrao.Padding = new Padding(5);
+ pnModoPadrao.Size = new Size(414, 282);
+ pnModoPadrao.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
+ pnModoPadrao.TabIndex = 47;
+ //
+ // pnSubModoPadrao
+ //
+ pnSubModoPadrao.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ pnSubModoPadrao.BackColor = Color.FromArgb(26, 31, 52);
+ pnSubModoPadrao.Controls.Add(chkParesAuto);
+ pnSubModoPadrao.Controls.Add(lblFilaExpandida);
+ pnSubModoPadrao.Controls.Add(flowLayoutPanelPares);
+ pnSubModoPadrao.Controls.Add(AdicionarFila);
+ pnSubModoPadrao.Controls.Add(txtboxFilaExp);
+ pnSubModoPadrao.Controls.Add(TglBtnListaOuFila);
+ pnSubModoPadrao.Controls.Add(lblModoFilaExpandida);
+ pnSubModoPadrao.Controls.Add(btnValidarFilaExp);
+ pnSubModoPadrao.EdgeColor = Color.FromArgb(32, 41, 50);
+ pnSubModoPadrao.Location = new Point(3, 3);
+ pnSubModoPadrao.Name = "pnSubModoPadrao";
+ pnSubModoPadrao.Padding = new Padding(5);
+ pnSubModoPadrao.Size = new Size(408, 276);
+ pnSubModoPadrao.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
+ pnSubModoPadrao.TabIndex = 48;
+ //
+ // label2
+ //
+ label2.Font = new Font("Berlin Sans FB", 9.5F);
+ label2.ForeColor = Color.White;
+ label2.Location = new Point(74, 200);
+ label2.Name = "label2";
+ label2.Size = new Size(205, 228);
+ label2.TabIndex = 49;
+ label2.Text = resources.GetString("label2.Text");
+ //
+ // label3
+ //
+ label3.Font = new Font("Berlin Sans FB", 9.5F);
+ label3.ForeColor = Color.White;
+ label3.Location = new Point(74, 527);
+ label3.Name = "label3";
+ label3.Size = new Size(205, 184);
+ label3.TabIndex = 50;
+ label3.Text = resources.GetString("label3.Text");
//
// TelaMediaPosicaoCentral
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
BackColor = Color.FromArgb(26, 31, 52);
- Controls.Add(btnListaOuFila);
- Controls.Add(pnResultadosEstatisticos);
- Controls.Add(BotaoProximoPassoVAC);
- Controls.Add(ResultadosEstatisticos);
- Controls.Add(AdicionarFila);
- Controls.Add(PanelFilaExpandida);
- Controls.Add(label4);
Controls.Add(label3);
Controls.Add(label2);
- Controls.Add(label1);
- Controls.Add(TituloEstatPar);
- Controls.Add(PanelListaXiFi);
- Margin = new Padding(3, 2, 3, 2);
+ Controls.Add(pnModoPadrao);
+ Controls.Add(pnModoReverso);
+ Controls.Add(hopeBtnMetodoPadrao);
+ Controls.Add(hopeBtnMetodoReverso);
+ Controls.Add(pnResultadosEstatisticos);
+ Controls.Add(BotaoProximoPassoVAC);
+ Controls.Add(lblResultadosEstatisticos);
+ Controls.Add(lblDescTela);
+ Controls.Add(lblTituloEstatPar);
+ Margin = new Padding(0);
Name = "TelaMediaPosicaoCentral";
Size = new Size(1280, 800);
Load += TelaMediaPosicaoCentral_Load;
- PanelFilaExpandida.ResumeLayout(false);
- PanelListaXiFi.ResumeLayout(false);
- PanelListaXiFi.PerformLayout();
pnResultadosEstatisticos.ResumeLayout(false);
+ flowLayoutPanelPares.ResumeLayout(false);
+ Par0.ResumeLayout(false);
+ Par0.PerformLayout();
+ Par1.ResumeLayout(false);
+ Par1.PerformLayout();
+ Par2.ResumeLayout(false);
+ Par2.PerformLayout();
+ Par3.ResumeLayout(false);
+ Par3.PerformLayout();
+ Par4.ResumeLayout(false);
+ Par4.PerformLayout();
+ pnModoReverso.ResumeLayout(false);
+ pnSubModoReverso.ResumeLayout(false);
+ pnSubModoReverso.PerformLayout();
+ pnModoPadrao.ResumeLayout(false);
+ pnSubModoPadrao.ResumeLayout(false);
ResumeLayout(false);
- PerformLayout();
}
#endregion
- private Label TituloEstatPar;
- private Label label1;
- private Label label2;
- private Label label3;
- private Label label4;
- private Panel PanelFilaExpandida;
- private Label FilaExpandidaLabel;
- private Panel PanelListaXiFi;
+ private Label lblTituloEstatPar;
+ private Label lblDescTela;
+ private Label lblFilaExpandida;
private TextBox Fi1;
private TextBox Xi1;
private Button AdicionarFila;
- private Label ResultadosEstatisticos;
+ private Label lblResultadosEstatisticos;
private Label lbPassosGeral;
private Label lbResultadoGeral;
private Button BotaoProximoPassoVAC;
@@ -374,6 +951,49 @@ private void InitializeComponent()
private Label lbTituloGeral;
private Button btnAntTxt;
private Button btnProxTxt;
- private ReaLTaiizor.Controls.HopeToggle btnListaOuFila;
+ private ReaLTaiizor.Controls.HopeToggle TglBtnListaOuFila;
+ private Label lblModoFilaExpandida;
+ private FlowLayoutPanel flowLayoutPanelPares;
+ private Panel Par1;
+ private Panel Par0;
+ private TextBox Xi0;
+ private TextBox Fi0;
+ private Panel Par2;
+ private TextBox Xi2;
+ private TextBox Fi2;
+ private Panel Par3;
+ private TextBox Xi3;
+ private TextBox Fi3;
+ private Panel Par4;
+ private TextBox Xi4;
+ private TextBox Fi4;
+ private CheckBox chkParesAuto;
+ private Button btnAdicionarNovoPar;
+ private ReaLTaiizor.Controls.Button btnRmvPar1;
+ private ReaLTaiizor.Controls.Button btnRmvPar2;
+ private ReaLTaiizor.Controls.Button btnRmvPar3;
+ private ReaLTaiizor.Controls.Button btnRmvPar4;
+ private ReaLTaiizor.Controls.DungeonRichTextBox txtboxFilaExp;
+ private Button btnValidarFilaExp;
+ private TextBox txtBoxCvReverso;
+ private Label lblChaveAPI;
+ private Label label1;
+ private TextBox txtBoxMediaReverso;
+ private Label lblMediaReverso;
+ private TextBox txtBoxDesvioReverso;
+ private Label lblDesvioReverso;
+ private TextBox txtBoxVarianciaReverso;
+ private Label lblVarianciaReverso;
+ private ReaLTaiizor.Controls.HopeRoundButton btnCalcReverso;
+ private ReaLTaiizor.Controls.HopeRoundButton hopeBtnMetodoReverso;
+ private ReaLTaiizor.Controls.HopeRoundButton hopeBtnMetodoPadrao;
+ private ReaLTaiizor.Controls.Panel pnModoReverso;
+ private ReaLTaiizor.Controls.Panel pnModoPadrao;
+ private ReaLTaiizor.Controls.Panel pnSubModoReverso;
+ private ReaLTaiizor.Controls.Panel pnSubModoPadrao;
+ private Label label2;
+ private Label label3;
+ private Label label4;
+ private Label lblCampoObrigatorio;
}
}
diff --git a/TelaMediaPosicaoCentral.cs b/TelaMediaPosicaoCentral.cs
index 000cfca..e9bdd9e 100644
--- a/TelaMediaPosicaoCentral.cs
+++ b/TelaMediaPosicaoCentral.cs
@@ -1,32 +1,27 @@
#region Usings
-
using System.Globalization;
+using System.Text;
+using System.Text.RegularExpressions;
#endregion
+#region Namespace e Declaração de Classe
namespace Interface_e_sistema_em_C_
-
{
-
public partial class TelaMediaPosicaoCentral : UserControl, ITela
{
- #region Campos
- private int proximoXiFiY = 40;
- private int XiX, FiX;
- private List listaXi = new List();
- private List listaFi = new List();
- private List<(TextBox Xi, TextBox Fi, Button BotaoRemover)> listaXiFi = new List<(TextBox, TextBox, Button)>();
+ #endregion
+
+ #region Campos e Propriedades
private GerenciadorTelas _gerenciadorTelas;
- private bool DeveAdicionarNovoPar = false;
- private bool podeAdicionar = true;
private Panel _panelContainer;
- private List listaPassos;
+ private List _painelPares;
private int indiceAtualGeral = 0;
private List textosSequenciais;
private List resultadosSequenciais;
private List titulosSequenciais;
#endregion
- #region Construtor
+ #region Inicialização e Ciclo de Vida
public TelaMediaPosicaoCentral(Panel panelContainer, GerenciadorTelas gerenciadorTelas)
{
InitializeComponent();
@@ -34,527 +29,1049 @@ public TelaMediaPosicaoCentral(Panel panelContainer, GerenciadorTelas gerenciado
this.Dock = DockStyle.Fill;
_gerenciadorTelas = gerenciadorTelas;
_panelContainer = panelContainer;
+ }
- XiX = Xi1.Location.X;
- FiX = Fi1.Location.X;
+ private void TelaMediaPosicaoCentral_Load(object sender, EventArgs e)
+ {
+ InicializarPares();
+ DesativarMenuContexto(this);
+ // Configura o botão manual
+ chkParesAuto.CheckedChanged += (s, e) => AtualizarBotoes();
+ AtualizarBotoes(); // Primeira atualização
+ txtboxFilaExp.KeyPress += (s, e) =>
+ {
+ char tecla = e.KeyChar;
+ if (char.IsControl(tecla))
+ return;
+ if (char.IsDigit(tecla) || tecla == ',' || tecla == ';' || tecla == '-')
+ return;
+ // Bloqueia tudo que não for permitido
+ e.Handled = true;
+ };
+ }
- listaXi.Add(Xi1);
- listaFi.Add(Fi1);
+ public void OnCarregar()
+ {
+ this.Visible = true;
+ this.BringToFront();
+ }
- proximoXiFiY = 40;
+ public void OnDescarregar()
+ {
+ this.Visible = false;
+ LimparRecursos();
}
+
+ private void LimparRecursos() { }
+
+ public UserControl GetView() => this;
#endregion
- #region Adição e Remoção de Pares Xi/Fi
- private void AdicionarNovoPar()
+ #region Gerenciamento de Pares Xi/Fi (Adição e Remoção)
+ private void InicializarPares()
{
- if (listaXiFi.Count > 1)
+
+ _painelPares = new List { Par0, Par1, Par2, Par3, Par4 };
+
+ // Garante que apenas o primeiro painel esteja visível já no início.
+ for (int i = 0; i < _painelPares.Count; i++)
{
- var ultimoPar = listaXiFi.Last();
- if (ultimoPar.Xi.Text == "" || ultimoPar.Fi.Text == "")
+ _painelPares[i].Visible = (i == 0);
+ _painelPares[i].Enabled = (i == 0);
+
+ if (i > 0)
{
- MessageBox.Show("Preencha todos os campos antes de adicionar um novo par.");
- return;
+ var textBoxes = _painelPares[i].Controls.OfType();
+ foreach (var tb in textBoxes)
+ {
+ tb.Clear();
+ }
}
+ ConfigurarEventosDoPar(_painelPares[i]);
+ }
+ AtualizarBotoes();
+ }
+
+ private void ConfigurarEventosDoPar(Panel panel)
+ {
+ int indice = ObterIndice(panel.Name);
+ TextBox xi = panel.Controls.OfType().FirstOrDefault(tb => tb.Name == $"Xi{indice}");
+ TextBox fi = panel.Controls.OfType().FirstOrDefault(tb => tb.Name == $"Fi{indice}");
+
+ if (xi != null)
+ {
+ xi.TextChanged += Xi_TextChanged;
+ xi.KeyPress += ValidarEntradaXi_KeyPress;
+
+ xi.TextChanged += Par_TextChanged;
}
- TextBox novoXi = CopiarConfiguracao(Xi1);
- novoXi.Location = new Point(XiX, proximoXiFiY);
- novoXi.TextChanged += VerificacaoNovoPar;
- novoXi.KeyPress += XiFi_KeyPress;
- novoXi.KeyDown += NovoXi_KeyDown;
+ if (fi != null)
+ {
+ fi.TextChanged += Fi_TextChanged;
+ fi.KeyPress += ValidarEntradaFi_KeyPress;
- TextBox novoFi = CopiarConfiguracao(Fi1);
- novoFi.Location = new Point(FiX, proximoXiFiY);
- novoFi.TextChanged += VerificacaoNovoPar;
- novoFi.KeyPress += XiFi_KeyPress;
- novoFi.KeyDown += XiFi_KeyDown;
+ fi.TextChanged += Par_TextChanged;
+ }
- foreach (Control control in PanelListaXiFi.Controls)
+ // Configura o botão de remover (exceto para o primeiro painel)
+ if (indice > 0)
{
- if (control is Button btn)
+ var btn = GetRemoveButton(panel);
+ if (btn != null)
{
- btn.Visible = false;
+ btn.Click -= BtnRmvPar_Click;
+ btn.Click += BtnRmvPar_Click;
}
}
+ }
- Button botaoRemover = new Button();
-
- botaoRemover.Font = new Font("Arial", 10, FontStyle.Bold);
- botaoRemover.ForeColor = Color.White;
- botaoRemover.Size = new Size(30, 30);
- botaoRemover.Location = new Point((PanelListaXiFi.Width - botaoRemover.Width) / 2, proximoXiFiY);
- botaoRemover.BackColor = Color.Red;
- botaoRemover.Image = Properties.Resources.Lixeira;
+ private ReaLTaiizor.Controls.Button GetRemoveButton(Panel par)
+ {
+ int indice = ObterIndice(par.Name);
- botaoRemover.Click += (sender, e) => RemoverPar(novoXi, novoFi, botaoRemover);
- botaoRemover.Visible = true;
+ if (indice == 0)
+ return null;
- if (listaXiFi.Count < 5)
- {
+ return par.Controls.OfType()
+ .FirstOrDefault(b => b.Name == $"btnRmvPar{indice}");
+ }
- PanelListaXiFi.Controls.Add(novoXi);
- PanelListaXiFi.Controls.Add(novoFi);
- PanelListaXiFi.Controls.Add(botaoRemover);
+ private bool ParPreenchido(Panel panel)
+ {
+ string indice = ObterIndice(panel.Name).ToString();
+ TextBox xi = panel.Controls.OfType().FirstOrDefault(tb => tb.Name == $"Xi{indice}");
+ TextBox fi = panel.Controls.OfType().FirstOrDefault(tb => tb.Name == $"Fi{indice}");
+ return !string.IsNullOrWhiteSpace(xi?.Text) &&
+ !string.IsNullOrWhiteSpace(fi?.Text);
+ }
- listaXi.Add(novoXi);
- listaFi.Add(novoFi);
- listaXiFi.Add((novoXi, novoFi, botaoRemover));
+ private void MostrarPar(int indice)
+ {
+ if (indice < 0 || indice >= _painelPares.Count) return;
+ Panel panel = _painelPares[indice];
+ panel.Visible = true;
+ panel.Enabled = true;
- proximoXiFiY += 30;
- PanelListaXiFi.ScrollControlIntoView(novoXi);
- }
- else
+ var btn = GetRemoveButton(panel);
+ if (btn != null)
{
- MessageBox.Show("Limite de pares Xi-Fi atingido.");
+ btn.Visible = false;
+ btn.Enabled = false;
}
+ flowLayoutPanelPares.ScrollControlIntoView(panel);
+
+ AtualizarBotoes();
}
- private void RemoverPar(TextBox xi, TextBox fi, Button botao)
+ private void AtualizarBotoes()
{
- if (!PanelListaXiFi.Controls.Contains(botao))
+ // Obtém todos os painéis visíveis em ordem
+ var paineisVisiveis = _painelPares
+ .Where(p => p.Visible)
+ .OrderBy(p => ObterIndice(p.Name))
+ .ToList();
+
+ if (!paineisVisiveis.Any())
{
- MessageBox.Show("O botão não foi encontrado no painel.");
+ foreach (var panel in _painelPares)
+ {
+ var btn = GetRemoveButton(panel);
+ if (btn != null)
+ {
+ btn.Visible = false;
+ btn.Enabled = false;
+ }
+ }
+ btnAdicionarNovoPar.Visible = false;
return;
}
- PanelListaXiFi.Controls.Remove(xi);
- PanelListaXiFi.Controls.Remove(fi);
- PanelListaXiFi.Controls.Remove(botao);
-
- listaXi.Remove(xi);
- listaFi.Remove(fi);
- listaXiFi.RemoveAll(par => par.Xi == xi && par.Fi == fi && par.BotaoRemover == botao);
+ var ultimoPar = paineisVisiveis.Last();
+ int indiceUltimo = ObterIndice(ultimoPar.Name);
- if (listaXiFi.Count > 0)
+ // Atualiza todos os botões de remover
+ foreach (var panel in _painelPares)
{
- var parAnterior = listaXiFi.Last();
- parAnterior.BotaoRemover.Visible = true;
+ var btn = GetRemoveButton(panel);
+ if (btn == null) continue;
+
+ // Só mostra o botão se:
+ // 1. For o último painel visível
+ // 2. Houver mais de um painel visível
+ // 3. O painel estiver visível
+ bool deveMostrar = (panel == ultimoPar) &&
+ (paineisVisiveis.Count > 1) &&
+ panel.Visible;
+ btn.Visible = deveMostrar;
+ btn.Enabled = deveMostrar;
}
-
- proximoXiFiY -= 30;
+ bool podeAdicionar = !chkParesAuto.Checked && indiceUltimo < _painelPares.Count - 1;
+ btnAdicionarNovoPar.Visible = podeAdicionar;
+ btnAdicionarNovoPar.Enabled = podeAdicionar;
}
- private TextBox CopiarConfiguracao(TextBox modelo)
+ private void Par_TextChanged(object sender, EventArgs e)
{
- return new TextBox
+ if (chkParesAuto.Checked)
{
- Width = modelo.Width,
- Height = modelo.Height,
- Size = modelo.Size,
- Font = modelo.Font,
- TextAlign = modelo.TextAlign
- };
+ for (int i = 0; i < _painelPares.Count - 1; i++)
+ {
+ if (_painelPares[i].Visible &&
+ ParPreenchido(_painelPares[i]) &&
+ !_painelPares[i + 1].Visible)
+ {
+ MostrarPar(i + 1);
+ break;
+ }
+ }
+ }
+ AtualizarBotoes();
}
- #endregion
- #region Eventos de Tecla e Scroll
- private void NovoXi_KeyDown(object? sender, KeyEventArgs e)
+ private void RemoverUltimoPar()
{
- if (e.Control && e.KeyCode == Keys.V)
+ Panel ultimoPar = _painelPares.LastOrDefault(p => p.Visible);
+ if (ultimoPar == null) return;
+
+ // Limpa os campos antes de esconder
+ var textBoxes = ultimoPar.Controls.OfType();
+ foreach (var tb in textBoxes)
{
- e.SuppressKeyPress = true;
+ tb.Clear();
}
+ ultimoPar.Visible = false;
+ ultimoPar.Enabled = false;
+
+ AtualizarBotoes();
}
- private void NovoXi_KeyPress(object? sender, KeyPressEventArgs e)
+ private void btnAdicionarNovoPar_Click(object sender, EventArgs e)
{
- if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar))
+ // Procura-se o primeiro par oculto que pode ser ativado
+ for (int i = 0; i < _painelPares.Count - 1; i++)
{
- e.Handled = true;
+ Panel parAtual = _painelPares[i];
+ Panel proximoPar = _painelPares[i + 1];
+
+ // Verifica:
+ // 1. O par atual está visível
+ // 2. Está preenchido (Xi e Fi não vazios)
+ // 3. O próximo par ainda está oculto
+ if (parAtual.Visible &&
+ ParPreenchido(parAtual) &&
+ !proximoPar.Visible)
+ {
+ MostrarPar(i + 1);
+ return;
+ }
}
+
+ MessageBox.Show(
+ "Todos os pares já foram adicionados ou o par anterior não está completo.",
+ "Aviso",
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Information
+ );
}
- private void XiFi_KeyDown(object sender, KeyEventArgs e)
+ private void BtnRmvPar_Click(object sender, EventArgs e)
{
- // Bloqueia Ctrl+V e Shift+Insert
- if ((e.Control && e.KeyCode == Keys.V) || (e.Shift && e.KeyCode == Keys.Insert))
- {
- e.SuppressKeyPress = true;
- e.Handled = true;
- }
-
+ RemoverUltimoPar();
}
+ #endregion
+
+ #region Validação e Eventos de Entrada (Teclado, TextChanged)
- private void XiFi_KeyPress(object sender, KeyPressEventArgs e)
+ private void ValidarEntradaXi_KeyPress(object sender, KeyPressEventArgs e)
{
char tecla = e.KeyChar;
-
if (char.IsControl(tecla))
return;
TextBox textBox = sender as TextBox;
if (textBox == null) return;
- bool ValidarFi = textBox.Name.StartsWith("Fi");
-
- // ----------- CAMPO Fi: só números inteiros > 0 -----------
- if (ValidarFi)
+ // Permite dígitos e vírgula
+ if (char.IsDigit(tecla) || tecla == ',')
{
- if (!char.IsDigit(tecla))
+ if (tecla == ',')
{
- e.Handled = true;
- return;
+ if (textBox.Text.Contains(',') || textBox.SelectionStart == 0)
+ {
+ e.Handled = true;
+ }
}
+ return;
+ }
- // Simula o texto final com a nova tecla inserida
- string textofinal = textBox.Text.Insert(textBox.SelectionStart, tecla.ToString());
+ e.Handled = true;
+ }
- // Bloqueia '0' como primeiro caractere
- if (textofinal.StartsWith("0") && textofinal.Length == 1)
- {
- e.Handled = true;
- return;
- }
+ private void ValidarEntradaFi_KeyPress(object sender, KeyPressEventArgs e)
+ {
+ char tecla = e.KeyChar;
+ if (char.IsControl(tecla))
return;
- }
- // ----------- CAMPO Xi: números com vírgula decimal -----------
+ TextBox textBox = sender as TextBox;
+ if (textBox == null) return;
- // Permite números
- if (char.IsDigit(tecla))
+ // Permite apenas dígitos
+ if (!char.IsDigit(tecla))
{
- // Bloqueia se primeiro caractere for '0' sozinho (sem vírgula)
- string textofinal = textBox.Text.Insert(textBox.SelectionStart, tecla.ToString());
- if (textofinal.StartsWith("0") && !textofinal.StartsWith("0,") && textofinal.Length == 1)
- {
- e.Handled = true;
- }
-
+ e.Handled = true;
return;
}
- // Permite apenas uma vírgula e não como primeiro caractere
- if (tecla == ',')
+ // Bloqueia '0' como primeiro caractere
+ string textoFinal = textBox.Text.Insert(textBox.SelectionStart, tecla.ToString());
+ if (textoFinal.StartsWith("0") && textoFinal.Length == 1)
{
- if (textBox.Text.Contains(',') || textBox.SelectionStart == 0)
- {
- e.Handled = true;
- }
-
+ e.Handled = true;
return;
}
-
- // Qualquer outro caractere é bloqueado
- e.Handled = true;
- }
-
- private void BotaoProximoPassoVAC_Click(object sender, EventArgs e)
- {
- _gerenciadorTelas.MostrarTela("Variação Aleatória Contínua");
}
- #endregion
- #region Verificações
- private void VerificacaoNovoPar(Object sender, EventArgs e)
+ private void Xi_TextChanged(object sender, EventArgs e)
{
- var ultimoXi = listaXi[listaXi.Count - 1];
- var ultimoFi = listaFi[listaFi.Count - 1];
+ TextBox textBox = sender as TextBox;
+ if (textBox == null) return;
- bool podeAdicionar = false;
+ string texto = textBox.Text;
- var cultura = new CultureInfo("pt-BR");
+ // Remove caracteres inválidos
+ string textoLimpo = "";
+ bool virgulaEncontrada = false;
- if (double.TryParse(ultimoXi.Text, NumberStyles.Any, cultura, out double valorXi) && int.TryParse(ultimoFi.Text, out int valorFi))
+ foreach (char c in texto)
{
- if (valorXi > 0 && valorFi > 0)
+ if (char.IsDigit(c))
{
- podeAdicionar = true;
+ textoLimpo += c;
}
-
- if (podeAdicionar && !DeveAdicionarNovoPar)
+ else if (c == ',' && !virgulaEncontrada)
{
- podeAdicionar = false;
-
- if (listaXiFi.Count + 1 < 5)
- {
- AdicionarNovoPar();
- }
-
- else
- {
- MessageBox.Show("Limite de inserção de pares Xi e Fi alcançados."); // Corrigir para não aparecer a cada modificação
- }
+ textoLimpo += c;
+ virgulaEncontrada = true;
}
}
- }
- private void DesativarMenuContexto(Control controle)
- {
- foreach (Control c in controle.Controls)
+ // Valida formato "0," vs "0X"
+ if (textoLimpo.StartsWith("0") && textoLimpo.Length > 1 && textoLimpo[1] != ',')
{
- if (c is TextBox)
- c.ContextMenuStrip = new ContextMenuStrip();
+ textoLimpo = "0," + textoLimpo.Substring(1);
+ }
- if (c.HasChildren)
- DesativarMenuContexto(c);
+ // Atualiza o texto se necessário
+ if (texto != textoLimpo)
+ {
+ int posicao = textBox.SelectionStart;
+ textBox.Text = textoLimpo;
+ textBox.SelectionStart = Math.Min(posicao, textoLimpo.Length);
}
}
- #endregion
- #region Backend: Estatísticas, Fila, Cálculo
- private void AdicionarFila_Click(object sender, EventArgs e)
+ private void Fi_TextChanged(object sender, EventArgs e)
{
- var resultados = CalcularEstatisticas();
+ TextBox textBox = sender as TextBox;
+ if (textBox == null) return;
+ // Remove não dígitos
+ string textoLimpo = new string(textBox.Text.Where(char.IsDigit).ToArray());
- if (double.IsNaN(resultados.media) || double.IsNaN(resultados.variancia) || double.IsNaN(resultados.desvio))
+ // Bloqueia "0" sozinho
+ if (textoLimpo == "0")
{
- MessageBox.Show("Não é possível calcular as estatísticas sem os dados fornecidos.", "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
+ textoLimpo = "";
}
- InicializarSequenciaGeral(resultados.passosMedia, resultados.passosVariancia, resultados.passosDesvio, resultados.media.ToString("F2"), resultados.variancia.ToString("F2"), resultados.desvio.ToString("F2"));
-
- try
+ if (textBox.Text != textoLimpo)
{
- List<(double Xi, int Fi)> valores = ObterValoresXiFi();
- string fila = FilaExpandida(valores);
- FilaExpandidaLabel.Text = fila;
- RedimensaoFilaExpandida();
+ int posicao = textBox.SelectionStart;
+ textBox.Text = textoLimpo;
+ textBox.SelectionStart = Math.Min(posicao, textoLimpo.Length);
}
- catch (FormatException ex)
+ }
+
+
+ private void DesativarMenuContexto(Control controle)
+ {
+ foreach (Control c in controle.Controls)
{
- MessageBox.Show(ex.Message, "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ if (c is TextBox)
+ c.ContextMenuStrip = new ContextMenuStrip();
+ if (c.HasChildren)
+ DesativarMenuContexto(c);
}
-
- BotaoProximoPassoVAC.Visible = true;
}
+ #endregion
- public (double media, double variancia, double desvio, double somaFi, string passosMedia, string passosVariancia, string passosDesvio) CalcularEstatisticas()
+ #region Cálculos Estatísticos
+ public (double media, double variancia, double desvio, double cv, double somaFi, string passosMedia, string passosVariancia, string passosDesvio, string passosCv) CalcularEstatisticas()
{
- List xi = new List();
- List fi = new List();
-
+ var dados = new List(); // Lista de valores considerando Fi ou lista em TextBox
+ var listaFi = new List();
double somaFi = 0;
- double MultiplicacaoXiFi = 0;
-
- for (int i = 0; i < listaXi.Count; i++) // este if tem a função
+ if (!TglBtnListaOuFila.Checked)
{
- if (double.TryParse(listaXi[i].Text, out double valorXi) && int.TryParse(listaFi[i].Text, out int valorFi)) // este if serve
+ foreach (Panel panel in _painelPares)
{
- xi.Add(valorXi);
- fi.Add(valorFi);
- somaFi += valorFi;
- MultiplicacaoXiFi += valorXi * valorFi;
+ if (!panel.Visible) continue;
+ string indice = ObterIndice(panel.Name).ToString();
+ TextBox xiTxt = panel.Controls.OfType().FirstOrDefault(tb => tb.Name == $"Xi{indice}");
+ TextBox fiTxt = panel.Controls.OfType().FirstOrDefault(tb => tb.Name == $"Fi{indice}");
+ if (xiTxt == null || fiTxt == null) continue;
+ if (string.IsNullOrWhiteSpace(xiTxt.Text) || string.IsNullOrWhiteSpace(fiTxt.Text)) continue;
+ if (double.TryParse(xiTxt.Text, NumberStyles.Any, new CultureInfo("pt-BR"), out double xi) && int.TryParse(fiTxt.Text, out int fi) && fi > 0)
+ {
+ for (int i = 0; i < fi; i++)
+ dados.Add(xi); // Repete Xi Fi vezes
+ listaFi.Add(fi);
+ somaFi += fi;
+ }
}
}
+ else // Toggle marcado (Fila Expandida)
+ {
+ string texto = txtboxFilaExp.Text.Trim();
+ if (string.IsNullOrEmpty(texto))
+ return (0, 0, 0, 0, 0, "Nenhum dado válido encontrado. Preencha pelo menos um par!", "", "", "");
+ // Substitui tabs e espaços por ';'
+ texto = texto.Replace("\t", ";").Replace(" ", ";");
+ // Permite tanto ';' quanto '-' como separadores
+ string[] tokens = texto.Split(new[] { ';', '-' }, StringSplitOptions.RemoveEmptyEntries);
+ foreach (string t in tokens)
+ {
+ if (double.TryParse(t.Trim(), NumberStyles.Any, new CultureInfo("pt-BR"), out double valor))
+ {
+ dados.Add(valor);
+ }
+ }
+ somaFi = dados.Count;
+ }
- double media = MultiplicacaoXiFi / somaFi;
-
- double somaQuadrados = 0;
-
- for (int i = 0; i < xi.Count; i++)
+ if (somaFi == 0)
{
- somaQuadrados += fi[i] * Math.Pow(xi[i] - media, 2);
+ return (0, 0, 0, 0, 0,
+ "Nenhum dado válido encontrado. Preencha pelo menos um valor!",
+ "", "", "");
}
- double variancia = somaQuadrados / somaFi;
+ double media = dados.Average();
+ double somaQuadrados = dados.Sum(x => Math.Pow(x - media, 2));
+ double variancia = somaQuadrados / (somaFi - 1);
double desvio = Math.Sqrt(variancia);
+ double cv = (media != 0)
+ ? (desvio / media) * 100
+ : 0;
+
+ string passosMedia = GerarPassosMedia(dados, listaFi, media, somaFi);
+ string passosVariancia = GerarPassosVariancia(dados, media, somaQuadrados, somaFi, variancia);
+ string passosDesvio = GerarPassosDesvio(variancia, desvio);
+ string passosCv = GerarPassosCV(desvio, media, cv);
+ return (media, variancia, desvio, cv, somaFi, passosMedia, passosVariancia, passosDesvio, passosCv);
+ }
+
+ private string GerarPassosMedia(List dados, List listaFi, double media, double somaFi)
+ {
+ var valoresComFrequencia = dados.GroupBy(d => d)
+ .Select(g => new
+ {
+ Valor = g.Key,
+ Frequencia = g.Count(),
+ Produto = g.Key * g.Count()
+ })
+ .ToList();
+
+ var passosMultiplicacao = valoresComFrequencia.Select(v => $"{v.Valor:F2} × {v.Frequencia} = {(v.Valor * v.Frequencia):F2}");
+
+ double somaProdutos = valoresComFrequencia.Sum(v => v.Valor * v.Frequencia);
- string passosMedia =
- $"📌 Passo 1: Calcular a soma de Xi · Fi\n" +
- $"→ Para cada linha, multiplique o valor de Xi pela sua frequência Fi.\n" +
- $"→ Depois, some esses produtos. Isso é a soma de todos os valores.\n" +
- $"→ Soma (Xi · Fi) = {MultiplicacaoXiFi}\n\n" +
+ var somaProdutosStr = string.Join(" + ", valoresComFrequencia.Select(v => v.Produto.ToString("F2")));
- $"📌 Passo 2: Calcular a soma das frequências Fi\n" +
- $"→ Some todas as frequências (Fi) da sua tabela. Isso representa o número total de elementos (ou observações) no seu conjunto de dados (N).\n" +
- $"→ Soma Fi = {somaFi}\n\n" +
+ string somaFiStr = string.Join(" + ", listaFi.Select(f => f.ToString()));
- $"📌 Passo 3: Aplicar a fórmula da média ponderada\n" +
- $"→ A média (x̄) é obtida dividindo-se a soma dos produtos (Xi · Fi) pelo número total de frequências (ΣFi).\n" +
- $"→ Exemplo: x̄ = {MultiplicacaoXiFi} / {somaFi} = {media:F2}";
+ return $@"
+→ Passo 1: Realizar a multiplicação Xi × Fi
+{string.Join("\n", passosMultiplicacao)}
- string passosVar =
- $"📌 Passo 1: Calcular a média\n" +
- $"→ Primeiro, você precisa da média (x̄) do seu conjunto de dados. Ela serve como o ponto de referência para medir a dispersão.\n" +
- $"→ Média (x̄) = {media:F2}\n\n" +
- $"📌 Passo 2: Calcular a soma de Fi · (Xi - x̄)²\n" +
- $"→ Para cada linha da sua tabela:\n" +
- $" a. Subtraia a média (x̄) de cada valor (Xi): (Xi - x̄).\n" +
- $" b. Eleve esse resultado ao quadrado para eliminar valores negativos e dar maior peso a desvios maiores: (Xi - x̄)².\n" +
- $" c. Multiplique esse quadrado pela frequência correspondente (Fi): Fi · (Xi - x̄)².\n" +
- $"→ Por fim, some todos esses resultados. Essa soma é a soma dos desvios quadrados ponderados pela frequência.\n" +
- $"→ Soma = {somaQuadrados:F2}\n\n" +
+→ Passo 2: Somar o produto dos cálculos para obter o resultado de ΣXiFi
+{somaProdutosStr} = {somaProdutos:F2}
- $"📌 Passo 3: Aplicar a fórmula da variância\n" +
- $"→ A variância é calculada dividindo a soma obtida no Passo 2 pelo número total de frequências (N = ΣFi).\n" +
- $"→ Fórmula: Variância = (ΣFi · (Xi - x̄)²) / (ΣFi)\n" +
- $"→ Exemplo: Variância = {somaQuadrados:F2} / {somaFi} = {variancia:F2}";
- string passosDesvio =
- $"📌 Passo 1: Calcular a variância\n" +
- $"→ O desvio padrão é diretamente derivado da variância, então você precisa ter a variância (σ²) calculada primeiro.\n" +
- $"→ Variância = {variancia:F2}\n\n" +
+→ Passo 3: Realizar a soma dos valores de Fi para obter o resultado de ΣFi (ou N)
+{somaFiStr} = {somaFi:F0}
- $"📌 Passo 2: Aplicar a fórmula do desvio padrão\n" +
- $"→ Calcule a raiz quadrada da variância.\n" +
- $"→ Fórmula: Desvio Padrão = √Variância\n" +
- $"→ Exemplo: Desvio Padrão = √{variancia:F2} = {Math.Sqrt(variancia):F2}";
- return (media, variancia, desvio, somaFi, passosMedia, passosVar, passosDesvio);
+→ Passo 4: Substituir os valores na fórmula e calcular a Média: x̄ = Σ(XiFi) / ΣFi
+x̄ = {somaProdutos:F2} / {somaFi:F0} = {media:F2}
+".Trim();
}
- private void NavegarGeral(bool proximo)
+ private string GerarPassosVariancia(List dados, double media, double somaQuadrados, double somaFi, double variancia)
{
- if (textosSequenciais == null || titulosSequenciais == null) return;
+ var grupos = dados.GroupBy(d => d)
+ .Select(g => new
+ {
+ Valor = g.Key,
+ Frequencia = g.Count(),
+ DesvioQuadrado = Math.Pow(g.Key - media, 2)
+ })
+ .OrderBy(g => g.Valor);
+
+ var desviosFormatados = new StringBuilder();
+ foreach (var grupo in grupos)
+ {
+ desviosFormatados.AppendLine($"({grupo.Valor:F2} - {media:F2})² = {grupo.DesvioQuadrado:F2} ({grupo.Frequencia}x) = {(grupo.DesvioQuadrado * grupo.Frequencia):F4}");
+ }
- int total = Math.Min(textosSequenciais.Count, titulosSequenciais.Count);
+ return $@"
+→ Passo 1: Tenha em mãos o valor da Média (x̄) e do Tamanho da Amostra (N)
+Média dos valores: x̄ = {media:F2}
+N = {somaFi}
- if (proximo)
- indiceAtualGeral = (indiceAtualGeral + 1) % total;
- else
- indiceAtualGeral = (indiceAtualGeral - 1 + total) % total;
+→ Passo 2: Calcular (Xi - x̄)² × Fi para cada valor (desvio quadrático multiplicado pela frequência)
+{desviosFormatados.ToString().Trim()}
+Soma dos quadrados: Σ(Xi - x̄)² = {somaQuadrados:F2}
- lbPassosGeral.Text = textosSequenciais[indiceAtualGeral];
- lbTituloGeral.Text = titulosSequenciais[indiceAtualGeral];
- lbResultadoGeral.Text = resultadosSequenciais[indiceAtualGeral];
+→ Passo 3: Substituir os valores da fórmula e calcular a Variância: s² = Σ(Xi - x̄)² / N - 1
+s² = {somaQuadrados:F2} / {somaFi} - 1 = {variancia:F2}
+".Trim();
}
- private void InicializarSequenciaGeral(string passosMedia, string passosVariancia, string passosDesvio, string resultadoMedia, string resultadoVariancia, string resultadoDesvio)
+ private string GerarPassosDesvio(double variancia, double desvio)
{
- textosSequenciais = new List { passosMedia, passosVariancia, passosDesvio };
+ return $@"
+→ Passo 1: Tenha em mãos o valor da Variância (s²)
+s² = {variancia:F2}
- resultadosSequenciais = new List { resultadoMedia, resultadoVariancia, resultadoDesvio };
+→ Passo 2: Substituir os valores da fórmula e calcular o Desvio Padrão: s = √s²
+s = √{variancia:F2} = {desvio:F2}
+".Trim();
+ }
- titulosSequenciais = new List
+ private string GerarPassosCV(double desvio, double media, double cv)
+ {
+ if (media == 0)
{
- "Média: x̄ = (ΣXi·Fi) / ΣFi",
- "Variância: σ² = ΣFi·(Xi - x̄)² / ΣFi",
- "Desvio Padrão: σ = √σ²"
+ return @"
+📌 **Coeficiente de Variação (CV)**
+→ CV = (s / x̄) × 100%
+→ Como a média é zero, o CV não pode ser calculado.
+→ O CV é indefinido quando a média é zero.
+".Trim();
+ }
+
+ string interpretacao = cv switch
+ {
+ < 15 => "Baixa dispersão (CV < 15%): Os dados são homogêneos.",
+ < 30 => "Média dispersão (15% ≤ CV < 30%): Dispersão moderada.",
+ < 50 => "Alta dispersão (30% ≤ CV < 50%): Os dados são heterogêneos.",
+ _ => "Muito alta dispersão (CV ≥ 50%): Grande variabilidade nos dados."
};
- indiceAtualGeral = 0;
+ return $@"
+→ Passo 1: Desvio Padrão (s)
+s = {desvio:F2}
- lbPassosGeral.Text = textosSequenciais[indiceAtualGeral];
- lbTituloGeral.Text = titulosSequenciais[indiceAtualGeral];
- lbResultadoGeral.Text = resultadosSequenciais[indiceAtualGeral]; // Só se você quiser exibir isso
+→ Passo 2: Média (x̄)
+x̄ = {media:F2}
+
+→ Passo 3: Coeficiente de Variação (CV)
+CV = (s / x̄) × 100%
+CV = ({desvio:F2} / {media:F2}) × 100%
+CV = {cv:F2}%
+
+📌 Interpretação do CV:
+→ {interpretacao}
+".Trim();
}
+ #endregion
+ #region Exibição de Resultados e Navegação
+ private void AdicionarFila_Click(object sender, EventArgs e)
+ {
+ var resultados = CalcularEstatisticas();
+ if (double.IsNaN(resultados.media) || double.IsNaN(resultados.variancia) || double.IsNaN(resultados.desvio) || double.IsNaN(resultados.cv))
+ {
+ MessageBox.Show("Não é possível calcular as estatísticas sem os dados fornecidos.", "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ return;
+ }
+ InicializarSequenciaGeral(
+ resultados.passosMedia,
+ resultados.passosVariancia,
+ resultados.passosDesvio,
+ resultados.passosCv,
+ resultados.media.ToString("F2"),
+ resultados.variancia.ToString("F2"),
+ resultados.desvio.ToString("F2"),
+ resultados.cv.ToString("F2")
+ );
+ try
+ {
+ string fila;
+ if (TglBtnListaOuFila.Checked)
+ {
+ // Já usa o que o usuário digitou no txtboxFilaExp
+ fila = txtboxFilaExp.Text;
+ }
+ else
+ {
+ // Constrói a lista expandida a partir de Xi/Fi
+ List<(double Xi, int Fi)> valores = ObterValoresXiFi();
+ fila = FilaExpandida(valores);
+ txtboxFilaExp.Text = fila; // mantém sincronizado
+ }
+ }
+ catch (FormatException ex)
+ {
+ MessageBox.Show(ex.Message, "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+
+ BotaoProximoPassoVAC.Visible = true;
+ }
private List<(double Xi, int Fi)> ObterValoresXiFi()
{
var valores = new List<(double Xi, int Fi)>();
+ foreach (Panel panel in _painelPares)
+ {
+ if (!panel.Visible) continue;
+ string indice = ObterIndice(panel.Name).ToString();
+ TextBox xiTxt = panel.Controls.OfType().FirstOrDefault(tb => tb.Name == $"Xi{indice}");
+ TextBox fiTxt = panel.Controls.OfType().FirstOrDefault(tb => tb.Name == $"Fi{indice}");
+ if (xiTxt == null || fiTxt == null) continue;
+ if (string.IsNullOrWhiteSpace(xiTxt.Text) || string.IsNullOrWhiteSpace(fiTxt.Text)) continue;
+ if (double.TryParse(xiTxt.Text, NumberStyles.Any, new CultureInfo("pt-BR"), out double xi) &&
+ int.TryParse(fiTxt.Text, out int fi) && fi > 0)
+ {
+ valores.Add((xi, fi));
+ }
+ else
+ {
+ throw new FormatException("Os valores de Xi e Fi devem ser números válidos!");
+ }
+ }
+ return valores;
+ }
- foreach (var (Xi, Fi, _) in listaXiFi.Prepend((Xi1, Fi1, null)))
+ private void InicializarSequenciaGeral(string passosMedia, string passosVariancia, string passosDesvio, string passosCv, string resultadoMedia, string resultadoVariancia, string resultadoDesvio, string resultadoCv)
+ {
+ textosSequenciais = new List { passosMedia, passosVariancia, passosDesvio, passosCv };
+ resultadosSequenciais = new List { resultadoMedia, resultadoVariancia, resultadoDesvio, resultadoCv };
+ titulosSequenciais = new List
{
- bool XiVazio = string.IsNullOrWhiteSpace(Xi.Text);
- bool FiVazio = string.IsNullOrWhiteSpace(Fi.Text);
+ "Média: x̄ = (ΣXi·Fi) / ΣFi",
+ "Variância: s² = (Xi - x̄)² / ΣFi",
+ "Desvio Padrão: s = √s²",
+ "Coeficiente de Variação: CV = (s / x̄) × 100%"
+ };
+ indiceAtualGeral = 0;
+ AtualizarExibicaoResultado();
+ }
- if (XiVazio && FiVazio)
- break;
+ private void AtualizarExibicaoResultado()
+ {
+ if (textosSequenciais == null || titulosSequenciais == null || resultadosSequenciais == null)
+ return;
+ lbPassosGeral.Text = textosSequenciais[indiceAtualGeral];
+ lbTituloGeral.Text = titulosSequenciais[indiceAtualGeral];
+ lbResultadoGeral.Text = resultadosSequenciais[indiceAtualGeral];
+ }
- if (XiVazio || FiVazio)
- continue;
+ private void NavegarGeral(bool proximo)
+ {
+ if (textosSequenciais == null || titulosSequenciais == null) return;
+ int total = Math.Min(textosSequenciais.Count, titulosSequenciais.Count);
+ indiceAtualGeral = proximo
+ ? (indiceAtualGeral + 1) % total
+ : (indiceAtualGeral - 1 + total) % total;
+ AtualizarExibicaoResultado();
+ }
- if (double.TryParse(Xi.Text, out double valorXi) && int.TryParse(Fi.Text, out int valorFi))
+ private void LimparCamposDeTexto(Control parent)
+ {
+ foreach (Control c in parent.Controls)
+ {
+ // TextBox normal ou RichTextBox
+ if (c is TextBox || c is RichTextBox)
{
- valores.Add((valorXi, valorFi));
+ c.Text = string.Empty;
}
else
{
- throw new FormatException("Os valores de Xi e Fi devem ser preenchidos com números válidos!");
+ // Verifica se o controle possui a propriedade "Text" (para controles customizados)
+ var prop = c.GetType().GetProperty("Text");
+ if (prop != null && prop.CanWrite)
+ {
+ prop.SetValue(c, string.Empty);
+ }
+ }
+ // Se tiver controles filhos, aplica recursivamente
+ if (c.HasChildren)
+ {
+ LimparCamposDeTexto(c);
}
}
- return valores;
}
- private void RedimensaoFilaExpandida()
+ private void btnProxTxt_Click(object sender, EventArgs e) => NavegarGeral(true);
+ private void btnAntTxt_Click(object sender, EventArgs e) => NavegarGeral(false);
+ #endregion
+
+ #region Manipulação de Dados (Fila Expandida)
+ private string FilaExpandida(List<(double Xi, int Fi)> pares)
{
- FilaExpandidaLabel.Width = PanelFilaExpandida.ClientSize.Width - 20;
- FilaExpandidaLabel.Height = FilaExpandidaLabel.PreferredHeight + 10;
- FilaExpandidaLabel.Padding = new Padding(5);
- FilaExpandidaLabel.MaximumSize = new Size(PanelFilaExpandida.ClientSize.Width - 20, 0);
+ var resultado = new List();
+ foreach (var par in pares)
+ resultado.AddRange(Enumerable.Repeat(par.Xi.ToString(), par.Fi));
+ return string.Join(" - ", resultado);
+ }
+ #endregion
+
- if (FilaExpandidaLabel.Height > PanelFilaExpandida.ClientSize.Height)
+ #region Navegação entre Telas
+ private void BotaoProximoPassoVAC_Click(object sender, EventArgs e)
+ {
+ _gerenciadorTelas.MostrarTela("Variação Aleatória Contínua");
+ }
+ #endregion
+
+ #region Eventos de Interface (Não Funcionais / Em Teste)
+ private void TglBtnListaOuFila_CheckedChanged(object sender, EventArgs e)
+ {
+ if (TglBtnListaOuFila.Checked)
{
- PanelFilaExpandida.AutoScroll = true;
+ flowLayoutPanelPares.Enabled = false;
+ txtboxFilaExp.Enabled = true;
+ btnValidarFilaExp.Enabled = TglBtnListaOuFila.Checked;
+ LimparCamposDeTexto(flowLayoutPanelPares);
}
-
else
{
- PanelFilaExpandida.AutoScroll = false;
+ flowLayoutPanelPares.Enabled = true;
+ txtboxFilaExp.Enabled = false;
+ btnValidarFilaExp.Enabled = TglBtnListaOuFila.Checked;
+ txtboxFilaExp.Text = string.Empty;
}
+ }
+ #endregion
- FilaExpandidaLabel.TextAlign = ContentAlignment.TopLeft;
+ #region Métodos Auxiliares
+ private int ObterIndice(string nome)
+ {
+ return int.Parse(new string(nome.Where(char.IsDigit).ToArray()));
}
+ #endregion
- private string FilaExpandida(List<(double Xi, int Fi)> pares)
+ #region Validação de Dados
+
+ private string ValidarItemNumero(string item)
{
- List Resultado = new List();
+ if (string.IsNullOrWhiteSpace(item))
+ return "Item vazio ou com espaços.";
- foreach (var par in pares)
+ if (item == ",")
+ return "Vírgula sozinha (use um número como '0,5').";
+
+ if (item.EndsWith(","))
+ return $"Número incompleto: '{item}' (falta o decimal).";
+
+ if (item.Count(c => c == ',') > 1)
+ return $"Múltiplas vírgulas: '{item}' (use apenas uma vírgula por número).";
+
+ if (item.Contains(" ") && item.Contains(","))
+ return $"Espaço dentro do número: '{item}' (não use espaço antes ou depois da vírgula).";
+
+ if (item.Length > 1 && item.StartsWith("0") && char.IsDigit(item[1]) && !item.StartsWith("0,"))
+ return $"Zero à esquerda não permitido: '{item}' (use '1' em vez de '01').";
+
+ if (double.TryParse(item, NumberStyles.Any, new CultureInfo("pt-BR"), out _))
+ return null;
+
+ if (double.TryParse(item, NumberStyles.Any, new CultureInfo("en-US"), out _))
+ return null;
+
+ return $"Formato inválido: '{item}'. Use vírgula (1,5) ou ponto (1.5).";
+ }
+
+ private string ValidarItemNumero(string item, out string sugestao)
+ {
+ sugestao = null;
+ string erro = ValidarItemNumero(item);
+
+ if (erro != null)
{
- for (int i = 0; i < par.Fi; i++)
- {
- Resultado.Add(par.Xi.ToString());
- }
+ if (item == ",")
+ sugestao = "0,0";
+ else if (item.EndsWith(","))
+ sugestao = item + "0";
+ else if (item.Count(c => c == ',') > 1)
+ sugestao = Regex.Replace(item, ",", (match) => match.Index == item.IndexOf(',') ? "," : "");
+ else if (item.Contains(" ") && item.Contains(","))
+ sugestao = item.Replace(" ", "");
+ else if (item.Length > 1 && item.StartsWith("0") && char.IsDigit(item[1]) && !item.StartsWith("0,"))
+ sugestao = item.TrimStart('0');
+ else if (item.Contains("."))
+ sugestao = item.Replace(".", ",");
+ else if (double.TryParse(item, NumberStyles.Any, CultureInfo.InvariantCulture, out _))
+ sugestao = item.Replace(".", ",");
+ else
+ sugestao = "0"; // Sugestão genérica como último recurso
}
- return string.Join(" - ", Resultado);
+
+ return erro;
}
#endregion
- #region Ciclo de Vida da Tela
- public void OnCarregar()
+ private bool ValidarLista(string texto, out string listaFormatada, out string erros, char separador = '-', int? minItens = null, int? maxItens = null)
{
- this.Visible = true;
- this.BringToFront();
- }
+ listaFormatada = string.Empty;
+ erros = string.Empty;
+ var errosList = new List();
+ if (string.IsNullOrWhiteSpace(texto))
+ {
+ errosList.Add("O campo está vazio.");
+ erros = string.Join("\n→ ", errosList);
+ return false;
+ }
+ string[] valores = texto.Split(new[] { ';', '-' }, StringSplitOptions.RemoveEmptyEntries);
+ var numeros = new List();
+ foreach (string v in valores)
+ {
+ string item = v.Trim();
+ string erroItem = ValidarItemNumero(item, out string sugestao);
+ if (erroItem != null)
+ {
+ // Adiciona a sugestão à mensagem de erro se disponível
+ string mensagemErro = erroItem;
+ if (!string.IsNullOrEmpty(sugestao))
+ mensagemErro += $" Sugerido: '{sugestao}'";
+ errosList.Add(mensagemErro);
+ }
+ else
+ {
+ numeros.Add(item);
+ }
+ }
+ // Se houver erros, retorna false com todos os detalhes
+ if (errosList.Count > 0)
+ {
+ erros = string.Join("\n→ ", errosList);
+ return false;
+ }
+ // Se não houver números válidos
+ if (numeros.Count == 0)
+ {
+ errosList.Add("Nenhum número válido foi encontrado.");
+ erros = string.Join("\n→ ", errosList);
+ return false;
+ }
+ // Validação de quantidade de itens
+ if (minItens.HasValue && numeros.Count < minItens)
+ errosList.Add($"Mínimo de {minItens} itens necessário(s). Encontrados: {numeros.Count}");
+ if (maxItens.HasValue && numeros.Count > maxItens)
+ errosList.Add($"Máximo de {maxItens} itens permitido(s). Encontrados: {numeros.Count}");
- public void OnDescarregar()
- {
- this.Visible = false;
- LimparRecursos();
+ if (errosList.Count > 0)
+ {
+ erros = string.Join("\n→ ", errosList);
+ return false;
+ }
+ // Recria no formato padronizado: NÚMERO - NÚMERO - NÚMERO
+ listaFormatada = string.Join($" {separador} ", numeros);
+ erros = string.Empty;
+ return true;
}
- private void LimparRecursos() { }
+ private void AplicarCorrecoesAutomaticas(string texto)
+ {
+ string[] valores = texto.Split(new[] { ';', '-' }, StringSplitOptions.RemoveEmptyEntries);
+ var corrigidos = new List();
+ foreach (string v in valores)
+ {
+ string item = v.Trim();
+ ValidarItemNumero(item, out string sugestao);
+ if (sugestao != null)
+ {
+ corrigidos.Add(sugestao);
+ }
+ else
+ {
+ corrigidos.Add(item);
+ }
+ }
+ txtboxFilaExp.Text = string.Join(" - ", corrigidos);
- public UserControl GetView() { return this; }
+ if (ValidarLista(txtboxFilaExp.Text, out string listaFormatada, out _))
+ {
+ txtboxFilaExp.Text = listaFormatada;
+ MessageBox.Show("✅ Correções aplicadas com sucesso!", "Sucesso",
+ MessageBoxButtons.OK, MessageBoxIcon.Information);
+ }
+ }
- private void TelaMediaPosicaoCentral_Load(object sender, EventArgs e)
+ private void btnValidarFilaExp_Click(object sender, EventArgs e)
{
- RedimensaoFilaExpandida();
- DesativarMenuContexto(this);
+ if (ValidarLista(txtboxFilaExp.Text, out string listaFormatada, out string erros,
+ separador: '-', minItens: 2, maxItens: 10))
+ {
+ txtboxFilaExp.Text = listaFormatada;
+ MessageBox.Show("Lista válida e padronizada!", "Validação", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ }
+ else
+ {
+ // Verifica se há sugestões para oferecer correção automática
+ if (erros.Contains("Sugerido:"))
+ {
+ var resultado = MessageBox.Show(
+ $"Corrija os seguintes erros:\n→ {erros}\n\nDeseja aplicar as sugestões automáticas?",
+ "Erros na lista",
+ MessageBoxButtons.YesNo,
+ MessageBoxIcon.Warning);
+ if (resultado == DialogResult.Yes)
+ {
+ AplicarCorrecoesAutomaticas(txtboxFilaExp.Text);
+ return;
+ }
+ }
+ MessageBox.Show($"Corrija os seguintes erros:\n→ {erros}",
+ "Erro na lista",
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Warning);
+ }
}
- #endregion
-
- private void btnProxTxt_Click(object sender, EventArgs e)
+ private void hopeBtnMetodoReverso_Click(object sender, EventArgs e)
{
- NavegarGeral(true);
+ pnModoReverso.Visible = true;
+ pnModoPadrao.Visible = false;
}
- private void btnAntTxt_Click(object sender, EventArgs e)
+ private void hopeBtnMetodoPadrao_Click(object sender, EventArgs e)
{
- NavegarGeral(false);
+ pnModoReverso.Visible = false;
+ pnModoPadrao.Visible = true;
}
- private void btnListaOuFila_CheckedChanged(object sender, EventArgs e) // não funciona, veriricar o por que isso ocore
+ private void btnCalcReverso_Click(object sender, EventArgs e)
{
- if (btnListaOuFila.Checked)
+ if (string.IsNullOrWhiteSpace(txtBoxCvReverso.Text) || string.IsNullOrWhiteSpace(txtBoxMediaReverso.Text))
+ {
+ MessageBox.Show("É necessário inserir valores para o Coeficiente de Variação e a Média!", "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ return;
+ }
+
+ try
{
- Panel pnlBlock = new Panel();
- pnlBlock.Location = new Point(73, 168);
- pnlBlock.Size = new Size(169, 172);
- pnlBlock.BackColor = Color.FromArgb(60, 128, 128, 128);
+ double cvReverso = double.Parse(txtBoxCvReverso.Text.Replace(",", "."));
+
+ double? mediaReversa = string.IsNullOrEmpty(txtBoxMediaReverso.Text)
+ ? null
+ : double.Parse(txtBoxMediaReverso.Text.Replace(",", "."));
+
+ double? varianciaReversa = string.IsNullOrEmpty(txtBoxVarianciaReverso.Text)
+ ? null
+ : double.Parse(txtBoxDesvioReverso.Text.Replace(",", "."));
+
+ double? desvioReverso = string.IsNullOrEmpty(txtBoxDesvioReverso.Text)
+ ? null
+ : double.Parse(txtBoxDesvioReverso.Text.Replace(",", "."));
+
+ if (cvReverso <= 0)
+ {
+ MessageBox.Show("O valor do Coeficiente de Variação deve ser maior que zero!", "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ return;
+ }
+
+ double mediaCalculadaReversa, desvioCalculadoReverso, varianciaCalculadaReversa;
- this.Controls.Add(pnlBlock);
+ if (mediaReversa.HasValue)
+ {
+ mediaCalculadaReversa = mediaReversa.Value;
+ desvioCalculadoReverso = (cvReverso * mediaCalculadaReversa) / 100;
+ varianciaCalculadaReversa = Math.Pow(desvioCalculadoReverso, 2);
+ }
+ else if (desvioReverso.HasValue)
+ {
+ desvioCalculadoReverso = desvioReverso.Value;
+ mediaCalculadaReversa = (desvioCalculadoReverso * 100) / cvReverso;
+ varianciaCalculadaReversa = Math.Pow(desvioCalculadoReverso, 2);
+ }
+ else if (varianciaReversa.HasValue)
+ {
+ varianciaCalculadaReversa = varianciaReversa.Value;
+ desvioCalculadoReverso = Math.Sqrt(varianciaCalculadaReversa);
+ mediaCalculadaReversa = (desvioCalculadoReverso * 100) / cvReverso;
+ }
+ else
+ {
+ MessageBox.Show("Você deve fornecer pelo menos mais um parâmetro além do CV (Média, Desvio ou Variância)!", "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ return;
+ }
+
+ string passosReverso = GerarPassosReverso(cvReverso, mediaReversa, desvioReverso, varianciaReversa, mediaCalculadaReversa, desvioCalculadoReverso, varianciaCalculadaReversa);
+
+ lbPassosGeral.Text = $@"
+Média: {mediaCalculadaReversa:F2}
+Desvio Padrão: {desvioCalculadoReverso:F2}
+Variância: {varianciaCalculadaReversa:F2}
+CV: {cvReverso:F2}%
+
+{passosReverso}
+";
}
- else
+ catch (Exception ex)
{
- RichTextBox txtFilaExpandida = new RichTextBox();
- txtFilaExpandida.Location = new Point(307, 168);
- txtFilaExpandida.Size = new Size(300, 160);
+ MessageBox.Show($"Erro: {ex.Message}", "Erro de Cálculo", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private string GerarPassosReverso(double cvReverso, double? mediaReversa, double? desvioReverso, double? varianciaReversa, double mediaCalculadaReversa, double desvioCalculadoReverso, double varianciaCalculadaReversa)
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.AppendLine("\n📌 **Passos do Cálculo Reverso:**");
- this.Controls.Add(txtFilaExpandida);
+ if (mediaReversa.HasValue)
+ {
+ sb.AppendLine($"1. Dados conhecidos: CV = {cvReverso:F2}%, Média = {mediaReversa:F2}");
+ sb.AppendLine($"2. Cálculo do Desvio Padrão:");
+ sb.AppendLine($" σ = (CV × x̄) / 100");
+ sb.AppendLine($" σ = ({cvReverso:F2} × {mediaReversa:F2}) / 100 = {desvioCalculadoReverso:F2}");
+ sb.AppendLine($"3. Cálculo da Variância:");
+ sb.AppendLine($" σ² = σ² = {desvioCalculadoReverso:F2}² = {varianciaCalculadaReversa:F2}");
+ }
+ else if (desvioReverso.HasValue)
+ {
+ sb.AppendLine($"1. Dados conhecidos: CV = {cvReverso:F2}%, Desvio = {desvioReverso:F2}");
+ sb.AppendLine($"2. Cálculo da Média:");
+ sb.AppendLine($" x̄ = (σ × 100) / CV");
+ sb.AppendLine($" x̄ = ({desvioReverso:F2} × 100) / {cvReverso:F2} = {mediaCalculadaReversa:F2}");
+ sb.AppendLine($"3. Cálculo da Variância:");
+ sb.AppendLine($" σ² = σ² = {desvioReverso:F2}² = {varianciaCalculadaReversa:F2}");
}
+ else if (varianciaReversa.HasValue)
+ {
+ sb.AppendLine($"1. Dados conhecidos: CV = {cvReverso:F2}%, Variância = {varianciaReversa:F2}");
+ sb.AppendLine($"2. Cálculo do Desvio Padrão:");
+ sb.AppendLine($" σ = √σ² = √{varianciaReversa:F2} = {desvioCalculadoReverso:F2}");
+ sb.AppendLine($"3. Cálculo da Média:");
+ sb.AppendLine($" x̄ = (σ × 100) / CV");
+ sb.AppendLine($" x̄ = ({desvioCalculadoReverso:F2} × 100) / {cvReverso:F2} = {mediaCalculadaReversa:F2}");
+ }
+
+ sb.AppendLine("\n📌 **Fórmulas Utilizadas:**");
+ sb.AppendLine("CV = (σ / x̄) × 100%");
+ sb.AppendLine("σ = √σ²");
+ sb.AppendLine("x̄ = (σ × 100) / CV");
+
+ return sb.ToString();
}
}
-}
-
+}
\ No newline at end of file
diff --git a/TelaMediaPosicaoCentral.resx b/TelaMediaPosicaoCentral.resx
index 45739ae..43a47d1 100644
--- a/TelaMediaPosicaoCentral.resx
+++ b/TelaMediaPosicaoCentral.resx
@@ -148,4 +148,71 @@
zDwW93fTtnD6lulP8AR0vfPhhzlYNgAAAABJRU5ErkJggg==
+
+
+ iVBORw0KGgoAAAANSUhEUgAAAA4AAAASCAYAAABrXO8xAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
+ DAAACwwBP0AiyAAAAFlJREFUOE9jYEAC399/V/jy7vv9z2+//0fGIDGQHLJaBnRFxGLyNVIE0E0jhEc1
+ 4sGjGvFgamj89h5dEhf+9Pb7fbjGT2++J4AE0BWh409vv73/8uZXPEgPADAoCyUr16wGAAAAAElFTkSu
+ QmCC
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAAA4AAAASCAYAAABrXO8xAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
+ DAAACwwBP0AiyAAAAFlJREFUOE9jYEAC399/V/jy7vv9z2+//0fGIDGQHLJaBnRFxGLyNVIE0E0jhEc1
+ 4sGjGvFgamj89h5dEhf+9Pb7fbjGT2++J4AE0BWh409vv73/8uZXPEgPADAoCyUr16wGAAAAAElFTkSu
+ QmCC
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAAA4AAAASCAYAAABrXO8xAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
+ DAAACwwBP0AiyAAAAFlJREFUOE9jYEAC399/V/jy7vv9z2+//0fGIDGQHLJaBnRFxGLyNVIE0E0jhEc1
+ 4sGjGvFgamj89h5dEhf+9Pb7fbjGT2++J4AE0BWh409vv73/8uZXPEgPADAoCyUr16wGAAAAAElFTkSu
+ QmCC
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAAA4AAAASCAYAAABrXO8xAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
+ DAAACwwBP0AiyAAAAFlJREFUOE9jYEAC399/V/jy7vv9z2+//0fGIDGQHLJaBnRFxGLyNVIE0E0jhEc1
+ 4sGjGvFgamj89h5dEhf+9Pb7fbjGT2++J4AE0BWh409vv73/8uZXPEgPADAoCyUr16wGAAAAAElFTkSu
+ QmCC
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAAKxJREFUSEvt
+ lFkKg0AQRD2KR80N9GZ6owoFip2yN5OP+OEDYRiqt+rBYXi4PQBGABOABQc8825U/SUAzCZpxKRxLQCs
+ milh0fiUZufKrHlcNs8jXkXxeidZAqOJqKfIvDeaiHoXGkFbVLPjTauaExqQPcNvC/xi0fqZzcHrasdo
+ IlpLzp4pfw/8IupnSrIpEuruLdkuHGrvPZqTXOtc2XbCQnYinnnX8/zhr7wB2iz5UWChVYoAAAAASUVO
+ RK5CYII=
+
+
+
+ 1. MODO DE ENTRADA:
+ • Botão de alternar entre:
+ [ ] Pares Xi/Fi & [ ] Fila Expandida
+
+2. MODO PARES (Xi/Fi):
+ • Adicione valores:
+ - Automático: ao preencher, novo par aparece
+ - Manual: clique em "+"
+
+3. MODO FILA EXPANDIDA:
+ • Digite valores separados por ; ou -
+ • Ex: 5;10;15 ou 5-10-15
+ • Validação: clique em "Validar Fila"
+
+
+ 1. ATIVE O MODO REVERSO:
+ • Clique em "Modo Reverso" (ao lado de "Modo Padrão")
+
+2. INSIRA OS DADOS:
+ • Campo OBRIGATÓRIO: CV (%)
+ • Campo OPCIONAL (escolha PELO MENOS UM):
+ - Média (x̄) ou
+ - Desvio Padrão (s) ou
+ - Variância (s²)
+
\ No newline at end of file
diff --git a/TelaVAC.cs b/TelaVAC.cs
index 05567b6..b8d0e11 100644
--- a/TelaVAC.cs
+++ b/TelaVAC.cs
@@ -103,7 +103,7 @@ private void IconeImportarMedia_Click(object sender, EventArgs e)
if (TelaMedia != null)
{
- var (media, _, _, _, _, _, _) = TelaMedia.CalcularEstatisticas();
+ var (media, _, _, _, _, _, _, _, _) = TelaMedia.CalcularEstatisticas();
if (media == 0 || double.IsNaN(media))
{
@@ -122,7 +122,7 @@ private void IconeImportarDesvio_Click(object sender, EventArgs e)
if (TelaMedia != null)
{
- var (_, desvio, _, _, _, _, _) = TelaMedia.CalcularEstatisticas();
+ var (_, desvio, _, _, _, _, _, _, _) = TelaMedia.CalcularEstatisticas();
if (desvio == 0 || double.IsNaN(desvio))
{
@@ -140,7 +140,7 @@ private void IconeImportarAmostra_Click(object sender, EventArgs e)
if (TelaMedia != null)
{
- var (_, _, _, somaFi, _, _, _) = TelaMedia.CalcularEstatisticas();
+ var (_, _, _, _, somaFi, _, _, _, _) = TelaMedia.CalcularEstatisticas();
if (somaFi == 0 || double.IsNaN(somaFi))
{
diff --git a/eStats.csproj b/eStats.csproj
index 830cef2..33e6885 100644
--- a/eStats.csproj
+++ b/eStats.csproj
@@ -7,6 +7,7 @@
enable
true
enable
+ true
diff --git a/icons/Close.png b/icons/Close.png
new file mode 100644
index 0000000..ecac6f2
Binary files /dev/null and b/icons/Close.png differ
diff --git a/icons/Plus.png b/icons/Plus.png
new file mode 100644
index 0000000..9f39d04
Binary files /dev/null and b/icons/Plus.png differ