예제 #1
0
            private void SendGroupAddedMessage(Group group, Group receivers)
            {
                Message message = new ParticipantGroupAddedMessage(group);

                message.Group = receivers;
                this.m_Service.m_Sender.Send(message);
            }
 private void SendGroupAddedMessage(Group group, Group receivers)
 {
     Message message = new ParticipantGroupAddedMessage(group);
     message.Group = receivers;
     this.m_Service.m_Sender.Send(message);
 }
        /// <summary>
        /// If current role is public, then resend RoleMessage and GroupMessage for reconnection
        /// </summary>
        private void SendRoleAndGroupMessage(TCPMessageSender sender)
        {
            using (Synchronizer.Lock(this.m_Model.Participant.SyncRoot)) {
                if (this.m_Model.Participant.Role is PublicModel) {

                    //Send RoleMessage
                    UW.ClassroomPresenter.Network.Messages.Message message = RoleMessage.ForRole(this.m_Model.Participant.Role);
                    message.Group = Group.AllParticipant;
                    sender.Send(message);

                    //Send GroupMessage
                    foreach (Group group in this.m_Model.Participant.Groups) {
                        message = new ParticipantGroupAddedMessage(group);
                        message.Group = Group.AllParticipant;
                        sender.Send(message);
                    }
                }
            }
        }