public void InvitationBox(string playerName) { AlertDialog.Builder aDialogBuilder = new AlertDialog.Builder(this.Context); aDialogBuilder.SetMessage("Invitation"); aDialogBuilder.SetMessage("Player " + playerName + " wants to play with you!"); aDialogBuilder.SetPositiveButton("OK", new EventHandler <DialogClickEventArgs>((sender, e) => { MyFragmentManager.Send("games,ask,yes," + playerName + "," + MyFragmentManager.UserName + ",XO"); (sender as Dialog).Cancel(); })); aDialogBuilder.SetNegativeButton("Cancel", new EventHandler <DialogClickEventArgs>((sender, e) => { MyFragmentManager.Send("games,ask,no," + playerName + "," + MyFragmentManager.UserName + ",XO"); (sender as Dialog).Cancel(); })); MyFragmentManager.activity.StartUiThread(() => { aDialogBuilder.SetCancelable(false); aDialogBuilder.Create(); aDialogBuilder.Show(); }); }
private void BAuth_Click(object sender, EventArgs e) { MyFragmentManager.UserName = etUsername.Text.ToString(); MyFragmentManager.SendLogin(etUsername.Text.ToString(), etPassword.Text.ToString()); ToLobby(); }
private void BLogin_Click(object sender, EventArgs e) { MyFragmentManager.activity.InitWebSocket(); MyFragmentManager.InitWebSocket(MyFragmentManager.activity.webSocket); FragmentTransaction transaction = FragmentManager.BeginTransaction(); transaction.Replace(Resource.Id.main_activity_fragment_placeholder, new FragmentRA()); transaction.Commit(); }
private void BForgotPass_Click(object sender, EventArgs e) { if (etUsername != null) { MyFragmentManager.Send("sendpassword," + etUsername.Text.ToString()); MessageBox("Info", "Your password send By Email"); } else { MessageBox("Error", "Put your Login"); } }
private void ChangePSW() { LayoutInflater inflater = (LayoutInflater)this.Context.GetSystemService(Context.LayoutInflaterService); View v = inflater.Inflate(Resource.Layout.newpsw, null); EditText dialog1 = v.FindViewById <EditText>(Resource.Id.new_PSW); AlertDialog.Builder aDialogBuilder = new AlertDialog.Builder(this.Context); aDialogBuilder.SetView(v); aDialogBuilder.SetPositiveButton("Ok", new EventHandler <DialogClickEventArgs>((sender, e) => { MyFragmentManager.Send("lobby,changepass," + MyFragmentManager.UserName + "," + dialog1.Text.ToString()); (sender as Dialog).Cancel(); })); aDialogBuilder.SetCancelable(false); aDialogBuilder.Create(); aDialogBuilder.Show(); }
private void BRefresf_Click(object sender, EventArgs e) { MyFragmentManager.Send("list" + "," + ""); }
private void BLogout_Click(object sender, EventArgs e) { ToReg(); MyFragmentManager.Send("lobby,exit" + "," + MyFragmentManager.UserName); }
private void sendReg(string mess) { MyFragmentManager.Send(mess); } //посылка регистраци на server
private void Invite(string playerName) { MyFragmentManager.SendInviteRequest(playerName); }
private void SendButtonClick(int index) { MyFragmentManager.Send("games,gamexo" + "," + MyFragmentManager.UserName + "," + index); }
public void BExit_Click(object sender, EventArgs e) { MyFragmentManager.Send("games,stopgame" + "," + MyFragmentManager.UserName); ToLobby(); }