private static void OnJoinGroupChat(object o, GroupChatJoinedEventArgs e) { lock(pendingGroupchatJoins) { List<TaskCompletionSource<bool>> list; if(pendingGroupchatJoins.TryGetValue(e.SessionID, out list)) { list.ForEach(i=> i.SetResult(e.Success)); pendingGroupchatJoins.Remove(e.SessionID); } } }
void Self_GroupChatJoined(object sender, GroupChatJoinedEventArgs e) { if (e.Success) { Console.WriteLine("Joined {0} Group Chat Success!", e.SessionName); WaitForSessionStart.Set(); } else { Console.WriteLine("Join Group Chat failed :("); } }
/// <summary>Raises the GroupChatJoined event</summary> /// <param name="e">A GroupChatJoinedEventArgs object containing the /// data returned from the data server</param> protected virtual void OnGroupChatJoined(GroupChatJoinedEventArgs e) { EventHandler<GroupChatJoinedEventArgs> handler = m_GroupChatJoined; if (handler != null) handler(this, e); }
void Self_GroupChatJoined(object sender, GroupChatJoinedEventArgs e) { if (e.SessionID != session && e.TmpSessionID != session) { return; } if (InvokeRequired) { if (!instance.MonoRuntime || IsHandleCreated) Invoke(new MethodInvoker(() => Self_GroupChatJoined(sender, e))); return; } if (e.Success) { textManager.TextPrinter.PrintTextLine("Join Group Chat Success!", Color.Green); WaitForSessionStart.Set(); } else { textManager.TextPrinter.PrintTextLine("Join Group Chat failed.", Color.Red); } }
public void Self_GroupChatJoined(object sender, GroupChatJoinedEventArgs e) { Hashtable message = new Hashtable(); message.Add("MessageType", "GroupChatJoin"); message.Add("GroupChatSessionID", e.SessionID); message.Add("TmpSessionID", e.TmpSessionID); message.Add("SessionName", e.SessionName); message.Add("Success", e.Success); enqueue(message); }
private void Self_OnGroupChatJoin(object sender, GroupChatJoinedEventArgs e) { if (e.SessionID != session && e.TmpSessionID != session) return; if (e.Success) { WaitForSessionStart.Set(); BeginInvoke(new MethodInvoker(delegate() { try { label1.Visible = false; } catch { ; } })); } else { //BeginInvoke(new MethodInvoker(Group_JoinError)); BeginInvoke(new MethodInvoker(delegate() { try { label1.Text = "Failed to join the requested group chat"; } catch { ; } })); } }
public virtual void Self_OnGroupChatJoin(object sender, GroupChatJoinedEventArgs e) { OnEvent("On-Group-Chat-Join", paramNamesOnGroupChatJoin, paramTypesOnGroupChatJoin,e); }
void Self_OnGroupChatJoin(object sender, GroupChatJoinedEventArgs e) { if (e.Success) { Logger.Log(String.Format(CultureInfo.CurrentCulture, "Chair Announcer: Joined GroupChat {0} with UUID {1} named {2}", targetIndex, e.SessionID.ToString(), e.SessionName), Helpers.LogLevel.Debug); chairAnnouncerGroupNames[targetIndex] = e.SessionName; waitGroupIMSession.Set(); } else { Logger.Log(String.Format(CultureInfo.CurrentCulture, "Chair Announcer: Failed GroupChat {0} with UUID {1} named {2}", targetIndex, e.SessionID.ToString(), e.SessionName), Helpers.LogLevel.Debug); chairAnnouncerGroupNames[targetIndex] = "N/A"; TextPrinter.PrintTextLine("Chair Announcer: Failed to join GroupChat"); } }
void Self_GroupChatJoined(object sender, GroupChatJoinedEventArgs e) { if (e.Success) { DebugUtilities.WriteInfo(session.ToString() + " " + MethodName + "Joined {0} Group Chat Success!"); WaitForSessionStart.Set(); } else { DebugUtilities.WriteInfo(session.ToString() + " " + MethodName + "Join Group Chat failed :("); } }