예제 #1
0
        public void TestPgr()
        {
            var pgr = new Pgr();

            TestRoundTripEquality(pgr);
            pgr.PinIndexes = new ushort[] { 0, 1 };
            TestRoundTripEquality(pgr);
        }
예제 #2
0
        public PinGroupRecord(Pgr pgr, List <PinMapRecord> listPinMaps)
        {
            GroupIndex = pgr.GroupIndex;
            GroupName  = pgr.GroupName;

            if (listPinMaps == null)
            {
                throw new Exception("PinMaps in Null!");
            }

            listPins = new List <PinMapRecord>();
            foreach (var v in pgr.PinIndexes)
            {
                if (v < listPinMaps.Count)
                {
                    listPins.Add(listPinMaps.ElementAt(v));
                }
                else
                {
                    throw new Exception("PGR Cannot get pins from the PMRs!");
                }
            }
        }