/// <summary> /// Add a label to the answer cells. The user cannot enter any answers. It's only a label. /// </summary> protected void DefineLabel(string label, int row, int column) { AnswerCells.Add(new Cell(row, column), new AnswerCell(InputTypes.Label) { Label = label }); }
/// <summary> /// Add a answer cell. /// </summary> /// <param name="inputType">The input type of the answer cell</param> /// <param name="row">The row of the answer cell</param> /// <param name="column">The column of the answer cell</param> /// <param name="options">Add an array of strings, if the input type is multiple choice. Those are the options displayed for the multiple choice answer cell.</param> /// <param name="label">The label of this answer cell. Default value is null: No label will be displayed</param> protected void DefineAnswerCell(InputTypes inputType, int row, int column, string label = null, string[] options = null) { var cell = new Cell(row, column); if (AnswerCells.ContainsKey(cell)) { throw new Exception($"There is more than on answer cell defined for {cell}."); } AnswerCells.Add(new Cell(row, column), new AnswerCell(inputType, options) { Label = label }); }