Example #1
0
        private async void AddNewFavorite()
        {
            var dialog = new AddOrEditFavoriteDialog();
            await dialog.ShowAsync();

            if (dialog.ResultFavorite != null)
            {
                _favoritesService.AddFavorite(dialog.ResultFavorite);
            }
        }
Example #2
0
        private async void EditFavorite(IFavorite obj)
        {
            //bring up the AddOrEdit dialog in Edit mode
            var dialog = new AddOrEditFavoriteDialog(obj);
            await dialog.ShowAsync();

            if (dialog.ResultFavorite != null)
            {
                _favoritesService.EditFavorite(dialog.ResultFavorite);
            }
        }