示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Eval obU = new Eval(Convert.ToSingle(BitVal.Text), Convert.ToSingle(LoLiScale.Text), Convert.ToSingle(UpLiScale.Text), Convert.ToSingle(qvant.Text));

            obU.CalcEval();
            Resultt.Text = obU.sRes + "";
        }
示例#2
0
        private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)Keys.Enter)
            {
                e.Handled = true;

                Eval obT = new Eval(Convert.ToSingle(BitVal.Text), Convert.ToSingle(LoLiScale.Text), Convert.ToSingle(UpLiScale.Text), Convert.ToSingle(qvant.Text));
                obT.CalcEval();
                Resultt.Text = obT.sRes + "";
            }
        }
示例#3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            string ver;

            string[] far;


            ver         = "v. 0.2";
            label6.Text = ver;
            far         = Environment.GetCommandLineArgs();
            //BitVal.Text = ""+far.Length;
            stArr fae = new stArr(far);

            if (far.Length > 2)
            {
                BitVal.Text = far[1];
                if (far.Length > 2)
                {
                    LoLiScale.Text = far[2];
                }
                if (far.Length > 3)
                {
                    UpLiScale.Text = far[3];
                }
                if (far.Length > 4)
                {
                    qvant.Text = far[4];
                }
            }

            //Resultt.Text = far.Length + "";

            switch (far.Length) //Выбор в зависимости от количества аргументов переданных командной строке
            {
            case 1:
                break;

            case 2:
                break;

            case 3:
                Eval obQ = new Eval(Convert.ToSingle(far[1]), Convert.ToSingle(far[2]));


                obQ.CalcEval();
                Resultt.Text   = obQ.sRes;
                UpLiScale.Text = obQ.iRend + "";
                qvant.Text     = obQ.iCodRange + "";

                break;

            case 4:
                Eval obA = new Eval(Convert.ToSingle(far[1]), Convert.ToSingle(far[2]), Convert.ToSingle(far[3]));


                obA.CalcEval();
                Resultt.Text = obA.sRes;
                qvant.Text   = obA.iCodRange + "";
                break;

            case 5:
                Eval obB = new Eval(Convert.ToSingle(far[1]), Convert.ToSingle(far[2]), Convert.ToSingle(far[3]), Convert.ToSingle(far[4]));


                obB.CalcEval();
                Resultt.Text = obB.sRes;

                break;

            default:

                break;
            } //end swith
        }
示例#4
0
文件: Form1.cs 项目: nus-ii/df
        private void Form1_Load(object sender, EventArgs e)
        {
            string ver;
            string[] far;

            ver = "v. 0.2";
            label6.Text = ver;
            far = Environment.GetCommandLineArgs();
            //BitVal.Text = ""+far.Length;
            stArr fae = new stArr(far);
            if (far.Length > 2)
            {
                BitVal.Text = far[1];
                if (far.Length > 2) { LoLiScale.Text = far[2]; }
                if (far.Length > 3) { UpLiScale.Text = far[3];}
                if (far.Length > 4) { qvant.Text = far[4]; }
            }

            //Resultt.Text = far.Length + "";

            switch (far.Length) //Выбор в зависимости от количества аргументов переданных командной строке
            {

                case 1:
                    break;

                case 2:
                    break;

                case 3:
                    Eval obQ = new Eval(Convert.ToSingle(far[1]), Convert.ToSingle(far[2]));

                    obQ.CalcEval();
                    Resultt.Text = obQ.sRes;
                    UpLiScale.Text = obQ.iRend + "";
                    qvant.Text = obQ.iCodRange+"";

                    break;

                case 4:
                    Eval obA = new Eval(Convert.ToSingle(far[1]), Convert.ToSingle(far[2]), Convert.ToSingle(far[3]));

                    obA.CalcEval();
                    Resultt.Text = obA.sRes;
                    qvant.Text = obA.iCodRange + "";
                    break;

                case 5:
                    Eval obB = new Eval(Convert.ToSingle(far[1]), Convert.ToSingle(far[2]), Convert.ToSingle(far[3]), Convert.ToSingle(far[4]));

                    obB.CalcEval();
                    Resultt.Text = obB.sRes;

                    break;

                default:

                    break;

            } //end swith
        }
示例#5
0
文件: Form1.cs 项目: nus-ii/df
 private void button1_Click(object sender, EventArgs e)
 {
     Eval obU = new Eval(Convert.ToSingle(BitVal.Text), Convert.ToSingle(LoLiScale.Text), Convert.ToSingle(UpLiScale.Text), Convert.ToSingle(qvant.Text));
     obU.CalcEval();
     Resultt.Text = obU.sRes + "";
 }
示例#6
0
文件: Form1.cs 项目: nus-ii/df
        private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)Keys.Enter)
            {
                e.Handled = true;

                Eval obT = new Eval(Convert.ToSingle(BitVal.Text), Convert.ToSingle(LoLiScale.Text), Convert.ToSingle(UpLiScale.Text), Convert.ToSingle(qvant.Text));
                obT.CalcEval();
                Resultt.Text = obT.sRes + "";

            }
        }