public static void TryReset()
        {
            if (dailyReset)
            {
                ResetDailyData();
                EventsWrapper.SendLogEntry(new LogEntryEventArgs("Daily data has been reset."));
                EventsWrapper.SendNotification(new NotificationEventArgs("Daily data has been reset.", NotificationImage.Default, NotificationType.Standard, TCTData.Colors.SolidGreen, true, true, false));
                //UI.UpdateLog("Daily data has been reset.");
                //UI.SendNotification("Daily data has been reset.", NotificationImage.Default, NotificationType.Standard, TCTData.Colors.SolidGreen, true, true, false);
                dailyReset = false;
            }
            if (weeklyReset)
            {
                ResetWeeklyData();
                //UI.UpdateLog("Weekly data has been reset.");
                //UI.SendNotification("Weekly data has been reset.", NotificationImage.Default, NotificationType.Standard, TCTData.Colors.SolidGreen, true, true, false);
                EventsWrapper.SendLogEntry(new LogEntryEventArgs("Weekly data has been reset."));
                EventsWrapper.SendNotification(new NotificationEventArgs("Weekly data has been reset.", NotificationImage.Default, NotificationType.Standard, TCTData.Colors.SolidGreen, true, true, false));

                weeklyReset = false;
            }
        }
Ejemplo n.º 2
0
        public static List <Event> getCurrentEvents()
        {
            EventsWrapper ew = getJSONObject <EventsWrapper>(new CancellationToken(), apiV3EventsUrl).Result;

            return(ew.events.ToList());
        }