Esempio n. 1
0
        private void LoadFromFile(string file)
        {
            if (!GetUri(file).Equals(GetUri(WindManager.DownloadFilePath)))
            {
                File.Delete(WindManager.DownloadFilePath);
                File.Copy(file, WindManager.DownloadFilePath);
            }

            GribConverter.ConvertGrib();
            var handler = new WindFileHandler();

            windTableLocator.Instance = handler.ImportAllTables();
            handler.TryDeleteCsvFiles();
        }
Esempio n. 2
0
        // May throw exception.
        private WxTableCollection LoadWindFile(string path)
        {
            if (!GetUri(path).Equals(GetUri(WindManager.DownloadFilePath)))
            {
                File.Delete(WindManager.DownloadFilePath);
                File.Copy(path, WindManager.DownloadFilePath);
            }

            GribConverter.ConvertGrib();
            var handler = new WindFileHandler();
            var result  = handler.ImportAllTables();

            handler.TryDeleteCsvFiles();
            return(result);
        }