public void onRequestUpdate(MegaSDK api, MRequest request)
 {
     Deployment.Current.Dispatcher.BeginInvoke(() => ProgessService.SetProgressIndicator(true,
                                                                                         String.Format("Fetching files & folders...[{0}/{1}]",
                                                                                                       request.getTransferredBytes().ToStringAndSuffix(),
                                                                                                       request.getTotalBytes().ToStringAndSuffix())));
 }
示例#2
0
        public virtual void onRequestFinish(MegaSDK api, MRequest request, MError e)
        {
            Deployment.Current.Dispatcher.BeginInvoke(() =>
            {
                ProgessService.SetProgressIndicator(false);

                //this.ControlState = true;

                if (e.getErrorCode() == MErrorType.API_OK)
                {
                    if (ShowSuccesMessage)
                    {
                        MessageBox.Show(SuccessMessage, SuccessMessageTitle, MessageBoxButton.OK);
                    }

                    if (ActionOnSucces)
                    {
                        OnSuccesAction(request);
                    }

                    if (NavigateOnSucces)
                    {
                        NavigateService.NavigateTo(NavigateToPage, NavigationParameter);
                    }
                }
                else
                {
                    MessageBox.Show(String.Format(ErrorMessage, e.getErrorString()), ErrorMessageTitle, MessageBoxButton.OK);
                }
            });
        }
示例#3
0
 public virtual void onRequestTemporaryError(MegaSDK api, MRequest request, MError e)
 {
     Deployment.Current.Dispatcher.BeginInvoke(() =>
     {
         ProgessService.SetProgressIndicator(false);
         MessageBox.Show(String.Format(ErrorMessage, e.getErrorString()), ErrorMessageTitle, MessageBoxButton.OK);
     });
 }
示例#4
0
 public virtual void onRequestStart(MegaSDK api, MRequest request)
 {
     Deployment.Current.Dispatcher.BeginInvoke(() =>
     {
         //this.ControlState = false;
         ProgessService.SetProgressIndicator(true, ProgressMessage);
     });
 }
        public void onRequestFinish(MegaSDK api, MRequest request, MError e)
        {
            Deployment.Current.Dispatcher.BeginInvoke(() =>
            {
                if (e.getErrorCode() == MErrorType.API_OK)
                {
                    _cloudDriveViewModel.CurrentRootNode = new NodeViewModel(api, api.getRootNode());
                    _cloudDriveViewModel.LoadNodes();
                }
                else
                {
                    MessageBox.Show(e.getErrorString());
                }

                ProgessService.SetProgressIndicator(false);
            });
        }