Exemple #1
0
        public NewDiscursiveQuestionViewModel(IPageService page, IUserDialogs dialog, NewFormViewModel formViewModel)
        {
            _page          = page;
            _dialog        = dialog;
            _formViewModel = formViewModel;

            AddQuestionCommand    = new Command(async() => await AddQuestion());
            CancelQuestionCommand = new Command(async() => await CancelQuestion());
        }
Exemple #2
0
        public NewMultipleQuestionViewModel(bool _multipleAnswers,
                                            IPageService _pageService,
                                            IUserDialogs dialog,
                                            NewFormViewModel formViewModel)
        {
            this._pageService = _pageService;
            _dialog           = dialog;
            _formViewModel    = formViewModel;

            Options = new ObservableCollection <string>();
            this._multipleAnswers = _multipleAnswers;

            CancelCommand       = new Command(async() => await Cancel());
            AddOptionCommand    = new Command(AddOption);
            RemoveOptionCommand = new Command(RemoveOption);
            SaveQuestionCommand = new Command(async() => await SaveQuestion());
        }