private bool OnApplicationQuitting() { this.isApplicationShuttingDown = true; this.DestoryConnection(); HTTPManager.OnUpdate(); return(true); }
public static ETTask <bool> DownloadAll(this DownloadComponent self) { if (self.tcs == null) { self.tcs = ETTask <bool> .Create(true); self.IsDownloading = true; ThreadPool.QueueUserWorkItem((_) => { while (true) { if (!self.IsDownloading) { return; } HTTPManager.OnUpdate(); self.UpdateThread(); Thread.Sleep(1); } }); } return(self.tcs); }