private void Apply(TestCreated @event) { Id = @event.Id; Name = @event.Name; Description = @event.Description; TestType = @event.TestType; }
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); }
public void Apply(TestCreated testCreated) { TestName = testCreated.TestName; }