public List<Entry> GetEntries() { List<Entry> entries = new List<Entry>(); InitIsoStoreObject(); InitStreamReader(); // read data /* every entry will occupy 3 lines inside the file as following: * * First line: description * Second line: 7 digit string in base two; ex: 0100100 (this means that we should be reminded * 'marti' and 'vineri' * Third line: DateTime objects separated by spaces */ string line; while (!reader.EndOfStream) { // add the description Entry newEntry = new Entry(); line = reader.ReadLine(); newEntry.Description = line; // add the days line = reader.ReadLine(); for (int i = 0; i < line.Length; i++) { if (line[i] == '1') { newEntry.addDay(i); } } // add the hours line = reader.ReadLine(); char[] separators = { ' ' }; string [] hours = line.Split(separators); foreach (string hour in hours) { DateTime newHour; if (DateTime.TryParse(hour, out newHour)) { newEntry.addHour(newHour); } } // add the entry entries.Add(newEntry); } reader.Close(); return entries; }