/** * Triggered when the server tells the client he's not allowed to play the card * @param header Infos about the header. * @param connection Infos about the server's connection. * @param message Unused. */ public void CardNotAllowed(PacketHeader header, Connection connection, string message) { MessageBox.Show("You can't play this card.", "Incorrect play", MessageBoxButton.OK, MessageBoxImage.Warning); }
/** * Triggered when the server refuse the connection. * @param header Infos about the header. * @param connection Infos about the server's connection. * @param message Unused. */ public void ConnectionKo(PacketHeader header, Connection connection, string message) { MessageBox.Show(message, "Connection error", MessageBoxButton.OK, MessageBoxImage.Warning); GameInfos.Instance.NetManager.IsConnected = false; }
/** * Triggered when the server tells the client he's not owning the played card * @param header Infos about the header. * @param connection Infos about the server's connection. * @param message Unused. */ public void NotOwningCard(PacketHeader header, Connection connection, string message) { MessageBox.Show("You don't own this card.", "Incorrect play", MessageBoxButton.OK, MessageBoxImage.Warning); }
/** * Triggered when the server tells the client he told a lower contract value * @param header Infos about the header. * @param connection Infos about the server's connection. * @param message Unused. */ public void AnnounceIncorrect(PacketHeader header, Connection connection, string message) { MessageBox.Show("You can't announce a lower contract value", "Incorrect announce", MessageBoxButton.OK, MessageBoxImage.Warning); }
/** * Triggered when the server agree with one of the client request * @param header Infos about the header. * @param connection Infos about the server's connection. * @param message Unused. */ public void Ok(PacketHeader header, Connection connection, string message) { }
/** * Triggered when the server tells the client it's not his turn * @param header Infos about the header. * @param connection Infos about the server's connection. * @param message An user id. */ public void NotMyTurn(PacketHeader header, Connection connection, string message) { MessageBox.Show("It's not your turn, it's player " + message + "'s turn", "Incorrect turn", MessageBoxButton.OK, MessageBoxImage.Warning); }
public ErrorEventArgs(PacketHeader header) : base(header) { Error = header.Error; }
private void UsersCount(PacketHeader packetHeader, Connection connection, string incomingObject) { MessageBox.Show(incomingObject); }
public ChatEventArgs(PacketHeader header, ChatPacket body) : base(header) { SourceId = body.SourceId; ChatContent = body.ChatContent; }
public ClientEventArgs(PacketHeader header) : this(header.Kind) { }
public NewBodyOnlineEventArgs(PacketHeader header, NewBodyOnlinePacket body) : base(header) { NewUserId = body.UserId; NewUserInfo = body.Info; }
private void WriteMessage(PacketHeader header, Connection connection, string message) { Console.WriteLine(message); }
private void SetId(PacketHeader header, Connection connection, int id) { Id = id; }
/** * Triggered when the server tells the client it's not anymore a announce turn * @param header Infos about the header. * @param connection Infos about the server's connection. * @param message Unused. */ public void AnnounceNotAllowed(PacketHeader header, Connection connection, string message) { MessageBox.Show("It's not an announce turn", "Incorrect call", MessageBoxButton.OK, MessageBoxImage.Warning); }
public InfoEventArgs(PacketHeader header, InfoPacket body) : base(header) { Info = body.Info; OnlineUsers = body.OnlineUsers; }
/** * Triggered when the server tells the client it's an incorrect turn type * @param header Infos about the header. * @param connection Infos about the server's connection. * @param message Unused. */ public void IncorrectTurnType(PacketHeader header, Connection connection, string message) { MessageBox.Show("Incorrect turn type", "Incorrect call", MessageBoxButton.OK, MessageBoxImage.Warning); }
private void NewsData(PacketHeader packetHeader, Connection connection, string incomingObject) { //richTextBox1.Text = incomingObject.ToString(); richTextBox1.Invoke(new Action(() => richTextBox1.Text = incomingObject)); //MessageBox.Show(incomingObject); }