fix : Evite les crash et permet de build ? (Pourquoi Sonar buildait avant ?)
continuous-integration/drone/push Build is passing Details

Popup_qui_marche_pas
BelsethUwU 2 years ago
parent d9ee9add3d
commit cd90803e9c

@ -15,7 +15,7 @@ namespace Model
public string? Username
{
get => username;
private set
set
{
if (string.IsNullOrWhiteSpace(value)) username = "Default";
else

@ -10,8 +10,7 @@ public partial class App : Application
public App()
{
InitializeComponent();
//Faut changer le boot sur LoginPage plus tard, j'ai mit create là pour pouvoir use l'appli, ce référer au comment sur create et loginpage.
MainPage = new Create();
MainPage = new LoginPage();
if (File.Exists(Path.Combine(FileSystem.Current.AppDataDirectory, "games.xml"))) Manager = new Manager(new Persistance(FileSystem.Current.AppDataDirectory));
else Manager = new(new Stub());
}

@ -24,7 +24,7 @@ public partial class Create : ContentPage
Application.Current.MainPage = new AppShell();
await Shell.Current.GoToAsync("//MainPage");
}
else Error.Children.Add(new Label { Text = "Mot de passe incorrect", TextColor = Colors.Red, VerticalTextAlignment = TextAlignment.Start });
else Error.Children.Add(new Label { Text = "Mot de passe invalide, votre mot de passe doit contenir une Majuscule, une minuscule, un chiffre et faire au moins 8 caractères", TextColor = Colors.Red, VerticalTextAlignment = TextAlignment.Start });
}
else Error.Children.Add(new Label { Text = "Ce nom d'utilisateur est déjà pris", TextColor = Colors.Red, VerticalTextAlignment = TextAlignment.Start });
}

@ -12,9 +12,12 @@ public partial class DetailledPage : ContentPage
InitializeComponent();
BindingContext = game;
CurrGame= game;
if (CurrGame != null)
{
avgLabel.Text = game.GetAvgRate().ToString();
AddStars(starsContainer, game.GetAvgRate());
}
}
private void AddStars(object sender, EventArgs e)
{

@ -27,7 +27,6 @@ public partial class MainPage : ContentPage
private void SearchBar_GameChanged(object sender, TextChangedEventArgs e)
{
SearchBar searchBar = (SearchBar)sender;
string GameText = Game.Text;
string Tag1Text = Tag1.Text;
string Tag2Text = Tag2.Text;
@ -47,7 +46,5 @@ public partial class MainPage : ContentPage
{
((App)App.Current).Manager.ResearchedGame.Add(game);
}
}
}

@ -20,6 +20,6 @@ public partial class ProfilPage : ContentPage
{
var newName = await this.ShowPopupAsync(new EntryPopup("Username"));
if (string.IsNullOrWhiteSpace(newName as string)) await this.ShowPopupAsync(new MessagePopup("Nom d'utilisateur invalide"));
else ((App)App.Current).Manager.CurrentUser.ChangeUsername(newName as string);
else ((App)App.Current).Manager.CurrentUser.Username = (newName as string);
}
}
Loading…
Cancel
Save