Ejemplo n.º 1
0
 private void Apply(TestCreated @event)
 {
     Id          = @event.Id;
     Name        = @event.Name;
     Description = @event.Description;
     TestType    = @event.TestType;
 }
Ejemplo n.º 2
0
        private void CompleteButton_Click(object sender, EventArgs e)
        {
            TestModel model = new TestModel();

            model.Questions          = new List <TestQuestionModel>();
            model.TestTime           = (int)testTime.Value;
            model.ResultRequirements = new List <int>()
            {
                (int)mark_threeNumber.Value,
                (int)mark_fourNumber.Value,
                (int)mark_fiveNumber.Value
            };

            for (int i = 0; i < treeView.Nodes.Count; i++)
            {
                var questionBlock = treeView.Nodes[i].Tag as QuestionBlockView;
                var questionModel = questionBlock.GetModel();

                model.Questions.Add(questionModel);
            }

            TestCreated?.Invoke(model, EventArgs.Empty);
        }
Ejemplo n.º 3
0
 public void Apply(TestCreated testCreated)
 {
     TestName = testCreated.TestName;
 }