Exemplo n.º 1
0
        private void registBtn_Click(object sender, RoutedEventArgs e)
        {
            bool   valid    = false;
            string user     = user_inp.Text;
            string pass     = pass_inp.Password;
            string pass2    = pass_inp2.Password;
            string realname = realname_inp.Text;
            string email    = email_inp.Text;

            if (user != db.langWordList(db.languageAsker())[7] && user != "" && pass != null && pass2 != null && realname != db.langWordList(db.languageAsker())[11] && realname != "" && email != db.langWordList(db.languageAsker())[13] && email != "")
            {
                if (pass == pass2)
                {
                    valid = db.dbUserRegistration(user, pass, pass2, realname, email);
                    if (valid == false)
                    {
                        registration_info_out.Text = db.langWordList(db.languageAsker())[74];
                        pc.idozito(registration_info_out);
                    }
                }
                else
                {
                    registration_info_out.Text = db.langWordList(db.languageAsker())[75];
                    pc.idozito(registration_info_out);
                }
            }
            else
            {
                valid = false;
            }
            if (valid == true)
            {
                user_inp.Text              = db.langWordList(db.languageAsker())[7];
                pass_label.Text            = db.langWordList(db.languageAsker())[8];
                pass_label2.Text           = db.langWordList(db.languageAsker())[12];
                pass_inp.Password          = null;
                pass_inp2.Password         = null;
                realname_inp.Text          = db.langWordList(db.languageAsker())[11];
                email_inp.Text             = db.langWordList(db.languageAsker())[13];
                registration_info_out.Text = db.langWordList(db.languageAsker())[80];
                pc.idozito(registration_info_out);
            }
        }