Esempio n. 1
0
        public static void SetDefHemispheres( double lat, double lon )
        {
            char defHemisphereNS = lat > 0 ? 'N' : 'S';
              char defHemisphereEW = lon > 0 ? 'E' : 'W';

              {
            TrackerDataSetTableAdapters.ProcsAdapter procAdapters = new FlyTrace.TrackerDataSetTableAdapters.ProcsAdapter( );
            procAdapters.SetDefHemispheres(
              UserId,
              defHemisphereNS.ToString( ),
              defHemisphereEW.ToString( )
            );
              }

              lock ( UserProfiles )
              {
            UserProfileData existingProfile;
            if ( UserProfiles.TryGetValue( UserId, out existingProfile ) )
            {
              existingProfile.DefHemisphereNS = lat > 0 ? 'N' : 'S';
              existingProfile.DefHemisphereEW = lon > 0 ? 'E' : 'W';
            }
              }
        }