Ejemplo n.º 1
0
        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 = "保存完成!";
        }
Ejemplo n.º 2
0
        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 = "水库水情曲线生成完成!";
        }
Ejemplo n.º 3
0
        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();
        }