void ReleaseDesignerOutlets()
        {
            if (InterviewTimer != null)
            {
                InterviewTimer.Dispose();
                InterviewTimer = null;
            }

            if (RecordButton != null)
            {
                RecordButton.Dispose();
                RecordButton = null;
            }

            if (TopicsCollectionView != null)
            {
                TopicsCollectionView.Dispose();
                TopicsCollectionView = null;
            }

            if (TopicsInstructions != null)
            {
                TopicsInstructions.Dispose();
                TopicsInstructions = null;
            }

            if (ThemeTitleLabel != null)
            {
                ThemeTitleLabel.Dispose();
                ThemeTitleLabel = null;
            }
        }
Example #2
0
        private void HydrateTopics(Measure measure, bool doUnselectAlso = true)
        {
            if (measure == null)
            {
                return;
            }

            foreach (var topicViewModel in TopicsCollectionView.Cast <TopicViewModel>())
            {
                if (topicViewModel.ChildrenCollectionView == null || !topicViewModel.ChildrenCollectionView.Any())
                {
                    continue;
                }

                foreach (var viewModel in topicViewModel.ChildrenCollectionView.OfType <SubTopicViewModel>().ToList())
                {
                    if (measure.Topics.Any(t => t.Id == viewModel.Id))
                    {
                        viewModel.IsSelected = true;
                    }
                    else if (doUnselectAlso)
                    {
                        viewModel.IsSelected = false;
                    }
                }
            }
        }
Example #3
0
 protected void InitData()
 {
     TopicsCollectionView = CollectionViewSource.GetDefaultView(DataService.GetTopicViewModels().ToObservableCollection()) as ListCollectionView;
     if (TopicsCollectionView != null)
     {
         TopicsCollectionView.MoveCurrentToFirst();
     }
 }
Example #4
0
        private void ReverseHydrateTopics(Measure measure)
        {
            if (measure == null)
            {
                return;
            }
            measure.ClearTopics();

            foreach (var topicViewModel in TopicsCollectionView.Cast <TopicViewModel>())
            {
                if (topicViewModel.ChildrenCollectionView == null || !topicViewModel.ChildrenCollectionView.Any())
                {
                    continue;
                }

                foreach (var selectedTopic in topicViewModel.SelectedTopics)                 //.ChildrenCollectionView.OfType<SubTopicViewModel>().ToList())
                {
                    measure.AddTopic(selectedTopic);
                }
            }
        }