aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications/Shiftnet.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-02-02 17:35:01 -0500
committerMichael <[email protected]>2017-02-02 17:35:01 -0500
commitbf100ab099e7335711ea739cb10a4a9df4b89dc5 (patch)
treec3e30b7596d1963b54afc25c94de188dc2513b8a /ShiftOS.WinForms/Applications/Shiftnet.cs
parentd5ab22629ba39ac9f0fae6768b527e82670f96fc (diff)
downloadshiftos_thereturn-bf100ab099e7335711ea739cb10a4a9df4b89dc5.tar.gz
shiftos_thereturn-bf100ab099e7335711ea739cb10a4a9df4b89dc5.tar.bz2
shiftos_thereturn-bf100ab099e7335711ea739cb10a4a9df4b89dc5.zip
Fix threading issues with Shiftnet downloader routine
Diffstat (limited to 'ShiftOS.WinForms/Applications/Shiftnet.cs')
-rw-r--r--ShiftOS.WinForms/Applications/Shiftnet.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/ShiftOS.WinForms/Applications/Shiftnet.cs b/ShiftOS.WinForms/Applications/Shiftnet.cs
index 6f99d25..986eec6 100644
--- a/ShiftOS.WinForms/Applications/Shiftnet.cs
+++ b/ShiftOS.WinForms/Applications/Shiftnet.cs
@@ -126,10 +126,12 @@ namespace ShiftOS.WinForms.Applications
var bytes = JsonConvert.DeserializeObject<byte[]>(msg.Contents);
string destPath = null;
string ext = Url.Split('.')[Url.Split('.').Length - 1];
-
- FileSkimmerBackend.GetFile(new[] { ext }, FileOpenerStyle.Save, new Action<string>((file) =>
+ this.Invoke(new Action(() =>
{
- destPath = file;
+ FileSkimmerBackend.GetFile(new[] { ext }, FileOpenerStyle.Save, new Action<string>((file) =>
+ {
+ destPath = file;
+ }));
}));
while (string.IsNullOrEmpty(destPath))
{
@@ -143,7 +145,10 @@ namespace ShiftOS.WinForms.Applications
Progress = 0,
};
DownloadManager.StartDownload(d);
- AppearanceManager.SetupWindow(new Downloader());
+ this.Invoke(new Action(() =>
+ {
+ AppearanceManager.SetupWindow(new Downloader());
+ }));
ServerManager.MessageReceived -= smr;
}
};