Beispiel #1
0
 public void RemoveConceptExternal(ConceptVM concept)
 {
     StudyUnit.OnRemoveConcept(concept);
     concepts.Remove(concept);
     if (SelectedConceptItem == concept)
     {
         SelectedConceptItem = null;
     }
 }
Beispiel #2
0
 public ConceptSchemeVM FindConceptScheme(ConceptVM concept)
 {
     foreach (ConceptSchemeVM conceptScheme in conceptSchemes)
     {
         if (conceptScheme.Concepts.Contains(concept))
         {
             return(conceptScheme);
         }
     }
     return(null);
 }
Beispiel #3
0
 public bool CanRemoveConceptExternal(ConceptVM concept)
 {
     if (concept == null)
     {
         return(false);
     }
     if (concept.InEdit)
     {
         return(false);
     }
     return(StudyUnit.CanRemoveConcept(concept));
 }
 public ConceptSchemeVM(ConceptScheme conceptScheme)
 {
     this.conceptScheme = conceptScheme;
     concepts = new ObservableCollection<ConceptVM>();
     foreach (Concept conceptModel in conceptScheme.Concepts) {
         ConceptVM conceptVM = new ConceptVM(conceptModel);
         conceptVM.Parent = this;
         concepts.Add(conceptVM);
     }
     modelSyncher = new ModelSyncher<ConceptVM, Concept>(this, concepts, conceptScheme.Concepts);
     string message = Properties.Resources.ConceptFormHelpMessage1;
     TestMessage = message;
 }
Beispiel #5
0
        public ConceptSchemeVM(ConceptScheme conceptScheme)
        {
            this.conceptScheme = conceptScheme;
            concepts           = new ObservableCollection <ConceptVM>();
            foreach (Concept conceptModel in conceptScheme.Concepts)
            {
                ConceptVM conceptVM = new ConceptVM(conceptModel);
                conceptVM.Parent = this;
                concepts.Add(conceptVM);
            }
            modelSyncher = new ModelSyncher <ConceptVM, Concept>(this, concepts, conceptScheme.Concepts);
            string message = Properties.Resources.ConceptFormHelpMessage1;

            TestMessage = message;
        }
Beispiel #6
0
 public void RemoveConcept(ConceptVM concept)
 {
     ConceptSchemeVM conceptScheme = conceptForm.FindConceptScheme(concept);
     if (conceptScheme == null)
     {
         return;
     }
     conceptScheme.RemoveConceptExternal(concept);
 }
Beispiel #7
0
 public ObservableCollection<QuestionVM> QuestionsFor(ConceptVM concept)
 {
     return questionForm.QuestionsFor(concept);
 }
Beispiel #8
0
 public void OnRemoveConcept(ConceptVM concept)
 {
     questionForm.OnRemoveConcept(concept);
     variableForm.OnRemoveConcept(concept);
     bookForm.OnRemoveConcept(concept);
 }
Beispiel #9
0
 public bool CanRemoveConcept(ConceptVM conceptVM)
 {
     ObservableCollection<QuestionVM> questions = questionForm.QuestionsFor(conceptVM);
     return questions.Count == 0;
 }
Beispiel #10
0
 public void RemoveQuestion(ConceptVM concept)
 {
     RemoveBookRelationOfMetaData(concept.Id);
 }
Beispiel #11
0
 public ConceptSchemeVM FindConceptScheme(ConceptVM concept)
 {
     foreach (ConceptSchemeVM conceptScheme in conceptSchemes)
     {
         if (conceptScheme.Concepts.Contains(concept))
         {
             return conceptScheme;
         }
     }
     return null;
 }
 public void RemoveConceptExternal(ConceptVM concept)
 {
     StudyUnit.OnRemoveConcept(concept);
     concepts.Remove(concept);
     if (SelectedConceptItem == concept)
     {
         SelectedConceptItem = null;
     }
 }
 public bool CanRemoveConceptExternal(ConceptVM concept)
 {
     if (concept == null)
     {
         return false;
     }
     if (concept.InEdit)
     {
         return false;
     }
     return StudyUnit.CanRemoveConcept(concept);
 }
 public ObservableCollection<QuestionVM> QuestionsFor(ConceptVM concept)
 {
     return RelatedQuestions(concept.Id);
 }
 public void OnRemoveConcept(ConceptVM concept)
 {
     if (SelectedConcept == concept)
     {
         SelectedConcept = null;
     }
 }
 public void OnRemoveConcept(ConceptVM concept)
 {
     foreach (VariableVM variable in variables)
     {
         if (variable.ConceptId == concept.Id)
         {
             variable.ConceptId = null;
             variable.Concept = null;
         }
     }
 }
Beispiel #17
0
 public ConceptVM FindConcept(string conceptId)
 {
     return(ConceptVM.Find(AllConcepts, conceptId));
 }
Beispiel #18
0
 public void OnRemoveConcept(ConceptVM concept)
 {
     RemoveBookRelationOfMetaData(concept.Id);
 }