diff --git a/Sources/Stim.Model/Manager.cs b/Sources/Stim.Model/Manager.cs
index 87db3e3..a5194ee 100644
--- a/Sources/Stim.Model/Manager.cs
+++ b/Sources/Stim.Model/Manager.cs
@@ -1,4 +1,5 @@
using System.Collections.ObjectModel;
+using System.Diagnostics.CodeAnalysis;
using System.Linq;
namespace Model
@@ -51,7 +52,7 @@ namespace Model
gameList.Remove(game);
mgrpersistance.SaveGame(gameList);
}
-
+ [ExcludeFromCodeCoverage]
public void SaveGames()
{
mgrpersistance.SaveGame(gameList);
@@ -64,6 +65,7 @@ namespace Model
}
return null;
}
+ [ExcludeFromCodeCoverage]
public void SaveUser()
{
mgrpersistance.SaveUser(Users);
diff --git a/Sources/Stim/ProfilPage.xaml b/Sources/Stim/ProfilPage.xaml
index c4b87e1..b31c263 100644
--- a/Sources/Stim/ProfilPage.xaml
+++ b/Sources/Stim/ProfilPage.xaml
@@ -31,7 +31,7 @@
-
+
@@ -43,8 +43,8 @@
-
-
+
+
diff --git a/Sources/Stim/ProfilPage.xaml.cs b/Sources/Stim/ProfilPage.xaml.cs
index 20f6dff..e972262 100644
--- a/Sources/Stim/ProfilPage.xaml.cs
+++ b/Sources/Stim/ProfilPage.xaml.cs
@@ -5,6 +5,7 @@ namespace Stim;
public partial class ProfilPage : ContentPage
{
+ delegate string delegatePopUp();
public ProfilPage()
{
InitializeComponent();
@@ -22,4 +23,8 @@ public partial class ProfilPage : ContentPage
if (string.IsNullOrWhiteSpace(newName as string)) await this.ShowPopupAsync(new MessagePopup("Nom d'utilisateur invalide"));
else ((App)App.Current).Manager.CurrentUser.Username = (newName as string);
}
+ void PopUp(object sender, EventArgs e)
+ {
+ //handle method here
+ }
}
\ No newline at end of file
diff --git a/Sources/Stim/UserInfo.xaml b/Sources/Stim/UserInfo.xaml
index 047b2f0..1611420 100644
--- a/Sources/Stim/UserInfo.xaml
+++ b/Sources/Stim/UserInfo.xaml
@@ -10,12 +10,12 @@
-
+
+ BackgroundColor="{StaticResource Gray500}"/>
diff --git a/Sources/Stim/UserInfo.xaml.cs b/Sources/Stim/UserInfo.xaml.cs
index 62acb01..49cf6e0 100644
--- a/Sources/Stim/UserInfo.xaml.cs
+++ b/Sources/Stim/UserInfo.xaml.cs
@@ -4,7 +4,11 @@ using CommunityToolkit.Maui.Views;
namespace Stim;
public partial class UserInfo : ContentView
{
-
+ public event EventHandler popUp;
+ public void PopUp(object sender, EventArgs e)
+ {
+ popUp?.Invoke(sender, e);
+ }
public string Name
{
get => (string)GetValue(NameProperty);
@@ -28,38 +32,38 @@ public partial class UserInfo : ContentView
private async void Modif(object sender, EventArgs e)
{
- if (Button == 0)
- {
- var result = await this.ShowPopupAsync(new EntryPopup("Username"));
- if (string.IsNullOrWhiteSpace(result))
- {
- ((App)App.Current).Manager.CurrentUser.Username = result;
- }
- }
- else if (Button == 1)
- {
- var result = await this.(new EntryPopup("Username"));
- if (string.IsNullOrWhiteSpace(result))
- {
- ((App)App.Current).Manager.CurrentUser.Username = result;
- }
- }
- else if (Button == 2)
- {
- var result = await this.(new EntryPopup("Password"));
- if (string.IsNullOrWhiteSpace(result))
- {
- ((App)App.Current).Manager.CurrentUser.Password = result;
- }
- }
- else if (Button == 3)
- {
- var result = await this.(new EntryPopup("Email"));
- if (string.IsNullOrWhiteSpace(result))
- {
- ((App)App.Current).Manager.CurrentUser.Email = result;
- }
- }
- else throw new ArgumentOutOfRangeException();
+ //if (Button == 0)
+ //{
+ // //var result = await CurrentPage.ShowPopupAsync(new EntryPopup("Username"));
+ // if (string.IsNullOrWhiteSpace((string)result))
+ // {
+ // ((App)App.Current).Manager.CurrentUser.Username = (string)result;
+ // }
+ //}
+ //else if (Button == 1)
+ //{
+ // //var result = await CurrentPage.ShowPopupAsync(new EntryPopup("Username"));
+ // if (string.IsNullOrWhiteSpace((string)result))
+ // {
+ // ((App)App.Current).Manager.CurrentUser.Username = (string)result;
+ // }
+ //}
+ //else if (Button == 2)
+ //{
+ // //var result = await CurrentPage.ShowPopupAsync(new EntryPopup("Username"));
+ // if (string.IsNullOrWhiteSpace((string)result))
+ // {
+ // ((App)App.Current).Manager.CurrentUser.Username = (string)result;
+ // }
+ //}
+ //else if (Button == 3)
+ //{
+ // //var result = await CurrentPage.ShowPopupAsync(new EntryPopup("Username"));
+ // if (string.IsNullOrWhiteSpace((string)result))
+ // {
+ // ((App)App.Current).Manager.CurrentUser.Username = (string)result;
+ // }
+ //}
+ throw new ArgumentOutOfRangeException();
}
}
\ No newline at end of file