示例#1
0
 private void DueMessage(Action <ReceieveMessage> action, ReceieveMessage message)
 {
     if (action == null)
     {
         UnDueMessages.Add(message);
         return;
     }
     action(message);
 }
示例#2
0
 private void Teacher_OnReveieveData(ReceieveMessage message)
 {
 }
示例#3
0
        private void Student_OnReveieveData(ReceieveMessage message)
        {
            switch (message.Action)
            {
            case (int)CommandType.UserLoginRes:
                DueMessage(OnUserLoginRes, message);
                break;

            case (int)CommandType.TeacherLoginIn:    //教师端登录
                DueMessage(OnTeacherLoginIn, message);
                break;

            case (int)CommandType.TeacherLoginOut:    //教师端登出
                DueMessage(OnTeacherLoginOut, message);
                break;

            case (int)CommandType.ScreenInteract:    //推送视频流
                DueMessage(OnScreenInteract, message);
                break;

            case (int)CommandType.StopScreenInteract:    //停止视频流
                DueMessage(OnStopScreenInteract, message);
                break;

            case (int)CommandType.LockScreen:    //锁屏
                DueMessage(OnLockScreen, message);
                break;

            case (int)CommandType.StopLockScreen:    //终止锁屏
                DueMessage(OnStopLockScreen, message);
                break;

            case (int)CommandType.Quiet:    //屏幕肃静
                DueMessage(OnQuiet, message);
                break;

            case (int)CommandType.StopQuiet:    //终止屏幕肃静
                DueMessage(OnStopQuiet, message);
                break;

            case (int)CommandType.PrivateChat:    //收到私聊信息
                DueMessage(OnPrivateChat, message);
                break;

            case (int)CommandType.TeamChat:    //收到组聊信息
                DueMessage(OnTeamChat, message);
                break;

            case (int)CommandType.GroupChat:    //收到群聊信息
                DueMessage(OnGroupChat, message);
                break;

            case (int)CommandType.BeginCall:    //开始点名
                DueMessage(OnBeginCall, message);
                break;

            case (int)CommandType.EndCall:    //结束点名
                DueMessage(OnEndCall, message);
                break;

            case (int)CommandType.CreateTeam:    //收到创建群组信息
                DueMessage(OnCreateTeam, message);
                break;

            case (int)CommandType.CallStudentShow:    //收到请求学生演示
                DueMessage(OnCallStudentShow, message);
                break;

            case (int)CommandType.StopStudentShow:    //停止演示
                DueMessage(OnStopStudentShow, message);
                break;

            case (int)CommandType.ForbidPrivateChat:    //收到禁止私聊
                DueMessage(OnForbidPrivateChat, message);
                break;

            case (int)CommandType.ForbidTeamChat:    //收到禁止群聊
                DueMessage(OnForbidTeamChat, message);
                break;

            case (int)CommandType.AllowPrivateChat:    //收到允许私聊
                DueMessage(OnAllowPrivateChat, message);
                break;

            case (int)CommandType.AllowTeamChat:    //收到允许群聊
                DueMessage(OnAllowTeamChat, message);
                break;

            default:
                break;
            }
        }