Ejemplo n.º 1
0
        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();
            });
        }
Ejemplo n.º 2
0
 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");
     }
 }
Ejemplo n.º 3
0
        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();
        }
Ejemplo n.º 4
0
 private void BRefresf_Click(object sender, EventArgs e)
 {
     MyFragmentManager.Send("list" + "," + "");
 }
Ejemplo n.º 5
0
 private void BLogout_Click(object sender, EventArgs e)
 {
     ToReg();
     MyFragmentManager.Send("lobby,exit" + "," + MyFragmentManager.UserName);
 }
Ejemplo n.º 6
0
 private void sendReg(string mess)
 {
     MyFragmentManager.Send(mess);
 }                                                                   //посылка регистраци на server
Ejemplo n.º 7
0
 private void SendButtonClick(int index)
 {
     MyFragmentManager.Send("games,gamexo" + "," + MyFragmentManager.UserName + "," + index);
 }
Ejemplo n.º 8
0
 public void BExit_Click(object sender, EventArgs e)
 {
     MyFragmentManager.Send("games,stopgame" + "," + MyFragmentManager.UserName);
     ToLobby();
 }