当前位置: 首页>>代码示例>>C#>>正文


C# DotNetBar.ItemPaintArgs类代码示例

本文整理汇总了C#中DevComponents.DotNetBar.ItemPaintArgs的典型用法代码示例。如果您正苦于以下问题:C# ItemPaintArgs类的具体用法?C# ItemPaintArgs怎么用?C# ItemPaintArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ItemPaintArgs类属于DevComponents.DotNetBar命名空间,在下文中一共展示了ItemPaintArgs类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Paint

        /// <summary>
        /// Must be overridden by class that is inheriting to provide the painting for the item.
        /// </summary>
        public override void Paint(ItemPaintArgs p)
        {
            Graphics g = p.Graphics;
            Region oldClip = null;
            bool clipSet = false;

            PaintBackground(p);

            Rectangle clip = GetClipRectangle();
            oldClip = g.Clip;
            g.SetClip(clip, CombineMode.Intersect);
            clipSet = true;

            ItemDisplay display = GetItemDisplay();
            display.Paint(this, p);

            if (clipSet)
            {
                if (oldClip != null)
                    g.Clip = oldClip;
                else
                    g.ResetClip();
            }

            if (oldClip != null)
                oldClip.Dispose();

            this.DrawInsertMarker(p.Graphics);
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:32,代码来源:CalendarBase.cs

示例2: PaintImage

        internal void PaintImage(ItemPaintArgs p, Image image, eLabelPartAlignment imageAlign)
        {
            if (image == null) return;
            Graphics g = p.Graphics;

            Rectangle imageRect = GetAlignedRect(this.DisplayRectangle, image.Size, imageAlign);
            CompositeImage ci = new CompositeImage(image, false);
            ci.DrawImage(g, imageRect);
            ci.Dispose();
            _ImageRenderBounds = imageRect;
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:11,代码来源:DayLabelItem.cs

示例3: RenderButton

 protected override void RenderButton(ItemPaintArgs p)
 {
     if (!p.IsOnMenu)
     {
         Rendering.BaseRenderer renderer = p.Renderer;
         if (renderer != null)
         {
             p.ButtonItemRendererEventArgs.Graphics = p.Graphics;
             p.ButtonItemRendererEventArgs.ButtonItem = this;
             p.ButtonItemRendererEventArgs.ItemPaintArgs = p;
             renderer.DrawCrumbBarOverflowItem(p.ButtonItemRendererEventArgs);
             return;
         }
     }
     base.RenderButton(p);
 }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:16,代码来源:CrumbBarOverflowButton.cs

示例4: Paint

 public override void Paint(ItemPaintArgs p)
 {
     Rendering.BaseRenderer renderer = p.Renderer;
     if (renderer != null)
     {
         ColorItemRendererEventArgs e = new ColorItemRendererEventArgs(p.Graphics, this);
         renderer.DrawColorItem(e);
     }
     else
     {
         Rendering.ColorItemPainter painter = PainterFactory.CreateColorItemPainter(this);
         if (painter != null)
         {
             ColorItemRendererEventArgs e = new ColorItemRendererEventArgs(p.Graphics, this);
             painter.PaintColorItem(e);
         }
     }
 }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:18,代码来源:ColorItem.cs

示例5: Paint

        public override void Paint(ItemPaintArgs p)
        {
            DayPaintEventArgs e = new DayPaintEventArgs(p, this);
            OnPaintLabel(e);
            if (e.RenderParts == eDayPaintParts.None) return;
            SingleMonthCalendar month = this.Parent as SingleMonthCalendar;
            if (month != null)
            {
                month.OnPaintLabel(this, e);
            }
            if (e.RenderParts == eDayPaintParts.None) return;

            if (this.Enabled && (e.RenderParts & eDayPaintParts.Background) == eDayPaintParts.Background)
                PaintBackground(p);

            if ((e.RenderParts & eDayPaintParts.Text) == eDayPaintParts.Text)
                PaintText(p, null, Color.Empty, _TextAlign);

            if ((e.RenderParts & eDayPaintParts.Image) == eDayPaintParts.Image)
                PaintImage(p, _Image, _ImageAlign);
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:21,代码来源:DayLabelItem.cs


注:本文中的DevComponents.DotNetBar.ItemPaintArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。