Пример #1
0
 /// <summary>
 /// 用来向下传递消息
 /// </summary>
 /// <param name="messageInfo"></param>
 protected override void MessageMonitor(MessageInfo messageInfo)
 {
     base.MessageMonitor(messageInfo);
     //
     ((IMessageChain)this.m_TextBoxButtonItem).SendMessage(messageInfo);
 }
 protected override void MessageMonitor(MessageInfo messageInfo)
 {
     base.MessageMonitor(messageInfo);
     //
     ((IMessageChain)this.m_TabButtonContainerItem).SendMessage(messageInfo);
 }
 protected override void MessageMonitor(MessageInfo messageInfo)
 {
     base.MessageMonitor(messageInfo);
     //发送消息
     ((IMessageChain)this.m_OverflowButton).SendMessage(messageInfo);
 }
 protected override void MessageMonitor(MessageInfo messageInfo)
 {
     base.MessageMonitor(messageInfo);
     //
     ((IMessageChain)this.m_BaseItemStackItem).SendMessage(messageInfo);
 }
 private void MSMouseDoubleClick(MessageInfo messageInfo)
 {
     //植入监听
     this.MessageMonitor(messageInfo);
 }
 /// <summary>
 /// 用来监听消息
 /// </summary>
 /// <param name="messageInfo"></param>
 protected virtual void MessageMonitor(MessageInfo messageInfo)
 {
 }
 private void MSMouseWheel(MessageInfo messageInfo)
 {
     //植入监听
     this.MessageMonitor(messageInfo);
 }
 private void MSMouseMove(MessageInfo messageInfo)
 {
     //if (this.m_MouseDown) return;
     //植入监听
     this.MessageMonitor(messageInfo);
 }
 private void MSLostFocus(MessageInfo messageInfo)
 {
     //植入监听
     this.MessageMonitor(messageInfo);
 }
 private void MSKeyPress(MessageInfo messageInfo)
 {
     //植入监听
     this.MessageMonitor(messageInfo);
 }
 private void MSPaint(MessageInfo messageInfo)
 {
     //植入监听
     this.MessageMonitor(messageInfo);
 }
 private void MSViewInfo(MessageInfo messageInfo)
 {
     //植入监听
     this.MessageMonitor(messageInfo);
 }
        void IMessageChain.SendMessage(MessageInfo messageInfo)
        {
            switch (messageInfo.eMessageStyle)
            {
            case MessageStyle.eMSViewInfo:
                this.MSViewInfo(messageInfo);
                break;

            //
            case MessageStyle.eMSPaint:
                this.MSPaint(messageInfo);
                break;

            //
            case MessageStyle.eMSLostFocus:
                this.MSLostFocus(messageInfo);
                break;

            case MessageStyle.eMSKeyDown:
                this.MSKeyDown(messageInfo);
                break;

            case MessageStyle.eMSKeyUp:
                this.MSKeyUp(messageInfo);
                break;

            case MessageStyle.eMSKeyPress:
                this.MSKeyPress(messageInfo);
                break;

            case MessageStyle.eMSMouseWheel:
                this.MSMouseWheel(messageInfo);
                break;

            //
            case MessageStyle.eMSMouseDown:
                this.MSMouseDown(messageInfo);
                break;

            case MessageStyle.eMSMouseUp:
                this.MSMouseUp(messageInfo);
                break;

            case MessageStyle.eMSMouseMove:
                this.MSMouseMove(messageInfo);
                break;

            case MessageStyle.eMSMouseClick:
                this.MSMouseClick(messageInfo);
                break;

            case MessageStyle.eMSMouseDoubleClick:
                this.MSMouseDoubleClick(messageInfo);
                break;

            case MessageStyle.eMSMouseEnter:
                this.MSMouseEnter(messageInfo);
                break;

            case MessageStyle.eMSMouseLeave:
                this.MSMouseLeave(messageInfo);
                break;

            //
            case MessageStyle.eMSEnabledChanged:
                this.MSEnabledChanged(messageInfo);
                break;

            case MessageStyle.eMSVisibleChanged:
                this.MSVisibleChanged(messageInfo);
                break;

            default:
                this.MessageMonitor(messageInfo);
                break;
            }
        }
        protected override void MessageMonitor(MessageInfo messageInfo)
        {
            base.MessageMonitor(messageInfo);
            if (this.m_BaseItemObject == null)
            {
                return;
            }
            //
            switch (messageInfo.eMessageStyle)
            {
            case MessageStyle.eMSPaint:
                Rectangle displayRectangle  = this.DisplayRectangle;
                Rectangle displayRectangle2 = this.m_BaseItemObject.DisplayRectangle;
                if (displayRectangle != displayRectangle2)
                {
                    Size size = displayRectangle2.Size;
                    if (this.m_BaseItemObject.LockWith)
                    {
                        if (!this.LockWith)
                        {
                            switch (this.Dock)
                            {
                            case System.Windows.Forms.DockStyle.Top:
                            case System.Windows.Forms.DockStyle.Bottom:
                            case System.Windows.Forms.DockStyle.Fill:
                                break;

                            default:
                                this.Width = displayRectangle2.Width;
                                break;
                            }
                        }
                    }
                    else
                    {
                        size.Width = displayRectangle.Width;
                    }
                    if (this.m_BaseItemObject.LockHeight)
                    {
                        if (!this.LockHeight)
                        {
                            switch (this.Dock)
                            {
                            case System.Windows.Forms.DockStyle.Left:
                            case System.Windows.Forms.DockStyle.Right:
                            case System.Windows.Forms.DockStyle.Fill:
                                break;

                            default:
                                this.Height = displayRectangle2.Height;
                                break;
                            }
                        }
                    }
                    else
                    {
                        size.Height = displayRectangle.Height;
                    }
                    displayRectangle = new Rectangle(displayRectangle.Location, size);
                    if (displayRectangle != displayRectangle2)
                    {
                        if (this.m_BaseItemObject is ISetBaseItemHelper)
                        {
                            ((ISetBaseItemHelper)this.m_BaseItemObject).SetDisplayRectangle(displayRectangle);
                        }
                    }
                }
                break;

            default:
                break;
            }
            //
            IMessageChain pMessageChain = this.m_BaseItemObject as IMessageChain;

            if (pMessageChain != null)
            {
                pMessageChain.SendMessage(messageInfo);
            }
        }
Пример #15
0
 protected override void MessageMonitor(MessageInfo messageInfo)
 {
     base.MessageMonitor(messageInfo);
     //
     ((IMessageChain)this.m_CustomizeButton).SendMessage(messageInfo);
 }