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