Exemplo n.º 1
0
        internal List <DemoDataModel> GetDemoDataList()
        {
            var list = new List <DemoDataModel>();

            for (var i = 1; i <= 20; i++)
            {
                var dataList = new List <DemoDataModel>();
                for (var j = 0; j < 3; j++)
                {
                    dataList.Add(new DemoDataModel
                    {
                        Index      = j,
                        IsSelected = j % 2 == 0,
                        Name       = $"SubName{j}",
                        Type       = (DemoType)j
                    });
                }
                var model = new DemoDataModel
                {
                    Index      = i,
                    IsSelected = i % 2 == 0,
                    Name       = $"Name{i}",
                    Type       = (DemoType)i,
                    DataList   = dataList,
                    ImgPath    = $"/HandyControlDemo;component/Resources/Img/Avatar/avatar{i % 6 + 1}.png",
                    Remark     = new string(i.ToString()[0], 10)
                };
                list.Add(model);
            }

            return(list);
        }
Exemplo n.º 2
0
        public List<DemoDataModel> GetDemoDataList(int count)
        {
            var list = new List<DemoDataModel>();
            for (var i = 1; i <= count; i++)
            {
                var index = i % 6 + 1;
                var model = new DemoDataModel
                {
                    Index = i,
                    IsSelected = i % 2 == 0,
                    Name = $"Name{i}",
                    Type = (DemoType)index,
                    ImgPath = $"/HandyControlDemo;component/Resources/Img/Avatar/avatar{index}.png",
                    Remark = new string(i.ToString()[0], 10)
                };
                list.Add(model);
            }

            return list;
        }