@ -44,6 +44,7 @@ public partial class PageAdmin : ContentPage
stringnbTelechargement=string.Empty;
stringgenre=string.Empty;
stringimage=string.Empty;
stringresume=string.Empty;
intetape=1;
boolannuler=false;
@ -53,67 +54,74 @@ public partial class PageAdmin : ContentPage
switch(etape)
{
case1:
nom=awaitDisplayPromptAsync("Informations sur le Jeu [1/9]","Quel est le Titre ?",accept:"Suivant",cancel:"Annuler",placeholder:"GTA VI");
nom=awaitDisplayPromptAsync("Informations sur le Jeu [1/10]","Quel est le Titre ?",accept:"Suivant",cancel:"Annuler",placeholder:"GTA VI");
if(string.IsNullOrEmpty(nom))
{
annuler=true;
}
break;
case2:
sortie=awaitDisplayPromptAsync("Informations sur le Jeu [2/9]","Date de Sortie",accept:"Suivant",cancel:"Annuler",placeholder:"JJ/MM/AAAA");
sortie=awaitDisplayPromptAsync("Informations sur le Jeu [2/10]","Date de Sortie",accept:"Suivant",cancel:"Annuler",placeholder:"JJ/MM/AAAA");
if(string.IsNullOrEmpty(sortie))
{
annuler=true;
}
break;
case3:
plateformes=awaitDisplayPromptAsync("Informations sur le Jeu [3/9]","Plateforme(s), un espace pour séparer",accept:"Suivant",cancel:"Annuler",placeholder:"Ex: XOne PC PS5");
plateformes=awaitDisplayPromptAsync("Informations sur le Jeu [3/10]","Plateforme(s), un espace pour séparer",accept:"Suivant",cancel:"Annuler",placeholder:"Ex: XOne PC PS5");
if(string.IsNullOrEmpty(plateformes))
{
annuler=true;
}
break;
case4:
developpeur=awaitDisplayPromptAsync("Informations sur le Jeu [4/9]","Développeur",accept:"Suivant",cancel:"Annuler",placeholder:"Rockstar Games");
developpeur=awaitDisplayPromptAsync("Informations sur le Jeu [4/10]","Développeur",accept:"Suivant",cancel:"Annuler",placeholder:"Rockstar Games");
if(string.IsNullOrEmpty(developpeur))
{
annuler=true;
}
break;
case5:
editeur=awaitDisplayPromptAsync("Informations sur le Jeu [5/9]","Editeur",accept:"Suivant",cancel:"Annuler",placeholder:"Take-Two Interactive");
editeur=awaitDisplayPromptAsync("Informations sur le Jeu [5/10]","Editeur",accept:"Suivant",cancel:"Annuler",placeholder:"Take-Two Interactive");
if(string.IsNullOrEmpty(editeur))
{
annuler=true;
}
break;
case6:
note=awaitDisplayPromptAsync("Informations sur le Jeu [6/9]","Note de 0 à 5",accept:"Suivant",cancel:"Annuler",maxLength:1,placeholder:"5");
note=awaitDisplayPromptAsync("Informations sur le Jeu [6/10]","Note de 0 à 5",accept:"Suivant",cancel:"Annuler",maxLength:1,placeholder:"5");
if(string.IsNullOrEmpty(note))
{
annuler=true;
}
break;
case7:
nbTelechargement=awaitDisplayPromptAsync("Informations sur le Jeu [7/9]","Nombre de Téléchargements (en milliers, ex: 630k)",accept:"Suivant",cancel:"Annuler",placeholder:"630");
nbTelechargement=awaitDisplayPromptAsync("Informations sur le Jeu [7/10]","Nombre de Téléchargements (en milliers, ex: 630k)",accept:"Suivant",cancel:"Annuler",placeholder:"630");
if(string.IsNullOrEmpty(nbTelechargement))
{
annuler=true;
}
break;
case8:
genre=awaitDisplayPromptAsync("Informations sur le Jeu [8/9]","Genre(s), un espace pour séparer",accept:"Suivant",cancel:"Annuler",placeholder:"Action Aventure");
genre=awaitDisplayPromptAsync("Informations sur le Jeu [8/10]","Genre(s), un espace pour séparer",accept:"Suivant",cancel:"Annuler",placeholder:"Action Aventure");
if(string.IsNullOrEmpty(genre))
{
annuler=true;
}
break;
case9:
image=awaitDisplayPromptAsync("Informations sur le Jeu [9/9]","Image de couverture (préférez URL finissant par .png)",accept:"Terminer",cancel:"Annuler",placeholder:"http://example.com/monimage.png");
image=awaitDisplayPromptAsync("Informations sur le Jeu [9/10]","Image de couverture (préférez URL finissant par .png)",accept:"Terminer",cancel:"Annuler",placeholder:"http://example.com/monimage.png");
if(string.IsNullOrEmpty(image))
{
annuler=true;
}
break;
case10:
resume=awaitDisplayPromptAsync("Informations sur le Jeu [10/10]","Résumé du jeu",accept:"Terminer",cancel:"Annuler",placeholder:"Résumé du jeu");
if(string.IsNullOrEmpty(resume))
{
annuler=true;
}
break;
}
@ -126,6 +134,8 @@ public partial class PageAdmin : ContentPage