BrightIdeasSoftware.FlagRenderer.HandleHitTest C# (CSharp) Метод

HandleHitTest() защищенный Метод

Do the actual work of hit testing. Subclasses should override this rather than HitTest()
protected HandleHitTest ( Graphics g, BrightIdeasSoftware.OlvListViewHitTestInfo hti, int x, int y ) : void
g System.Drawing.Graphics
hti BrightIdeasSoftware.OlvListViewHitTestInfo
x int
y int
Результат void
        protected override void HandleHitTest(Graphics g, OlvListViewHitTestInfo hti, int x, int y)
        {
            IConvertible convertable = this.Aspect as IConvertible;
            if (convertable == null)
                return;

            Int32 v2 = convertable.ToInt32(NumberFormatInfo.InvariantInfo);

            Point pt = this.Bounds.Location;
            foreach (Int32 key in this.keysInOrder) {
                if ((v2 & key) == key) {
                    Image image = this.GetImage(this.imageMap[key]);
                    if (image != null) {
                        Rectangle imageRect = new Rectangle(pt, image.Size);
                        if (imageRect.Contains(x, y)) {
                            hti.UserData = key;
                            return;
                        }
                        pt.X += (image.Width + this.Spacing);
                    }
                }
            }
        }