public refWord(string word, string type, string part, string mean, string pron) { this.word = word; switch (type.ToLower()) { case "派生語": case "派": case "derivative": this.reftype = 1; break; case "同義語": case "同": case "synonym": this.reftype = 2; break; case "類義語": case "類": case "quasisynonym": this.reftype = 3; break; case "反意語": case "反": case "antonym": this.reftype = 4; break; case "姉妹語": case "姉": case "sister": this.reftype = 5; break; case "熟語": case "熟": case "idiom": this.reftype = 6; break; case "略語": case "略": case "abreviation": this.reftype = 7; break; case "頭文字": case "頭": case "acronym": this.reftype = 8; break; case "紛らわしい語": case "紛": case "confusing": this.reftype = -1; break; default: this.reftype = 0; break; } this.mean = mean; this.part = (wordPart)part; this.pron = pron; }
public Word(string word, wordPart part, string[] conj, string mean, string[] refWords, string[] example, int shutudai, int seikai) { string[] word2 = word.Split(new char[] { '|' }, 2); System.Collections.ArrayList refWords2 = new System.Collections.ArrayList(); for (int ir = 0; ir < refWords.Length; ir++) { refWords2.Add(new 英単語の練習.refWord(refWords[ir])); } initialize(word2[0], (word2.Length == 2)?word2[1]:"", part, conj, mean, refWords2, example, shutudai, seikai); }
private void initialize(string word, string pronounce, wordPart part, string[] conj, string mean, System.Collections.ArrayList refWords, string[] example, int shutudai, int seikai) { this.word = word; this.pron = pronounce; this.part = part; this.conjugate = conj; this.mean = mean; this.referWord = (System.Collections.ArrayList)refWords; this.example = example; this.shutsudai = shutsudai; this.seikai = this.seikai; }
public PartChangedEventArgs(wordPart prt) { this.part = prt; }
//===================================== // Word constructor //------------------------------------- /// <summary>単語の情報を格納するクラス public class Word のコンストラクタ。</summary> /// <param name="word">単語を指定します。発音記号も付す時には"単語|発音記号"として渡して下さい。</param> /// <param name="part">品詞を指定します。動詞="verb"、名詞="noun"、副詞="adverb"、形容詞="adjective"</param> /// <param name="conj">活用形を指定します。"活用形の種類:[実際の活用した単語|発音記号]"を単位として、複数或る場合にはセミコロン";" で区切ります。空白 または null で指定された場合には、活用形の指定は特にない物と見なされます。 /// 活用形の種類は 複数形="plural"、比較級(comparative degree)="comp"、最上級(superlative degree)=""、三単現(third person singular present tense)="tsp"、過去形(past tense)="past"、現在分詞(present participle)="presentp"、過去分詞(past participle)="pp"</param> /// <param name="mean">日本語の意味を指定して下さい。(勿論、日本語でなくとも読んで理解できればよい)</param> /// <param name="refWord">参照する単語の配列。同義語・類義語は"[同]"、反意語は"[反]"、姉妹語(語源など)は"[姉]"、その他は"[参]"を単語の頭に付して渡して下さい。</param> /// <param name="example">例文の配列</param> public Word(string word, wordPart part, string[] conj, string mean, System.Collections.ArrayList refWords, string[] example, int shutudai, int seikai) { string[] word2 = word.Split(new char[] { '|' }, 2); initialize(word2[0], (word2.Length == 2)?word2[1]:"", part, conj, mean, refWords, example, shutudai, seikai); }