Пример #1
0
        public StandardValuesDropDown(IWindowsFormsEditorService editorService, ICollection values)
        {
            InitializeComponent();

            this.editorService = editorService;
            UpdateSearchTextBoxState();

            foreach (var value in values)
            {
                var standardValue = value as StandardValue;

                if (standardValue == null)
                    standardValue = new StandardValue(GetDisplayTextFromValue(value), value);

                this.Add(standardValue, false);
            }

            this.values = this.values.OrderBy(value => value.DisplayText).ToList();

            this.UpdateFilteredListboxItems();
        }
Пример #2
0
        public void Add(StandardValue value, bool shouldUpdateListBoxItems)
        {
            if (!string.IsNullOrEmpty(value.DisplayText))
            {
                this.values.Add(value);

                if (shouldUpdateListBoxItems)
                    this.UpdateFilteredListboxItems();
            }
        }
Пример #3
0
 public void Add(StandardValue value)
 {
     this.Add(value, true);
 }