Пример #1
0
        private void signup_Click(object sender, RoutedEventArgs e)
        {
            count = count + 1;
            if (sUsername.Text == "" || sPassword.Password == "" || sPasswordc.Password == "")
            {
                String aaa = "Please Fill All Information";
                t1.Text = aaa;
            }
            else if (sPasswordc.Password != sPassword.Password)
            {
                String aaa = "Password Not Matched";
                t1.Text = aaa;
            }

            if (count % 2 == 0)
            {
                string parameters = new SignupPage().ToString();
                string para       = new SignupPage().ToString();
                parameters             = sUsername.Text;
                para                   = sPassword.Password;
                Window.Current.Content = new NewUserDataPage(parameters, para);
            }
            else
            {
                String aaa = "You Are Registered Press SignUp ";
                t1.Text = aaa;
            }
        }
Пример #2
0
        private void login_Click(object sender, RoutedEventArgs e)
        {
            var query = conn.Table <userdata2>();

            foreach (var message in query)
            {
                if (lUsername.Text == message.Name1 && lPassword.Password == message.Password1)
                {
                    String aaa = "You Are Logged In";
                    t1.Text = aaa;
                    string parameters = new SignupPage().ToString();
                    parameters             = lUsername.Text;
                    Window.Current.Content = new WorkOutPage(parameters);
                }
                else
                {
                    String aaa = "Please Fill Correct Credentials";
                    t1.Text = aaa;
                }
            }
        }