Ejemplo n.º 1
0
        public SettingsTypeDescriptor(SettingCategrory category)
        {
            m_Properties = new List <PropertyDescriptor>();

            if (category is Settings)
            {
                foreach (ISettingItem item in category.Items)
                {
                    if (item.IsHidden == true)
                    {
                        continue;
                    }

                    if (item is ISettingValue)
                    {
                        m_Properties.Add(new SettingValuePropertyInfo(item as ISettingValue));
                    }
                    else if (item is SettingCategrory)
                    {
                        foreach (ISettingItem sub in (item as SettingCategrory).Items)
                        {
                            if (sub.IsHidden == true)
                            {
                                continue;
                            }

                            if (sub is ISettingValue)
                            {
                                m_Properties.Add(new SettingValuePropertyInfo(sub as ISettingValue));
                            }
                            else
                            {
                                m_Properties.Add(new SettingCategoryPropertyDescriptor(sub as SettingCategrory));
                            }
                        }
                    }
                }
            }
            else
            {
                foreach (ISettingItem item in category.Items)
                {
                    if (item.IsHidden == true)
                    {
                        continue;
                    }

                    if (item is ISettingValue)
                    {
                        m_Properties.Add(new SettingValuePropertyInfo(item as ISettingValue));
                    }
                    else if (item is SettingCategrory)
                    {
                        m_Properties.Add(new SettingCategoryPropertyDescriptor(item as SettingCategrory));
                    }
                }
            }
        }
Ejemplo n.º 2
0
 public SettingCategoryPropertyDescriptor(SettingCategrory group)
     : base(group.Text, new Attribute[0])
 {
     m_Category   = group;
     m_Descriptor = new SettingsTypeDescriptor(group);
 }