Example #1
0
 public Course(string name, DateTime date, Lake lake)
 {
     _name                = name;
     _date                = date;
     _lakeId              = lake.Id;
     _directionType       = WindDirectionType.ConstantManual;
     _manualWindDirection = 0.0;
     _new     = true;
     _changed = true;
 }
Example #2
0
 public Course(string name,DateTime date, Lake lake)
 {
     _name = name;
     _date = date;
     _lakeId = lake.Id;
     _directionType = WindDirectionType.ConstantManual;
     _manualWindDirection = 0.0;
     _new = true;
     _changed = true;
 }
Example #3
0
 private Course(SkipperDataSet.CourseRow row)
 {
     _id     = row.id;
     _name   = row.name;
     _lakeId = row.lake_id;
     _date   = row.date;
     try
     {
         if (row.wind_direction_type == "ConstantCourse")
         {
             _directionType           = WindDirectionType.ConstantCourse;
             _windDirectionFromMarkId = row.wind_direction_from_mark_id;
             _windDirectionToMarkId   = row.wind_direction_to_mark_id;
         }
         else if (row.wind_direction_type == "ConstantManual")
         {
             _directionType       = WindDirectionType.ConstantManual;
             _manualWindDirection = row.manual_wind_direction;
         }
         else if (row.wind_direction_type == "DynamicSensor")
         {
             _directionType = WindDirectionType.DynamicSensor;
             throw new Exception("Dynamic Wind Sensors are not supported... yet.");
         }
         else if (row.wind_direction_type == null || row.wind_direction_type == "")
         {
             _directionType       = WindDirectionType.ConstantManual;
             _manualWindDirection = 0.0;
         }
         else
         {
             throw new Exception("Unknown Wind Direction Type");
         }
     }
     catch//(Exception e)
     {
         _directionType       = WindDirectionType.ConstantManual;
         _manualWindDirection = 0.0;
     }
     _new     = false;
     _changed = false;
 }
Example #4
0
 private Course(SkipperDataSet.CourseRow row)
 {
     _id = row.id;
     _name = row.name;
     _lakeId = row.lake_id;
     _date = row.date;
     try
     {
         if (row.wind_direction_type == "ConstantCourse")
         {
             _directionType = WindDirectionType.ConstantCourse;
             _windDirectionFromMarkId = row.wind_direction_from_mark_id;
             _windDirectionToMarkId = row.wind_direction_to_mark_id;
         }
         else if (row.wind_direction_type == "ConstantManual")
         {
             _directionType = WindDirectionType.ConstantManual;
             _manualWindDirection = row.manual_wind_direction;
         }
         else if (row.wind_direction_type == "DynamicSensor")
         {
             _directionType = WindDirectionType.DynamicSensor;
             throw new Exception("Dynamic Wind Sensors are not supported... yet.");
         }
         else if (row.wind_direction_type == null || row.wind_direction_type == "")
         {
             _directionType = WindDirectionType.ConstantManual;
             _manualWindDirection = 0.0;
         }
         else
         {
             throw new Exception("Unknown Wind Direction Type");
         }
     }
     catch//(Exception e)
     {
         _directionType = WindDirectionType.ConstantManual;
         _manualWindDirection = 0.0;
     }
     _new = false;
     _changed = false;
 }