Ejemplo n.º 1
0
 private void Login_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (!_client.Connected)
     {
         return;
     }
     SendServerMessage(JsonConvert.SerializeObject(PacketFactory.DisconnectPacket(PacketType.Disconnect, new User
     {
         Username = usernameTb.Text,
         Password = passwordTb.Text
     })));
     _formProvider.Register.Close();
     _formProvider.Chat.Close();
 }