private void btn_login_page_Click(object sender, RoutedEventArgs e)
        {
            var loginpage = new login_form();

            this.Close();
            loginpage.Show();
        }
        private void btn_return_Click(object sender, RoutedEventArgs e)
        {
            login_form login_Form = new login_form();

            this.Close();
            login_Form.Show();
        }
Example #3
0
        private void ButtonCloseWindow_Click(object sender, RoutedEventArgs e)
        {
            MaterialMessageBox.Show("You are now logout");
            var loginpage = new login_form();

            loginpage.Show();
            this.Close();
        }
Example #4
0
        private void btn_logout_Click(object sender, RoutedEventArgs e)
        {
            Login_process.user_info.Clear();
            var loginpage = new login_form();

            this.Close();
            MaterialMessageBox.Show("Logout successfully ");
            loginpage.Show();
        }
        private void btn_change_Click(object sender, RoutedEventArgs e)
        {
            serverurl = "http://" + txt_url.Text + "/";
            MaterialMessageBox.Show(serverurl);
            login_form login_Form = new login_form();

            this.Close();
            login_Form.Show();
        }
        public Register_process(string name, string firstname, string email, string username, string password)
        {
            try
            {
                var request        = new Request();
                var register_Model = new register_request
                {
                    name     = name + " " + firstname,
                    email    = email,
                    username = username,
                    password = password
                };

                //var response = request.Execute("http://192.168.0.198:8080/register", register_Model, "POST");

                register_response response = (register_response)request.Execute <register_response>(Rest_API.serverurl + "/api/users/register", register_Model, "POST");

                if (response.status == 200)
                {
                    MaterialMessageBox.Show(response.message);
                    login_form login_Form = new login_form();
                    succes = "true";
                    login_Form.Show();
                }
                if (response.status == 901)
                {
                    MaterialMessageBox.Show(response.message);
                }
                if (response.status == 902)
                {
                    MaterialMessageBox.Show(response.message);
                    //register_form register_Form = new register_form();

                    //register_Form.Show();
                }
                return;
            }
            catch (Exception ex)
            {
                succes = "false";
                Console.WriteLine(ex);
                return;
            }
        }