Exemple #1
0
        public async void OnAppearing()
        {
            var database = new ActivityDatabase();

//			ActivityList = new ObservableCollection<Activities> (await database.GetAll ());

            ActivityList.Add(new Activities("Cook Dinner", "Kitchen", 1, false));
        }
Exemple #2
0
        public AddActivityViewModel(IMyNavigationService navigationService)
        {
            var database = new ActivityDatabase();

            DemoButtonCommand = new Command(() => {
                //create new model for adding a step
                //Do something e.g:
                //navigationService.GoBack();
                // navigationService.NavigateTo(ViewModelLocator.SamplePagePageKey);
            });

            SaveAndQuit = new Command(() => {
                database.InsertOrUpdateActivity(new Activities(ActivityName, ActivityLocation, 1, false));
                navigationService.GoBack();
            });

            OpenImageSelector = new Command(() =>
            {
                //once i get the image selecor in it'll go here
                //navigationService.NavigateTo();
                navigationService.NavigateTo(ViewModelLocator.ImagePickerPageKey);
            });
        }
		public AddActivityViewModel(IMyNavigationService navigationService)
		{
			var database = new ActivityDatabase();

			DemoButtonCommand = new Command(() => {
				//create new model for adding a step
				//Do something e.g:
				//navigationService.GoBack();
				// navigationService.NavigateTo(ViewModelLocator.SamplePagePageKey);
			});

			SaveAndQuit = new Command (() => {
				database.InsertOrUpdateActivity(new Activities(ActivityName, ActivityLocation, 1, false));
				navigationService.GoBack();
			});

			OpenImageSelector = new Command(() =>
			{
				//once i get the image selecor in it'll go here
				//navigationService.NavigateTo();
				navigationService.NavigateTo(ViewModelLocator.ImagePickerPageKey);

			});
		}
		public async void OnAppearing(){
			var database = new ActivityDatabase ();
//			ActivityList = new ObservableCollection<Activities> (await database.GetAll ());

			ActivityList.Add (new Activities ("Cook Dinner", "Kitchen", 1, false));
		}