예제 #1
0
파일: RibbonSensor.cs 프로젝트: radtek/dms
        /// <summary>
        /// Selects the specified item as the currently selected sub-item
        /// </summary>
        /// <param name="item"></param>
        private void SetSelectedSubItem(RibbonItem item)
        {
            if (item == _lastSelectedSubItem)
            {
                return;
            }

            if (_lastSelectedSubItem != null)
            {
                _lastSelectedSubItem.SetSelected(false);
                RedrawItem(_lastSelectedSubItem, GetContentBounds(_lastSelectedSubItemParent));
            }

            if (item != null)
            {
                item.SetSelected(true);
                RedrawItem(item, GetContentBounds(_lastSelectedSubItemParent));
            }

            _lastSelectedSubItem = item;
        }
예제 #2
0
파일: RibbonSensor.cs 프로젝트: radtek/dms
        /// <summary>
        /// Selects the specified item as the currently selected item
        /// </summary>
        /// <param name="item"></param>
        private void SetSelectedItem(RibbonItem item)
        {
            if (item == _lastSelectedItem)
            {
                return;
            }

            if (_lastSelectedItem != null)
            {
                _lastSelectedItem.SetSelected(false);
                RedrawItem(_lastSelectedItem);
            }

            if (item != null)
            {
                item.SetSelected(true);
                RedrawItem(item);
            }

            _lastSelectedItem = item;
        }