Beispiel #1
0
        public async Task <bool> init()
        {
            grdStatus.DataContext = EDSClass.Single;
            AllPoints             = new SortedList <string, EDSPointInfo>();
            bool ok = true;

            ok &= await EDSPointsClass.getPointsArr("11VT.*", AllPoints);

            SDPMDKReport.init(AllPoints);
            return(true);
        }
Beispiel #2
0
        public static async Task <bool> DKSend(int d1, int d2)
        {
            Settings.init("Data/Settings.xml");
            Logger.InitFileLogger(Settings.Single.LogPath, "DKSend");

            SortedList <string, EDSPointInfo> AllPoints = new SortedList <string, EDSPointInfo>();
            bool ok = true;

            ok &= await EDSPointsClass.getPointsArr("11VT.*", AllPoints);

            SDPMDKReport.init(AllPoints);

            SDPMDKReport report  = new SDPMDKReport();
            DateTime     date    = DateTime.Now.Date.AddDays(-d1);
            DateTime     dateEnd = DateTime.Now.Date.AddDays(-d2);;

            dateEnd = dateEnd > DateTime.Now ? DateTime.Now.AddMinutes(-10) : dateEnd;
            ok      = await report.ReadData(date, dateEnd);

            report.sendDKData();
            return(ok);
        }