2021-08-01 17:24:15 +02:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace TINK.ViewModel.MiniSurvey.Question
|
|
|
|
|
{
|
|
|
|
|
public class FreeTextViewModel : IMiniSurveyQuestion
|
|
|
|
|
{
|
|
|
|
|
/// <summary> Constructs object. </summary>
|
|
|
|
|
/// <param name="question">Holds the question with key asked to user.</param>
|
|
|
|
|
/// <param name="answers">Holds the list of possible answers with their option keys.</param>
|
|
|
|
|
public FreeTextViewModel(
|
|
|
|
|
KeyValuePair<string, string> question)
|
|
|
|
|
{
|
|
|
|
|
Question = question;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary> Holds the question with key asked to user. </summary>
|
|
|
|
|
public KeyValuePair<string, string> Question { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary> Holds the question with key asked to user exposed to GUI. </summary>
|
|
|
|
|
public string QuestionText => Question.Value;
|
|
|
|
|
|
|
|
|
|
/// <summary> Holds the users selected answer with its option key. </summary>
|
|
|
|
|
public KeyValuePair<string, string> Answer { get; private set; }
|
|
|
|
|
|
|
|
|
|
/// <summary> Holds the list of possible answers exposed to GUI. </summary>
|
2022-08-30 15:42:25 +02:00
|
|
|
|
public string AnswerText
|
2021-08-01 17:24:15 +02:00
|
|
|
|
{
|
|
|
|
|
get => null;
|
|
|
|
|
set => Answer = new KeyValuePair<string, string>(value, null);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|