Example #1
0
 /**
  *  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);
 }
Example #2
0
 /**
  *  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;
 }
Example #3
0
 /**
  *  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);
 }
Example #4
0
 /**
  *  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);
 }
Example #5
0
 /**
  *  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)
 {
 }
Example #6
0
 /**
  *  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);
 }
Example #7
0
 public ErrorEventArgs(PacketHeader header)
     : base(header)
 {
     Error = header.Error;
 }
Example #8
0
 private void UsersCount(PacketHeader packetHeader, Connection connection, string incomingObject)
 {
     MessageBox.Show(incomingObject);
 }
Example #9
0
 public ChatEventArgs(PacketHeader header, ChatPacket body)
     : base(header)
 {
     SourceId = body.SourceId;
     ChatContent = body.ChatContent;
 }
Example #10
0
 public ClientEventArgs(PacketHeader header)
     : this(header.Kind)
 {
 }
Example #11
0
 public NewBodyOnlineEventArgs(PacketHeader header, NewBodyOnlinePacket body)
     : base(header)
 {
     NewUserId = body.UserId;
     NewUserInfo = body.Info;
 }
Example #12
0
 private void WriteMessage(PacketHeader header, Connection connection, string message)
 {
     Console.WriteLine(message);
 }
Example #13
0
 private void SetId(PacketHeader header, Connection connection, int id)
 {
     Id = id;
 }
Example #14
0
 /**
  *  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);
 }
Example #15
0
 public InfoEventArgs(PacketHeader header, InfoPacket body)
     : base(header)
 {
     Info = body.Info;
     OnlineUsers = body.OnlineUsers;
 }
Example #16
0
 /**
  *  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);
 }
Example #17
0
 private void NewsData(PacketHeader packetHeader, Connection connection, string incomingObject)
 {
     //richTextBox1.Text = incomingObject.ToString();
     richTextBox1.Invoke(new Action(() => richTextBox1.Text = incomingObject));
     //MessageBox.Show(incomingObject);
 }