Esempio n. 1
0
        private void LoginButton_Click_1(object sender, EventArgs e)
        {
            string UserToken;

            try
            {
                UserToken = logic.LoginCheck(EmailtextBox.Text, PasswordtextBox.Text);
                UserMainForm Umf = new UserMainForm(UserToken);
                this.Hide();
                Umf.ShowDialog();
                this.Close();
            }
            catch (Exception exp)
            {
                MessageBox.Show(exp.Message);
            }
        }
Esempio n. 2
0
        private void DoneButton_Click(object sender, EventArgs e)
        {
            string token;

            if (!(string.IsNullOrWhiteSpace(UserNameTextbox.Text)) && !(string.IsNullOrWhiteSpace(PasswordTextbox.Text)) && !(string.IsNullOrWhiteSpace(PhoneNumberTextbox.Text)) && !(string.IsNullOrWhiteSpace(EmailTextbox.Text)))
            {
                try
                {
                    token = logic.RegisterCheck(UserNameTextbox.Text, EmailTextbox.Text, PhoneNumberTextbox.Text, PasswordTextbox.Text);
                    UserMainForm umf = new UserMainForm(token);
                    this.Hide();
                    umf.ShowDialog();
                }
                catch (Exception exp)
                {
                    MessageBox.Show(exp.Message);
                }
            }
        }