示例#1
0
        /// <summary>
        /// Initializes a new instance of Autodesk.IM.UI.Rule.ItemSelector with given
        /// selector UI.
        /// </summary>
        /// <param name="selectorLink">The object implementing ISelectorLink interface.</param>
        public ItemSelector(ISelectorLink selectorLink)
        {
            if (selectorLink == null)
            {
                throw new ArgumentNullException("selectorLink"); //NOXLATE
            }

            Initialize(selectorLink);
        }
示例#2
0
        /// <summary>
        /// Initializes the instance of ItemSelector with given selector UI.
        /// </summary>
        /// <param name="selectorLink">The object implementing ISelectorLink interface.</param>
        protected virtual void Initialize(ISelectorLink selectorLink)
        {
            _selectorLink = selectorLink;

            // Hook event handlers.
            _selectorLink.OnRemove      += OnRemove;
            _selectorLink.OnReset       += OnReset;
            _selectorLink.OnPopupOpened += OnPopupOpened;

            ItemSelected += new ItemSelectedEventHandler(ItemSelectedHandler);

            this.Content = _selectorLink.UIContent;
        }