Exemplo n.º 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);
 }
Exemplo n.º 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;
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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)
 {
 }
Exemplo n.º 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);
 }
Exemplo n.º 7
0
 public ErrorEventArgs(PacketHeader header)
     : base(header)
 {
     Error = header.Error;
 }
Exemplo n.º 8
0
 private void UsersCount(PacketHeader packetHeader, Connection connection, string incomingObject)
 {
     MessageBox.Show(incomingObject);
 }
Exemplo n.º 9
0
 public ChatEventArgs(PacketHeader header, ChatPacket body)
     : base(header)
 {
     SourceId = body.SourceId;
     ChatContent = body.ChatContent;
 }
Exemplo n.º 10
0
 public ClientEventArgs(PacketHeader header)
     : this(header.Kind)
 {
 }
Exemplo n.º 11
0
 public NewBodyOnlineEventArgs(PacketHeader header, NewBodyOnlinePacket body)
     : base(header)
 {
     NewUserId = body.UserId;
     NewUserInfo = body.Info;
 }
Exemplo n.º 12
0
 private void WriteMessage(PacketHeader header, Connection connection, string message)
 {
     Console.WriteLine(message);
 }
Exemplo n.º 13
0
 private void SetId(PacketHeader header, Connection connection, int id)
 {
     Id = id;
 }
Exemplo n.º 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);
 }
Exemplo n.º 15
0
 public InfoEventArgs(PacketHeader header, InfoPacket body)
     : base(header)
 {
     Info = body.Info;
     OnlineUsers = body.OnlineUsers;
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }