Exemplo n.º 1
0
        public void trans(PanelCommon panel, LabelCommon lblIn, LabelCommon lblOut, LabelCommon lblYeild, string eqid)
        {
            GA1ModelVo Input = (GA1ModelVo)DefaultCbmInvoker.Invoke(new GetCountNoiseCbm(), new GA1ModelVo()
            {
                Status = true, DateFrom = dtp_From.Value, DateTo = dtp_To.Value, Noise_eq_id = eqid
            });
            GA1ModelVo Output = (GA1ModelVo)DefaultCbmInvoker.Invoke(new GetCountNoiseCbm(), new GA1ModelVo()
            {
                Status = false, DateFrom = dtp_From.Value, DateTo = dtp_To.Value, Noise_eq_id = eqid
            });

            lblIn.Text  = "INPUT: " + Input.AffectedCount.ToString();
            lblOut.Text = "OUTPUT: " + Output.AffectedCount.ToString();
            if (Input.AffectedCount > 0)
            {
                double yeild = (double.Parse(Output.AffectedCount.ToString()) / double.Parse(Input.AffectedCount.ToString())) * 100;
                lblYeild.Text = "YIELD: " + Math.Round(yeild, 3).ToString() + " %";
                if (yeild < 90)//NG
                {
                    panel.BackColor = Color.FromArgb(255, 60, 60);
                }
                else if (yeild >= 90 && yeild <= 95)
                {
                    panel.BackColor = Color.Yellow;
                }
                else
                {
                    panel.BackColor = Color.LightGreen;
                }
            }
            else
            {
                panel.BackColor = Color.FromArgb(255, 192, 128);
            }
        }
Exemplo n.º 2
0
        public void SumYieldlLine(PanelCommon panel, LabelCommon lblyield, LabelCommon lblIn, LabelCommon lblOut, double input, double output)
        {
            double yield = Math.Round((output / input) * 100, 3);

            lblIn.Text    = "INPUT: " + input.ToString();
            lblOut.Text   = "OUTPUT: " + output.ToString();
            lblyield.Text = "YIELD: " + yield.ToString() + " %";

            if (yield < 90)
            {
                panel.BackColor = Color.FromArgb(255, 60, 60);
            }
            else if (yield >= 90 && yield <= 95)
            {
                panel.BackColor = Color.Yellow;
            }
            else
            {
                panel.BackColor = Color.LightGreen;
            }
        }