예제 #1
0
 public override void Paint(ControlGraphicsInfoArgs info)
 {
     ViewInfo.Calculate(info.Cache);
     ViewInfo.TopLine = 0;
     for (int i = 0; i < ViewInfo.Count; ++i)
     {
         FilterLabelInfoTextViewInfo textViewInfo = (FilterLabelInfoTextViewInfo)ViewInfo[i];
         NodeEditableElement         nodeElement  = textViewInfo.InfoText.Tag as NodeEditableElement;
         ElementType elementType             = null == nodeElement ? ElementType.None : nodeElement.ElementType;
         CustomDrawFilterLabelEventArgs args =
             new CustomDrawFilterLabelEventArgs(elementType, textViewInfo.InfoText.Text, info.Cache, textViewInfo.TextElement.Bounds);
         args.Font         = info.ViewInfo.Appearance.GetFont();
         args.ForeColor    = textViewInfo.InfoText.Color;
         args.StringFormat = info.ViewInfo.Appearance.GetStringFormat();
         MyFilterControl filterControl = OwnerControl as MyFilterControl;
         if (filterControl != null)
         {
             filterControl.RaiseCustomDrawFilterLabel(args);
         }
         if (!args.Handled)
         {
             ViewInfo[i].Draw(info.Cache, args.Font, args.ForeColor, args.StringFormat);
         }
     }
 }