Esempio n. 1
0
 public ConfigElement(PropertyFieldWrapper memberInfo, object item, IList array)
 {
     Width.Set(0f, 1f);
     Height.Set(30f, 0f);
     this.memberInfo           = memberInfo;
     this.item                 = item;
     this.array                = array;
     this.backgroundColor      = UICommon.defaultUIBlue;
     this._TextDisplayFunction = () => memberInfo.Name;
     labelAttribute            = ConfigManager.GetCustomAttribute <LabelAttribute>(memberInfo, item, array);
     if (labelAttribute != null)
     {
         this._TextDisplayFunction = () => labelAttribute.Label;
     }
     tooltipAttribute = ConfigManager.GetCustomAttribute <TooltipAttribute>(memberInfo, item, array);
     if (tooltipAttribute != null)
     {
         this._TooltipFunction = () => tooltipAttribute.Tooltip;
     }
     backgroundColorAttribute = ConfigManager.GetCustomAttribute <BackgroundColorAttribute>(memberInfo, item, array);
     if (backgroundColorAttribute != null)
     {
         backgroundColor = backgroundColorAttribute.color;
     }
     rangeAttribute     = ConfigManager.GetCustomAttribute <RangeAttribute>(memberInfo, item, array);
     incrementAttribute = ConfigManager.GetCustomAttribute <IncrementAttribute>(memberInfo, item, array);
 }
Esempio n. 2
0
 public virtual void OnBind()
 {
     TextDisplayFunction = () => memberInfo.Name;
     labelAttribute      = ConfigManager.GetCustomAttribute <LabelAttribute>(memberInfo, item, list);
     if (labelAttribute != null)
     {
         TextDisplayFunction = () => labelAttribute.Label;
     }
     tooltipAttribute = ConfigManager.GetCustomAttribute <TooltipAttribute>(memberInfo, item, list);
     if (tooltipAttribute != null)
     {
         this.TooltipFunction = () => tooltipAttribute.Tooltip;
     }
     backgroundColorAttribute = ConfigManager.GetCustomAttribute <BackgroundColorAttribute>(memberInfo, item, list);
     if (backgroundColorAttribute != null)
     {
         backgroundColor = backgroundColorAttribute.color;
     }
     rangeAttribute     = ConfigManager.GetCustomAttribute <RangeAttribute>(memberInfo, item, list);
     incrementAttribute = ConfigManager.GetCustomAttribute <IncrementAttribute>(memberInfo, item, list);
 }