예제 #1
0
 private void importPotentialEveporationTimeseriesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ExtractTimeSeriesFromFile extractTimeSeriesFromFileDialog = new ExtractTimeSeriesFromFile();
     extractTimeSeriesFromFileDialog.ShowDialog();
     if (extractTimeSeriesFromFileDialog.SelectedTimeseries != null)
     {
         hydroCatEngine.InputPotentialEvaporation = extractTimeSeriesFromFileDialog.SelectedTimeseries;
     }
     else
     {
         MessageBox.Show("Failed to import potential evaporation timeseries");
     }
 }
예제 #2
0
 private void importObservedRunoffTimeseriesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ExtractTimeSeriesFromFile extractTimeSeriesFromFileDialog = new ExtractTimeSeriesFromFile();
     extractTimeSeriesFromFileDialog.ShowDialog();
     if (extractTimeSeriesFromFileDialog.SelectedTimeseries != null)
     {
         hydroCatEngine.InputObservedRunoff = extractTimeSeriesFromFileDialog.SelectedTimeseries;
     }
     else
     {
         MessageBox.Show("Failed to import observer runoff timeseries");
     }
 }
예제 #3
0
        private void importTimeseriesFromFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ExtractTimeSeriesFromFile extractTimeSeriesFromFile = new ExtractTimeSeriesFromFile();
            extractTimeSeriesFromFile.ShowDialog();

            if (extractTimeSeriesFromFile.SelectedTimeseries != null)
            {
                timeSeriesGroup.Items.Add(extractTimeSeriesFromFile.SelectedTimeseries);

                tsPlot.Visible = true;

                timeSeriesGroup.Current = timeSeriesGroup.Items.Count - 1;
                if (extractTimeSeriesFromFile.SelectedTimeseries is TimestampSeries)
                {
                    this.timestampSeriesGrid.TimeSeriesData = (TimestampSeries)extractTimeSeriesFromFile.SelectedTimeseries;
                    this.timespanSeriesGrid.Visible = false;
                    this.timestampSeriesGrid.Visible = true;
                }
                else if (extractTimeSeriesFromFile.SelectedTimeseries is TimespanSeries)
                {
                    this.timespanSeriesGrid.TimeSeriesData = (TimespanSeries)extractTimeSeriesFromFile.SelectedTimeseries;
                    this.timestampSeriesGrid.Visible = false;
                    this.timespanSeriesGrid.Visible = true;
                }
                else
                {
                    throw new Exception("Unexpected exception");
                }
            }
            
        }