Exemplo n.º 1
0
 public GeographicLocation([NotNull] string name, int slathour, int slatMinute, int slatSecond, int slongHour,
                           int slongMinute, int slongSecond, [NotNull] string slongDir, [NotNull] string slatDir, [NotNull] string connectionString,
                           [CanBeNull] TimeLimit lightTimeLimit, StrGuid guid, [CanBeNull] int?id = null) : base(name, id, TableName, connectionString, guid)
 {
     _latHour        = slathour;
     _latMinute      = slatMinute;
     _latSecond      = slatSecond;
     _longHour       = slongHour;
     _longMinute     = slongMinute;
     _longSecond     = slongSecond;
     _lightTimeLimit = lightTimeLimit;
     TypeDescription = "Geographic Location";
     if (slatDir.ToUpperInvariant().Trim() == "NORTH")
     {
         LatDirectionEnum = CalcSunriseTimes.LatitudeCoords.Direction.North;
     }
     else
     {
         LatDirectionEnum = CalcSunriseTimes.LatitudeCoords.Direction.South;
     }
     if (slongDir.ToUpperInvariant().Trim() == "EAST")
     {
         _longDirection = CalcSunriseTimes.LongitudeCoords.Direction.East;
     }
     else
     {
         _longDirection = CalcSunriseTimes.LongitudeCoords.Direction.West;
     }
 }
Exemplo n.º 2
0
        public GeographicLocation([NotNull] string connectionString, [CanBeNull] TimeLimit lightTimeLimit, StrGuid guid) : base("Chemnitz",
                                                                                                                                TableName, connectionString, guid)
        {
            _lightTimeLimit = lightTimeLimit;
            // dummy loc for unit tests
            _latDirection = CalcSunriseTimes.LatitudeCoords.Direction.North;
            _latHour      = 50;
            _latMinute    = 49;
            _latSecond    = 21;

            _longDirection  = CalcSunriseTimes.LongitudeCoords.Direction.East;
            _longHour       = 12;
            _longMinute     = 56;
            _longSecond     = 16;
            TypeDescription = "Geographic Location";
        }