protected override void Dispose(bool disposing) { if (_ScrollBar != null) { _ScrollBar.Dispose(); _ScrollBar = null; } base.Dispose(disposing); }
private void CreateScrollbars() { m_VScrollBar = new ScrollBarCore(m_Control as Control, true); m_VScrollBar.IsAppScrollBarStyle = m_IsAppScrollBarStyle; m_HScrollBar = new ScrollBarCore(m_Control as Control, true); m_HScrollBar.IsAppScrollBarStyle = m_IsAppScrollBarStyle; m_HScrollBar.Orientation = eOrientation.Horizontal; m_HScrollBar.Enabled = false; }
public ScrollBarReplacement(System.Windows.Forms.ScrollBar sb) { m_ParentScrollBar = sb; m_ParentScrollBarWndProc = (IScrollBarExtender)m_ParentScrollBar; m_IsVScrollBar = m_ParentScrollBar is VScrollBar; m_ScrollBarCore = new ScrollBarCore(m_ParentScrollBar, false); m_ScrollBarCore.ValueChanged += new EventHandler(ScrollBarCore_ValueChanged); if (m_ParentScrollBar is HScrollBar) m_ScrollBarCore.Orientation = eOrientation.Horizontal; else m_ScrollBarCore.Orientation = eOrientation.Vertical; m_ScrollBarCore.Minimum = m_ParentScrollBar.Minimum; m_ScrollBarCore.Maximum = m_ParentScrollBar.Maximum; m_ScrollBarCore.Value = m_ParentScrollBar.Value; m_ScrollBarCore.Enabled = m_ParentScrollBar.Enabled; m_ParentScrollBar.EnabledChanged += new EventHandler(ParentScrollBar_EnabledChanged); }
public ScrollBarImplementation(System.Windows.Forms.ScrollBar sb) { m_ParentScrollBar = sb; m_ParentScrollBarWndProc = (IScrollBarExtender)m_ParentScrollBar; m_IsVScrollBar = m_ParentScrollBar is VScrollBar; m_PaintTimer = new Timer(); m_PaintTimer.Interval = 50; m_PaintTimer.Tick += new EventHandler(PaintTimerTick); m_ScrollBarCore = new ScrollBarCore(m_ParentScrollBar, true); //m_ScrollBarCore.IsAppScrollBarStyle = false; if (m_ParentScrollBar is HScrollBar) m_ScrollBarCore.Orientation = eOrientation.Horizontal; else m_ScrollBarCore.Orientation = eOrientation.Vertical; m_ScrollBarCore.Minimum = m_ParentScrollBar.Minimum; m_ScrollBarCore.Maximum = m_ParentScrollBar.Maximum; m_ScrollBarCore.Value = m_ParentScrollBar.Value; }
private void CreateScrollBarCore() { _ScrollBar = new ScrollBarCore(this, false); _ScrollBar.Orientation = IsVertical() ? eOrientation.Vertical : eOrientation.Horizontal; _ScrollBar.LargeChange = _LargeChange; _ScrollBar.Maximum = _Maximum; _ScrollBar.Minimum = _Minimum; _ScrollBar.SmallChange = this.SmallChange; _ScrollBar.Value = _Value; _ScrollBar.ValueChanged += new EventHandler(CoreValueChanged); _ScrollBar.Scroll += new ScrollEventHandler(CoreScroll); }
protected override void Dispose(bool disposing) { if (m_ScrollBar != null) { m_ScrollBar.Dispose(); m_ScrollBar = null; } m_ThreadUI.Stop(); base.Dispose(disposing); }
//public bool IsAppScrollBarStyle //{ // get { return m_ScrollBarCore.IsAppScrollBarStyle; } // set // { // m_ScrollBarCore.IsAppScrollBarStyle = value; // m_ParentScrollBar.Invalidate(); // } //} #endregion #region IDisposable Members public void Dispose() { if (m_ScrollBarCore != null) { m_ScrollBarCore.Dispose(); m_ScrollBarCore = null; } if (m_PaintTimer != null) { m_PaintTimer.Stop(); m_PaintTimer.Dispose(); m_PaintTimer = null; } StopAutoScrollTimer(); }