Esempio n. 1
0
        private void button_Click(object sender, RoutedEventArgs e)
        {
            var storage = new Services.PersistentStorage();
            var focus   = new Services.FocusService(storage);

            focus.EndActivity(CurrentActivity);
        }
Esempio n. 2
0
        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();
        }