Ejemplo n.º 1
0
        public void OnProgress(int percentage, ErrorResult result)
        {
            if (result.IsError)
            {
                StoreFactory.CurrentVM.Logs.Add(result.ToString());
            }


            if (percentage == 100)
            {
                StoreFactory.HalProxy.RunOnUiThread(
                    new Action(() => { this.parentVm.ErrorMsg = result.ToString(); this.PublishActive = true; this.parentVm.IsRunning = false;
                                       StoreFactory.HalProxy.MakeToast(this.parentVm.ErrorMsg); }));
            }
            else if (percentage == 0)
            {
                StoreFactory.HalProxy.RunOnUiThread(
                    new Action(() => { this.parentVm.ErrorMsg = Resources.TextResource.Running; this.PublishActive = false; this.parentVm.IsRunning = true;
                                       StoreFactory.HalProxy.MakeToast(this.parentVm.ErrorMsg); }));
            }
        }
        /// <summary>
        /// A human-readable error display
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            var start = string.IsNullOrEmpty(Header) ? "" : Header + ": ";

            return(start + ErrorResult.ToString());
        }
Ejemplo n.º 3
0
 public override void OnFailure(ErrorResult errorResult)
 {
     Logger.E(errorResult.ToString());
 }
 public override void OnFailure(ErrorResult errorResult)
 {
     KakaoToast.MakeToast(applicationConfig.ApplicationContext, errorResult.ToString(), ToastLength.Short).Show();
 }