예제 #1
0
        private VGPSHistorySection GetSection(Dictionary<VGPSInstallationInfo, IList<EGPSHistoryInfo>> dic, DateTime endTime,int size) 
        {
            List<EGPSHistoryInfo> list = new List<EGPSHistoryInfo>();
            foreach (KeyValuePair<VGPSInstallationInfo, IList<EGPSHistoryInfo>> ky in dic)
            {
                list.AddRange(ky.Value);
            }

            VGPSHistorySection section = new VGPSHistorySection();
            if (list.Count < size)
            {
                section.IsNext = false;
                section.NextBegin = endTime;
                section.NextEnd = endTime;
            }
            else 
            {
                section.IsNext = true;
                section.NextBegin = list[list.Count - 1].ReportTime;
                section.NextEnd = endTime;
            }

            return section;
        }
예제 #2
0
 private VGPSHistorySection GetSection(List<EGPSHistoryInfo> list, DateTime endTime, int size)
 {
     VGPSHistorySection section = new VGPSHistorySection();
     if (list.Count < size)
     {
         section.IsNext = false;
         section.NextBegin = endTime;
         section.NextEnd = endTime;
     }
     else
     {
         section.IsNext = true;
         section.NextBegin = list.Last().ReportTime;
         section.NextEnd = endTime;
     }
     return section;
 }