public bool IsThisPersonRegistered(PersonInformationScript.PersonInformation newPerson) { foreach (PersonInformationScript.PersonInformation personInformation in allPersonsInformation) { if (personInformation.ReturnPersonMail() == newPerson.ReturnPersonMail() && personInformation.ReturnPersonEncryptedPassword() == newPerson.ReturnPersonEncryptedPassword()) { return(true); } } return(false); }
public void DeleteRegisteredPerson(PersonInformationScript.PersonInformation newPerson) { for (int i = 0; i < allPersonsInformation.Count; i++) { //Debug.Log(allPersonsInformation[i].ReturnPersonMail()); if (newPerson.ReturnPersonMail() == allPersonsInformation[i].ReturnPersonMail()) { allPersonsInformation.RemoveAt(i); } } }
public void ChangePersonName(PersonInformationScript.PersonInformation newPerson, string newName) { foreach (PersonInformationScript.PersonInformation personInformation in allPersonsInformation) { //Debug.Log(personInformation.ReturnPersonName() + " " + newPerson.ReturnPersonName()); if (personInformation.ReturnPersonMail() == newPerson.ReturnPersonMail()) { personInformation.LoadPersonName(newName); } } }
public void LoadAllDataFromFile() { //if (PhotonNetwork.IsMasterClient) { LoadFiles(); if ((JSONArray)JSON.Parse(File.ReadAllText(fileForProfileSave)) != null) { JSONArray personDATA = (JSONArray)JSON.Parse(File.ReadAllText(fileForProfileSave)); if (personDATA != null) { //Debug.Log(personDATA.Count); int i = 0; while (i < personDATA.Count) { PersonInformationScript.PersonInformation personInformation = new PersonInformationScript.PersonInformation(); string personName = personDATA.AsArray[i]["PersonName"]; string personMail = personDATA.AsArray[i]["PersonMail"]; string personPassword = personDATA.AsArray[i]["PersonPassword"]; int personID = int.Parse(personDATA.AsArray[i]["PersonID"]); //Debug.Log(personName + " " + personMail + " " + personPassword); personInformation.LoadPersonName(personName); personInformation.LoadPersonMail(personMail); personInformation.LoadPersonPassword(personPassword); personInformation.LoadPersonID(personID); allPersonsInformation.Add(personInformation); i++; } } } } }
public void AddNewRegisteredPerson(string personName, string personMail, string personPassword, int personID) { PersonInformationScript.PersonInformation newPerson = new PersonInformationScript.PersonInformation(personName, personMail, personPassword, personID); allPersonsInformation.Add(newPerson); }
public void AddNewRegisteredPerson(PersonInformationScript.PersonInformation person) { PersonInformationScript.PersonInformation newPerson = person; allPersonsInformation.Add(newPerson); }