Пример #1
0
 public void Create()
 {
     if ((!string.IsNullOrEmpty(name.text)) && (!string.IsNullOrEmpty(motdepass.text)) && (!string.IsNullOrEmpty(confirmPassword.text)))
     {
         StartCoroutine(webRequest.Post <Player>("http://localhost:53985/api/Account/Register", new Player()
         {
             Email = name.text, Password = motdepass.text, ConfirmPassword = confirmPassword.text, name = name.text
         }, Callback));
     }
     else if ((string.IsNullOrEmpty(name.text)) && (!string.IsNullOrEmpty(motdepass.text)) && (!string.IsNullOrEmpty(confirmPassword.text)))
     {
         pp.Show("Vueillez bien remplir votre login");
     }
     else if (!(string.IsNullOrEmpty(name.text)) && (string.IsNullOrEmpty(motdepass.text)) && (!string.IsNullOrEmpty(confirmPassword.text)))
     {
         pp.Show("Vueillez bien remplir votre mot de passe");
     }
     else if (!(string.IsNullOrEmpty(name.text)) && (!string.IsNullOrEmpty(motdepass.text)) && (string.IsNullOrEmpty(confirmPassword.text)))
     {
         pp.Show("Vueillez bien confirmer votre mot de passe");
     }
     else
     {
         pp.Show("Tous les champs sont obligatoires, veuillez bien les remplir");
     }
 }