Пример #1
0
        /*
         * Testé
         */
        public void Register(string firstname, string lastname, string email,
                             string username, string password, Genre gender, String imgFilename, byte[] imageData, int fileSize)
        {
            MembreDTO membre = new MembreDTO(firstname, lastname, username, password, email, gender, imgFilename, imageData, fileSize);

            api.Register(membre);
        }
Пример #2
0
 public void Init()
 {
     membre = new Membre(1, "bob", "bob", "bob", "bob", "*****@*****.**", Genre.MALE, null, null, 0);
     ami    = new MembreDTO(2, "bob2", "bob2", "bob2", "bob2", "*****@*****.**", Genre.MALE, null, null, 0);
     membre.UpdateMessageStacks(new List <MembreDTO> {
         ami
     });
 }
Пример #3
0
        public WinModifProfil(WinProfil winProfil)
        {
            profil = winProfil;
            InitializeComponent();
            membreCourant = CoordonateurMembreCourant.GetInstance();
            facade        = Facade.GetInstance();
            mdto          = membreCourant.GetMembreCourant();

            InitialiserInfos();
        }
Пример #4
0
        private void CreerProfil()
        {
            mDtoCourant = coordinateur.GetMembreCourant();
            this.TxtNomUtilisateur.Text = mDtoCourant.firstName + " " + mDtoCourant.lastName;
            this.txtUsername.Text       = "@" + mDtoCourant.username;

            ImageSource source = coordinateur.retreiveImageProfile(mDtoCourant.id);

            if (source != null)
            {
                this.ImageProfil.Source = source;
            }
            RafraichirListDamis();
        }
Пример #5
0
        private void ChangerAmis()
        {
            LblBlockConversation.Text = null;
            TxtMessage.Clear();

            currentAmis = listAmis[listViewContact.SelectedIndex];
            txtEnDiscussionAvec.Text = DISCUSSION_START + currentAmis.firstName + " " + currentAmis.lastName;
            txtUsernameAmi.Text      = USERNAME_SYMBOL + currentAmis.username;
            if (observable != null)
            {
                observable.Dispose();
            }
            observable = coordinateur.SubscribeToStack(this, currentAmis.id);

            PnlConversation.Visibility = Visibility.Visible;
            listViewContact.UnselectAll();
        }
Пример #6
0
        private void BtnEnregistrerInfos_Click_1(object sender, RoutedEventArgs e)
        {
            mdto = membreCourant.GetMembreCourant();

            string nom    = this.txtBContenuNom.Text.ToString();
            string prenom = this.txtBContenuPrenom.Text.ToString();
            string email  = this.txtBContenuEmail.Text.ToString();
            string notel  = this.txtBContenuNoTelephone.Text.ToString();

            if (rdBMasculin.IsChecked == true)
            {
                Genre genre = Genre.MALE;
            }
            else if (rdB_Feminin.IsChecked == true)
            {
                Genre genre = Genre.FEMALE;
            }


            membreCourant.ModifierInfosAPartirProfil(nom, prenom, email, notel, mdto.id);
            MessageBox.Show("Vos informations ont ete modifiees avec succes!");
        }
Пример #7
0
        private void ValiderMotDePasse()
        {
            mdto = coordinateur.GetMembreCourant();
            string mdpCrypte = CryptPasswordEntered();

            if (mdpCrypte.Equals(mdto.password.ToString()))
            {
                if (this.passBNewMDP.Password.ToString().Equals(this.passBConfirmNewMDP.Password.ToString()))
                {
                    coordinateur.UpdatePassword(mdto.id, this.passBNewMDP.Password.ToString());
                    MessageBox.Show("Mot de passe modifie avec succes!");
                }
                else
                {
                    MessageBox.Show("Les nouveaux mots de passe ne concordent pas");
                }
            }
            else
            {
                MessageBox.Show("Le mot de passe courant entre n'est pas correct");
            }
        }
Пример #8
0
 public MembreDTO GetMembreCourant()
 {
     return(mdtoCourant = api.GetMembreCourant());
 }