private void FillFormData() { Random r = new Random(); ElaesaData data = new ElaesaData(); 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]; correctAnswer = string.Join(",", item.Value); }
private void FillFormData() { Random r = new Random(); ElaesaData data = new ElaesaData(); 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.Value; matrixTextBox1.Text = keys[0]; matrixTextBox2.Text = keys[1]; matrixTextBox3.Text = keys[2]; matrixTextBox4.Text = keys[3]; matrixTextBox5.Text = keys[4]; matrixTextBox6.Text = keys[5]; matrixTextBox7.Text = keys[6]; matrixTextBox8.Text = keys[7]; matrixTextBox9.Text = keys[8]; matrixTextBox10.Text = keys[9]; matrixTextBox11.Text = keys[10]; matrixTextBox12.Text = keys[11]; matrixTextBox13.Text = keys[12]; matrixTextBox14.Text = keys[13]; matrixTextBox15.Text = keys[14]; matrixTextBox16.Text = keys[15]; matrixTextBox17.Text = keys[16]; matrixTextBox18.Text = keys[17]; matrixTextBox19.Text = keys[18]; matrixTextBox20.Text = keys[19]; matrixTextBox21.Text = keys[20]; matrixTextBox22.Text = keys[21]; matrixTextBox23.Text = keys[22]; matrixTextBox24.Text = keys[23]; matrixTextBox25.Text = keys[24]; matrixLabel1.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.Key); }