コード例 #1
0
        private void LoadMockingData()
        {
            Header            = "室内测试简报";
            LoadingVisibility = Visibility.Collapsed;
            WorkReportBuildingEntity building = new WorkReportBuildingEntity();

            building.BuildingName = "oldstar";
            building.BuildingType = 1;
            building.BuildingUse  = "特殊";
            building.Result       = 1;
            WorkReportFloorEntity floor = new WorkReportFloorEntity();

            floor.FloorsName     = "new star";
            floor.FloorsType     = "new begining";
            floor.WorkReportLogs = new ObservableCollection <WorkReportLogEntity>();
            floor.Result         = 1;
            WorkReportLogEntity log = new WorkReportLogEntity();

            log.LogName       = "sdfsdf";
            log.LogServertype = "数据";
            log.Result        = 2;
            WorkReportLogEntity log1 = new WorkReportLogEntity();

            log1.LogName       = "sdfsdf1";
            log1.LogServertype = "数据";
            log1.Result        = 1;

            WorkReportLogKpiEntity logKpis = new WorkReportLogKpiEntity()
            {
                KpiName = "kpi test", KpiRange = ">5", KpiValue = 12.2m
            };

            log.Kpis = new ObservableCollection <WorkReportLogKpiEntity>();
            log.Kpis.AddRange(Enumerable.Repeat(logKpis, 10));
            // floor.WorkReportLogs.AddRange(Enumerable.Repeat(log,15));
            floor.WorkReportLogs.AddRange(new[] { log, log1 });
            building.WorkReportFloors = new ObservableCollection <WorkReportFloorEntity>();
            building.WorkReportFloors.AddRange(Enumerable.Repeat(floor, 5));
            Initial(new List <WorkReportBuildingEntity>()
            {
                building
            });
        }
コード例 #2
0
        private void LoadMockingData()
        {
            Header = "室内测试简报";
            LoadingVisibility = Visibility.Collapsed;
            WorkReportBuildingEntity building = new WorkReportBuildingEntity();
            building.BuildingName = "oldstar";
            building.BuildingType = 1;
            building.BuildingUse = "特殊";
            building.Result = 1;
            WorkReportFloorEntity floor = new WorkReportFloorEntity();
            floor.FloorsName = "new star";
            floor.FloorsType = "new begining";
            floor.WorkReportLogs = new ObservableCollection<WorkReportLogEntity>();
            floor.Result = 1;
            WorkReportLogEntity log = new WorkReportLogEntity();
            log.LogName = "sdfsdf";
            log.LogServertype = "数据";
            log.Result = 2;
            WorkReportLogEntity log1 = new WorkReportLogEntity();
            log1.LogName = "sdfsdf1";
            log1.LogServertype = "数据";
            log1.Result = 1;

            WorkReportLogKpiEntity logKpis = new WorkReportLogKpiEntity() { KpiName = "kpi test", KpiRange = ">5", KpiValue = 12.2m };
            log.Kpis = new ObservableCollection<WorkReportLogKpiEntity>();
            log.Kpis.AddRange(Enumerable.Repeat(logKpis, 10));
            // floor.WorkReportLogs.AddRange(Enumerable.Repeat(log,15));
            floor.WorkReportLogs.AddRange(new[] { log, log1 });
            building.WorkReportFloors = new ObservableCollection<WorkReportFloorEntity>();
            building.WorkReportFloors.AddRange(Enumerable.Repeat(floor, 5));
            Initial(new List<WorkReportBuildingEntity>() { building });
        }