Some gui
This commit is contained in:
24
Päevaküsimus/Models/Answer.cs
Normal file
24
Päevaküsimus/Models/Answer.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace Päevaküsimus.Models
|
||||
{
|
||||
public class Answer
|
||||
{
|
||||
public string answer { get; set; }
|
||||
public bool correct { get; set; }
|
||||
public int selectionCount { get; set; }
|
||||
|
||||
public Answer(string answer)
|
||||
{
|
||||
this.answer = answer;
|
||||
this.correct = false;
|
||||
}
|
||||
|
||||
public Answer(string answer, bool correct)
|
||||
{
|
||||
this.answer = answer;
|
||||
this.correct = correct;
|
||||
}
|
||||
}
|
||||
}
|
||||
25
Päevaküsimus/Models/Question.cs
Normal file
25
Päevaküsimus/Models/Question.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace Päevaküsimus.Models
|
||||
{
|
||||
public class Question
|
||||
{
|
||||
public string question { get; set; }
|
||||
private ObservableCollection<Answer> _answers;
|
||||
|
||||
public Question(string question)
|
||||
{
|
||||
this.question = question;
|
||||
this._answers = new ObservableCollection<Answer>();
|
||||
}
|
||||
|
||||
public ObservableCollection<Answer> answers { get { return _answers; } }
|
||||
|
||||
public void AddAnswer(Answer answer)
|
||||
{
|
||||
_answers.Add(answer);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user