public QuestionarySession(IQuestionsStore questions, IOptionsStore options)
 {
     _questions            = questions;
     _options              = options;
     _answeredQuestions    = new List <Question>();
     CurrentQuestionNumber = 1;
     Lifes  = 5;
     Scores = 0;
     NextQuestion();
 }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Window.RequestFeature(WindowFeatures.NoTitle);
            SetContentView(Resource.Layout.Questionary);

            _settings                   = new RuntimeSettingsAndroid();
            _optionsStore               = new OptionsStoreSqlLite(_settings);
            _questionsStore             = new QuestionsStoreSqlLite(_settings, _optionsStore);
            _session                    = new QuestionarySession(_questionsStore, _optionsStore);
            _questionNumberTextView     = FindViewById <TextView>(Resource.Id.QuestionNumberTextView);
            _questionTextView           = FindViewById <TextView>(Resource.Id.QuestionTextView);
            _optionsListView            = FindViewById <ListView>(Resource.Id.OptionsListView);
            _lifesTextView              = FindViewById <TextView>(Resource.Id.LifesTextView);
            _scoresTextView             = FindViewById <TextView>(Resource.Id.ScoresTextView);
            _optionsListView.ChoiceMode = ChoiceMode.Single;
            _optionsListView.ItemClick += OptionsListViewOnItemClick;

            UpdatePontuations();
            PopulateQuestion();
        }
示例#3
0
 public QuestionsSeeder(IQuestionsStore store)
 {
     _store = store;
 }
示例#4
0
 public QuestionsQuery(IQuestionsStore store)
 {
     _store = store;
 }