Example #1
0
        private void sendBtn_Click(object sender, EventArgs e)
        {
            string authority = AppAuthority.Authority;

            string mail = mailTextBox.Text;

            AccountWebService.accountPortTypeClient soap = new AccountWebService.accountPortTypeClient();


            string forgotPassword = soap.forgotPasswordToMailSend(mail, authority).ToString();

            if (forgotPassword == "0")
            {
                MessageBox.Show("Password operation failed!");
            }
            else
            {
                var loginReturn = forgotPassword.Split('_');


                Customer.Token = loginReturn[0];
                Customer.Nick  = loginReturn[1];
                Customer.Money = loginReturn[2];


                MessageBox.Show("Your new password has been sent to your mail. Check your mail.");
                th = new Thread(openingUserProfile);
                th.SetApartmentState(ApartmentState.STA);
                th.Start();
                th = new Thread(openingUserSessionScreen);
                th.SetApartmentState(ApartmentState.STA);
                th.Start();
                this.Close();
            }
        }