/// <summary> /// 获取外观类型数据 /// </summary> protected virtual XCIList <XCIAppearanceObject> GetAppearanceData() { XCIList <XCIAppearanceObject> list = new XCIList <XCIAppearanceObject>(); PropertyInfo[] pi = AppearanceType.GetProperties(); string appearanceType = typeof(AppearanceObject).Name; foreach (PropertyInfo info in pi) { if (info.PropertyType.Name.Equals(appearanceType)) { XCIAppearanceObject obj = new XCIAppearanceObject(); string name = info.Name; string des = name; if (ItemDescriptionDic.ContainsKey(name)) { des = ItemDescriptionDic[name]; } obj.Name = name; obj.Description = des; obj.Spell = SpellHelper.GetStringSpell(des); list.Add(obj); } } return(list); }
private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) { XCIAppearanceObject obj = xciGridControl1.Get <XCIAppearanceObject>(e.FocusedRowHandle); if (obj != null) { object appearanceObject = AppearanceType.GetProperty(obj.Name).GetValue(AppearanceObject, null); xciPropertyGrid1.SetObject(appearanceObject); xciPropertyGrid1.Enabled = true; } else { xciPropertyGrid1.SetObject(null); xciPropertyGrid1.Enabled = false; } }