コード例 #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);
         }
     }
 }
コード例 #2
0
 protected override void ChangeElement(NodeEditableElement element, object value)
 {
     if (element.ElementType == ElementType.Operation && !Enum.IsDefined(typeof(ClauseType), value))
     {
         Model.BeginUpdate();
         Operation = (ClauseType)value;
         var clauseType = (int)value;
         if (clauseType == ClauseTypeEnumHelper.FullText)
         {
             FilterControlHelpers.ForceAdditionalParamsCount(AdditionalOperands, 1);
         }
         Model.EndUpdate(FilterChangedAction.OperationChanged, this);
         FilterControlFocusInfo fi = FocusInfo.OnRight();
         if (fi.Node == FocusInfo.Node)
         {
             FocusInfo = fi;
         }
     }
     else
     {
         base.ChangeElement(element, value);
     }
 }
コード例 #3
0
 protected override void ChangeElement(NodeEditableElement element, object value) {
     if (element.ElementType == ElementType.Operation && !Enum.IsDefined(typeof(ClauseType), value)) {
         Model.BeginUpdate();
         Operation = (ClauseType)value;
         var clauseType = (int)value;
         if (clauseType == ClauseTypeEnumHelper.FullText)
             FilterControlHelpers.ForceAdditionalParamsCount(AdditionalOperands, 1);
         Model.EndUpdate(FilterChangedAction.OperationChanged, this);
         FilterControlFocusInfo fi = FocusInfo.OnRight();
         if (fi.Node == FocusInfo.Node)
             FocusInfo = fi;
     }
     else base.ChangeElement(element, value);
 }