Esempio n. 1
0
            /// <summary>
            /// 读取界面上的值,创建WarningValue对象
            /// </summary>
            /// <returns></returns>
            private WarningValue getFormValve()
            {
                String name = tbName.Text;
                String rate = cbRate.Text;

                double incloSum;

                double.TryParse(tbIncliSum.Text, out incloSum);
                double incloVelo;

                double.TryParse(tbIncliVelo.Text, out incloVelo);
                WarningIncli incli = new WarningIncli(incloSum, incloVelo);

                double setlSum;

                double.TryParse(tbGSetlSum.Text, out setlSum);
                double setlVelo;

                double.TryParse(tbGSetlVelo.Text, out setlVelo);
                WarningGSetle setle = new WarningGSetle(setlSum, setlVelo);

                double forceRate;

                double.TryParse(tbForceRatio.Text, out forceRate);
                WarningForce force = new WarningForce(forceRate);

                //创建警戒值类
                WarningValue warning = new WarningValue(name, rate, incli, setle, force);

                return(warning);
            }
Esempio n. 2
0
 public WarningValue(String name, String rate, WarningIncli warningIncli, WarningGSetle warningGSetle, WarningForce warningForc)
 {
     this.name          = name;
     this.rate          = rate;
     this.warningIncli  = warningIncli;
     this.warningGSetle = warningGSetle;
     this.warningForc   = warningForc;
 }