Esempio n. 1
0
        /// <summary>
        /// Method that handles the couple message from the page
        /// </summary>
        private void HandleCoupleMessage()
        {


            App.ShowLoading(true);
            APICaller.Couple(_model.APIUrl, _username, _pw).ContinueWith((result) =>
            {
                if (result.Result.User == null)
                {
                    App.ShowMessage("Login fejlede\n" + "Fejl besked: " + result.Result.Error.Message);
                    return;
                }

                var success = Couple(result.Result.User);
                if (!success)
                {
                    App.ShowMessage("Login fejlede\n" + "Fejl besked: Coupling Error");
                    return;
                }

                Definitions.RefreshMainView = true;
                Dispose();
                App.Navigation.PopToRootAsync();
            }, TaskScheduler.FromCurrentSynchronizationContext());
        }