public void OnGainMouseFocus(object sender, EventArgs args) { //base.OnGainMouseFocus(sender, args); if (this.CanScroll) { this.IsActive = true; if (this.m_timerScroll == null) { this.m_timerScroll = new Microsoft.MediaCenter.UI.Timer(); this.m_timerScroll.Tick += new EventHandler(this.OnAutoScroll); } if (this.m_nDelayInterval > 0) { this.m_timerScroll.Interval = this.m_nDelayInterval; this.m_fDelayScroll = true; } else { this.m_timerScroll.Interval = this.m_nScrollInterval; this.m_fDelayScroll = false; this.m_dtActivated = DateTime.Now; this.OnAutoScroll(this.m_timerScroll, EventArgs.Empty); } this.m_timerScroll.Enabled = true; this.LockMouseActive(true); } }
protected override void Dispose(bool disposing) { if (this._autoHideTimer != null) { this._autoHideTimer.Tick -= new EventHandler(this.OnAutoHideTimerTick); this._autoHideTimer.Dispose(); this._autoHideTimer = null; } if (this._commandNextSlide != null) { this._commandNextSlide.Invoked -= new EventHandler(this.OnNavigatedNextSlide); this._commandNextSlide = null; } if (this._commandPrevSlide != null) { this._commandPrevSlide.Invoked -= new EventHandler(this.OnNavigatedPreviousSlide); this._commandPrevSlide = null; } IDisposable model = this.Model as IDisposable; if (model != null) { model.Dispose(); model = null; } base.Dispose(disposing); }
public SlideDeck(int autoHideInterval) { this._enabled = true; this.Finder = new SlideMarkupFinder(); this._autoHideTimer = new Microsoft.MediaCenter.UI.Timer(); this._autoHideTimer.Interval = autoHideInterval; this._autoHideTimer.Tick += new EventHandler(this.OnAutoHideTimerTick); if (autoHideInterval != 0) { this._autoHideEnabled = true; } this._id = Guid.NewGuid(); }
protected override void Dispose(bool fInDispose) { if (fInDispose) { if (this.IsActive) { this.DisableAutoScroll(); } if (this.m_timerScroll != null) { this.m_timerScroll.Tick -= new EventHandler(this.OnAutoScroll); this.m_timerScroll.Dispose(); this.m_timerScroll = null; } } base.Dispose(fInDispose); }
protected override void Dispose(bool fInDispose) { if (fInDispose) { if (this.IsActive) { this.DisableAutoScroll(); } if (this.m_timerScroll != null) { this.m_timerScroll.Tick -= new EventHandler(this.OnAutoScroll); this.m_timerScroll.Dispose(); this.m_timerScroll = null; } } base.Dispose(fInDispose); }
public void OnGainMouseFocus(object sender, EventArgs args) { //base.OnGainMouseFocus(sender, args); if (this.CanScroll) { this.IsActive = true; if (this.m_timerScroll == null) { this.m_timerScroll = new Microsoft.MediaCenter.UI.Timer(); this.m_timerScroll.Tick += new EventHandler(this.OnAutoScroll); } if (this.m_nDelayInterval > 0) { this.m_timerScroll.Interval = this.m_nDelayInterval; this.m_fDelayScroll = true; } else { this.m_timerScroll.Interval = this.m_nScrollInterval; this.m_fDelayScroll = false; this.m_dtActivated = DateTime.Now; this.OnAutoScroll(this.m_timerScroll, EventArgs.Empty); } this.m_timerScroll.Enabled = true; this.LockMouseActive(true); } }