public AddPicturePage()
        {
            InitializeComponent();

            BindingContext = new AddPicturePageViewModel();

            MessagingCenter.Subscribe <AddPicturePageViewModel>(this, Constants.PictureAddedMessage, async(vm) => await Shell.Current.GoToAsync("//main"));

            MessagingCenter.Subscribe <AddPicturePageViewModel>(this, Constants.PictureFailedMessage, async(vm) => await DisplayAlert("Uh-oh!", "Can you hand me my glasses? Something went wrong while analyzing this image", "OK"));
        }
Пример #2
0
        public AddPicturePage()
        {
            InitializeComponent();

            BindingContext = new AddPicturePageViewModel();

            MessagingCenter.Subscribe <AddPicturePageViewModel>(this, Constants.PictureAddedMessage, async(vm) => await Navigation.PopModalAsync(true));

            MessagingCenter.Subscribe <AddPicturePageViewModel>(this, Constants.PictureFailedMessage, async(vm) => await DisplayAlert("Uh-oh!", "Can you hand me my glasses? Something went wrong while analyzing this image", "OK"));
            MessagingCenter.Subscribe <AddPicturePageViewModel>(this, Constants.NoPictureSelected, async(vm) => await DisplayAlert("Uh-oh!", "Please select a picture before", "OK"));
            MessagingCenter.Subscribe <AddPicturePageViewModel>(this, Constants.AzureBlobFail, async(vm) => await DisplayAlert("Uh-oh! A monkey unplug the cable!", "Unable to connect to Azure Blob. Your images will not persist accross app's reboots.", "OK"));
        }