Пример #1
0
Файл: Vnc.cs Проект: tmbx/kwm-ng
 /// <summary>
 /// Post a LocalVncSession event.
 /// </summary>
 private void PostLocalVncSessionEvent(bool startFlag, EAnpException ex)
 {
     AnpMsg m = Kws.MakeTransientEAnpEvent(EAnpEvt.LocalVncSession);
     m.AddBin(SessionUuid);
     m.AddUInt64(SessionID);
     m.AddUInt32(Convert.ToUInt32(ServerSessionFlag));
     m.AddUInt32(Convert.ToUInt32(startFlag));
     m.AddUInt32(Convert.ToUInt32(ex != null));
     if (ex != null) ex.Serialize(m);
     Kws.PostTransientEAnpEvent(m);
 }
Пример #2
0
Файл: Vnc.cs Проект: tmbx/kwm-ng
        /// <summary>
        /// This method should be called when a "VNC session end" event is
        /// received from the KCD.
        /// </summary>
        public void OnSessionEndEventReceived(UInt64 sessionID, EAnpException ex)
        {
            if (Status == VncSessionStatus.Completed) return;

            // Check if the local session is being ended.
            else if (Status == VncSessionStatus.Started)
            {
                if (sessionID == SessionID) HandleSessionTrouble(ex);
            }

            // Cache the session ID.
            else
            {
                SessionIDTree[sessionID] = sessionID;
            }
        }