void DownloadHimawari8Image(Himawari8.Area area, Himawari8.ImageType type) { DateTime timeTag = DateTime.Now; //update picHimawari8.Image showHimawari8Message("Download Himawari8 Image"); this.Invoke(new downloadHimawari8Handler(satHimawari8.DownloadHimawari8Image), area, type, timeTag); if (satHimawari8.sourceImage != null) { picHimawari8.Image = satHimawari8.sourceImage; } showHimawari8Message(satHimawari8.status); }
String saveHimawari8SourceImage(Himawari8.Area area, Himawari8.ImageType type, DateTime pictureTime) { if (satHimawari8.sourceImage == null) //no image { return(null); } DateTime fileTag = new DateTime(pictureTime.Year, pictureTime.Month, pictureTime.Day, pictureTime.Hour, (pictureTime.Minute / 10) * 10, 0); showHimawari8Message("save CWB Image"); String subPath = String.Format("CWB\\{0}\\{1}", Himawari8.ImageAreaName[(int)area], Himawari8.ImageTypeName[(int)type]); String FilePath = rmtCore.fileRoot.CreateSubPath(subPath, FileRoot.Type.Daily); String FileName = String.Format("{0}_{1}_{2}_{3}.png", (type == Himawari8.ImageType.RadarCompositeReflect) ? "Radar" : "Himawari8", fileTag.ToString("yyyy-MM-dd_HH-mm-ss"), Himawari8.ImageAreaName[(int)area], Himawari8.ImageTypeName[(int)type]); String BmpFileName = satHimawari8.SaveSourceImage(FilePath, FileName); showHimawari8Message(""); return(BmpFileName); }