private void signInBtn_Click(object sender, EventArgs e) { string authority = AppAuthority.Authority; string nick = nickTextBox.Text; string password = passwordTextBox.Text; AccountWebService.accountPortTypeClient soap = new AccountWebService.accountPortTypeClient(); string loginAction = soap.loginAccount(nick, password, authority); if (loginAction == "0") { MessageBox.Show("Sign In Failed!"); } else { var loginReturn = loginAction.Split('_'); Customer.Token = loginReturn[0]; Customer.Nick = loginReturn[1]; Customer.Money = loginReturn[2]; MessageBox.Show("Signed In.Please waiting…"); th = new Thread(openingUserProfile); th.SetApartmentState(ApartmentState.STA); th.Start(); th = new Thread(openingUserSessionScreen); th.SetApartmentState(ApartmentState.STA); th.Start(); this.Close(); } }