Exemple #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();
            });
        }
Exemple #2
0
 private void BAuth_Click(object sender, EventArgs e)
 {
     MyFragmentManager.UserName = etUsername.Text.ToString();
     MyFragmentManager.SendLogin(etUsername.Text.ToString(),
                                 etPassword.Text.ToString());
     ToLobby();
 }
Exemple #3
0
        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();
        }
Exemple #4
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");
     }
 }
Exemple #5
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();
        }
Exemple #6
0
 private void BRefresf_Click(object sender, EventArgs e)
 {
     MyFragmentManager.Send("list" + "," + "");
 }
Exemple #7
0
 private void BLogout_Click(object sender, EventArgs e)
 {
     ToReg();
     MyFragmentManager.Send("lobby,exit" + "," + MyFragmentManager.UserName);
 }
Exemple #8
0
 private void sendReg(string mess)
 {
     MyFragmentManager.Send(mess);
 }                                                                   //посылка регистраци на server
Exemple #9
0
 private void Invite(string playerName)
 {
     MyFragmentManager.SendInviteRequest(playerName);
 }
Exemple #10
0
 private void SendButtonClick(int index)
 {
     MyFragmentManager.Send("games,gamexo" + "," + MyFragmentManager.UserName + "," + index);
 }
Exemple #11
0
 public void BExit_Click(object sender, EventArgs e)
 {
     MyFragmentManager.Send("games,stopgame" + "," + MyFragmentManager.UserName);
     ToLobby();
 }