public void Update(object obj) { if (_dataBoundItem == null || obj == null) { Debug.Assert(false, "_dataBoundItem 或 obj 为 null"); return; } ReflectionPool.SetPropertyValue(_dataBoundItem, TextMember, ReflectionPool.GetPropertyValue(obj, TextMember)); SetText(); }
private void SetText() { if (String.IsNullOrEmpty(TextMember) || _dataBoundItem == null) { return; } object textObject = ReflectionPool.GetPropertyValue(_dataBoundItem, TextMember); if (textObject == null) { return; } this.Text = textObject.ToString(); }
/// <summary> /// 获取当前选定对象的下钻对象集合 /// </summary> /// <returns></returns> private IList GetGoingDownItems() { if (_currentCodon == null || SelectedItemsCount != 1) { return(null); } object selectedObject = GetSelectedItem(); if (String.IsNullOrEmpty(_currentCodon.ItemsMember) || selectedObject == null) { return(null); } object listObject = ReflectionPool.GetPropertyValue(selectedObject, _currentCodon.ItemsMember); if (listObject == null) { return(null); } return(listObject as IList); }