Ejemplo n.º 1
0
        /// <summary>
        /// Downloads the wind and updates the wind tables.
        /// If failed, errors are logged and displayed.
        /// </summary>
        /// <returns></returns>
        public async Task DownloadWind()
        {
            view.ShowWindStatus(WindDownloadStatus.Downloading);

            try
            {
                windTableLocator.Instance = await WindManager.LoadWindAsync();

                view.ShowWindStatus(WindDownloadStatus.FinishedDownload);
                WindAvailable = true;
            }
            catch (Exception ex)
            {
                Log(ex);
                view.ShowWindStatus(WindDownloadStatus.FailedToDownload);
            }
        }
Ejemplo n.º 2
0
        public async Task DownloadWind()
        {
            downloadBtn.Enabled = false;
            loadFileBtn.Enabled = false;
            ShowWindStatus(WindDownloadStatus.Downloading);

            try
            {
                windTableLocator.Instance = await WindManager.LoadWindAsync();

                ShowWindStatus(WindDownloadStatus.FinishedDownload);
                windAvailable = true;
            }
            catch (Exception ex)
            {
                Log(ex);
                ShowWindStatus(WindDownloadStatus.FailedToDownload);
            }

            downloadBtn.Enabled = true;
            loadFileBtn.Enabled = true;
        }