public static void OnEventMesg(object sender, MesgEventArgs e)
        {
            EventValues values = new EventValues();
            EventMesg   mesg   = (EventMesg)e.mesg;

            try
            {
                values._event0    = mesg.GetEvent();
                values._eventType = mesg.GetEventType();
                values._data      = mesg.GetData();

                ////Make sure properties with sub properties arent null before trying to create objects based on them
                if (mesg.GetTimestamp() != null)
                {
                    uint tc = (uint)mesg.GetTimestamp().GetTimeStamp();
                    values._timestamp = FitConvert.ToLocalDateTime(tc);
                }
            }
            catch (FitException exception)
            {
                Console.WriteLine("\tOnFileIDMesg Error {0}", exception.Message);
                Console.WriteLine("\t{0}", exception.InnerException);
            }
            DataManager.Instance.EventValues.Add(values);
        }
Exemple #2
0
 private void ClearAdditionalValues()
 {
     WahooFF00Values.Clear();
     WahooFF01Values.Clear();
     ActivityValues.Clear();
     FileIdValues.Clear();
     DeviceInfoValues.Clear();
     WorkoutValues.Clear();
     FieldDescriptionValues.Clear();
     DeveloperDataIdValues.Clear();
     EventValues.Clear();
     SportValues.Clear();
 }