Ejemplo n.º 1
0
        private void FillFormData()
        {
            Random       r    = new Random();
            SateliteData data = new SateliteData();
            KeyValuePair <string[], string> item;

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

            taskLabel.Text = item.Key.First();
            string[] keys = item.Key;
            label3.Text = keys[1];
            label4.Text = keys[2];
            label5.Text = keys[3];
            label6.Text = keys[4];
            label7.Text = keys[5];
            label8.Text = keys[6];
            label9.Text = keys[7];

            correctAnswer = item.Value;
        }
Ejemplo n.º 2
0
        private void FillFormData()
        {
            Random       r    = new Random();
            SateliteData data = new SateliteData();
            KeyValuePair <string, string[]> item;

            if (_isTest)
            {
                int skipNumber = r.Next(0, 3);
                item = data.CodecData.Skip(skipNumber).First();
            }
            else
            {
                int skipNumber = r.Next(3, 6);
                item = data.CodecData.Skip(skipNumber).First();
            }
            string[] values = item.Value;


            taskLabel.Text = item.Key;

            correctAnswer = string.Join(",", item.Value);

            //textBox1.Text = values[0];
            //textBox2.Text = values[1];
            //textBox3.Text = values[2];
            //textBox4.Text = values[3];
            //textBox5.Text = values[4];
            //textBox6.Text = values[5];
            //textBox7.Text = values[6];
            //textBox8.Text = values[7];
            //textBox9.Text = values[8];
            //textBox10.Text = values[9];
            //textBox11.Text = values[10];
            //textBox12.Text = values[11];
            //textBox13.Text = values[12];
            //textBox14.Text = values[13];
            //textBox15.Text = values[14];
            //textBox16.Text = values[15];
            //textBox17.Text = values[16];
            //textBox18.Text = values[17];
            //textBox19.Text = values[18];
            //textBox20.Text = values[19];
            //textBox21.Text = values[20];
        }