public void DeinitControl() { durationTimer.Enabled = false; iconTimer.Enabled = false; m_app = null; m_session = null; }
public RunningOverlay(AppScreenSharing _app, AppSharingSession _sess) : this() { Debug.Assert(_app != null); this.Text = "Screen Sharing in '" + _app.Helper.GetKwsName() + "'"; overlayCtrl.InitControl(_app, _sess); SetLocation(); }
/// <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(); }
/// <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(); }
/// <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; }