public override void onRequestFinish(MegaSDK api, MRequest request, MError e)
        {
            Deployment.Current.Dispatcher.BeginInvoke(() =>
            {
                ProgressService.ChangeProgressBarBackgroundColor((Color)Application.Current.Resources["PhoneChromeColor"]);
                ProgressService.SetProgressIndicator(false);
            });

            if (e.getErrorCode() == MErrorType.API_OK)
            {
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    AccountService.AccountDetails.HasAvatarImage = true;

                    var img           = new BitmapImage();
                    img.CreateOptions = BitmapCreateOptions.IgnoreImageCache;
                    img.UriSource     = new Uri(request.getFile());
                    AccountService.AccountDetails.AvatarUri = img.UriSource;
                });
            }
            else
            {
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    AccountService.AccountDetails.HasAvatarImage = false;
                    AccountService.AccountDetails.AvatarUri      = null;
                });
            }
        }
Exemplo n.º 2
0
 protected override void OnSuccesAction(MegaSDK api, MRequest request)
 {
     Deployment.Current.Dispatcher.BeginInvoke(() =>
     {
         _node.IsDefaultImage    = false;
         _node.ThumbnailImageUri = new Uri(request.getFile());
     });
 }
Exemplo n.º 3
0
 protected override void OnSuccesAction(MegaSDK api, MRequest request)
 {
     Deployment.Current.Dispatcher.BeginInvoke(() => _node.PreviewImageUri = new Uri(request.getFile()));
 }