public GroupVM(MainWindowVM mainWindowVM, Group group) : base(mainWindowVM, group) { this.groupModel = group; groupForm = new GroupFormVM(this); MenuItemVM categoryGroup = new MenuItemVM(MenuElem.C_GROUP, groupForm); MenuItemVM menuDetail = new MenuItemVM(MenuElem.M_DETAIL, groupForm); categoryGroup.Add(menuDetail); this.MenuItems.Add(categoryGroup); compareConceptSchemeForm = new CompareFormVM(this, groupModel.ConceptSchemeCompareTable); MenuItemVM menuCompareDai = new MenuItemVM(MenuElem.M_COMPARE_DAI, compareConceptSchemeForm); categoryGroup.Add(menuCompareDai); compareConceptForm = new CompareFormVM(this, groupModel.ConceptCompareTable); MenuItemVM menuCompareSho = new MenuItemVM(MenuElem.M_COMPARE_SHO, compareConceptForm); categoryGroup.Add(menuCompareSho); compareVariableForm = new CompareFormVM(this, groupModel.VariableCompareTable); MenuItemVM menuCompareVariable = new MenuItemVM(MenuElem.M_COMPARE_VARIABLE, compareVariableForm); categoryGroup.Add(menuCompareVariable); }
public StudyUnitVM(MainWindowVM mainWindowVM, StudyUnit studyUnit) : base(mainWindowVM, studyUnit) { this.studyUnit = studyUnit; EventFormVM eventFormViewModel = new EventFormVM(this); MenuItemVM categoryEvent = new MenuItemVM(MenuElem.C_EVENT, eventFormViewModel); //1 MenuItemVM menuEvent = new MenuItemVM(MenuElem.M_EVENT, eventFormViewModel); //2 menuEvent.IsSelected = true; categoryEvent.Add(menuEvent); this.MenuItems.Add(categoryEvent); memberForm = new MemberFormVM(this); abstractForm = new AbstractFormVM(this); coverageForm = new CoverageFormVM(this); fundingInfoForm = new FundingInfoFormVM(this); MenuItemVM categoryStudy = new MenuItemVM(MenuElem.C_STUDY, memberForm); //3 MenuItemVM menuStudyMember = new MenuItemVM(MenuElem.M_MEMBER, memberForm); //4 MenuItemVM menuStudyAbstract = new MenuItemVM(MenuElem.M_ABSTRACT, abstractForm); //5 MenuItemVM menuStudyRange = new MenuItemVM(MenuElem.M_COVERAGE, coverageForm); //6 MenuItemVM menuFund = new MenuItemVM(MenuElem.M_FUNDING_INFO, fundingInfoForm); //7 categoryStudy.Add(menuStudyMember); categoryStudy.Add(menuStudyAbstract); categoryStudy.Add(menuStudyRange); categoryStudy.Add(menuFund); this.MenuItems.Add(categoryStudy); samplingForm = new SamplingFormVM(this); MenuItemVM categoryScheme = new MenuItemVM(MenuElem.C_SAMPLING, samplingForm); //8 MenuItemVM menuScheme = new MenuItemVM(MenuElem.M_SAMPLING, samplingForm); //9 categoryScheme.Add(menuScheme); this.MenuItems.Add(categoryScheme); conceptForm = new ConceptFormVM(this); categoryForm = new CategoryFormVM(this); codeForm = new CodeFormVM(this); questionForm = new QuestionFormVM(this); //QuestionFormはconcept、category、codeよりあとに生成する必要あり questionGroupForm = new QuestionGroupFormVM(this); // QuestionGroupFormは、SequenceFormより先に生成する必要あり sequenceForm = new SequenceFormVM(this); MenuItemVM categoryQuestion = new MenuItemVM(MenuElem.C_QUESTION, conceptForm); //10 MenuItemVM menuConcept = new MenuItemVM(MenuElem.M_CONCEPT, conceptForm); //11 MenuItemVM menuQuestion = new MenuItemVM(MenuElem.M_QUESTION, questionForm); //12 MenuItemVM menuCategory = new MenuItemVM(MenuElem.M_CATEGORY, categoryForm); //13 MenuItemVM menuCode = new MenuItemVM(MenuElem.M_CODE, codeForm); //14 MenuItemVM menuSequence = new MenuItemVM(MenuElem.M_SEQUENCE, sequenceForm); //15 MenuItemVM menuQuestionGroup = new MenuItemVM(MenuElem.M_QUESTION_GROUP, questionGroupForm); categoryQuestion.Add(menuConcept); categoryQuestion.Add(menuQuestion); categoryQuestion.Add(menuCategory); categoryQuestion.Add(menuCode); categoryQuestion.Add(menuSequence); categoryQuestion.Add(menuQuestionGroup); this.MenuItems.Add(categoryQuestion); variableForm = new VariableFormVM(this); MenuItemVM categoryVariable = new MenuItemVM(MenuElem.C_VARIABLE, variableForm); //16 MenuItemVM menuVariable = new MenuItemVM(MenuElem.M_VARIABLE, variableForm); //17 categoryVariable.Add(menuVariable); this.MenuItems.Add(categoryVariable); dataSetForm = new DataSetFormVM(this); dataFileForm = new DataFileFormVM(this); bookForm = new BookFormVM(this); MenuItemVM categoryData = new MenuItemVM(MenuElem.C_DATA, dataSetForm); //18 MenuItemVM menuDataRelation = new MenuItemVM(MenuElem.M_DATA_SET, dataSetForm); //19 MenuItemVM menuPhysicalStructure = new MenuItemVM(MenuElem.M_DATA_FILE, dataFileForm); //20 MenuItemVM menuBooks = new MenuItemVM(MenuElem.M_BOOKS, bookForm); categoryData.Add(menuDataRelation); categoryData.Add(menuPhysicalStructure); categoryData.Add(menuBooks); this.MenuItems.Add(categoryData); this.SelectedMenuItem = categoryEvent; OnRemoveBooks(); }
public StudyUnitVM(MainWindowVM mainWindowVM, StudyUnit studyUnit) : base(mainWindowVM, studyUnit) { this.studyUnit = studyUnit; EventFormVM eventFormViewModel = new EventFormVM(this); MenuItemVM categoryEvent = new MenuItemVM(MenuElem.C_EVENT, eventFormViewModel); //1 MenuItemVM menuEvent = new MenuItemVM(MenuElem.M_EVENT, eventFormViewModel); //2 menuEvent.IsSelected = true; categoryEvent.Add(menuEvent); this.MenuItems.Add(categoryEvent); memberForm = new MemberFormVM(this); abstractForm = new AbstractFormVM(this); coverageForm = new CoverageFormVM(this); fundingInfoForm = new FundingInfoFormVM(this); MenuItemVM categoryStudy = new MenuItemVM(MenuElem.C_STUDY, memberForm); //3 MenuItemVM menuStudyMember = new MenuItemVM(MenuElem.M_MEMBER, memberForm); //4 MenuItemVM menuStudyAbstract = new MenuItemVM(MenuElem.M_ABSTRACT, abstractForm); //5 MenuItemVM menuStudyRange = new MenuItemVM(MenuElem.M_COVERAGE, coverageForm); //6 MenuItemVM menuFund = new MenuItemVM(MenuElem.M_FUNDING_INFO, fundingInfoForm); //7 categoryStudy.Add(menuStudyMember); categoryStudy.Add(menuStudyAbstract); categoryStudy.Add(menuStudyRange); categoryStudy.Add(menuFund); this.MenuItems.Add(categoryStudy); samplingForm = new SamplingFormVM(this); MenuItemVM categoryScheme = new MenuItemVM(MenuElem.C_SAMPLING, samplingForm); //8 MenuItemVM menuScheme = new MenuItemVM(MenuElem.M_SAMPLING, samplingForm); //9 categoryScheme.Add(menuScheme); this.MenuItems.Add(categoryScheme); conceptForm = new ConceptFormVM(this); categoryForm = new CategoryFormVM(this); codeForm = new CodeFormVM(this); questionForm = new QuestionFormVM(this); //QuestionForm needs to be genarated after concept, category and code questionGroupForm = new QuestionGroupFormVM(this); // QuestionGroupForm needs to be genarated before SequenceForm sequenceForm = new SequenceFormVM(this); MenuItemVM categoryQuestion = new MenuItemVM(MenuElem.C_QUESTION, conceptForm); //10 MenuItemVM menuConcept = new MenuItemVM(MenuElem.M_CONCEPT, conceptForm); //11 MenuItemVM menuQuestion = new MenuItemVM(MenuElem.M_QUESTION, questionForm); //12 MenuItemVM menuCategory = new MenuItemVM(MenuElem.M_CATEGORY, categoryForm); //13 MenuItemVM menuCode = new MenuItemVM(MenuElem.M_CODE, codeForm); //14 MenuItemVM menuSequence = new MenuItemVM(MenuElem.M_SEQUENCE, sequenceForm); //15 MenuItemVM menuQuestionGroup = new MenuItemVM(MenuElem.M_QUESTION_GROUP, questionGroupForm); categoryQuestion.Add(menuConcept); categoryQuestion.Add(menuQuestion); categoryQuestion.Add(menuCategory); categoryQuestion.Add(menuCode); categoryQuestion.Add(menuSequence); categoryQuestion.Add(menuQuestionGroup); this.MenuItems.Add(categoryQuestion); variableForm = new VariableFormVM(this); MenuItemVM categoryVariable = new MenuItemVM(MenuElem.C_VARIABLE, variableForm); //16 MenuItemVM menuVariable = new MenuItemVM(MenuElem.M_VARIABLE, variableForm); //17 categoryVariable.Add(menuVariable); this.MenuItems.Add(categoryVariable); dataSetForm = new DataSetFormVM(this); dataFileForm = new DataFileFormVM(this); bookForm = new BookFormVM(this); statisticsForm = new StatisticsFormVM(this); MenuItemVM categoryData = new MenuItemVM(MenuElem.C_DATA, dataSetForm); //18 MenuItemVM menuDataRelation = new MenuItemVM(MenuElem.M_DATA_SET, dataSetForm); //19 MenuItemVM menuPhysicalStructure = new MenuItemVM(MenuElem.M_DATA_FILE, dataFileForm); //20 MenuItemVM menuBooks = new MenuItemVM(MenuElem.M_BOOKS, bookForm); MenuItemVM menuAggregate = new MenuItemVM(MenuElem.M_STATISTICS, statisticsForm); categoryData.Add(menuDataRelation); categoryData.Add(menuPhysicalStructure); categoryData.Add(menuBooks); categoryData.Add(menuAggregate); this.MenuItems.Add(categoryData); this.SelectedMenuItem = categoryEvent; OnRemoveBooks(); }