Example #1
0
        void OnDelete(Object sender, EventArgs e)
        {
            MenuItem   mi   = sender as MenuItem;//((MenuItem)sender);
            TodoObject item = mi.CommandParameter as TodoObject;

            viewModel.Delete(item);
            viewModel.Read();
        }
Example #2
0
        public void AddNewActivity()
        {
            TodoObject item = new TodoObject();

            item.name      = activityName;
            item.date      = new DateTimeOffset(activityDate);
            item.completed = false;
            manager.Create(item);
        }
Example #3
0
 public void UpdateTodo(TodoObject item, string name, bool completed, DateTimeOffset date)
 {
     realm.Write(() =>
     {
         item.name      = name;
         item.completed = completed;
         item.date      = date;
     });
 }
Example #4
0
        void listview_ItemTapped(Object sender, ItemTappedEventArgs e)
        {
            TodoObject item = e.Item as TodoObject;

            viewModel.ToggleCompleted(item);
        }
Example #5
0
 public void ToggleCompleted(TodoObject item)
 {
     manager.UpdateTodo(item, item.name, !item.completed, item.date);
 }