Beispiel #1
0
 public void ConnectOMCS(string serverIP, int serverPort)
 {
     if (UserInfo.UserState == UserState.未登录)
     {
         throw new Exception("未登录用户申请初始化");
     }
     if (callOMCS != null)//登录成功 实例CallOMCS
     {
         callOMCS.Dispose();
     }
     if (UserInfo.IsPrerogative)
     {
         callOMCS = new TeacherCallOMCS();
     }
     else
     {
         callOMCS = new StudentCallOMCS();
     }
     callOMCS.Initialize(UserInfo.UserId, "", serverIP, serverPort);
     callOMCS.ConnectEnded += a => { ConnectEnded?.Invoke(a); };
     callOMCS.SomeoneExit  += a => { SomeoneExit?.Invoke(a); };
     callOMCS.SomeoneJoin  += a => { SomeoneJoin?.Invoke(a); };
 }