コード例 #1
0
ファイル: ReplayBoat.cs プロジェクト: brookpatten/VisualSail
 private ReplayBoat(SkipperDataSet.BoatRow row)
 {
     LoadFromRow(row);
     _currentMarkIndex = new TimeLineStatistic<int>(new Raw<int>("Current Mark", new AmphibianSoftware.VisualSail.Data.Statistics.Calculator.Int32.Calculator(), 0, StatisticType.other, StatisticUnit.other, StatisticUnit.other, "", false));
     _currentTackIndex = new TimeLineStatistic<int>(new Raw<int>("Current Tack", new AmphibianSoftware.VisualSail.Data.Statistics.Calculator.Int32.Calculator(), 1, StatisticType.other, StatisticUnit.other, StatisticUnit.other, "", false));
     _tacks = new List<Tack>();
     _boatDataRows = GetSensorReadings();
     InitializeStatistics();
 }
コード例 #2
0
ファイル: Boat.cs プロジェクト: brookpatten/VisualSail
 public SkipperDataSet.SensorReadingsDataTable GetSensorReadings(DateTime? start,DateTime? end)
 {
     SkipperDataSet.SensorReadingsDataTable dt = new SkipperDataSet.SensorReadingsDataTable();
     List<SensorFile> files = new List<SensorFile>();
     var query = from r in Persistance.Data.BoatFile.AsEnumerable()
                 join f in Persistance.Data.SensorReadings.AsEnumerable() on r.sensorfile_id equals f.sensorfile_id
                 where 
                     r.boat_id == _id 
                     && (start==null || f.datetime >=start)
                     && (end == null || f.datetime <= end)
                 orderby f.datetime ascending
                 select f;
     foreach (SkipperDataSet.SensorReadingsRow r in query)
     {
         dt.ImportRow(r);
     }
     return dt;
 }