private bool OwnerContainMousePoint(Point point) { if (this.pOwner == null) { return(false); } // IPopupOwner pPopupOwner = this.pOwner as IPopupOwner; if (pPopupOwner != null) { return(pPopupOwner.PopupTriggerRectangle.Contains(this.pOwner.PointToClient(point))); } else { return(this.pOwner.DisplayRectangle.Contains(this.pOwner.PointToClient(point))); } //IButtonItem pButtonItem = this.pOwner as IButtonItem; //if (pButtonItem != null) //{ // if (pButtonItem.eButtonStyle == ButtonStyle.eSplitButton) return pButtonItem.SplitRectangle.Contains(this.pOwner.PointToClient(point)); // else return this.pOwner.DisplayRectangle.Contains(this.pOwner.PointToClient(point)); //} //else //{ // ISplitButtonItem pSplitButtonItem = this.pOwner as ISplitButtonItem; // if (pSplitButtonItem != null) return this.pOwner.DisplayRectangle.Contains(this.pOwner.PointToClient(point)); // else this.pOwner.DisplayRectangle.Contains(this.pOwner.PointToClient(point)); //} //// //return false; }
private bool OwnerContainMousePoint(Point point) { if (this.pOwner == null) { return(false); } // IPopupOwner pPopupOwner = this.pOwner as IPopupOwner; if (pPopupOwner != null) { return(pPopupOwner.PopupTriggerRectangle.Contains(this.pOwner.PointToClient(point))); } else { return(this.pOwner.DisplayRectangle.Contains(this.pOwner.PointToClient(point))); } }