public void Eat(string nick, BBConversation conversation) { // Create a message BBMessage msg = new BBMessage(); msg.MsgEat("", PList.GetPlayer(nick, OurID).Carac.ActorID); msg.Conversation = conversation; // Send use the ReliableUnordered channel; ie. it WILL arrive, but not necessarily in order Client.SendMessage(msg.GetNetMessage(), NetChannel.ReliableUnordered); }
public void PrivateMessage(BBConversation convers, string text, string actualnick) { if (convers != null) { Player player = PList.GetPlayer(actualnick, OurID); if (player != null) { // Create a message BBMessage msg = new BBMessage(); msg.Conversation = convers; msg.PlayerCarac = player.Carac; msg.MsgPrivateMessage(text, actualnick); msg.Message = text; if (msg.PlayerCarac != null) // Send use the ReliableUnordered channel; ie. it WILL arrive, but not necessarily in order Client.SendMessage(msg.GetNetMessage(), NetChannel.ReliableUnordered); } } }
internal static void PrivateMessage(BBConversation bBConversation, string p, string p_3) { Program.ChatApplicationBusiness.PrivateMessage(bBConversation, p, p_3); }
/// <summary> /// Vérifie que l'utilisateur fait partie de la conversation /// </summary> /// <param name="conversation"></param> /// <returns></returns> private bool IsPartOfConversation(BBConversation conversation) { if (conversation == null) return true; foreach (string play in conversation.Players) { if (PList.GetPlayer(play, OurID) != null) { if (OurID == PList.GetPlayer(play, OurID).Carac.ActorID) return true; } } return false; }
public void MsgChatHelper(string text, PlayerCarac player, BBMessage message) { MsgType = BBMsgType.CHAT; Conversation = message.Conversation; PlayerCarac = player; Message = text; Param1 = text; }
internal static void LeaveConversation(BBConversation BBConversation, string p) { Program.ChatApplicationBusiness.LeaveConversation(BBConversation, p); }
static void _chatApplicationBusiness_UserTyping(PlayerCarac playerCarac, BBConversation conversation, bool isTyping) { if (conversation == null) MainForm.UserIsTypingMsg(playerCarac.Nick, isTyping); else MainForm.UserIsTypingMsg(playerCarac.Nick, isTyping, conversation); }
public BBConversation StartPrivateConversation(List<string> users) { BBConversation conversation = new BBConversation(users); //BBMessage msg = new BBMessage(); //msg.Conversation = conversation; foreach (string str in users) { this.JoinConversation(conversation, str); } return conversation; }
/// <summary> /// Création d'un tabpage /// </summary> /// <param name="message"></param> /// <returns></returns> private TabPage CreateTabPage(BBConversation conversation) { if (conversation != null) { this.tabControl1.TabPages.Add(conversation.ConversGUID.ToString(), conversation.ToString()); if (this.tabControl1.TabPages.ContainsKey(conversation.ConversGUID.ToString())) { TabPage tabPage = this.tabControl1.TabPages[conversation.ConversGUID.ToString()]; if (tabPage != null) { RichTextBox richTextBox = new RichTextBox(); richTextBox.ReadOnly = true; richTextBox.Dock = DockStyle.Fill; richTextBox.BackColor = Color.White; tabPage.BorderStyle = BorderStyle.FixedSingle; tabPage.Controls.Add(richTextBox); //Le tag de la tabpage correspond à la conversation tabPage.Tag = conversation; return tabPage; } else return null; } else return null; } else return null; }
public void UserIsTypingMsg(string nick, bool isTyping, BBConversation convers) { if ((this.tabControl1.SelectedTab.Tag != null) && (this.tabControl1.SelectedTab.Tag is BBConversation)) { if (convers.ConversGUID == ((BBConversation)this.tabControl1.SelectedTab.Tag).ConversGUID) { DataGridViewRow dgvr = this.GetRowByUserName(nick); if (dgvr != null) { if (isTyping) { dgvr.Cells[this.LogoColumn.Index].Value = this.imageList_user.Images[1]; } else { dgvr.Cells[this.LogoColumn.Index].Value = this.imageList_user.Images[0]; } } } } }
private void AddPlayerIntoConversation(BBConversation conversation, string player) { if ((conversation != null) && (!conversation.Players.Contains(player))) { conversation.Players.Add(player); Program.JoinConversation(conversation, player); } }
public void MsgChatBash(string text, PlayerCarac player, bool toDisplay, BBMessage message) { MsgType = BBMsgType.BASH; Conversation = message.Conversation; PlayerCarac = player; Message = text; Param1 = text; Param2 = toDisplay; }
public void MsgChatPendu(string text, PlayerCarac player, bool alert, BBMessage message) { MsgType = BBMsgType.PENDU; Conversation = message.Conversation; PlayerCarac = player; Message = text; Param1 = text; Param2 = alert; }
public void LeaveConversation(BBConversation convers, string actualnick) { if (convers != null) { if (convers.Players.Contains(actualnick)) { convers.Players.Remove(actualnick); if (PList.GetPlayer(actualnick, OurID) != null) { BBMessage msg = new BBMessage(); msg.Conversation = convers; msg.MsgLeaveConversationPlayer(PList.GetPlayer(actualnick, OurID).Carac.ActorID, string.Empty); Client.SendMessage(msg.GetNetMessage(), NetChannel.ReliableUnordered); } } } }
internal static void Eat(string str, BBConversation conversation) { Program.ChatApplicationBusiness.Eat(str, conversation); }
public void JoinConversation(BBConversation convers, string actualnick) { if (convers != null) { BBMessage msg = new BBMessage(); msg.Conversation = convers; msg.MsgJoinConversationPlayer(PList.GetPlayer(actualnick, OurID), true); Client.SendMessage(msg.GetNetMessage(), NetChannel.ReliableUnordered); } }
internal static void JoinConversation(BBConversation conversation, string player) { Program.ChatApplicationBusiness.JoinConversation(conversation, player); }
private void OnUserTyping(PlayerCarac player, BBConversation conversation, bool isTyping) { if (this.UserTyping != null) this.UserTyping(player, conversation, isTyping); }
public void MsgChatVDM(string text, PlayerCarac player, bool displayMessage, BBMessage message) { MsgType = BBMsgType.VDM; Conversation = message.Conversation; PlayerCarac = player; Message = text; Param1 = text; Param2 = displayMessage; }