public static string GetVerbDeclination(int VerbID, int PersonID, int Tense) { string s = ""; if (Persons == null) { return(s); } Person person = Persons.Find(PersonID); if (Tense == Co.CB.Tense_Present) { if (PersonID == A.P_I) { Tense = Co.CB.Tense_1P_Sin_Present; } else if (PersonID == A.P_You) { Tense = Co.CB.Tense_2P_Sin_Present; } else { Tense = Co.CB.Tense_3P_Sin_Present; } } else if (Tense == Co.CB.Tense_Past) { if (PersonID == A.P_I) { Tense = Co.CB.Tense_1P_Sin_Past; } else if (PersonID == A.P_You) { Tense = Co.CB.Tense_2P_Sin_Past; } else { Tense = Co.CB.Tense_3P_Sin_Past; } } for (int i = 0; i < VT.List.Count; i++) { if (VT.List[i].ID == VerbID) { s = VT.List[i].VerbNameTense[Tense]; } } return(s); }
public static string GetPronoun(int PersonID) { Person person = Persons.Find(PersonID); if (PersonID == A.P_I) { return("ich"); } if (PersonID == A.P_You) { return("du"); } if (person.Sex == Co.SEX_FEMALE) { return("sie"); } if (person.Sex == Co.SEX_MALE) { return("er"); } if (person.Sex == Co.SEX_NEUTER) { return("es"); } if (person.Sex == Co.SEX_FEMALE_PL) { return("sie"); } if (person.Sex == Co.SEX_MALE) { return("sie"); } if (person.Sex == Co.SEX_NEUTER) { return("sie"); } return("sie"); }
public MyProgram(bool Generate, int cadastralCount, int personsCount, int propertyListCount, int propertyCount) : this() { if (Generate) { Random personsR = new Random(100); Random cadR = new Random(101); for (int i = 0; i < personsCount; i++) { Persons.Add(new Person(personsR.Next(personsCount * 10).ToString())); } CadastralArea c = null; PropertyList pl = null; Property p = null; for (int i = 0; i < cadastralCount; i++) { c = new CadastralArea(cadR.Next(cadastralCount + 10)); if (CadastralAreasByID.Add(new CadastralAreaByID(c))) { CadastralAreasByName.Add(new CadastralAreaByName(c)); for (int j = 1; j <= propertyListCount; j++) { pl = new PropertyList(j, c); if (c.AddPropertyList(pl)) { pl.AddOwner(Persons.Find(), 1); for (int k = 0; k < propertyCount; k++) { p = new Property(c.Properties.Count, "Address" + (j + k), "Unknown", pl); p.AddOccupant(pl.Owners.GetRoot().Person); pl.AddProperty(p); } } } } } } }
public static string GetPossesivePronoun(int PersonID, int Case) { Person person = Persons.Find(PersonID); string s = ""; if (Case == Co.CASE_AKK) { if (PersonID == A.P_I) { s = "mein"; } else if (PersonID == A.P_You) { s = "dein"; } else if ((person.Sex == Co.SEX_MALE) || (person.Sex == Co.SEX_NEUTER)) { s = "sein"; } else { s = "ihr"; } } if (Case == Co.CASE_NOM) { if (PersonID == A.P_I) { s = "mein"; } else if (PersonID == A.P_You) { s = "dein"; } else if ((person.Sex == Co.SEX_MALE) || (person.Sex == Co.SEX_NEUTER)) { s = "sein"; } else { s = "ihr"; } } else if (Case == Co.CASE_DAT) { if (PersonID == A.P_I) { s = "meiner"; } else if (PersonID == A.P_You) { s = "deiner"; } else if ((person.Sex == Co.SEX_MALE) || (person.Sex == Co.SEX_NEUTER)) { s = "seiner"; } else { s = "ihrer"; } } else if (Case == Co.CASE_GEN) { if (PersonID == A.P_I) { s = "meines"; } else if (PersonID == A.P_You) { s = "deines"; } else if ((person.Sex == Co.SEX_MALE) || (person.Sex == Co.SEX_NEUTER)) { s = "seines"; } else { s = "ihres"; } } return(s); }
public Person getPersonByHelpLabel(int id) { return(Persons.Find(x => x.HelpLabel == id)); }
//public double getDistances(Person p, Person j) { //return ((Persons.Contains(p) && Persons.Contains(j)) ? p.getDistance(j) : -1); //} //returns null if the id does not exists in the frame public Person getPersonById(int id) { return(Persons.Find(x => x.ID == id)); }
public Person Get(int id) { return(Persons.Find(user => user.Id == id)); }
public void Delete(int id) { Persons.Remove(Persons.Find(u => u.Id == id)); }