コード例 #1
0
 private void cmbObsVars_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ODM != null)
     {
         var pck  = Package as IDataPackage;
         var site = cmbObsSite.SelectedItem as Site;
         var varb = cmbObsVars.SelectedItem as Variable;
         var ts   = ODM.GetTimeSeries(new QueryCriteria()
         {
             Start        = pck.StartOfLoading,
             End          = pck.EndOfLoading,
             SiteID       = site.ID,
             VariableID   = varb.ID,
             VariableName = varb.Name
         });
         if (ts != null)
         {
             var    derieved_ts = TimeSeriesAnalyzer.Derieve(ts, pck.NumericalDataType, pck.TimeUnits);
             string sereis      = string.Format("{1} at {0}", site.Name, varb.Name);
             if (btnCompareMode.Checked)
             {
                 var sim_site = cmbSimSite.SelectedItem as Site;
                 if (sim_site != null && sim_site.TimeSeries != null)
                 {
                     TimeSeriesAnalyzer.Compensate(derieved_ts, sim_site.TimeSeries);
                     winChart_timeseries.Plot <double>(derieved_ts.DateTimes, derieved_ts[0, ":", "0"], sereis);
                 }
             }
             else
             {
                 winChart_timeseries.Plot <double>(derieved_ts.DateTimes, derieved_ts[0, ":", "0"], sereis);
             }
         }
     }
 }
コード例 #2
0
 private void cmbObsVars_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ODM != null)
     {
         var site = cmbSite.SelectedItem as Site;
         var varb = cmbObsVars.SelectedItem as Variable;
         var ts   = ODM.GetTimeSeries(new QueryCriteria()
         {
             Start        = _SFROutputPackage.StartOfLoading,
             End          = _SFROutputPackage.EndOfLoading,
             SiteID       = site.ID,
             VariableID   = varb.ID,
             VariableName = varb.Name
         });
         if (ts != null)
         {
             var    derieved_ts = TimeSeriesAnalyzer.Derieve(ts, _SFROutputPackage.NumericalDataType, _SFROutputPackage.TimeUnits);
             string sereis      = string.Format("{1} at {0}", site.Name, varb.Name);
             winChart_timeseries.Plot <double>(derieved_ts.DateTimes, derieved_ts[0, ":", "0"], sereis);
         }
     }
 }