Пример #1
0
 protected override void OnHandleCreated(EventArgs e)
 {
     base.OnHandleCreated(e);
     if (_upDownButtonNativeWindow == null)
     {
         _upDownButtonNativeWindow = new UpDownButtonNativeWindow(this);
     }
 }
Пример #2
0
 protected override void OnSizeChanged(EventArgs e)
 {
     base.OnSizeChanged(e);
     if (UpDownButtonHandle != IntPtr.Zero && _upDownButtonNativeWindow == null)
     {
         _upDownButtonNativeWindow = new UpDownButtonNativeWindow(this);
     }
 }
Пример #3
0
 protected override void OnCreateControl()
 {
     base.OnCreateControl();
     if (UpDownButtonHandle != IntPtr.Zero && _upDownButtonNativeWindow == null)
     {
         _upDownButtonNativeWindow = new UpDownButtonNativeWindow(this);
     }
 }
Пример #4
0
 protected override void OnHandleDestroyed(EventArgs e)
 {
     base.OnHandleDestroyed(e);
     if (_upDownButtonNativeWindow != null)
     {
         _upDownButtonNativeWindow.Dispose();
         _upDownButtonNativeWindow = null;
     }
 }
Пример #5
0
 protected override void OnHandleCreated(EventArgs e)
 {
     base.OnHandleCreated(e);
     if (UpDownButtonHandle != IntPtr.Zero)
     {
         if (_UpDownButtonNativeWindow == null)
         {
             _UpDownButtonNativeWindow = new UpDownButtonNativeWindow(this);
         }
     }
 }
Пример #6
0
        protected override void OnControlAdded(ControlEventArgs e)
        {
            base.OnControlAdded(e);

            if (UpDownButtonHandle != IntPtr.Zero)
            {
                if (_upDownButtonNativeWindow == null)
                {
                    _upDownButtonNativeWindow = new UpDownButtonNativeWindow(this);
                }
            }
        }
Пример #7
0
 /// <summary>
 /// 检查是否存在左右按钮,有则以句柄创建一个upDownButtonNativeWindow。如果没有则将分配的的内存释放。
 /// </summary>
 private void checkUpDownButton()
 {
     if (UpDownButtonHandle != IntPtr.Zero)
     {
         if (_upDownButtonNativeWindow == null)
         {
             _upDownButtonNativeWindow = new UpDownButtonNativeWindow(this);
         }
     }
     else
     {
         if (_upDownButtonNativeWindow != null)
         {
             _upDownButtonNativeWindow.Dispose();
             _upDownButtonNativeWindow = null;
         }
     }
 }
 protected override void OnHandleDestroyed(EventArgs e)
 {
     base.OnHandleDestroyed(e);
     if (this._upDownButtonNativeWindow != null)
     {
         this._upDownButtonNativeWindow.Dispose();
         this._upDownButtonNativeWindow = null;
     }
 }
 protected override void OnHandleCreated(EventArgs e)
 {
     base.OnHandleCreated(e);
     if (this._upDownButtonNativeWindow == null)
     {
         this._upDownButtonNativeWindow = new UpDownButtonNativeWindow(this);
     }
 }
Пример #10
0
 protected override void OnSizeChanged(EventArgs e)
 {
     base.OnSizeChanged(e);
     if (UpDownButtonHandle != IntPtr.Zero)
     {
         if (_upDownButtonNativeWindow == null)
         {
             _upDownButtonNativeWindow = new UpDownButtonNativeWindow(this);
         }
     }
     else
     {
         this.Refresh();
     }
 }
Пример #11
0
        protected override void OnControlAdded(ControlEventArgs e)
        {
            base.OnControlAdded(e);

            if (UpDownButtonHandle != IntPtr.Zero)
            {
                if (_upDownButtonNativeWindow == null)
                {
                    _upDownButtonNativeWindow = new UpDownButtonNativeWindow(this);
                }
            }
        }
Пример #12
0
        protected override void OnCreateControl()
        {
            base.OnCreateControl();

            if (UpDownButtonHandle != IntPtr.Zero)
            {
                if (_upDownButtonNativeWindow == null)
                {
                    _upDownButtonNativeWindow = new UpDownButtonNativeWindow(this);
                }
            }
        }