コード例 #1
0
        private void buttonEvaluate_Click(object sender, EventArgs e)
        {
            Result r = new Result();
            int    tl;
            int    ml;

            if (textBoxTimeLimit.Text == "")
            {
                tl = -1;
            }
            else
            {
                tl = Convert.ToInt32(textBoxTimeLimit.Text);
            }
            if (textBoxMemoryLimit.Text == "")
            {
                ml = -1;
            }
            else
            {
                ml = Convert.ToInt32(textBoxMemoryLimit.Text);
            }
            r = BackEnd.InitEvaluation(textBoxGPP.Text, textBoxSource.Text, textBoxTests.Text, tl, ml);

            /*string sad = "";
             * int br = 0;
             * foreach (string asd in r.testResults)
             * {
             *  if (asd == "ok ")
             ++br;
             *  sad += asd;
             * }
             *
             * listBoxResults.Items.Add(textBoxSource.Text + " " + Convert.ToString(100/r.testResults.Count*br) + "% " + sad);*/
            //MessageBox.Show("done");
        }
コード例 #2
0
 //The function that activates when the text in textBoxGPP is changed
 private void textBoxGPP_TextChanged(object sender, EventArgs e)
 {
     this.tbChanged();
     BackEnd.SetSettings();
 }
コード例 #3
0
 //Startup function
 private void Form1_Load(object sender, EventArgs e)
 {
     BackEnd.InitSettings();
 }