Beispiel #1
0
        private void UploadFailed(string errorMessage, string tempFiles, bool bNeedClear = false)
        {
            if (bNeedClear)
            {
                ConfigFileManager.SetSectionValue("RemoteID", _upLoadPara.DocGUID, "");
                ConfigFileManager.SetSectionValue("ProjectPassword", _upLoadPara.DocGUID, "");
            }
            _procesVM.sErrorMessage = errorMessage;
            _busyIndicator.Progress = 100;
            _busyIndicator.Content  = @"Publish Failed!";

            _procesVM.IsCloseEnable = true;
            if (_procesWindow != null)
            {
                _procesWindow.IsAllowClose = true;
            }
            else
            {
                Application.Current.Dispatcher.Invoke(
                    new Action(
                        delegate
                {
                    _differView.UploadError(errorMessage);
                }));
                _procesVM.StopProgress();
            }
            _uploadState = UploadState.upload_End;

            ClearTempFile(tempFiles);
        }
Beispiel #2
0
        private void UploadSucessed(ref ResponseData data, string tempFiles)
        {
            ConfigFileManager.SetSectionValue("RemoteID", _upLoadPara.DocGUID, data.id);
            ConfigFileManager.SetSectionValue("ProjectPassword", _upLoadPara.DocGUID, _upLoadPara.ProjectPassword);

            _busyIndicator.Progress = 100;
            _busyIndicator.Content  = @"Publish Success";

            _procesVM.sShortUrl = data.shortUrl;
            _procesVM.sUrl      = data.shortUrl;

            _procesVM.IsCloseEnable = true;
            if (_procesWindow != null)
            {
                _procesWindow.IsAllowClose = true;
            }
            else
            {
                Application.Current.Dispatcher.Invoke(
                    new Action(
                        delegate
                {
                    RemovePrePublish_Closing();
                    _differView.Current = _procesVM;
                }));
                _procesVM.StopProgress();
            }
            _uploadState = UploadState.upload_End;

            ClearTempFile(tempFiles);
        }