This commit is contained in:
2020-04-29 19:04:19 +00:00
parent 0abc8de546
commit d34acd45d4

View File

@@ -163,6 +163,7 @@ namespace AyaNova.PlugIn.V8
/// </summary> /// </summary>
private async void DoExport() private async void DoExport()
{ {
Cursor.Current = Cursors.WaitCursor;
//Show progress form //Show progress form
ProgressForm progress = new ProgressForm(); ProgressForm progress = new ProgressForm();
progress.Show(); progress.Show();
@@ -242,13 +243,15 @@ namespace AyaNova.PlugIn.V8
} }
catch (Exception ex) catch (Exception ex)
{ {
progress.Append("ERROR, During operation: " + progress.LastOp + "\n"+progress.LastSubOp); progress.Append("ERROR, During operation: " + progress.LastOp + "\n" + progress.LastSubOp);
progress.Append("\n************\nExport failed with error:"); progress.Append("\n************\nExport failed with error:");
progress.Append(ex.Message); progress.Append(ex.Message);
progress.Append("stack:\n" + ex.StackTrace); progress.Append("stack:\n" + ex.StackTrace);
} }
finally { finally
progress.FinishedImport(); {
progress.FinishedImport();
Cursor.Current = Cursors.Default;
} }
@@ -389,7 +392,7 @@ namespace AyaNova.PlugIn.V8
} }
//Attachments / FILES //Attachments / FILES
await ExportAttachments(new TypeAndID(RootObjectTypes.User, c.ID),progress); await ExportAttachments(new TypeAndID(RootObjectTypes.User, c.ID), progress);
} }
@@ -651,7 +654,7 @@ namespace AyaNova.PlugIn.V8
var af = AyaFile.GetItem(i.LT_O_AyaFile.Value); var af = AyaFile.GetItem(i.LT_O_AyaFile.Value);
if (af == null) continue; if (af == null) continue;
progress.SubOp("Wikifile: \"" + af.Name + "\" size:" + af.FileSize); progress.SubOp("Wikifile: \"" + af.Name + "\" " + AyaBizUtils.FileSizeDisplay((decimal)af.FileSize));
//Compile the FileData property //Compile the FileData property
var sDate = i.LT_Common_Label_Created.ToString(); var sDate = i.LT_Common_Label_Created.ToString();
@@ -695,6 +698,9 @@ namespace AyaNova.PlugIn.V8
var ravenId = a.ObjectResponse["data"][0]["id"].Value<long>(); var ravenId = a.ObjectResponse["data"][0]["id"].Value<long>();
Map.Add(af.ID, ravenId); Map.Add(af.ID, ravenId);
} }
progress.SubOp("");
} }
#endregion attachments #endregion attachments