Beispiel #1
0
        public List <string> GetFuriganaData(int _id)
        {
            List <string> comboData = MasterFactory.GetMasterData <ComboWordMaster>().GetFuriganaData(subjectMaster[_id].ComboId);

            comboData.Add(subjectMaster[_id].ModificationWord);
            return(comboData);
        }
Beispiel #2
0
        /// <summary>
        /// 人数語尾マスタ置換処理
        /// </summary>
        /// <returns>置換語マスタ</returns>
        private List <List <string> > _ConvertNumberOfPeople(List <List <string> > master, List <int> masterId)
        {
            List <string> numberOfPeopleMaster = MasterFactory.GetMasterData <AdjectiveNumberOfPeopleEndOfWordMaster>().GetRangeEnglishWordList(
                ContainerFactory.StepLevelComboBox._StepLevel != StepLevel.ALLSTEP
                        ? MasterFactory.GetMasterData <AdjectiveNumberOfPeopleEndOfWordMaster>().GetRangeEnglishIdGroupByGroupIdAndPersonCategoryAndStepLevel(
                    ContainerFactory.AdjectiveList.SelectedAdjectiveGroupId,
                    ContainerFactory.SubjectList._PersonalCategory,
                    ContainerFactory.StepLevelComboBox._StepLevel,
                    ContainerFactory.AdjectiveList.SelectedItem.Category)
                        : MasterFactory.GetMasterData <AdjectiveNumberOfPeopleEndOfWordMaster>().GetRangeEnglishIdGroupByGroupIdAndPersonCategory(
                    ContainerFactory.AdjectiveList.SelectedAdjectiveGroupId,
                    ContainerFactory.SubjectList._PersonalCategory,
                    ContainerFactory.AdjectiveList.SelectedItem.Category));

            for (int counter = 0; counter < master.Count; counter++)
            {
                if (numberOfPeopleMaster.Count > counter)
                {
                    master[counter][0] = numberOfPeopleMaster[counter];
                    List <string> addWord = MasterFactory.GetMasterData <AdjectiveAddEndOfWordMaster>().GetData(masterId[counter], 0, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType);
                    master[counter][0] += (" " + addWord[0]).Replace("  ", " ");
                    master[counter][1]  = addWord[1] + master[counter][1];
                }
            }
            return(master);
        }
Beispiel #3
0
        private List <List <string> > _SetAdjectiveEndWordMaster(JapaneseReadType type, bool numberOfPeople = false)
        {
            List <List <string> > masterString    = null;
            List <int>            endWordMasterId = ((ContainerFactory.StepLevelComboBox._StepLevel != StepLevel.ALLSTEP) ?
                                                     MasterFactory.GetMasterData <AdjectiveEndOfWordMaster>().GetRangeIdGroupByGroupIdAndStepLevel(
                                                         ContainerFactory.AdjectiveList.SelectedAdjectiveGroupId,
                                                         ContainerFactory.StepLevelComboBox._StepLevel,
                                                         ContainerFactory.AdjectiveList.SelectedItem.Category)
                                            : MasterFactory.GetMasterData <AdjectiveEndOfWordMaster>().GetRangeIdGroupByGroupId(
                                                         ContainerFactory.AdjectiveList.SelectedAdjectiveGroupId,
                                                         ContainerFactory.AdjectiveList.SelectedItem.Category)
                                                     ).ToList();

            masterString = MasterFactory.GetMasterData <AdjectiveEndOfWordMaster>()
                           .GetRangeData(endWordMasterId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType);

            //人数語尾(3人称以外)
            if (numberOfPeople)
            {
                masterString = _ConvertNumberOfPeople(masterString, endWordMasterId);
            }
            else
            {
                //後付け語尾
                for (int addWordCount = 0; addWordCount < masterString.Count; addWordCount++)
                {
                    List <string> addWord = MasterFactory.GetMasterData <AdjectiveAddEndOfWordMaster>().GetData(endWordMasterId[addWordCount], 0, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType);
                    masterString[addWordCount][0] += (" " + addWord[0]).Replace("  ", " ");
                    masterString[addWordCount][1]  = addWord[1] + masterString[addWordCount][1];
                }
            }

            return(masterString);
        }
Beispiel #4
0
        public void SetAdverbList(JapaneseReadType type, AdverbPosition pos, bool init = false)
        {
            // 内部要素をクリア
            parent.AdverbListView.Items.Clear();

            nowSelectedItemIdList.Clear();

            List <List <string> > master = new List <List <string> >();

            master = MasterFactory.GetMasterData <AdverbMaster>().GetRangeData(pos, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType);

            //副詞リストの初期化
            foreach (var items in master.Select((value, index) => new { index, value }))
            {
                ListViewItem addItem = new ListViewItem(items.value[0]);
                addItem.SubItems.Add(items.value[1]);
                parent.AdverbListView.Items.Add(addItem);
                nowSelectedItemIdList.Add(items.index);
            }

            // 初期セットの場合は選択状態も設定
            if (init)
            {
                SelectedItemIndex = 0;
                parent.AdverbListView.Items[0].Selected     = true;
                parent.AdverbListView.SelectedIndexChanged += SetSelectedItemIndex;
            }
        }
Beispiel #5
0
        public string GetFuriganaData(int _id)
        {
            string        furigana = "";
            JapaneseCombo combo    = jcomboWordMaster[_id];

            if (combo != null)
            {
                furigana = MasterFactory.GetMasterData <JapaneseWordMaster>().GetFuriganaData(combo.JapaneseWordMasterId) + MasterFactory.GetMasterData <JapaneseEndingWordMaster>().GetFuriganaData(combo.JapansesEndingWordMasterId);
            }
            return(furigana);
        }
Beispiel #6
0
        public string GetKanjiData(int _id)
        {
            string        kanji = "";
            JapaneseCombo combo = jcomboWordMaster[_id];

            if (combo != null)
            {
                kanji = MasterFactory.GetMasterData <JapaneseWordMaster>().GetKanjiData(combo.JapaneseWordMasterId) + MasterFactory.GetMasterData <JapaneseEndingWordMaster>().GetKanjiData(combo.JapansesEndingWordMasterId);
            }
            return(kanji);
        }
Beispiel #7
0
        public List <string> GetFuriganaGroupData(int _id)
        {
            List <string> comboList = new List <string>();
            JapaneseCombo combo     = jcomboWordMaster[_id];

            if (combo != null)
            {
                comboList.Add(MasterFactory.GetMasterData <JapaneseWordMaster>().GetFuriganaData(combo.JapaneseWordMasterId));
                comboList.Add(MasterFactory.GetMasterData <JapaneseEndingWordMaster>().GetFuriganaData(combo.JapansesEndingWordMasterId));
            }
            return(comboList);
        }
Beispiel #8
0
        public List <string> GetFuriganaData(int _id)
        {
            List <string> comboList = new List <string>();
            ComboWord     combo     = comboWordMaster[_id];

            if (combo != null)
            {
                comboList.Add(MasterFactory.GetMasterData <EnglishWordMaster>().GetData(combo.EnglishId));
                comboList.Add(MasterFactory.GetMasterData <JapaneseComboMaster>().GetFuriganaData(combo.JapaneseId));
            }
            return(comboList);
        }
Beispiel #9
0
        public void SetSubjectList(JapaneseReadType type, bool init = false)
        {
            // 内部要素をクリア
            parent.SubjectListView.Items.Clear();
            nowSelectedItemIdList.Clear();

            //主語リストの初期化
            List <List <string> > master = new List <List <string> >();

            switch (type)
            {
            case JapaneseReadType.HIRAGANA:
                master = MasterFactory.GetMasterData <SubjectMaster>().GetCreatureOrObjectSubjctHiragana(SubjectCategory.None);
                break;

            case JapaneseReadType.FURIGANA:
                master = MasterFactory.GetMasterData <SubjectMaster>().GetCreatureOrObjectSubjctFurigana(SubjectCategory.None);
                break;

            case JapaneseReadType.KANJI:
            default:
                master = MasterFactory.GetMasterData <SubjectMaster>().GetCreatureOrObjectSubjctKanji(SubjectCategory.None);
                break;
            }

            //主語リストの初期化
            foreach (var items in master.Select((value, index) => new { index, value }))
            {
                if (items.index > 0)
                {
                    ListViewItem addItem = new ListViewItem(items.value[0]);
                    addItem.SubItems.Add(items.value[1]);
                    parent.SubjectListView.Items.Add(addItem);
                    nowSelectedItemIdList.Add(items.index);
                }
            }

            // 初期セットの場合は選択状態も設定
            if (init)
            {
                parent.SubjectListView.Items[0].Selected = true;
                SelectedTENIOHA   = "は";
                _Subject          = SubjectCategory.Creature;
                _PersonalCategory = PersonalPronounCategory.First;
                _ConstReason      = ConstReason.None;
                SelectedItemIndex = 0;
                SelectedItemId    = nowSelectedItemIdList[SelectedItemIndex];
                parent.SubjectListView.SelectedIndexChanged += _SubjectListView_SelectedIndexChanged;
            }
        }
Beispiel #10
0
        /// <summary>
        /// 日本語(動詞)の出力
        /// </summary>
        private void SetVerbSourceTextBox()
        {
            string        subject     = MasterFactory.GetMasterData <SubjectMaster>().GetData(ContainerFactory.SubjectList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1] + ContainerFactory.SubjectList.SelectedTENIOHA;
            VerbEndOfWord verbEndItem = (
                ContainerFactory.StepLevelComboBox._StepLevel != StepLevel.ALLSTEP ? (MasterFactory.GetMasterData <VerbEndOfWordMaster>().GetRangeGroupByGroupIdAndStepLevel(
                                                                                          ContainerFactory.VerbList.SelectedItem.Id, ContainerFactory.StepLevelComboBox._StepLevel)).ToList()
                                                                       : (MasterFactory.GetMasterData <VerbEndOfWordMaster>().GetRangeGroupByGroupId(ContainerFactory.VerbList.SelectedVerbGroupId)).ToList()
                )[(ContainerFactory.VerbList.SelectedEndOfWordItemId - 1 >= 0) ? ContainerFactory.VerbList.SelectedEndOfWordItemId - 1 : 0];

            string end = string.Empty;

            end = MasterFactory.GetMasterData <VerbEndOfWordMaster>().GetData(verbEndItem.Id, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            string verb = MasterFactory.GetMasterData <VerbMaster>().GetData(ContainerFactory.VerbList.SelectedItem.Id, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            //後付けマスタが表示されない。。マスタのGet処理作り直す?
            string timeValue = MasterFactory.GetMasterData <VerbAddEndOfWordMaster>().GetGroupByGroupIdData(verbEndItem.Id, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];

            //副詞
            string adverb         = MasterFactory.GetMasterData <AdverbMaster>().GetData(ContainerFactory.AdverbList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            string nounPossessive = MasterFactory.GetMasterData <PossessiveMaster>().GetData(ContainerFactory.NounList.SelectedPossessiveId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            string article        = MasterFactory.GetMasterData <ArticleMaster>().GetData(ContainerFactory.NounList.SelectedArticleId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            //前置詞
            string prePosition = MasterFactory.GetMasterData <PrepositionMaster>().GetData(
                MasterFactory.GetMasterData <VerbConnectionMaster>().GetGroupByGroupIdData(ContainerFactory.VerbList.SelectedItem.Id), ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            //名詞
            string noun = (MasterFactory.GetMasterData <NounMaster>().GetData(
                               ContainerFactory.NounList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1] == string.Empty) ?
                          string.Empty
                : ((prePosition == string.Empty) ?
                   MasterFactory.GetMasterData <NounMaster>().GetData(ContainerFactory.NounList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1] + "に"
                : string.Empty);
            string personPossessive = MasterFactory.GetMasterData <PossessiveMaster>().GetData(ContainerFactory.PersonPrepositionList.SelectedPossessiveId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            string personArticle    = MasterFactory.GetMasterData <ArticleMaster>().GetData(ContainerFactory.PersonPrepositionList.SelectedArticleId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            //名詞
            string person = MasterFactory.GetMasterData <NounMaster>().GetData(ContainerFactory.PersonPrepositionList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];

            person = (person == string.Empty) ? person : person + "と";
            string locationPossessive = MasterFactory.GetMasterData <PossessiveMaster>().GetData(ContainerFactory.LocationPrepositionList.SelectedPossessiveId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            string locationArticle    = MasterFactory.GetMasterData <ArticleMaster>().GetData(ContainerFactory.LocationPrepositionList.SelectedArticleId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            //名詞
            string location = MasterFactory.GetMasterData <NounMaster>().GetData(ContainerFactory.LocationPrepositionList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];

            parent.SourceViewLabel.Text = subject + timeValue +
                                          ((person == string.Empty) ? string.Empty : personPossessive + personArticle + person)
                                          + ((location == string.Empty) ? string.Empty : locationPossessive + locationArticle + location)
                                          + ((noun == string.Empty) ? string.Empty : nounPossessive + article + noun + prePosition)
                                          + adverb
                                          + verb
                                          + end;
        }
Beispiel #11
0
        //人称指定が効いていない。初期表示で形容詞語尾でなく動詞語尾が表示される。
        public void SetVerbList(JapaneseReadType type, bool init = false)
        {
            parent.VerbListView.SelectedIndexChanged -= SetSelectedItemIndex;
            int selectIndex = (parent.VerbListView.SelectedItems.Count <= 0) ? 0 : parent.VerbListView.SelectedIndices[0];


            // 内部要素をクリア
            parent.VerbListView.Items.Clear();
            nowSelectedItemList.Clear();
            nowSelectedItemIdList.Clear();

            // 主語の種別に合致する形容詞リストを作成
            //主語リストの初期化
            List <List <string> > master = new List <List <string> >();

            nowSelectedItemList   = MasterFactory.GetMasterData <VerbMaster>().GetMixCreOrObjAndCategorySubject(ContainerFactory.SubjectList._Subject, ContainerFactory.SubjectList._PersonalCategory);
            nowSelectedItemIdList = nowSelectedItemList.Select(indexer => indexer.Id).ToList();
            master = MasterFactory.GetMasterData <VerbMaster>().GetRangeData(nowSelectedItemIdList, type);

            //リストの初期化
            foreach (var items in master.Select((value, index) => new { index, value }))
            {
                ListViewItem addItem = new ListViewItem(items.value[0]);
                addItem.SubItems.Add(items.value[1]);
                parent.VerbListView.Items.Add(addItem);
            }

            // 初期セットの場合は選択状態も設定
            if (init)
            {
                SelectedItemIndex = 0;
                SelectedItem      = nowSelectedItemList[SelectedItemIndex];
                parent.VerbListView.Items[0].Selected     = true;
                parent.VerbListView.Click                += VerbListView_Click;
                parent.VerbListView.SelectedIndexChanged += SetSelectedItemIndex;
            }
            else
            {
                if (parent.VerbListView.Items.Count >= selectIndex - 1)
                {
                    parent.VerbListView.Items[selectIndex].Selected = true;
                }
                parent.VerbListView.SelectedIndexChanged += SetSelectedItemIndex;
                // 語尾もセット
                SetSelectedItemIndex(null, null);
            }
        }
Beispiel #12
0
 private void _SubjectListView_SelectedIndexChanged(object sender, EventArgs e)
 {
     SelectedItemIndex = 0;
     SelectedItemId    = nowSelectedItemIdList[0];
     if (parent.SubjectListView.SelectedIndices.Count > 0)
     {
         SelectedItemIndex = parent.SubjectListView.SelectedIndices[0];
         SelectedItemId    = nowSelectedItemIdList[parent.SubjectListView.SelectedIndices[0]];
         _Subject          = (SubjectCategory)(MasterFactory.GetMasterData <SubjectMaster>().GetCategoryData(SelectedItemId)[0]);
         _PersonalCategory = (PersonalPronounCategory)(MasterFactory.GetMasterData <SubjectMaster>().GetCategoryData(SelectedItemId)[1]);
         _ConstReason      = ConstReason.None;
         // 現在のパネルモードから対象のリストを更新する
         ContainerFactory.ConvertModePanel.UpdatePanelView();
         // セット
         ContainerFactory.ResultTextBoxPanel.UpdateResultTextBoxPanel();
     }
 }
Beispiel #13
0
        public void SetBeingList(JapaneseReadType type, bool init = false)
        {
            // 内部要素をクリア
            parent.BeingListView.Items.Clear();
            nowSelectedItemIdList.Clear();
            List <List <string> > masterString = null;
            List <BeingWord>      tempWord     = (ContainerFactory.StepLevelComboBox._StepLevel == StepLevel.ALLSTEP) ?
                                                 MasterFactory.GetMasterData <BeingWordMaster>().GetRangeIdPersonalPronounAndSubjectMaster(
                ContainerFactory.SubjectList._PersonalCategory
                , ContainerFactory.SubjectList._Subject).ToList()
                : MasterFactory.GetMasterData <BeingWordMaster>().GetRangeIdPersonalPronounSubjectAndStepLevelMaster(
                ContainerFactory.StepLevelComboBox._StepLevel
                , ContainerFactory.SubjectList._PersonalCategory
                , ContainerFactory.SubjectList._Subject).ToList();

            masterString = MasterFactory.GetMasterData <BeingWordMaster>()
                           .GetRangeData(tempWord.Select(n => n.Id), ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType);
            //後付け語尾
            for (int addWordCount = 0; addWordCount < masterString.Count; addWordCount++)
            {
                masterString[addWordCount][0] += (" " + ((MasterFactory.GetMasterData <BeingAddWordMaster>().GetRangeData(tempWord[addWordCount].Id, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType).Count <= 0)
                    ? string.Empty
                    : MasterFactory.GetMasterData <BeingAddWordMaster>().GetRangeData(tempWord[addWordCount].Id, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0][0]))
                                                 .Replace("  ", " ");
                masterString[addWordCount][1] = ((MasterFactory.GetMasterData <BeingAddWordMaster>().GetRangeData(tempWord[addWordCount].Id, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType).Count <= 0)
                    ? string.Empty
                    : MasterFactory.GetMasterData <BeingAddWordMaster>().GetRangeData(tempWord[addWordCount].Id, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0][1]) + masterString[addWordCount][1];
            }

            //主語リストの初期化
            foreach (var items in masterString.Select((value, index) => new { index, value }))
            {
                ListViewItem addItem = new ListViewItem(items.value[0]);
                addItem.SubItems.Add(items.value[1]);
                parent.BeingListView.Items.Add(addItem);
                nowSelectedItemIdList.Add(items.index + 1);
            }

            if (init)
            {
                SelectedItemIndex = 0;
            }
            parent.BeingListView.Click += BeingListView_Click;
            parent.BeingListView.SelectedIndexChanged += SetSelectedItemIndex;
        }
Beispiel #14
0
        public void SetPrePositionList(JapaneseReadType type, bool init = false)
        {
            // 内部要素をクリア
            parent.PrepositionListView.Items.Clear();

            nowSelectedItemIdList.Clear();

            List <List <string> > master = new List <List <string> >();

            switch (type)
            {
            case JapaneseReadType.HIRAGANA:
                master = MasterFactory.GetMasterData <PrepositionMaster>().GetRangeHiraganaData(MasterFactory.GetMasterData <PrepositionMaster>().GetPrepositionIdList());
                break;

            case JapaneseReadType.FURIGANA:
                master = MasterFactory.GetMasterData <PrepositionMaster>().GetRangeFuriganaData(MasterFactory.GetMasterData <PrepositionMaster>().GetPrepositionIdList());
                break;

            case JapaneseReadType.KANJI:
            default:
                master = MasterFactory.GetMasterData <PrepositionMaster>().GetRangeKanjiData(MasterFactory.GetMasterData <PrepositionMaster>().GetPrepositionIdList());
                break;
            }

            //主語リストの初期化
            foreach (var items in master.Select((value, index) => new { index, value }))
            {
                ListViewItem addItem = new ListViewItem(items.value[0]);
                addItem.SubItems.Add(items.value[1]);
                parent.PrepositionListView.Items.Add(addItem);
                nowSelectedItemIdList.Add(items.index);
            }

            // 初期セットの場合は選択状態も設定
            if (init)
            {
                SelectedItemIndex = 0;
                parent.PrepositionListView.Items[0].Selected     = true;
                parent.PrepositionListView.SelectedIndexChanged += SetSelectedItemIndex;
            }
        }
Beispiel #15
0
        public List <List <string> > _SetVerbEndWordMaster(JapaneseReadType type)
        {
            List <List <string> > masterString  = null;
            List <VerbEndOfWord>  endWordMaster = ((ContainerFactory.StepLevelComboBox._StepLevel != StepLevel.ALLSTEP) ?
                                                   MasterFactory.GetMasterData <VerbEndOfWordMaster>().GetRangeGroupByGroupIdAndStepLevel(ContainerFactory.VerbList.SelectedVerbGroupId, ContainerFactory.StepLevelComboBox._StepLevel)
                                            : MasterFactory.GetMasterData <VerbEndOfWordMaster>().GetRangeGroupByGroupId(ContainerFactory.VerbList.SelectedVerbGroupId)
                                                   ).ToList();
            List <int> endWordMasterId = endWordMaster.Select(indexer => indexer.Id).ToList();

            masterString = MasterFactory.GetMasterData <VerbEndOfWordMaster>()
                           .GetRangeData(endWordMasterId, type);

            ////後付け語尾
            for (int addWordCount = 0; addWordCount < masterString.Count; addWordCount++)
            {
                List <string> addWord = MasterFactory.GetMasterData <VerbAddEndOfWordMaster>().GetGroupByGroupIdData(endWordMasterId[addWordCount], ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType);
                masterString[addWordCount][0] += (" " + addWord[0]).Replace("  ", " ");
                masterString[addWordCount][1]  = addWord[1] + masterString[addWordCount][1];
            }
            SetOpenView();

            return(masterString);
        }
Beispiel #16
0
        /// <summary>
        /// 日本語(存在)の出力
        /// </summary>
        private void SetBeingSourceTextBox()
        {
            string    subject  = MasterFactory.GetMasterData <SubjectMaster>().GetData(ContainerFactory.SubjectList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1] + ContainerFactory.SubjectList.SelectedTENIOHA;
            BeingWord tempWord = (ContainerFactory.StepLevelComboBox._StepLevel == StepLevel.ALLSTEP) ?
                                 MasterFactory.GetMasterData <BeingWordMaster>().GetRangeIdPersonalPronounAndSubjectMaster(
                ContainerFactory.SubjectList._PersonalCategory
                , ContainerFactory.SubjectList._Subject).ToList()[ContainerFactory.BeingList.SelectedItemIndex]
                 : MasterFactory.GetMasterData <BeingWordMaster>().GetRangeIdPersonalPronounSubjectAndStepLevelMaster(
                ContainerFactory.StepLevelComboBox._StepLevel
                , ContainerFactory.SubjectList._PersonalCategory
                , ContainerFactory.SubjectList._Subject).ToList()[ContainerFactory.BeingList.SelectedItemIndex];
            string endVerb = MasterFactory.GetMasterData <BeingWordMaster>().GetData(tempWord.Id, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            //後付けマスタ
            List <List <string> > tempTimeValue = MasterFactory.GetMasterData <BeingAddWordMaster>().GetRangeData(tempWord.Id, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType);

            string timeWord = (tempTimeValue.Count == 0) ? string.Empty : tempTimeValue[0][1];
            //副詞
            string adverb           = MasterFactory.GetMasterData <AdverbMaster>().GetData(ContainerFactory.AdverbList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            string personPossessive = MasterFactory.GetMasterData <PossessiveMaster>().GetData(ContainerFactory.PersonPrepositionList.SelectedPossessiveId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            string personArticle    = MasterFactory.GetMasterData <ArticleMaster>().GetData(ContainerFactory.PersonPrepositionList.SelectedArticleId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            //前置詞
            string prePosition = MasterFactory.GetMasterData <PrepositionMaster>().GetData(
                MasterFactory.GetMasterData <BeingConnectionMaster>().GetGroupByGroupIdData(ContainerFactory.BeingList.SelectedItemId), ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            //名詞
            string person = MasterFactory.GetMasterData <NounMaster>().GetData(ContainerFactory.PersonPrepositionList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];

            person += (person == string.Empty) ? string.Empty : "と";
            string locationPossessive = MasterFactory.GetMasterData <PossessiveMaster>().GetData(ContainerFactory.LocationPrepositionList.SelectedPossessiveId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            string locationArticle    = MasterFactory.GetMasterData <ArticleMaster>().GetData(ContainerFactory.LocationPrepositionList.SelectedArticleId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            //名詞
            string location = MasterFactory.GetMasterData <NounMaster>().GetData(ContainerFactory.LocationPrepositionList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];

            parent.SourceViewLabel.Text = subject + timeWord
                                          + ((person == string.Empty) ? string.Empty : personPossessive + personArticle + person)
                                          + ((location == string.Empty) ? string.Empty : locationPossessive + locationArticle + location)
                                          + adverb + endVerb;
        }
Beispiel #17
0
        public void _SubjectListView_Click(string tenioha)
        {
            if (parent.SubjectListView.SelectedIndices[0] != SelectedItemIndex)
            {
                return;
            }
            SelectedItemIndex = 0;
            SelectedItemId    = nowSelectedItemIdList[0];
            if (parent.SubjectListView.SelectedIndices.Count > 0)
            {
                SelectedItemIndex = parent.SubjectListView.SelectedIndices[0];
                SelectedItemId    = nowSelectedItemIdList[parent.SubjectListView.SelectedIndices[0]];
            }

            SelectedTENIOHA   = tenioha;
            _Subject          = (SubjectCategory)(MasterFactory.GetMasterData <SubjectMaster>().GetCategoryData(SelectedItemId)[0]);
            _PersonalCategory = (PersonalPronounCategory)(MasterFactory.GetMasterData <SubjectMaster>().GetCategoryData(SelectedItemId)[1]);
            _ConstReason      = ConstReason.None;

            // 現在のパネルモードから対象のリストを更新する
            ContainerFactory.ConvertModePanel.UpdatePanelView();
            // セット
            ContainerFactory.ResultTextBoxPanel.UpdateResultTextBoxPanel();
        }
Beispiel #18
0
 private List <string> GetFuriganaData(int _id)
 {
     return(MasterFactory.GetMasterData <ComboWordMaster>().GetFuriganaData(beingEndOfWordMaster[_id].ComboId));
 }
Beispiel #19
0
 private List <string> GetHiraganaData(int _id)
 {
     return(MasterFactory.GetMasterData <ComboWordMaster>().GetHiraganaData(adjectiveMaster[_id].ComboId));
 }
Beispiel #20
0
        private List <string> GetFuriganaData(int _id)
        {
            List <string> comboData = MasterFactory.GetMasterData <ComboWordMaster>().GetFuriganaData(adverbMaster[_id].ComboId);

            return(comboData);
        }
Beispiel #21
0
 private List <string> GetKanjiData(int _id)
 {
     return(MasterFactory.GetMasterData <ComboWordMaster>().GetKanjiData(verbEndOfWordMaster[_id].ComboId));
 }
Beispiel #22
0
 public List <string> GetRangeEnglishWordList(List <int> _englishIdList)
 {
     return(MasterFactory.GetMasterData <EnglishWordMaster>().GetRangeData(_englishIdList));
 }
Beispiel #23
0
 public string GetEnglishWord(int _englishId)
 {
     return(MasterFactory.GetMasterData <EnglishWordMaster>().GetData(_englishId));
 }
Beispiel #24
0
 public string GetPrepositionData(int _id)
 {
     return(MasterFactory.GetMasterData <EnglishWordMaster>().GetData(_id));
 }
Beispiel #25
0
 private List <string> GetKanjiData(int _id)
 {
     return(MasterFactory.GetMasterData <ComboWordMaster>().GetKanjiData(prepositionMaster[_id].ComboId));
 }
Beispiel #26
0
 private List <string> GetPrepositionFurigana(int _id)
 {
     return(MasterFactory.GetMasterData <PrepositionMaster>().GetFuriganaData(prepositionMaster[_id].PrepositionId));
 }
Beispiel #27
0
        /// <summary>
        /// 日本語(形容詞)の出力
        /// </summary>
        private void SetAdjectiveSourceTextBox()
        {
            //主語
            string subject = MasterFactory.GetMasterData <SubjectMaster>().GetData(ContainerFactory.SubjectList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1] + ContainerFactory.SubjectList.SelectedTENIOHA;
            //形容詞
            string adjective = MasterFactory.GetMasterData <AdjectiveMaster>().GetData(ContainerFactory.AdjectiveList.SelectedItem.Id, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];

            AdjectiveEndOfWord adjectiveEndItem = (
                ContainerFactory.StepLevelComboBox._StepLevel != StepLevel.ALLSTEP ? (MasterFactory.GetMasterData <AdjectiveEndOfWordMaster>().GetRangeItemGroupByGroupIdAndStepLevel(
                                                                                          ContainerFactory.AdjectiveList.SelectedItem.GroupId,
                                                                                          ContainerFactory.StepLevelComboBox._StepLevel,
                                                                                          ContainerFactory.AdjectiveList.SelectedItem.Category)).ToList()
                                                                        : (MasterFactory.GetMasterData <AdjectiveEndOfWordMaster>().GetRangeItemGroupByGroupId(
                                                                               ContainerFactory.AdjectiveList.SelectedItem.GroupId,
                                                                               ContainerFactory.AdjectiveList.SelectedItem.Category)).ToList()
                )[(ContainerFactory.AdjectiveList.SelectedEndOfWordItemId - 1 >= 0) ? ContainerFactory.AdjectiveList.SelectedEndOfWordItemId - 1 : 0];
            AdjectiveNumberOfPeopleEndOfWord adjectiveNumEndItem = (
                ContainerFactory.StepLevelComboBox._StepLevel != StepLevel.ALLSTEP ? MasterFactory.GetMasterData <AdjectiveNumberOfPeopleEndOfWordMaster>().GetRangeEnglishItemGroupByGroupIdAndPersonCategoryAndStepLevel(
                    ContainerFactory.AdjectiveList.SelectedAdjectiveGroupId,
                    ContainerFactory.SubjectList._PersonalCategory,
                    ContainerFactory.StepLevelComboBox._StepLevel,
                    ContainerFactory.AdjectiveList.SelectedItem.Category)
                                                                                   : MasterFactory.GetMasterData <AdjectiveNumberOfPeopleEndOfWordMaster>().GetRangeEnglishItemGroupByGroupIdAndPersonCategory(
                    ContainerFactory.AdjectiveList.SelectedAdjectiveGroupId,
                    ContainerFactory.SubjectList._PersonalCategory,
                    ContainerFactory.AdjectiveList.SelectedItem.Category))[(ContainerFactory.AdjectiveList.SelectedEndOfWordItemId - 1 >= 0) ? ContainerFactory.AdjectiveList.SelectedEndOfWordItemId - 1 : 0];

            //後付け
            //語尾を持ってくる際、文字列でなく、語尾ID/人数語尾IDを持ってくる。
            string timeWord = string.Empty;

            switch (ContainerFactory.SubjectList._PersonalCategory)
            {
            case PersonalPronounCategory.ThirdSingle:
                timeWord = MasterFactory.GetMasterData <AdjectiveAddEndOfWordMaster>().GetData(adjectiveEndItem.Id, 0)[1];
                break;

            default:
                timeWord = MasterFactory.GetMasterData <AdjectiveAddEndOfWordMaster>().GetData(0, adjectiveNumEndItem.Id, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
                break;
            }            //語尾
            string verb = MasterFactory.GetMasterData <AdjectiveEndOfWordMaster>().GetData(adjectiveEndItem.Id, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];

            //副詞
            string adverb = MasterFactory.GetMasterData <AdverbMaster>().GetData(ContainerFactory.AdverbList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            //前置詞が共通になっているので各名詞リスト毎にする。
            //前置詞
            string prePosition = MasterFactory.GetMasterData <PrepositionMaster>().GetData(
                MasterFactory.GetMasterData <AdjectiveConnectionMaster>().GetGroupByGroupIdData(ContainerFactory.AdjectiveList.SelectedItem.Id), ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            string nounPossessive = MasterFactory.GetMasterData <PossessiveMaster>().GetData(ContainerFactory.NounList.SelectedPossessiveId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            string article        = MasterFactory.GetMasterData <ArticleMaster>().GetData(ContainerFactory.NounList.SelectedArticleId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            //名詞
            string noun             = (prePosition == string.Empty)? "" : MasterFactory.GetMasterData <NounMaster>().GetData(ContainerFactory.NounList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            string personPossessive = MasterFactory.GetMasterData <PossessiveMaster>().GetData(ContainerFactory.PersonPrepositionList.SelectedPossessiveId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            string personArticle    = MasterFactory.GetMasterData <ArticleMaster>().GetData(ContainerFactory.PersonPrepositionList.SelectedArticleId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            //名詞
            string person = MasterFactory.GetMasterData <NounMaster>().GetData(ContainerFactory.PersonPrepositionList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];

            person = (person == string.Empty) ? person : person + "と";
            string locationPossessive = MasterFactory.GetMasterData <PossessiveMaster>().GetData(ContainerFactory.LocationPrepositionList.SelectedPossessiveId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];
            string locationArticle    = MasterFactory.GetMasterData <ArticleMaster>().GetData(ContainerFactory.LocationPrepositionList.SelectedArticleId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];

            //名詞
            string location = MasterFactory.GetMasterData <NounMaster>().GetData(ContainerFactory.LocationPrepositionList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[1];


            parent.SourceViewLabel.Text = subject + timeWord
                                          + ((person == string.Empty) ? string.Empty : personPossessive + personArticle + person)
                                          + ((location == string.Empty)? string.Empty : locationPossessive + locationArticle + location)
                                          + ((noun == string.Empty) ? string.Empty : nounPossessive + article + noun + prePosition)
                                          + adverb + adjective + verb;
        }
Beispiel #28
0
        /// <summary>
        /// 英語の出力
        /// </summary>
        private void SetAdjectiveResultTextBox()
        {
            string             subject          = MasterFactory.GetMasterData <SubjectMaster>().GetData(ContainerFactory.SubjectList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0];
            AdjectiveEndOfWord adjectiveEndItem = (
                ContainerFactory.StepLevelComboBox._StepLevel != StepLevel.ALLSTEP ? (MasterFactory.GetMasterData <AdjectiveEndOfWordMaster>().GetRangeItemGroupByGroupIdAndStepLevel(
                                                                                          ContainerFactory.AdjectiveList.SelectedItem.GroupId,
                                                                                          ContainerFactory.StepLevelComboBox._StepLevel,
                                                                                          ContainerFactory.AdjectiveList.SelectedItem.Category)).ToList()
                                                                                   : (MasterFactory.GetMasterData <AdjectiveEndOfWordMaster>().GetRangeItemGroupByGroupId(
                                                                                          ContainerFactory.AdjectiveList.SelectedItem.GroupId,
                                                                                          ContainerFactory.AdjectiveList.SelectedItem.Category)).ToList()
                )[(ContainerFactory.AdjectiveList.SelectedEndOfWordItemId - 1 >= 0) ? ContainerFactory.AdjectiveList.SelectedEndOfWordItemId - 1 : 0];
            AdjectiveNumberOfPeopleEndOfWord adjectiveNumEndItem = (
                ContainerFactory.StepLevelComboBox._StepLevel != StepLevel.ALLSTEP ? MasterFactory.GetMasterData <AdjectiveNumberOfPeopleEndOfWordMaster>().GetRangeEnglishItemGroupByGroupIdAndPersonCategoryAndStepLevel(
                    ContainerFactory.AdjectiveList.SelectedAdjectiveGroupId,
                    ContainerFactory.SubjectList._PersonalCategory,
                    ContainerFactory.StepLevelComboBox._StepLevel,
                    ContainerFactory.AdjectiveList.SelectedItem.Category)
                                                                                   : MasterFactory.GetMasterData <AdjectiveNumberOfPeopleEndOfWordMaster>().GetRangeEnglishItemGroupByGroupIdAndPersonCategory(
                    ContainerFactory.AdjectiveList.SelectedAdjectiveGroupId,
                    ContainerFactory.SubjectList._PersonalCategory,
                    ContainerFactory.AdjectiveList.SelectedItem.Category))[(ContainerFactory.AdjectiveList.SelectedEndOfWordItemId - 1 >= 0) ? ContainerFactory.AdjectiveList.SelectedEndOfWordItemId - 1 : 0];
            //語尾と時間詞
            string end       = string.Empty;
            string timeValue = string.Empty;

            switch (ContainerFactory.SubjectList._PersonalCategory)
            {
            case PersonalPronounCategory.ThirdSingle:
                end       = MasterFactory.GetMasterData <AdjectiveEndOfWordMaster>().GetData(adjectiveEndItem.Id, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0];
                timeValue = MasterFactory.GetMasterData <AdjectiveAddEndOfWordMaster>().GetData(adjectiveEndItem.Id, 0)[0];
                break;

            default:
                end       = MasterFactory.GetMasterData <AdjectiveNumberOfPeopleEndOfWordMaster>().GetEnglishWord(adjectiveNumEndItem.EnglishId);
                timeValue = MasterFactory.GetMasterData <AdjectiveAddEndOfWordMaster>().GetData(0, adjectiveNumEndItem.Id, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0];
                break;
            }
            string be = MasterFactory.GetMasterData <AdjectiveMaster>().GetData(ContainerFactory.AdjectiveList.SelectedItem.Id, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0];

            //副詞
            string adverbFront  = string.Empty;
            string adverbMiddle = string.Empty;
            string adverbBack   = string.Empty;

            switch (MasterFactory.GetMasterData <AdverbMaster>().GetAdverbPosFromId(ContainerFactory.AdverbList.SelectedItemIndex))
            {
            case AdverbPosition.Front:
                adverbFront = MasterFactory.GetMasterData <AdverbMaster>().GetData(ContainerFactory.AdverbList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0] + " ";
                break;

            case AdverbPosition.Middle:
                adverbMiddle = MasterFactory.GetMasterData <AdverbMaster>().GetData(ContainerFactory.AdverbList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0];
                break;

            case AdverbPosition.Back:
                adverbBack = " " + MasterFactory.GetMasterData <AdverbMaster>().GetData(ContainerFactory.AdverbList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0];
                break;
            }

            string nounPossessive = MasterFactory.GetMasterData <PossessiveMaster>().GetData(ContainerFactory.NounList.SelectedPossessiveId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0];
            //冠詞
            string article = MasterFactory.GetMasterData <ArticleMaster>().GetData(ContainerFactory.NounList.SelectedArticleId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0];
            //前置詞が共通になっているので各名詞リスト毎にする。
            //前置詞
            string prePosition = MasterFactory.GetMasterData <PrepositionMaster>().GetData(
                MasterFactory.GetMasterData <AdjectiveConnectionMaster>().GetGroupByGroupIdData(ContainerFactory.AdjectiveList.SelectedItem.Id), ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0];
            //名詞
            string noun = string.Empty;

            noun = (prePosition == string.Empty) ? "" : MasterFactory.GetMasterData <NounMaster>().GetData(ContainerFactory.NounList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0];
            if (noun.Contains("@冠詞@"))
            {
                noun = noun.Replace("@冠詞@", article + " ");
            }
            string personPossessive = MasterFactory.GetMasterData <PossessiveMaster>().GetData(ContainerFactory.PersonPrepositionList.SelectedPossessiveId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0];

            //冠詞(人)
            string personArticle = MasterFactory.GetMasterData <ArticleMaster>().GetData(ContainerFactory.PersonPrepositionList.SelectedArticleId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0];

            //名詞(人)
            string person = MasterFactory.GetMasterData <NounMaster>().GetData(ContainerFactory.PersonPrepositionList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0];

            if (person.Contains("@冠詞@"))
            {
                person = person.Replace("@冠詞@", personArticle + " ");
            }
            string locationPossessive = MasterFactory.GetMasterData <PossessiveMaster>().GetData(ContainerFactory.LocationPrepositionList.SelectedPossessiveId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0];
            //冠詞(場所)
            string locationArticle = MasterFactory.GetMasterData <ArticleMaster>().GetData(ContainerFactory.LocationPrepositionList.SelectedArticleId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0];

            //名詞(場所)
            string location = MasterFactory.GetMasterData <NounMaster>().GetData(
                (ContainerFactory.LocationPrepositionList.SelectedItem == null) ? 0 : ContainerFactory.LocationPrepositionList.SelectedItemId, ContainerFactory.JapaneseReadTypeComboBox._JapaneseReadType)[0];

            if (location.Contains("@冠詞@"))
            {
                location = location.Replace("@冠詞@", locationArticle + " ");
            }

            //文中に副詞を付ける。
            if (adverbMiddle != string.Empty)
            {
                string[] splitEndWords = end.Split(' ');
                bool     addAdjective  = true;
                foreach (string n in adjectiveVerb.ToList())
                {
                    //to beの場合、形容詞の前に副詞が付く
                    if (end.Contains("going to be"))
                    {
                        break;
                    }
                    //動詞が付いている場合、動詞の前につく。
                    if (splitEndWords[splitEndWords.Length - 1] == n)
                    {
                        string addWords = "";
                        for (int ct = 0; ct < splitEndWords.Length; ct++)
                        {
                            if (ct == splitEndWords.Length - 1)
                            {
                                addWords += " " + adverbMiddle;
                            }
                            addWords += " " + splitEndWords[ct];
                        }
                        end = addWords;
                        //動詞の前につける場合、形容詞の前にはつけない。
                        addAdjective = false;
                        break;
                    }
                }
                //形容詞の前につける
                if (addAdjective)
                {
                    be = adverbMiddle + " " + be;
                }
            }

            parent.ResultLabel.Text = (CultureInfo.CurrentCulture.TextInfo.ToTitleCase(adverbFront) + subject + " " + end + " " + be + " " + adverbBack
                                       + ((noun == string.Empty) ? "" : " " + prePosition + " " + nounPossessive + ((article == string.Empty) ? "" : " " + article) + " " + noun)
                                       + ((person == string.Empty) ? "" : " " + "with " + " " + personPossessive + ((personArticle == string.Empty) ? "" : " " + personArticle) + " " + person)
                                       + ((location == string.Empty) ? "" : " " + prePosition + " " + locationPossessive + ((locationArticle == string.Empty) ? "" : " " + locationArticle) + " " + location)
                                       + ((timeValue == string.Empty) ? "" : " " + timeValue))
                                      .Replace("  ", " ").Replace("  ", " ");
        }
Beispiel #29
0
 public List <string> GetFuriganaData(int _id)
 {
     return(MasterFactory.GetMasterData <ComboWordMaster>().GetFuriganaData(endOfWordMaster.FirstOrDefault(data => data.Id == _id).ComboId));
 }
Beispiel #30
0
 private List <string> GetPrepositionKanji(int _id)
 {
     return(MasterFactory.GetMasterData <PrepositionMaster>().GetKanjiData(prepositionMaster[_id].PrepositionId));
 }