コード例 #1
0
        private void FillFormData()
        {
            Random          r    = new Random();
            IterativityData data = new IterativityData();
            KeyValuePair <string[], string[]> item;

            if (_isTest)
            {
                int skipNumber = r.Next(0, 4);
                item = data.DeCodecData.Skip(skipNumber).First();
            }
            else
            {
                int skipNumber = r.Next(4, 7);
                item = data.DeCodecData.Skip(skipNumber).First();
            }


            string[] keys = item.Key;
            matrixLabel1.Text    = keys[0];
            matrixTextBox1.Text  = keys[1];
            matrixTextBox2.Text  = keys[2];
            matrixTextBox3.Text  = keys[3];
            matrixTextBox4.Text  = keys[4];
            matrixTextBox5.Text  = keys[5];
            matrixTextBox6.Text  = keys[6];
            matrixTextBox7.Text  = keys[7];
            matrixTextBox8.Text  = keys[8];
            matrixTextBox9.Text  = keys[9];
            matrixTextBox10.Text = keys[10];
            matrixTextBox11.Text = keys[11];
            matrixTextBox12.Text = keys[12];
            matrixTextBox13.Text = keys[13];
            matrixTextBox14.Text = keys[14];
            matrixTextBox15.Text = keys[15];
            matrixTextBox16.Text = keys[16];
            matrixTextBox17.Text = keys[17];
            matrixTextBox18.Text = keys[18];
            matrixTextBox19.Text = keys[19];
            matrixTextBox20.Text = keys[20];
            matrixTextBox21.Text = keys[21];
            matrixTextBox22.Text = keys[22];
            matrixTextBox23.Text = keys[23];
            matrixTextBox24.Text = keys[24];
            matrixTextBox25.Text = keys[25];
            matrixLabel2.Text    = keys[26];
            matrixLabel3.Text    = keys[27];
            matrixLabel4.Text    = keys[28];
            matrixLabel5.Text    = keys[29];
            matrixLabel6.Text    = keys[30];
            matrixLabel7.Text    = keys[31];
            matrixLabel8.Text    = keys[32];
            matrixLabel9.Text    = keys[33];
            matrixLabel10.Text   = keys[34];

            correctAnswer = string.Join(",", item.Value);
        }
コード例 #2
0
        private void FillFormData()
        {
            Random          r    = new Random();
            IterativityData data = new IterativityData();
            KeyValuePair <string[], string[]> item;

            if (_isTest)
            {
                int skipNumber = r.Next(0, 4);
                item = data.CodecData.Skip(skipNumber).First();
            }
            else
            {
                //19 is upsent
                int skipNumber = r.Next(4, 7);
                item = data.CodecData.Skip(skipNumber).First();
            }

            string[] keys = item.Key;
            matrixElement1.Text  = keys[0];
            matrixElement2.Text  = keys[1];
            matrixElement3.Text  = keys[2];
            matrixElement4.Text  = keys[3];
            matrixElement5.Text  = keys[4];
            matrixElement6.Text  = keys[5];
            matrixElement7.Text  = keys[6];
            matrixElement8.Text  = keys[7];
            matrixElement9.Text  = keys[8];
            matrixElement10.Text = keys[9];
            matrixElement11.Text = keys[10];
            matrixElement12.Text = keys[11];
            matrixElement13.Text = keys[12];
            matrixElement14.Text = keys[13];
            matrixElement15.Text = keys[14];
            matrixElement16.Text = keys[15];
            matrixElement17.Text = keys[16];
            matrixElement18.Text = keys[17];
            matrixElement19.Text = keys[18];
            matrixElement20.Text = keys[19];
            matrixElement21.Text = keys[20];
            matrixElement22.Text = keys[21];
            matrixElement23.Text = keys[22];
            matrixElement24.Text = keys[23];
            matrixElement25.Text = keys[24];
            matrixElement26.Text = keys[25];
            correctAnswer        = string.Join(",", item.Value);
        }