Пример #1
0
        private bool OnApplicationQuitting()
        {
            this.isApplicationShuttingDown = true;
            this.DestoryConnection();

            HTTPManager.OnUpdate();

            return(true);
        }
Пример #2
0
        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);
        }