示例#1
0
        public void CreateChildViews()
        {
            mCurrentFormHolder = DependencyResolver.Resolve<ICurrentFormHolder>();
            mConfigurationProvider = DependencyResolver.Resolve<IConfigurationProvider>();

            switch (mConfigurationProvider.Configuration)
            {
                case Configurations.TwoStepsSheet:
                    InitialzeTwoStepsSheetWordSet2();
                    break;

                case Configurations.ThreeStepsSheet:
                    InitializeFourStepsSheetWordSet1();
                    break;

                case Configurations.TwoStepsSheetTwo:
                    InitialzeTwoStepsSheetWordSet3();
                    break;

                case Configurations.TwoStepsSheetThree:
                    InitialzeTwoStepsSheetWordSet4();
                    break;
            }

            mCurrentFormHolder.OnChanged += x => Stack.SelectedIndex = 0;
        }
        public QuestionFormViewModel(ICurrentFormHolder currentFormHolder, 
            IQuestionFormRepository formRepository)
        {
            mCurrentFormHolder = currentFormHolder;
            mFormRepository = formRepository;

            mCurrentFormHolder.OnChanged += ResetFormTo;
        }
        public AllAnswersViewModelBase(ICurrentFormHolder currentFormHolder, Stage stage, string header)
        {
            mCurrentFormHolder = currentFormHolder;
            mStage = stage;
            Header = header;

            mCurrentFormHolder.OnChanged += SetAnswers;
        }
        public AllGradeAnswersViewModel(ICurrentFormHolder currentFormHolder,
            Stage stage, string header)
            : base(currentFormHolder,stage,header)
        {
            Answers = new ObservableCollection<GradeAnswerViewModel>();

            SetAnswers(mCurrentFormHolder.Form);
        }
示例#5
0
        public ButtonsViewModel(ICurrentFormHolder currentFormHolder, 
            IQuestionFormRepository formRepository)
        {
            mCurrentFormHolder = currentFormHolder;
            mFormRepository = formRepository;

            UpdateHasPreviosAndHasNext(mCurrentFormHolder.Form);
            mCurrentFormHolder.OnChanged += UpdateHasPreviosAndHasNext;
        }
        public AllBinaryAnswersViewModel(ICurrentFormHolder currentFormHolder,
            Stage stage, Func<Form, IList<BinaryAnswer>> getAnswers,
            string header)
            : base(currentFormHolder,stage,header)
        {
            mGetAnswers = getAnswers;

            Answers = new ObservableCollection<BinaryAnswerViewModel>();

            SetAnswers(mCurrentFormHolder.Form);
        }