internal FilterablePropertyValueEditor GetPropertyFilterEditor(PropertyFilterOperator filterOperator) { FilterablePropertyValueEditor result = FilterablePropertyValueEditor.TextBox; if (this.editorTypePerOperator.ContainsKey(filterOperator)) { result = this.editorTypePerOperator[filterOperator]; } else { Type valueType = this.ValueType; if (filterOperator == PropertyFilterOperator.NotPresent || filterOperator == PropertyFilterOperator.Present) { result = FilterablePropertyValueEditor.DisabledTextBox; } else if (valueType == typeof(DateTime) || valueType == typeof(DateTime?)) { result = FilterablePropertyValueEditor.DateTimePicker; } else if (filterOperator == PropertyFilterOperator.Equal || filterOperator == PropertyFilterOperator.NotEqual) { if (this.FilterableListSource != null) { result = FilterablePropertyValueEditor.ComboBox; } else if (!string.IsNullOrEmpty(this.PickerProfileName) || this.objectPicker != null) { result = FilterablePropertyValueEditor.PickerLauncherTextBox; } } else if ((filterOperator == PropertyFilterOperator.Contains || filterOperator == PropertyFilterOperator.NotContains) && this.PropertyDefinition.IsMultivalued && (!string.IsNullOrEmpty(this.PickerProfileName) || this.objectPicker != null)) { result = FilterablePropertyValueEditor.PickerLauncherTextBox; } } return(result); }
public void SetFilterablePropertyValueEditor(PropertyFilterOperator filterOperator, FilterablePropertyValueEditor editorType) { if (this.editorTypePerOperator.ContainsKey(filterOperator)) { this.editorTypePerOperator[filterOperator] = editorType; return; } this.editorTypePerOperator.Add(filterOperator, editorType); }