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(); }
// 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); }