group demo items

This commit is contained in:
NaBian committed 2021-01-11 00:42:03 +08:00
1 parent 789eeed609
commit 17d2353107
18 files changed
+256 -162

No files matched your search

@@ -383,14 +383,18 @@ namespace HandyControlDemo.Service
{
var titleKey = (string) item.title;
var title = titleKey;
var list = Convert2DemoItemList(item.demoItemList);
infoList.Add(new DemoInfoModel
List<DemoItemModel> list = Convert2DemoItemList(item.demoItemList);
var demoInfoModel = new DemoInfoModel
{
Key = titleKey,
Title = title,
DemoItemList = list,
SelectedIndex = (int) item.selectedIndex
});
SelectedIndex = (int) item.selectedIndex,
IsGroupEnabled = (bool) item.group
};
infoList.Add(demoInfoModel);
}
return infoList;
@@ -406,13 +410,19 @@ namespace HandyControlDemo.Service
string targetCtlName = item[1];
string imageName = item[2];
var isNew = !string.IsNullOrEmpty((string) item[3]);
var groupName = (string) item[4];
if (string.IsNullOrEmpty(groupName))
{
groupName = "Misc";
}
resultList.Add(new DemoItemModel
{
Name = name,
TargetCtlName = targetCtlName,
ImageName = $"../../Resources/Img/LeftMainContent/{imageName}.png",
IsNew = isNew
IsNew = isNew,
GroupName = groupName
});
}