Пример #1
0
        /// <summary>
        /// See base docs.
        /// </summary>
        protected override void DoInitialising()
        {
            if (_GetListItemDescription == null)
            {
                _GetListItemDescription = (obj) => obj.ToString();
            }
            if (_GetListItemValue == null)
            {
                _GetListItemValue = (obj) => {
                    var boxed   = (Object)obj;
                    var unboxed = (TValue)boxed;
                    return(unboxed);
                };
            }
            ItemDescriptions          = new ItemDescriptionList <TListModel>(List, _GetListItemDescription);
            ItemDescriptions.Changed += ItemDescriptions_Changed;

            CopyListToControl();

            base.DoInitialising();
        }
Пример #2
0
        private IEnumerable <ItemDescription <TListModel> > DoSortList(ItemDescriptionList <TListModel> list)
        {
            var result = list.OrderBy(r => r.Description).ToArray();

            return(result);
        }