Esempio n. 1
0
        public FitUserProfile(UserProfileMesg msg)
        {
            ActivityClass              = msg.GetActivityClass();
            Age                        = msg.GetAge();
            DefaultMaxBikingHeartRate  = msg.GetDefaultMaxBikingHeartRate();
            DefaultMaxHeartRate        = msg.GetDefaultMaxHeartRate();
            DefaultMaxRunningHeartRate = msg.GetDefaultMaxRunningHeartRate();
            DiveCount                  = msg.GetDiveCount();
            FriendlyName               = msg.GetFriendlyNameAsString();
            Gender                     = msg.GetGender();
            //msg.GetGlobalId();
            Height   = msg.GetHeight();
            Language = msg.GetLanguage();
            LocalId  = msg.GetLocalId();
            //NumGlobalId = msg.GetNumGlobalId();
            RestingHeartRate      = msg.GetRestingHeartRate();
            SleepTime             = msg.GetSleepTime();
            UserRunningStepLength = msg.GetUserRunningStepLength();
            UserWalkingStepLength = msg.GetUserWalkingStepLength();
            WakeTime = msg.GetWakeTime();
            Weight   = msg.GetWeight();

            DepthSetting       = msg.GetDepthSetting();
            DistSetting        = msg.GetDistSetting();
            ElevSetting        = msg.GetElevSetting();
            HeightSetting      = msg.GetHeightSetting();
            HrSetting          = msg.GetHrSetting();
            PositionSetting    = msg.GetPositionSetting();
            PowerSetting       = msg.GetPowerSetting();
            SpeedSetting       = msg.GetSpeedSetting();
            TemperatureSetting = msg.GetTemperatureSetting();
            WeightSetting      = msg.GetWeightSetting();
        }
Esempio n. 2
0
        void OnUserProfileMesg(object sender, MesgEventArgs e)
        {
            UserProfileMesg myUserProfile = (UserProfileMesg)e.mesg;

            try
            {
                tGender.Text       = myUserProfile.GetGender().ToString();
                tAge.Text          = myUserProfile.GetAge().ToString();
                tHeight.Text       = myUserProfile.GetHeight().ToString() + " m";
                tWeightKg.Text     = myUserProfile.GetWeight().ToString() + " kg";
                tHeartResting.Text = myUserProfile.GetRestingHeartRate().ToString() + " bpm";
                tHeartMax.Text     = myUserProfile.GetDefaultMaxBikingHeartRate().ToString() + " bpm";
            }
            catch (FitException exception)
            {
                Debug.WriteLine(string.Format("\tOnUserProfileMesg Error {0}", exception.Message));
                Debug.WriteLine(string.Format("\t{0}", exception.InnerException));
            }
        }