Beispiel #1
0
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            _vm = DataContext as TaskListsViewModel;
            _vm.EditMode = true;

            ((ApplicationBarIconButton)ApplicationBar.Buttons[2]).Click += ReorderList_Click;
            ((ApplicationBarMenuItem)ApplicationBar.MenuItems[0]).Click += CreateTaskList_Click;
            ((ApplicationBarMenuItem)ApplicationBar.MenuItems[2]).Click += AboutMenu_Click;

            ApplicationBar.IsVisible = false;
        }
Beispiel #2
0
        public void TestGetTaskListsCommand()
        {
            var data = new DataService();
            var navi = new NavigationService();
            var dialog = new DialogService();
            var vm = new TaskListsViewModel(data, navi, dialog);
            
            vm.GetTaskListsCommand.Execute(null);

            Assert.AreEqual(3, vm.TaskLists.Count);
            Assert.AreEqual("1", vm.SelectedTaskList.Id);
            Assert.AreEqual(10, vm.SelectedTaskList.Tasks.Count);
        }