public CheckMenuItemVM(MenuElem elem)
 {
     this.elem = elem;
     this.menuItems = new ObservableCollection<CheckMenuItemVM>();
     this.relatedMenuItems = new List<CheckMenuItemVM>();
     isChecked = true;
 }
Exemple #2
0
        static MenuElem()
        {
            int id = 1;

            C_EVENT = new MenuElem(id++, Resources.EventManagement, true);         //Data Lifecycle Events
            M_EVENT = new MenuElem(id++, Resources.EventManagement);               //Data Lifecycle Events

            C_STUDY        = new MenuElem(id++, Resources.StudyPlan, true);        //Study Description
            M_MEMBER       = new MenuElem(id++, Resources.StudyMember);            //Study Member
            M_ABSTRACT     = new MenuElem(id++, Resources.StudyAbstract);          //Abstract
            M_COVERAGE     = new MenuElem(id++, Resources.StudyRange);             //Coverage
            M_FUNDING_INFO = new MenuElem(id++, Resources.StudyFund);              //Funding

            C_SAMPLING = new MenuElem(id++, Resources.DataCollectionMethod, true); //Data Collection
            M_SAMPLING = new MenuElem(id++, Resources.DataCollectionMethod);       //Data Collection

            C_QUESTION       = new MenuElem(id++, Resources.QuestionDesign, true); //Question
            M_CONCEPT        = new MenuElem(id++, Resources.VariableConcept);      //Concept
            M_QUESTION       = new MenuElem(id++, Resources.QuestionItemDesign);   //Question Item
            M_CATEGORY       = new MenuElem(id++, Resources.Category);             //Category
            M_CODE           = new MenuElem(id++, Resources.Code);                 //Code
            M_SEQUENCE       = new MenuElem(id++, Resources.Sequence);             //Sequence
            M_QUESTION_GROUP = new MenuElem(id++, Resources.QuestionGroup);

            C_VARIABLE = new MenuElem(id++, Resources.VariableManagement, true); //Variable
            M_VARIABLE = new MenuElem(id++, Resources.VariableInfo);             //Variable Information

            C_DATA       = new MenuElem(id++, Resources.DataManagement, true);   //Data
            M_DATA_SET   = new MenuElem(id++, Resources.DataSetDefinition);      //Logical Data Definition
            M_DATA_FILE  = new MenuElem(id++, Resources.DataFileDefinition);     //Physical Data Description
            M_BOOKS      = new MenuElem(id++, Resources.BookList);               //Physical Data Description
            M_STATISTICS = new MenuElem(id++, Resources.StatisticsInfo);

            C_GROUP            = new MenuElem(id++, Resources.GroupManagement, true); //Group Information
            M_DETAIL           = new MenuElem(id++, Resources.DetailItem);            //Group Description
            M_COMPARE_DAI      = new MenuElem(id++, Resources.CompareMajorDivision);  //Concept Scheme Comparison
            M_COMPARE_SHO      = new MenuElem(id++, Resources.CompareMinorDivision);  //Concept Comparison
            M_COMPARE_VARIABLE = new MenuElem(id++, Resources.CompareVariable);       //Variable Comparison
        }
Exemple #3
0
        static MenuElem()
        {
            int id = 1;
            C_EVENT = new MenuElem(id++, Resources.EventManagement, true); //イベント管理
            M_EVENT = new MenuElem(id++, Resources.EventManagement); //イベント管理

            C_STUDY = new MenuElem(id++, Resources.StudyPlan, true); //調査の企画
            M_MEMBER = new MenuElem(id++, Resources.StudyMember); //調査メンバー
            M_ABSTRACT = new MenuElem(id++, Resources.StudyAbstract); //調査の概
            M_COVERAGE = new MenuElem(id++, Resources.StudyRange); //調査の範囲
            M_FUNDING_INFO = new MenuElem(id++, Resources.StudyFund); //研究資金

            C_SAMPLING = new MenuElem(id++, Resources.DataCollectionMethod, true); //データの収集方法
            M_SAMPLING = new MenuElem(id++, Resources.DataCollectionMethod); //データの収集方法

            C_QUESTION = new MenuElem(id++, Resources.QuestionDesign, true); //設問設計
            M_CONCEPT = new MenuElem(id++, Resources.VariableConcept); //扱いたい変数のイメージ
            M_QUESTION = new MenuElem(id++, Resources.QuestionItemDesign); //質問項目の設計
            M_CATEGORY = new MenuElem(id++, Resources.Category); //選択肢
            M_CODE = new MenuElem(id++, Resources.Code); //コード
            M_SEQUENCE = new MenuElem(id++, Resources.Sequence); //順序
            M_QUESTION_GROUP = new MenuElem(id++, Resources.QuestionGroup);

            C_VARIABLE = new MenuElem(id++, Resources.VariableManagement, true); //変数の管理
            M_VARIABLE = new MenuElem(id++, Resources.VariableInfo); //変数情報

            C_DATA = new MenuElem(id++, Resources.DataManagement, true); //データの管理
            M_DATA_SET = new MenuElem(id++, Resources.DataSetDefinition); //データセットの定義
            M_DATA_FILE = new MenuElem(id++, Resources.DataFileDefinition); //データファイルの定義
            M_BOOKS = new MenuElem(id++, Resources.BookList); //データファイルの定義

            C_GROUP = new MenuElem(id++, Resources.GroupManagement, true); //グループ管理
            M_DETAIL = new MenuElem(id++, Resources.DetailItem); //詳細項目
            M_COMPARE_DAI = new MenuElem(id++, Resources.CompareMajorDivision); //大分類で比較
            M_COMPARE_SHO = new MenuElem(id++, Resources.CompareMinorDivision); //小分類で比
            M_COMPARE_VARIABLE = new MenuElem(id++, Resources.CompareVariable); //変数で比較
        }
Exemple #4
0
 public MenuItemVM(MenuElem elem, FormVM content)
 {
     this.elem = elem;
     this.content = content;
     this.MenuItems = new ObservableCollection<MenuItemVM>();
 }
 public bool IsValid(MenuElem menuElem)
 {
     return validMenuElems.Contains(menuElem);
 }
 public List<MenuElem> GetRelatedMenuElems(MenuElem menuElem)
 {
     //最初の項目(配列の0番目)がチェックされたとき、残りの項目がチェックされる)
     MenuElem[][] menuMatrix = new MenuElem[][] {
         new MenuElem[] {MenuElem.M_QUESTION,  MenuElem.M_CONCEPT, MenuElem.M_CATEGORY, MenuElem.M_CODE, MenuElem.M_VARIABLE, MenuElem.M_DATA_SET, MenuElem.M_DATA_FILE},
         new MenuElem[] {MenuElem.M_CODE, MenuElem.M_CATEGORY},
         new MenuElem[] {MenuElem.M_SEQUENCE, MenuElem.M_CONCEPT, MenuElem.M_QUESTION, MenuElem.M_CATEGORY, MenuElem.M_CODE, MenuElem.M_VARIABLE, MenuElem.M_DATA_SET, MenuElem.M_DATA_FILE},
         new MenuElem[] {MenuElem.M_VARIABLE, MenuElem.M_CONCEPT, MenuElem.M_QUESTION, MenuElem.M_CATEGORY, MenuElem.M_CODE, MenuElem.M_DATA_SET, MenuElem.M_DATA_FILE},
         new MenuElem[] {MenuElem.M_DATA_SET, MenuElem.M_CONCEPT, MenuElem.M_QUESTION, MenuElem.M_CATEGORY, MenuElem.M_CODE, MenuElem.M_VARIABLE, MenuElem.M_DATA_FILE},
         new MenuElem[] {MenuElem.M_DATA_FILE, MenuElem.M_CONCEPT, MenuElem.M_QUESTION, MenuElem.M_CATEGORY, MenuElem.M_CODE, MenuElem.M_VARIABLE, MenuElem.M_DATA_SET},
     };
     List<MenuElem> relatedMenuElems = new List<MenuElem>();
     foreach (MenuElem[] menuList in menuMatrix)
     {
         MenuElem fromMenu = menuList[0];
         if (fromMenu == menuElem)
         {
             for (int i = 1; i < menuList.Length; i++)
             {
                 relatedMenuElems.Add(menuList[i]);
             }
             if (relatedMenuElems.Contains(fromMenu))
             {
                 throw new ApplicationException();
             }
             return relatedMenuElems;
         }
     }
     return relatedMenuElems;
 }
 public static void AppendUniq(List<MenuElem> menuElems, MenuElem appendMenuElem)
 {
     if (menuElems.Contains(appendMenuElem))
     {
         return;
     }
     menuElems.Add(appendMenuElem);
 }
 public static CheckMenuItemVM FindByMenuElem(List<CheckMenuItemVM> menuItems, MenuElem menuElem)
 {
     foreach (CheckMenuItemVM menuItem in menuItems)
     {
         if (menuItem.MenuElem == menuElem)
         {
             return menuItem;
         }
     }
     return null;
 }