Ejemplo n.º 1
0
 public ObjectEditorEntry(PropertyInfo prop, object obj, object optionable, object range, object hue)
 {
     this.m_Property   = prop;
     this.m_Object     = obj;
     this.m_Optionable = optionable as OptionableAttribute;
     this.m_Range      = range as OptionRangeAttribute;
     this.m_Hue        = hue as OptionHueAttribute;
 }
Ejemplo n.º 2
0
 private void BuildCategories(object obj, Hashtable categories)
 {
     foreach (PropertyInfo property in obj.GetType().GetProperties())
     {
         OptionableAttribute optionableAttribute = this.GetAttribute((MemberInfo)property, typeof(OptionableAttribute)) as OptionableAttribute;
         if (optionableAttribute != null && (!optionableAttribute.OnlyAOS || Engine.ServerFeatures.AOS))
         {
             if (!property.CanWrite)
             {
                 this.BuildCategories(property.GetValue(obj, (object[])null), categories);
             }
             else
             {
                 ArrayList arrayList = (ArrayList)categories[(object)optionableAttribute.Category];
                 if (arrayList == null)
                 {
                     categories[(object)optionableAttribute.Category] = (object)(arrayList = new ArrayList());
                 }
                 arrayList.Add((object)new ObjectEditorEntry(property, obj, (object)optionableAttribute, this.GetAttribute((MemberInfo)property, typeof(OptionRangeAttribute)), this.GetAttribute((MemberInfo)property, typeof(OptionHueAttribute))));
             }
         }
     }
 }