Inheritance: SECTION
Example #1
0
        public void Load()
        {
            Property prop = DXFData.Next();

            while (prop != null)
            {
                switch (prop.Value)
                {
                case "HEADER":
                    HEADER = new HEADER(DXFData, prop);
                    prop   = HEADER.ReadProperties();
                    break;

                case "CLASSES":
                    CLASSES = new CLASSES(DXFData, prop);
                    prop    = CLASSES.ReadProperties();
                    break;

                case "TABLES":
                    TABLES = new TABLES(DXFData, prop);
                    prop   = TABLES.ReadProperties();
                    break;

                case "BLOCKS":
                    BLOCKS = new BLOCKS(DXFData, prop);
                    prop   = BLOCKS.ReadProperties();
                    break;

                case "ENTITIES":
                    ENTITIES = new ENTITIES(DXFData, prop);
                    prop     = ENTITIES.ReadProperties();
                    break;

                case "OBJECTS":
                    OBJECTS = new OBJECTS(DXFData, prop);
                    prop    = OBJECTS.ReadProperties();
                    break;

                case "THUMBNAILIMAGE":
                    THUMBNAILIMAGE = new THUMBNAILIMAGE(DXFData, prop);
                    prop           = THUMBNAILIMAGE.ReadProperties();
                    break;

                default:
                    prop = DXFData.Next();
                    break;
                }
                //
            }

            //foreach (var item in ENTITIES.INSERTList)
            //{
            //    if (BLOCKS.BLOCKList.Any(x => x.C2 == item.C2 ) == false)
            //    {
            //        Debug.Print(item.C2);
            //    }
            //}

            foreach (var item in ENTITIES.Sons.GroupBy(x => x.V).Select(x => new { v = x.Key, c = x.Count() }).ToList())
            {
                if (item.v == "INSERT")
                {
                    var a = item;
                }
            }
        }
        public void Load()
        {
            Property prop = DXFData.Next();
            while (prop != null)
            {
                switch (prop.Value)
                {
                    case "HEADER":
                        HEADER = new HEADER(DXFData, prop);
                        prop = HEADER.ReadProperties();
                        break;
                    case "CLASSES":
                        CLASSES = new CLASSES(DXFData, prop);
                        prop = CLASSES.ReadProperties();
                        break;
                    case "TABLES":
                        TABLES = new TABLES(DXFData, prop);
                        prop = TABLES.ReadProperties();
                        break;
                    case "BLOCKS":
                        BLOCKS = new BLOCKS(DXFData, prop);
                        prop = BLOCKS.ReadProperties();
                        break;
                    case "ENTITIES":
                        ENTITIES = new ENTITIES(DXFData, prop);
                        prop = ENTITIES.ReadProperties();
                        break;
                    case "OBJECTS":
                        OBJECTS = new OBJECTS(DXFData, prop);
                        prop = OBJECTS.ReadProperties();
                        break;
                    case "THUMBNAILIMAGE":
                        THUMBNAILIMAGE = new THUMBNAILIMAGE(DXFData, prop);
                        prop = THUMBNAILIMAGE.ReadProperties();
                        break;
                    default:
                        prop = DXFData.Next();
                        break;
                }
                //
            }

            //foreach (var item in ENTITIES.INSERTList)
            //{
            //    if (BLOCKS.BLOCKList.Any(x => x.C2 == item.C2 ) == false)
            //    {
            //        Debug.Print(item.C2);
            //    }
            //}

            foreach (var item in ENTITIES.Sons.GroupBy(x => x.V).Select(x => new { v = x.Key, c = x.Count() }).ToList())
            {
                if (item.v == "INSERT")
                {
                    var a = item;
                }

            }
        }