public VmTestQuestionContent(VmPopupHostingPage vmPopupHostingPage, int index)
 {
     Index = index;
     this.vmPopupHostingPage = vmPopupHostingPage;
     SelectedAnswers = new ObservableCollection<object>();
     CommandShowImage = new RelayCommand(ShowImage);
 }
Ejemplo n.º 2
0
 public VmQuestionContent(VmPopupHostingPage vmPopupHostingPage)
 {
     this.vmPopupHostingPage = vmPopupHostingPage;
     SelectedAnswers = new ObservableCollection<object>();
     SelectedAnswers.CollectionChanged += SelectedAnswers_CollectionChanged;
     CommandShowImage = new RelayCommand(ShowImage);
 }
Ejemplo 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;
        }
Ejemplo 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;
        }
Ejemplo 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;
                    }
                });
        }
Ejemplo n.º 6
0
 public VmSubjectPanorama(Subject subject, NavigationService navigationService)
     : base(navigationService)
 {
     ParentSubject = subject;
     CommandResetProgress = new RelayCommand(notUsed => ParentSubject.ResetProgress());
 }
Ejemplo n.º 7
0
 public VmTopicsPanorama(Topic topic, NavigationService navigationService)
     : base(navigationService)
 {
     Topic = topic;
     CommandResetProgress = new RelayCommand(notUsed => Topic.ResetProgress());
 }