You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SAE-2.01/MCTG/Views/MyProfil.xaml.cs

31 lines
678 B

using CommunityToolkit.Maui.Behaviors;
using DataPersistence;
using Model;
using System.Diagnostics;
namespace Views;
public partial class MyProfil : ContentPage
{
public DataManager DataMgr => (App.Current as App).DataMgr;
public User user => (App.Current as App).user;
public User userBis {get; set; }
public MyProfil()
{
userBis = new User(user);
InitializeComponent();
BindingContext = this;
}
public void Validation_Click(object sender, EventArgs e)
{
if (String.IsNullOrEmpty(userBis.Name) || String.IsNullOrEmpty(userBis.Surname)){
return;
}
user.Name = userBis.Name;
user.Surname = userBis.Surname;
}
}