/// <summary> /// その偉人に関係する事件 /// </summary> /// <param name="person">偉人</param> /// <returns></returns> public static Event[] PersonSelectEvent(Person person) { Event[] events; events = new Event[10]; for (int i = 0; i < events.Length; i++) { events[i] = new Event(); events[i].ID = i * person.ID; events[i].name = person.name + "の事件" + i.ToString(); events[i].year = 1989; events[i].description = "ここにはそれぞれの事件の説明を記述します。"; events[i].place = "事件の発生場所を記述します。"; } return events; }
/// <summary> /// 名前検索からの人を見つける /// </summary> /// <param name="first">頭文字</param> public static Person[] NameSelectPersons(char first) { if (first == 'さ') { Person[] persons = new Person[2]; persons[0] = new Person(); Person p = persons[0]; p.name = "坂本竜馬"; p.nameKana = "さかもとりょうま"; p.from = "土佐"; p.fromKana = "とさ"; p.fromAreaGroup = AreaGroup.四国; p.ID = 0; p.job = "武士"; p.birthYear = 1836; p.deathYear = 1867; p.profile = "土佐の武士だぜ"; p.sex = Sex.Male; p.era = Era.江戸; persons[1] = new Person(); p = persons[1]; p.name = "西郷隆盛"; p.nameKana = "さいごうたかもり"; p.from = "薩摩"; p.fromKana = "さつま"; p.fromAreaGroup = AreaGroup.九州; p.ID = 0; p.job = "武士"; p.birthYear = 1828; p.deathYear = 1877; p.profile = "薩摩の武士だぜ"; p.sex = Sex.Male; p.era = Era.江戸; return persons; } else if (first == 'ま') { Person[] persons = new Person[1]; persons[0] = new Person(); Person p = persons[0]; p.name = "みやざきゆうや"; p.nameKana = "みやざきゆうや"; p.from = "香川"; p.fromKana = "かがわ"; p.fromAreaGroup = AreaGroup.四国; p.ID = 2; p.job = "パチプロ"; p.birthYear = 1992; p.deathYear = 2100; p.profile = "にゃー"; p.sex = Sex.Male; p.era = Era.平成; return persons; } else { Person[] persons = new Person[5]; for (int i = 0; i < 5; i++) { persons[i] = new Person(); Person p = persons[i]; p.name = "[" + first.ToString() + "]" + "から始まる人" + "第" + i.ToString() + "号"; p.nameKana = "さんぷる"; p.from = "香川"; p.fromKana = "かがわ"; p.fromAreaGroup = AreaGroup.四国; p.ID = 2; p.job = "さんぷる"; p.birthYear = 2011; p.deathYear = 2011; p.profile = "さんぷる"; p.sex = Sex.Male; p.era = Era.平成; } return persons; } }
/// <summary> /// 出身地検索からの人を見つける /// </summary> /// <param name="area"></param> /// <returns></returns> public static Person[] FromSelectPersons(AreaGroup area) { Person[] persons; Person p; switch (area) { case AreaGroup.四国: persons = new Person[2]; persons[0] = new Person(); p = persons[0]; p.name = "坂本竜馬"; p.nameKana = "さかもとりょうま"; p.from = "土佐"; p.fromKana = "とさ"; p.fromAreaGroup = AreaGroup.四国; p.ID = 0; p.job = "武士"; p.birthYear = 1836; p.deathYear = 1867; p.profile = "土佐の武士だぜ"; p.sex = Sex.Male; p.era = Era.江戸; persons[1] = new Person(); p = persons[1]; p.name = "西郷隆盛"; p.nameKana = "さいごうたかもり"; p.from = "薩摩"; p.fromKana = "さつま"; p.fromAreaGroup = AreaGroup.九州; p.ID = 0; p.job = "武士"; p.birthYear = 1828; p.deathYear = 1877; p.profile = "薩摩の武士だぜ"; p.sex = Sex.Male; p.era = Era.江戸; return persons; default: Random r = new Random(); persons = new Person[5]; for (int i = 0; i < 5; i++) { persons[i] = new Person(); p = persons[i]; p.name = "さんぷる" + "第" + r.Next(10, 100).ToString() + "号"; p.nameKana = "さんぷる"; p.from = "香川"; p.fromKana = "かがわ"; p.fromAreaGroup = AreaGroup.四国; p.ID = 2; p.job = "さんぷる"; p.birthYear = 2011; p.deathYear = 2011; p.profile = "さんぷる"; p.sex = Sex.Male; p.era = Era.平成; } return persons; } }