Пример #1
0
        protected override void MessageMonitor(MessageInfo messageInfo)
        {
            base.MessageMonitor(messageInfo);
            //
            switch (messageInfo.eMessageStyle)
            {
            case MessageStyle.eMSPaint:
                ISetViewItemHelper pSetViewItemHelper = this.m_pRowViewItem as ISetViewItemHelper;
                if (pSetViewItemHelper != null)
                {
                    pSetViewItemHelper.SetViewItemDisplayRectangle(
                        Rectangle.FromLTRB(this.TextRectangle.Left, this.DisplayRectangle.Top, this.DisplayRectangle.Right, this.DisplayRectangle.Bottom));
                }
                break;

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

            if (pMessageChain != null)
            {
                pMessageChain.SendMessage(messageInfo);
            }
        }
Пример #2
0
        protected override void MessageMonitor(MessageInfo messageInfo)
        {
            if (this.BaseItemObject == null)
            {
                return;
            }
            //
            switch (messageInfo.eMessageStyle)
            {
            case MessageStyle.eMSPaint:
                ISetViewItemHelper pSetViewItemHelper = this.BaseItemObject as ISetViewItemHelper;
                if (pSetViewItemHelper != null)
                {
                    pSetViewItemHelper.SetViewItemDisplayRectangle(this.BaseItemRectangle);
                }
                //
                System.Windows.Forms.PaintEventArgs e = messageInfo.MessageParameter as System.Windows.Forms.PaintEventArgs;
                if (e != null)
                {
                    this.m_ItemsViewRectangle = e.ClipRectangle;
                }
                break;

            default:
                base.MessageMonitor(messageInfo);
                break;
            }
            //
            IMessageChain pMessageChain = this.BaseItemObject as IMessageChain;

            if (pMessageChain != null)
            {
                if (messageInfo.eMessageStyle == MessageStyle.eMSMouseWheel)
                {
                    pMessageChain.SendMessage(messageInfo);//new MessageInfo(this, messageInfo.eMessageStyle, messageInfo.MessageParameter)
                }
                else
                {
                    pMessageChain.SendMessage(new MessageInfo(this, messageInfo.eMessageStyle, messageInfo.MessageParameter));//messageInfo
                }
            }
        }