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.
76 lines
1.8 KiB
76 lines
1.8 KiB
using Business;
|
|
using Modèle;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace WpfApp1
|
|
{
|
|
/// <summary>
|
|
/// Logique d'interaction pour InfoUtilisateur.xaml
|
|
/// </summary>
|
|
public partial class InfoUtilisateur : Window
|
|
{
|
|
|
|
public InfoUtilisateur()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public ManagerUsers MgrUser => (Application.Current as App).LeManagerUsers;
|
|
|
|
private Personne _pers;
|
|
public Personne pers
|
|
{
|
|
get { return _pers; }
|
|
set
|
|
{
|
|
_pers = value;
|
|
UpdateUi(_pers);
|
|
}
|
|
}
|
|
|
|
|
|
private void UpdateUi(Personne pers)
|
|
{
|
|
mdp.Text = "";
|
|
email.Text = pers.Email;
|
|
for (int i = 0; i < pers.MotDePasse.Length; i++)
|
|
{
|
|
mdp.Text = mdp.Text + "*";
|
|
}
|
|
if (MgrUser.SelectedUser is Utilisateur user)
|
|
{
|
|
surnombre.Text = user.NbSubmit.ToString();
|
|
}
|
|
else if (MgrUser.SelectedUser is Expert alex)
|
|
{
|
|
mess.Text = "Surnom";
|
|
surnombre.Text = alex.Surnom;
|
|
}
|
|
}
|
|
|
|
private void exit_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
((MainWindow)System.Windows.Application.Current.MainWindow).ContentControlSwapAcc();
|
|
}
|
|
|
|
private void deco_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
Close();
|
|
MgrUser.SelectedUser = null;
|
|
}
|
|
|
|
}
|
|
}
|