Example #1
0
 public void DeinitControl()
 {
     durationTimer.Enabled = false;
     iconTimer.Enabled = false;
     m_app = null;
     m_session = null;
 }
Example #2
0
        public RunningOverlay(AppScreenSharing _app, AppSharingSession _sess)
            : this()
        {
            Debug.Assert(_app != null);

            this.Text = "Screen Sharing in '" + _app.Helper.GetKwsName() + "'";

            overlayCtrl.InitControl(_app, _sess);
            SetLocation();
        }
Example #3
0
        /// <summary>
        /// Initialize the control with the right objects.
        /// </summary>
        /// <param name="_app"></param>
        /// <param name="_ses"></param>
        public void InitControl(AppScreenSharing _app, AppSharingSession _ses)
        {
            Debug.Assert(_app != null);
            Debug.Assert(_ses != null);
            Debug.Assert(_ses.Status == AppSharingSession.AppSharingSessionStatus.RUNNING);

            m_app = _app;
            m_session = _ses;

            durationTimer.Enabled = true;
            iconTimer.Enabled = true;

            UpdateLabels();
            UpdateDuration();
        }
Example #4
0
        /// <summary>
        /// If we are running a session, unregister the relevant event handler
        /// and destroy the overlay.
        /// </summary>
        private void StopOverlay()
        {
            if (m_appRunningASession != null)
                m_appRunningASession = null;

            if (m_overlayForm != null)
            {
                m_overlayForm.Close();
                m_overlayForm.Dispose();
                m_overlayForm = null;
            }

            runningCtrl.DeinitControl();
        }
Example #5
0
        /// <summary>
        /// Called when this KWM starts a new session.
        /// </summary>
        private void OnCreatingNewSession()
        {
            if (m_appRunningASession != null)
            {
                m_appRunningASession.OnVncSessionEnd -= HandleOnRunningSessionEnd;
            }

            m_appRunningASession = SrcApp;
            m_appRunningASession.OnVncSessionEnd += HandleOnRunningSessionEnd;
            m_appRunningASession.OnLocalStop += HandleOnLocalStop;
        }