Esempio n. 1
0
        public Form1()
        {
            InitializeComponent();
            mainControls = new List <Control>()
            {
                QuestionListBox,
                webBrowser,
                AnswerACheckBox,
                AnswerBCheckBox,
                AnswerCCheckBox,
                AnswerDCheckBox,
                FinishButton
            };
            nameControls = new List <Control>()
            {
                Namelabel,
                NametextBox,
                StartButton
            };

            foreach (var elem in mainControls)
            {
                elem.Visible = false;
            }

            pack = jsonSender.GetPack(false);
            sets = pack.GetSettings();
            if (sets.GetPriorities().Count != 3)
            {
                sets.SetPriorities(jsonSender.GetConfig().InPriority);
            }
            answerCheckBoxes = new CheckBox[] { AnswerACheckBox, AnswerBCheckBox, AnswerCCheckBox, AnswerDCheckBox };

            foreach (var elem in answerCheckBoxes)
            {
                CA[elem] = null;
            }

            for (int i = 1; i < pack.GetQuestions().Count + 1; i++)
            {
                QuestionListBox.Items.Add(i);
            }

            QuestionListBox.SelectedIndex = 0;
        }
Esempio n. 2
0
 public Pack(List <Question> q, PackSettings s)
 {
     Questions = q;
     Settings  = s;
 }