Пример #1
0
 private void __refereshGroupMembersInfo()
 {
     if (_Joined)
     {
         List <CSCommunicateClass.ClientInfo> _newBaseDeviceInfoList = null;
         GroupCommunicateLayer gclprocessor = _corelogicProcessor.GroupCommunicateProcessor;
         try
         {
             gclprocessor.GetGroupMembers(this, out _newBaseDeviceInfoList);
         }
         catch (System.Exception ex)
         {
             _members = null;
             throw new GetOnlineGroupClientExcetion(ex.ToString());
         }
         List <ClientDevice> newMembersList = new List <ClientDevice>();
         foreach (CSCommunicateClass.ClientInfo item in _newBaseDeviceInfoList)
         {
             ClientDevice cd = new ClientDevice();
             ClientDevice.Parse(item, cd);
             newMembersList.Add(cd);
         }
         _members = newMembersList;
     }
     else
     {
         throw new GetOnlineGroupClientExcetion("未加入该群组");
     }
 }
Пример #2
0
 internal void Join(GroupMemberRole role)
 {
     if (false == _Joined)
     {
         GroupCommunicateLayer gclprocessor = _corelogicProcessor.GroupCommunicateProcessor;
         try
         {
             gclprocessor.JoinGroup(this, role);
             _Joined = true;
             __refereshGroupMembersInfo();
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
 }
Пример #3
0
        internal void Exit()
        {
            if (true == _Joined)
            {
                GroupCommunicateLayer gclprocessor = _corelogicProcessor.GroupCommunicateProcessor;
                try
                {
                    gclprocessor.ExitGroup(this);
                    _Joined = false;

                    _members.Clear();
                    _members = null;
                }
                catch (System.Exception ex)
                {
                    throw ex;
                }
            }
        }