コード例 #1
0
        internal object XtraCreateFilterConditionsItem(XtraItemEventArgs e)
        {
            ColumnFilterCondition filterCondition = new ColumnFilterCondition();

            filterCollection.Add(filterCondition);
            return(filterCondition);
        }
        private void AddSingleFilterCondition(string filterConditionString, ColumnFilterItem filterValue)
        {
            OwnerTreeList.FilteredVisibleNodes.Clear();

            FilterConditionEnum   condition;
            ColumnFilterCondition newCondition;

            if (filterValue is ColumnFilterBlanksItem)
            {
                newCondition = new ColumnFilterCondition(filterShowingColumn.FieldName, FilterConditionEnum.IsBlank, null, null);
            }
            else if (filterValue is ColumnFilterNonBlanksItem)
            {
                newCondition = new ColumnFilterCondition(filterShowingColumn.FieldName, FilterConditionEnum.IsNotBlank, null, null);
            }
            else
            {
                condition    = (FilterConditionEnum)Enum.Parse(typeof(FilterConditionEnum), filterConditionString);
                newCondition = new ColumnFilterCondition(filterShowingColumn.FieldName, condition, filterValue.Value, filterValue.DisplayText);
            }

            for (int i = 0; i < OwnerTreeList.ColumnFilterConditions.Count; i++)
            {
                if (OwnerTreeList.ColumnFilterConditions[i].Column == filterShowingColumn)
                {
                    OwnerTreeList.ColumnFilterConditions.RemoveAt(i);
                    break;
                }
            }

            if (!(filterValue is ColumnFilterAllItem))
            {
                OwnerTreeList.ColumnFilterConditions.Add(newCondition);
            }
        }
 public void Assign(ColumnFilterCondition source)
 {
     Collection  = source.Collection;
     FieldName   = source.FieldName;
     Condition   = source.Condition;
     Value       = source.Value;
     DisplayText = source.DisplayText;
 }
コード例 #4
0
 public void Assign(ColumnFilterConditionCollection source)
 {
     Clear();
     foreach (ColumnFilterCondition condition in source)
     {
         ColumnFilterCondition newCondition = new ColumnFilterCondition();
         newCondition.Assign(condition);
         Add(newCondition);
     }
 }
コード例 #5
0
 public bool Contains(ColumnFilterCondition item)
 {
     return(List.Contains(item));
 }
コード例 #6
0
 public int IndexOf(ColumnFilterCondition item)
 {
     return(List.IndexOf(item));
 }
コード例 #7
0
 public int Add(ColumnFilterCondition item)
 {
     item.Collection = this;
     item.FilterConditionPropertyChanged += new FilterConditionPropertyChangedEventHandler(OnItemPropertyChanged);
     return(List.Add(item));
 }