public void Unidentified() { ISequenceItem item = new SequenceItem(UnidentifiedBoat, DateTime.Now, string.Empty); _location.SequenceItems.Add(item); _repos.ForEach(r => r.LogATime(_location, item)); Finished.Clear(); _location.SequenceItems.OrderByDescending(i => i.TimeStamp).ForEach(Finished.Add); }
public void SaveBoat(IEnumerable<Tuple<IBoat, DateTime, string>> list) { foreach(var tuple in list) { var boat = tuple.Item1; var time = tuple.Item2; var notes = tuple.Item3; ISequenceItem item = new SequenceItem(boat == null ? UnidentifiedBoat : boat, time, notes); _location.SequenceItems.Add(item); var sw = new Stopwatch(); sw.Start(); // note: for now this has to happen first, otherwise the visible time is not going to be populated ahead of being displayed in the master panel binding _repos.ForEach(r => r.LogATime(_location, item)); sw.Stop(); ReportStopwatch(sw, boat.Number.ToString()); _keepUnfinished.Remove(boat); Unfinished.Remove(boat); // if(boat.Number < 0) // Unfinished.Insert(0, UnidentifiedBoat); } RefreshObservable(); }