partial void SaveButton_TouchUpInside(UIButton sender)
        {
            TodoItem newItem = new TodoItem();

            if (currentTask != null)
            {
                newItem.ID = currentTask.ID;
            }

            newItem.Name  = TitleText.Text.Equals("") ? "np" : TitleText.Text;
            newItem.Notes = NotesText.Text;

            if (DoneSwitch.On)
            {
                newItem.Done = true;
            }
            else
            {
                newItem.Done = false;
            }

            tasksViewModel.SaveTask(newItem);

            // Come back to the previous view
            NavigationController.PopViewController(true);
        }
Exemplo n.º 2
0
        void Save()
        {
            task.Name  = nameTextEdit.Text;
            task.Notes = notesTextEdit.Text;
            task.Done  = doneCheckbox.Checked;

            int saved = tasksViewModel.SaveTask(task);

            Console.WriteLine("SaveTesk value {0}", saved);
            Finish();
        }