コード例 #1
0
ファイル: KwsCoreOp.cs プロジェクト: tmbx/kwm-ng
        /// <summary>
        /// Handle a notification received from the workspace state machine. By
        /// default this method calls the default handlers.
        /// </summary>
        public virtual void HandleKwsNotification(Object sender, KwsSmNotif evt)
        {
            if (DoneFlag)
            {
                return;
            }

            else if (evt is KwsSmNotifKcdConn)
            {
                KwsSmNotifKcdConn e = evt as KwsSmNotifKcdConn;
                HandleKcdConn(e.Status, e.Ex);
            }

            else if (evt is KwsSmNotifKcdLogin)
            {
                KwsSmNotifKcdLogin e = evt as KwsSmNotifKcdLogin;
                HandleKwsLogin(e.Status, e.Ex);
            }

            else if (evt is KwsSmNotifTaskSwitch)
            {
                KwsSmNotifTaskSwitch e = evt as KwsSmNotifTaskSwitch;
                HandleTaskSwitch(e.Task, e.Ex);
            }
        }
コード例 #2
0
ファイル: Vnc.cs プロジェクト: tmbx/kwm-ng
 public override void OnKwsSmNotif(Object sender, KwsSmNotif notif)
 {
     // We want to stop the local session if we go offline.
     if (LocalSession != null &&
         !IsOnlineCapable() &&
         notif is KwsSmNotifKcdLogin)
     {
         KwsSmNotifKcdLogin n = notif as KwsSmNotifKcdLogin;
         LocalSession.HandleSessionTrouble(n.Ex);
     }
 }