示例#1
0
 private void InitImageList()
 {
     lock ( globalImageList )
     {
         if (globalImageList.Images.Count == 0)
         {
             globalImageList.ImageSize        = new System.Drawing.Size(12, 12);
             globalImageList.ColorDepth       = ColorDepth.Depth32Bit;
             globalImageList.TransparentColor = System.Drawing.Color.Transparent;
             ControlUtil.AddImage(globalImageList, "widgets.images.removeAttribute.png");
         }
     }
 }
示例#2
0
        public bool Update(XmlNode n, Point location, Point cursor)
        {
            Rectangle bounds       = CurrentBounds;
            bool      wasDrawnFull = drawnFull;

            this.location  = location;
            this.node      = n;
            this.drawnFull = bounds.Contains(cursor);
            if (!visible)
            {
                this.caretVisible = caret.Visible;
                caret.Visible     = false;
            }

            if (visible && !bounds.Equals(CurrentBounds))
            {
                Region rgn = new Region(bounds);
                if (drawnFull && wasDrawnFull)
                {
                    rgn.Exclude(CurrentBounds);
                }

                parent.Invalidate(rgn);
                parent.Update();
                Console.WriteLine("Invalidate!");
            }

            if (!visible || !bounds.Equals(CurrentBounds))
            {
                using (Graphics g = parent.CreateGraphics())
                {
                    if (drawnFull)
                    {
                        ControlUtil.DrawButton(g, CurrentBounds);
                        Point pt = location;
                        pt.Offset(14, 0);
                        imageList.Draw(g, pt, 1);
                    }
                    imageList.Draw(g, location, 0);
                }
            }

            visible = true;
            return(drawnFull);
        }
示例#3
0
 private void InitImageList()
 {
     ControlUtil.AddImage(coreImageList, "widgets.images.validationError.png");
     ControlUtil.AddImage(coreImageList, "widgets.images.bulbLarge.png");
     ControlUtil.AddImage(coreImageList, "widgets.images.elementNormal.png");
 }
 private void InitImageList()
 {
     ControlUtil.AddImage(imageList, "widgets.images.elementNormal.png");
     ControlUtil.AddImage(imageList, "widgets.images.elementChoice.png");
     ControlUtil.AddImage(imageList, "widgets.images.elementRequired.png");
 }