private void logoutBtn_Click(object sender, EventArgs e) { AccountWebService.accountPortTypeClient soap = new AccountWebService.accountPortTypeClient(); var logout = soap.logoutAccount(Customer.Nick, Customer.Token, AppAuthority.Authority); if (logout == "1") { } else if (logout == "0") { th = new Thread(openingIndex); th.SetApartmentState(ApartmentState.STA); th.Start(); Application.Exit(); } }
private void saveBtn_Click(object sender, EventArgs e) { string authority = AppAuthority.Authority; string password = passwordTextBox.Text; AccountWebService.accountPortTypeClient YeniWebServis = new AccountWebService.accountPortTypeClient(); string Update = YeniWebServis.updateAccount(password, Customer.Token, authority); if (Update == "0") { MessageBox.Show("Failed to update!"); } else if (Update == "1") { MessageBox.Show("Update successfull"); } }
private void timer1_Tick(object sender, EventArgs e) { ticks++; AccountWebService.accountPortTypeClient soap = new AccountWebService.accountPortTypeClient(); string money = soap.updatedFetchSessionData(Customer.Nick, Customer.Token); if (money != "0") { Customer.Money = money; } moneyLabel.Text = Customer.Money + " AIO Money"; }
private void signUpBtn_Click(object sender, EventArgs e) { string authority = AppAuthority.Authority; string nick = nickTextBox.Text; string mail = mailTextBox.Text; string password = passwordTextBox.Text; AccountWebService.accountPortTypeClient YeniWebServis = new AccountWebService.accountPortTypeClient(); string HesapBilgi = YeniWebServis.createAccount(nick, password, mail, authority); if (HesapBilgi == "0") { MessageBox.Show("Sign Up Failed!"); } else if (HesapBilgi == "1") { MessageBox.Show("Sign Up Successfull!"); } }
private void RemoveAccountBtn_Click(object sender, EventArgs e) { string token = Customer.Token; string authority = AppAuthority.Authority; AccountWebService.accountPortTypeClient servisaccount = new AccountWebService.accountPortTypeClient(); var HesapSilme = servisaccount.deleteAccount(Customer.Token, AppAuthority.Authority); if (HesapSilme == "0") { MessageBox.Show("delete filed!"); } else if (HesapSilme == "1") { MessageBox.Show("delete succes!"); Index iindex = new Index(); iindex.Show(); this.Hide(); } }
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(); } }