Пример #1
0
        }                                                        //负荷

        public void start()
        {
            DateTime d = DateTime.Now;

            d = new DateTime(d.Year, d.Month, d.Day);
            for (int i = 1; i <= 24; i++)
            {
                MyChartDataPoint cp = new MyChartDataPoint()
                {
                    nPos = i, argudate = d.AddHours(i), value = MyClassLibrary.MyFunction.simHourData((int)(i / 4)) * 200 + rd.Next(30)
                };
                Loads.Add(cp);
            }
        }
Пример #2
0
        public void start()
        {
            DateTime d = DateTime.Now;

            d = new DateTime(d.Year, d.Month, d.Day);
            for (int i = 0; i < 24; i++)
            {
                MyChartDataPoint cp = new MyChartDataPoint()
                {
                    species = ElecSpecies.工业, nPos = i, argudate = d.AddHours(i), value = MyClassLibrary.MyFunction.simHourData((int)(i / 4)) * 200 + rd.Next(30)
                };
                gyLoads.Add(cp);
            }

            for (int i = 0; i < 24; i++)
            {
                MyChartDataPoint cp = new MyChartDataPoint()
                {
                    species = ElecSpecies.商业, nPos = i, argudate = d.AddHours(i), value = MyClassLibrary.MyFunction.simHourData((int)(i / 4)) * 200 + rd.Next(30)
                };
                syLoads.Add(cp);
            }

            for (int i = 0; i < 24; i++)
            {
                MyChartDataPoint cp = new MyChartDataPoint()
                {
                    species = ElecSpecies.居民, nPos = i, argudate = d.AddHours(i), value = MyClassLibrary.MyFunction.simHourData((int)(i / 4)) * 200 + rd.Next(30)
                };
                jmLoads.Add(cp);
            }

            RaisePropertyChanged(() => gyLoads);
            RaisePropertyChanged(() => syLoads);
            RaisePropertyChanged(() => jmLoads);
        }