Ejemplo n.º 1
0
        private void txtInputLimit_TextChanged(object sender, EventArgs e)
        {
            bool   isOK = true;
            double dbl;

            if (!double.TryParse(txtGeneRiceK.Text, out dbl) || !cgt.ParaLimitEst(dbl, ChanGenTool.ChanAssign.gpRiceK))
            {
                errorShow.SetError(txtGeneRiceK, cgt.ParaLimitError(ChanGenTool.ChanAssign.gpRiceK));
                isOK = false;
            }
            else
            {
                errorShow.SetError(txtGeneRiceK, null);
            }

            if (!double.TryParse(txtGeneRiceAOA.Text, out dbl) || !cgt.ParaLimitEst(dbl, ChanGenTool.ChanAssign.gpRiceAOA))
            {
                errorShow.SetError(txtGeneRiceAOA, cgt.ParaLimitError(ChanGenTool.ChanAssign.gpRiceAOA));
                isOK = false;
            }
            else
            {
                errorShow.SetError(txtGeneRiceAOA, null);
            }

            btnGeneOk.Enabled = isOK;
        }
Ejemplo n.º 2
0
        private void txt_TextChanged(object sender, EventArgs e)
        {
            bool   isOK = true;
            double dbl;

            if (!double.TryParse(txtAeroDielectric.Text, out dbl) || !cgt.ParaLimitEst(dbl, ChanGenTool.ChanAssign.apDielectric))
            {
                errorShow.SetError(txtAeroDielectric, cgt.ParaLimitError(ChanGenTool.ChanAssign.apDielectric));
                isOK = false;
            }
            else
            {
                errorShow.SetError(txtAeroDielectric, null);
            }

            if (!double.TryParse(txtAeroConductivity.Text, out dbl) || !cgt.ParaLimitEst(dbl, ChanGenTool.ChanAssign.apConductivity))
            {
                errorShow.SetError(txtAeroConductivity, cgt.ParaLimitError(ChanGenTool.ChanAssign.apConductivity));
                isOK = false;
            }
            else
            {
                errorShow.SetError(txtAeroConductivity, null);
            }

            if (!double.TryParse(txtAeroAngSp.Text, out dbl) || !cgt.ParaLimitEst(dbl, ChanGenTool.ChanAssign.apAngSp))
            {
                errorShow.SetError(txtAeroAngSp, cgt.ParaLimitError(ChanGenTool.ChanAssign.apAngSp));
                isOK = false;
            }
            else
            {
                errorShow.SetError(txtAeroAngSp, null);
            }

            btnOk.Enabled = isOK;
        }
Ejemplo n.º 3
0
        private void txtInputLimit_TextChanged(object sender, EventArgs e)
        {
            TextBox txt  = sender as TextBox;
            bool    isOK = true;
            double  dbl;

            if (!double.TryParse(txtGeneDoppler.Text, out dbl) || !cgt.ParaLimitEst(dbl, ChanGenTool.ChanAssign.gpDopplerFre))
            {
                errorShow.SetError(txtGeneDoppler, cgt.ParaLimitError(ChanGenTool.ChanAssign.gpDopplerFre));
                isOK = false;
            }
            else
            {
                errorShow.SetError(txtGeneDoppler, null);
            }

            btnGeneOk.Enabled = isOK;
        }