예제 #1
0
파일: SingleHost.cs 프로젝트: sunoru/PBO
 public void OnReceived(int senderId, IMessage message)
 {
     IMessagable obj = message.GetMessageObjectOrNull();
       if (obj != null)
     if (obj is IHostCommand) UIDispatcher.Invoke((Action<IHostCommand, int>)((IHost)host).ExecuteCommand, obj, senderId);
     else if (obj is IUserInformation) UIDispatcher.Invoke((Action<IUserInformation>)((IUser)user).ExecuteInformation, obj);
 }
예제 #2
0
 public void OnReceived(IMessage message)
 {
   IUserInformation info = message.GetMessageObjectOrNull() as IUserInformation;
   if (info != null) UIDispatcher.Invoke((Action<IUserInformation>)((IUser)user).ExecuteInformation, info);
 }