コード例 #1
0
		public EventViewModel(IMyNavigationService navigationService)
		{
			this.navigationService = navigationService;
			var database = new EventDatabase ();

			NewEventCommand = new Command (() => this.navigationService.NavigateTo (ViewModelLocator.EventPageKey));
			SaveEventCommand = new Command (() => {
				database.InsetOrUpdateEvent (new Event (EventName, EventTime, EventDate, EventLocation, EventAttendees, IsPublic, GuestCanInvite));
				navigationService.GoBack ();
			});

		}
コード例 #2
0
		public async void OnAppearing()
		{
			var database = new EventDatabase ();
			EventList = new ObservableCollection<Event> (await database.GetAll ());
		}