Ejemplo n.º 1
0
        private async void btnCreate_Click(object sender, RoutedEventArgs e)
        {
            SDPMDKReport report  = new SDPMDKReport();
            DateTime     date    = clndDate.SelectedDate.Value;
            DateTime     dateEnd = date.AddDays(1);

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

            grdEvents.ItemsSource = report.DKDataFull.Values;
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
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);
        }