private void InitializeNetworking() { networkUpdateTimer.Interval = 20; networkUpdateTimer.Start(); networkUpdateTimer.Tick += networkUpdateTimer_Tick; NetworkingClient.InitializeClient("37.157.138.76"); }
private bool SendChatMessage() { if (chatBox.Text.Length > 0) { NetworkingClient.SendChatMessage(UserName, chatBox.Text); chatBox.Clear(); return(true); } else { return(false); } }
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); } }
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); } }
private void networkUpdateTimer_Tick(object sender, EventArgs e) { NetworkingClient.Update(); }
private void activateButton_Click(object sender, EventArgs e) { NetworkingClient.SendActivationCode(activationCodeText.Text); }