Exemplo n.º 1
0
        private void BtnSignIn_Click(object sender, EventArgs e)
        {
            WerewolfCommand wcmd = new WerewolfCommand();

            wcmd.Action   = WerewolfCommand.CommandEnum.SignIn;
            wcmd.Payloads = new Dictionary <string, string>()
            {
                { "Login", TbLogin.Text }, { "Password", TbPassword.Text }, { "Server", TBServer.Text }
            };
            controller.ActionPerformed(wcmd);
        }
Exemplo n.º 2
0
        private void OnTimerEvent(object sender, EventArgs e)
        {
            WerewolfCommand wcmd = new WerewolfCommand();

            wcmd.Action = CommandEnum.RequestUpdate;
            controller.ActionPerformed(wcmd);
        }
Exemplo n.º 3
0
        private void BtnSignIn_Click(object sender, EventArgs e)
        {
            WerewolfCommand wcmd = new WerewolfCommand();

            wcmd.Action   = WerewolfCommand.CommandEnum.SignIn;
            wcmd.Payloads = new Dictionary <string, string>()
            {
                { "Login", TbLogin.Text }, { "Password", TbPassword.Text }, { "Server", TBServer.Text }
            };
            controller.ActionPerformed(wcmd);
            player.controls.stop();
            player1.URL = "G Minor - (arranged by Luo Ni Piano Tiles 2).mp3";
            player1.controls.play();
        }
Exemplo n.º 4
0
        private void BtnSignIn_Click(object sender, EventArgs e)
        {
            if (TbLogin.Text == "" || TbPassword.Text == "")
            {
                MessageBox.Show("Login or password incorrect, please try again", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            WerewolfCommand wcmd = new WerewolfCommand();

            wcmd.Action   = WerewolfCommand.CommandEnum.SignIn;
            wcmd.Payloads = new Dictionary <string, string>()
            {
                { "Login", TbLogin.Text }, { "Password", TbPassword.Text }, { "Server", TBServer.Text }
            };
            controller.ActionPerformed(wcmd);
        }
Exemplo n.º 5
0
 private void BtnSignIn_Click(object sender, EventArgs e)
 {
     if (TbLogin.Text.Equals("") || TbPassword.Text.Equals(""))
     {
         MessageBox.Show("Please input username and/or password", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         WerewolfCommand wcmd = new WerewolfCommand();
         wcmd.Action   = WerewolfCommand.CommandEnum.SignIn;
         wcmd.Payloads = new Dictionary <string, string>()
         {
             { "Login", TbLogin.Text }, { "Password", TbPassword.Text }, { "Server", (cbServerlist.SelectedItem as dynamic).Value }
         };
         controller.ActionPerformed(wcmd);
     }
 }
Exemplo n.º 6
0
        private void btnMM_Click(object sender, EventArgs e)
        {
            _MMTimer = new Timer();

            if (!_isMM)
            {
                WerewolfCommand wcmd = new WerewolfCommand();
                wcmd.Action = WerewolfCommand.CommandEnum.JoinGame;
                controller.ActionPerformed(wcmd);
            }
            else
            {
                WerewolfCommand wcmd = new WerewolfCommand();
                wcmd.Action = WerewolfCommand.CommandEnum.CancelJoin;
                controller.ActionPerformed(wcmd);

                _isMM = false;
                _MMTimer.Dispose();
            }
        }
Exemplo n.º 7
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (textBox3.Text == textBox2.Text)
     {
         WerewolfController c    = WerewolfController.GetInstance();
         WerewolfCommand    wcmd = new WerewolfCommand();
         wcmd.Action   = WerewolfCommand.CommandEnum.SignUp;
         wcmd.Payloads = new Dictionary <string, string>()
         {
             { "Login", textBox1.Text }, { "Password", textBox2.Text }, { "Server", TBServer.Text }
         };
         c.ActionPerformed(wcmd);
     }
     else
     {
         MessageBox.Show("Please make sure your passwords match.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
     }
 }