Exemplo n.º 1
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.º 2
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.º 3
0
 public VmTopicsPanorama(Topic topic, NavigationService navigationService)
     : base(navigationService)
 {
     Topic = topic;
     CommandResetProgress = new RelayCommand(notUsed => Topic.ResetProgress());
 }