Ejemplo n.º 1
0
        public static void UpdateTimeGroupData(ref byte[] timeSegmentData, TimeGroupService service)
        {
            Int32 index = service.TimeGroupId * 10;

            foreach (var timeSegmentId in service.TimeSegmentIds)
            {
                timeSegmentData[index++] = (byte)timeSegmentId;
            }
        }
Ejemplo n.º 2
0
        public static List <TimeGroupService> BuildServices(byte[] timeGroupData)
        {
            var timeGroupServices = new List <TimeGroupService>();

            for (int index = 0; index < Zd2911Utils.PassItemCount; index++)
            {
                var ids = new List <int>();
                ZeroToNineCollection.ForEach(num => ids.Add(timeGroupData[index * 10 + num]));
                var timeGroupService = new TimeGroupService()
                {
                    TimeGroupId = index, TimeSegmentIds = ids
                };

                timeGroupServices.Add(timeGroupService);
            }

            return(timeGroupServices);
        }