コード例 #1
0
 /// <summary>
 /// 引发 ActiveChange 事件
 /// </summary>
 /// <param name="e">包含激活状态的 ActiveChangeEventArgs 参数</param>
 protected virtual void OnActiveChange(ActiveChangeEventArgs e)
 {
     if (this.ActiveChange != null)
     {
         this.ActiveChange(this, e);
     }
 }
コード例 #2
0
 /// <summary>
 /// 下拉列表激活或失去激活状态时引发的事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Drop_ActiveChange(object sender, ActiveChangeEventArgs e)
 {
     if (!e.Active)
     {
         this.CloseList();
     }
 }
コード例 #3
0
 /// <summary>
 /// 引发 ActiveChange 事件
 /// </summary>
 /// <param name="e">包含激活状态的 ActiveChangeEventArgs 参数</param>
 protected virtual void OnActiveChange( ActiveChangeEventArgs e )
 {
     if ( this.ActiveChange != null )
     {
         this.ActiveChange( this, e );
     }
 }
コード例 #4
0
        /// <summary>
        /// 处理 windows 消息
        /// </summary>
        /// <param name="m">windows 消息</param>
        protected override void WndProc(ref Message m)
        {
            if (m.Msg == 0x18)
            {
                if (m.WParam == IntPtr.Zero)
                {
                    ActiveChangeEventArgs e = new ActiveChangeEventArgs();
                    e.Active = false;
                }
            }

            if (m.Msg == 0x1c || m.Msg == 0x86)
            {
                ActiveChangeEventArgs e = new ActiveChangeEventArgs();
                e.Active = m.WParam == IntPtr.Zero ? false : true;

                this.OnActiveChange(e);
            }

            base.WndProc(ref m);
        }
コード例 #5
0
 /// <summary>
 /// 下拉列表激活或失去激活状态时引发的事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Drop_ActiveChange( object sender, ActiveChangeEventArgs e )
 {
     if ( !e.Active )
     {
         this.CloseList();
     }
 }
コード例 #6
0
        /// <summary>
        /// 处理 windows 消息
        /// </summary>
        /// <param name="m">windows 消息</param>
        protected override void WndProc( ref Message m )
        {
            if ( m.Msg == 0x18 )
            {
                if ( m.WParam == IntPtr.Zero)
                {
                    ActiveChangeEventArgs e = new ActiveChangeEventArgs();
                    e.Active = false;
                }
            }

            if ( m.Msg == 0x1c|| m.Msg == 0x86 )
            {
                ActiveChangeEventArgs e = new ActiveChangeEventArgs();
                e.Active = m.WParam == IntPtr.Zero ? false : true;

                this.OnActiveChange( e );
            }

            base.WndProc( ref m );
        }