public VmTopicQuestions(Topic topic) { Topic = topic; 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 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 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 VmTopicsPanorama(Topic topic, NavigationService navigationService) : base(navigationService) { Topic = topic; CommandResetProgress = new RelayCommand(notUsed => Topic.ResetProgress()); }
private void CreateStatsForTopic(Topic topic) { foreach (var subTopic in topic.SubTopics) CreateStatsForTopic(subTopic); topicsDb.TopicStats.InsertOnSubmit(new TopicStats(){AssociatedTopic = topic, SuccessRate = null}); }
private void CreateStatsForQuestionsInTopic(Topic topic) { foreach (var subtopic in topic.SubTopics) CreateStatsForQuestionsInTopic(subtopic); foreach (var question in topic.Questions) topicsDb.QuestionStats.InsertOnSubmit(new QuestionStats() { AssociatedQuestion = question }); }
public VmTimedTopicMockTest(Topic topic, NavigationService navigationService) : base(navigationService) { Topic = topic; InitialiseQuestions(); }