Example #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);
         }
     }
 }
Example #2
0
        internal void RaiseCustomDrawFilterLabel(CustomDrawFilterLabelEventArgs args)
        {
            CustomDrawFilterLabelEventHandler handler = Events[fCustomDrawFilterLabel] as CustomDrawFilterLabelEventHandler;

            if (handler != null)
            {
                handler(this, args);
            }
        }