示例#1
0
        private async void NavigateNotification(NotificationsTypesEnum NotificationType, int NotificationID)
        {
            if (NotificationType == NotificationsTypesEnum.Chat)
            {
                //TODO
            }
            else if (NotificationType == NotificationsTypesEnum.Cooker)
            {
                OrdersModel     model  = new OrdersModel();
                CookerViewModel cooker = await model.GetCooker(NotificationID);

                await PageTemplate.CurrentPage.NavigateAsync(new SingleCookerPage(cooker) { Title = cooker.Name });
            }
            else if (NotificationType == NotificationsTypesEnum.Recipe)
            {
                RecipesModel    model  = new RecipesModel();
                RecipeViewModel recipe = await model.GetRecipeFromID(NotificationID);

                await PageTemplate.CurrentPage.NavigateAsync(new SingleRecipePage(recipe) { Title = recipe.Title });
            }
            else
            {
                await PageTemplate.CurrentPage.NavigateAsync(Utility.PageParser(PageNavigateEnums.NotificationsPage));
            }
        }
示例#2
0
 public SingleCookerPage(CookerViewModel model)
 {
     InitializeComponent();
     this.BindingContext = new SingleCookerViewModel(model);
 }