Beispiel #1
0
 public static void SaveToFile(PomodoroStatistics statistics, string loc)
 {
     using (var file = new StreamWriter(@loc, false))
     {
         foreach (var task in SerializeStatistics(statistics))
         {
             file.Write(task);
         }
     }
 }
Beispiel #2
0
 public PomodoroScheduler(PomodoroStatistics stat)
 {
     Stats        = stat;
     WorkLeft     = MaxPomodorosInRound;
     CurrentState = State.REST;
 }
Beispiel #3
0
 public static string SerializeStatistics(PomodoroStatistics statistics)
 {
     return(JsonConvert.SerializeObject(statistics));
 }
Beispiel #4
0
 public EverythingManager()
 {
     Stat      = FileStatistics.GetStatisticsFromJsonFile(Directory.GetCurrentDirectory() + "/statistics.json");
     Scheduler = new PomodoroScheduler(Stat);
 }