public async Task ExecuteLoginCommand()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                //var login = await DataStore.LoginAsync();
                //if (login != null)
                //{
                //    App.Token = login.Token;
                //}
                string error = await DataStore.LoginAsync();

                if (!string.IsNullOrEmpty(error))
                {
                    await Application.Current.MainPage.DisplayAlert("ERROR", error, "OK");
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
Пример #2
0
        public async Task ExecuteLoginCommand()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                var login = await DataStore.LoginAsync();

                if (login != null)
                {
                    App.Token = login.Token;
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }