示例#1
0
        public static void OnFileIDMesg(object sender, MesgEventArgs e)
        {
            FileIdValues values = new FileIdValues();
            FileIdMesg   mesg   = (FileIdMesg)e.mesg;

            try
            {
                values._fileType     = mesg.GetType();
                values._manufacturer = mesg.GetManufacturer();
                values._product      = mesg.GetProduct();
                values._serialNumber = mesg.GetSerialNumber();

                //Make sure properties with sub properties arent null before trying to create objects based on them
                if (mesg.GetTimeCreated() != null)
                {
                    uint tc = (uint)mesg.GetFieldValue("TimeCreated");
                    values._timeCreated = FitConvert.ToLocalDateTime(tc);
                }
            }
            catch (FitException exception)
            {
                Console.WriteLine("\tOnFileIDMesg Error {0}", exception.Message);
                Console.WriteLine("\t{0}", exception.InnerException);
            }
            DataManager.Instance.FileIdValues.Add(values);
        }
示例#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();
 }