public VmTestQuestionContent(VmPopupHostingPage vmPopupHostingPage, int index)
 {
     Index = index;
     this.vmPopupHostingPage = vmPopupHostingPage;
     SelectedAnswers = new ObservableCollection<object>();
     CommandShowImage = new RelayCommand(ShowImage);
 }
 public VmQuestionContent(VmPopupHostingPage vmPopupHostingPage)
 {
     this.vmPopupHostingPage = vmPopupHostingPage;
     SelectedAnswers = new ObservableCollection<object>();
     SelectedAnswers.CollectionChanged += SelectedAnswers_CollectionChanged;
     CommandShowImage = new RelayCommand(ShowImage);
 }
Exemplo n.º 3
0
        public VmTopicQuestions(Topic topic, NavigationService navigationService)
        {
            this.navigationService = navigationService;
            Topic = topic;
            CommandResetProgress = new RelayCommand(notUsed => Topic.ResetProgress());
            CommandGoToQuestions = new RelayCommand(
                notUsed =>
                {
                    //VmLocator.Instance.VmQuestionNew.Topic = Topic;
                    this.navigationService.Navigate(new Uri("/Views/Questions.xaml", UriKind.Relative));
                });

            TitleName = Topic.Name;

            Questions = new ObservableCollection<object>();
            foreach(var question in Topic.Questions)
                Questions.Add(new VmQuestionContent(this) {Topic = Topic, Question = question });

            IsPopupOpened = false;
        }
Exemplo n.º 4
0
        public VmTopicsInfo(Topic topic, NavigationService navigationService)
        {
            this.navigationService = navigationService;
            Topic = topic;
            CommandResetProgress = new RelayCommand(notUsed => Topic.ResetProgress());
            CommandGoToQuestions = new RelayCommand(
                notUsed =>
                {
                    //VmLocator.Instance.VmQuestionNew.Topic = Topic;
                    this.navigationService.Navigate(new Uri("/Views/Questions.xaml", UriKind.Relative));
                });
            CommandMockTest = new RelayCommand(
                notUsed =>
                {
                    VmLocator.Instance.VmMockTest = new VmTimedTopicMockTest(Topic, this.navigationService);
                    this.navigationService.Navigate(new Uri("/Views/MockTest.xaml", UriKind.Relative));
                });

            TitleName = Topic.Name;
        }
Exemplo n.º 5
0
        protected VmMockTest(NavigationService navigationService)
        {
            this.navigationService = navigationService;
            Questions = new ObservableCollection<object>();
            CommandStartTest = new RelayCommand(
                notUsed =>
                {
                    //VmLocator.Instance.VmQuestionNew.Topic = Topic;
                    this.navigationService.Navigate(new Uri("/Views/MockTestContent.xaml", UriKind.Relative));
                });

            CommandEndTest = new RelayCommand(
                notUsed =>
                {
                    //VmLocator.Instance.VmQuestionNew.Topic = Topic;
                    this.navigationService.Navigate(new Uri("/Views/MockTestResults.xaml", UriKind.Relative));

                    foreach (var question in Questions)
                    {
                        ((VmTestQuestionContent) question).IsResultVisible = true;
                    }
                });
        }
 public VmSubjectPanorama(Subject subject, NavigationService navigationService)
     : base(navigationService)
 {
     ParentSubject = subject;
     CommandResetProgress = new RelayCommand(notUsed => ParentSubject.ResetProgress());
 }
Exemplo n.º 7
0
 public VmTopicsPanorama(Topic topic, NavigationService navigationService)
     : base(navigationService)
 {
     Topic = topic;
     CommandResetProgress = new RelayCommand(notUsed => Topic.ResetProgress());
 }