Esempio n. 1
0
 private void InitializeNetworking()
 {
     networkUpdateTimer.Interval = 20;
     networkUpdateTimer.Start();
     networkUpdateTimer.Tick += networkUpdateTimer_Tick;
     NetworkingClient.InitializeClient("37.157.138.76");
 }
Esempio n. 2
0
 private bool SendChatMessage()
 {
     if (chatBox.Text.Length > 0)
     {
         NetworkingClient.SendChatMessage(UserName, chatBox.Text);
         chatBox.Clear();
         return(true);
     }
     else
     {
         return(false);
     }
 }
Esempio n. 3
0
 private bool SignIn()
 {
     if (ValidatePassword(passText.Text))
     {
         NetworkingClient.SendLoginData(userText.Text, passText.Text);
         UserName = userText.Text;
         userText.Clear();
         passText.Clear();
         return(true);
     }
     else
     {
         return(false);
     }
 }
Esempio n. 4
0
        private bool Register()
        {
            if (passText.Text != passConfirmText.Text)
            {
                return(false);
            }

            if (ValidatePassword(passText.Text))
            {
                NetworkingClient.SendRegistrationData(userText.Text, emailText.Text, passText.Text);
                UserName = userText.Text;
                userText.Clear();
                passText.Clear();
                emailText.Clear();
                passConfirmText.Clear();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 5
0
 private void networkUpdateTimer_Tick(object sender, EventArgs e)
 {
     NetworkingClient.Update();
 }
Esempio n. 6
0
 private void activateButton_Click(object sender, EventArgs e)
 {
     NetworkingClient.SendActivationCode(activationCodeText.Text);
 }