コード例 #1
0
        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);
        }
コード例 #2
0
 public ExtendedRecordMesg(EventMesg mesg)
 {
     SetTimestamp(mesg.GetTimestamp());
     EventType = mesg.GetEventType() ?? EventType.Invalid;
 }