示例#1
0
        /// <summary>
        /// Read all data from disk
        /// </summary>
        public void DataRead()
        {
            SensorData = SensorProject.Current.DataStore.RetrieveData(this);

            // Set most recent collect time, if one is available
            var most_recent_record = SensorData.GetLastData();

            if (most_recent_record != null)
            {
                LastCollectTime = most_recent_record.Time;
            }
            else
            {
                LastCollectTime = DateTime.MinValue;
            }

            // Determine last exception message
            var ex = SensorData.GetLastException();

            if (ex != null && !ex.Cleared)
            {
                LastException = ex.Description;
            }
        }