private void button_Click(object sender, RoutedEventArgs e) { var storage = new Services.PersistentStorage(); var focus = new Services.FocusService(storage); focus.EndActivity(CurrentActivity); }
private void button_Click(object sender, RoutedEventArgs e) { var storage = new Services.PersistentStorage(); var act = new Models.Activity() { StartedAt = DateTime.Now, }; // TODO insert via focus ActivityHistory.Add(act); storage.Db.Insert(act); var focus = new Services.FocusService(storage); var activity = focus.RetrieveCurrentActivity(); new FocusBar(activity).Show(); Close(); }