private void SaveReservoirFile(string fileName, OutPutSelectOption option) { this.Hint = "保存中..."; FetchReservoirRecord frr = new FetchReservoirRecord(); if (option.IsSetTimeRange == true) { frr.SetDuration(option.From, option.To); } if (option.IsSetStationRange == true) { frr.SetStationId(option.StationIdList); } frr.FecthData(); if (option.FileType == OutPutSelectOption.FILE_TYPE_EXCEL) { frr.SaveToExcelFile(fileName); } if (option.FileType == OutPutSelectOption.FILE_TYPE_TXT) { frr.SaveToTxTFile(fileName); } this.Hint = "保存完成!"; }
private void ShowReservoirData(OutPutSelectOption option) { FetchReservoirRecord frr = new FetchReservoirRecord(); if (option.IsSetTimeRange == true) { frr.SetDuration(option.From, option.To); } if (option.IsSetStationRange == true) { frr.SetStationId(option.StationIdList); } frr.FecthData(); WindowShowReserviorChart wd = new WindowShowReserviorChart(frr.ReservoirList); wd.ShowDialog(); this.Hint = "水库水情曲线生成完成!"; }
private void ShowReservoirData(OutPutSelectOption option) { FetchReservoirRecord frr = new FetchReservoirRecord(); if (option.IsSetTimeRange == true) { frr.SetDuration(option.From, option.To); } if (option.IsSetStationRange == true) { frr.SetStationId(option.StationIdList); } frr.FecthData(); frr.ReservoirList.Sort(delegate(ReservoirHydrologyRecord x, ReservoirHydrologyRecord y) { return(x.Time.CompareTo(y.Time)); }); WindowShowReserviorChart wd = new WindowShowReserviorChart(frr.ReservoirList); wd.ShowDialog(); }