Exemplo n.º 1
0
        internal void Add(SettingInfo info, SettingItem setting)
        {
            string categoryText = GetCategoryText(info.Category);

            CategoryViewModel cvm = CategoryItems.Find(c => c.Category == categoryText);

            if (cvm == null)
            {
                cvm          = new CategoryViewModel();
                cvm.Category = categoryText;
                CategoryItems.Add(cvm);
            }

            cvm.SettingItems.Add(new SettingItemViewModel(info, setting));
        }