Esempio n. 1
0
 public void Write(Class741 dataStore, DxfWriter w)
 {
     this.class741_0 = dataStore;
     w.Write(0, (object)"SECTION");
     w.Write(2, (object)"ACDSDATA");
     w.Write(70, (object)(short)2);
     w.Write(71, (object)(short)2);
     foreach (Class48 schema in dataStore.Schemas)
     {
         schema.Write(w);
     }
     foreach (KeyValuePair <ulong, List <Stream> > keyValuePair in (Dictionary <ulong, List <Stream> >)dataStore.method_0(Enum53.const_2))
     {
         foreach (Stream stream in keyValuePair.Value)
         {
             Class1027 class1027  = new Class1027();
             Class496  class496_1 = new Class496();
             class496_1.Name     = "AcDbDs::ID";
             class496_1.DataType = Enum26.const_9;
             Class496 class496_2 = class496_1;
             class496_2.Data = new Struct18(320, (object)keyValuePair.Key);
             class1027.Columns.Add(class496_2);
             Class496 class496_3 = new Class496();
             class496_3.Name     = "ASM_Data";
             class496_3.DataType = Enum26.const_14;
             Class496 class496_4 = class496_3;
             class496_4.Data = new Struct18(310, (object)stream);
             class1027.Columns.Add(class496_4);
             class1027.Write(w);
         }
     }
     w.Write(0, (object)"ENDSEC");
 }
Esempio n. 2
0
            public void Read(out Class741 dataStore, DxfReader r)
            {
                dataStore       = new Class741(false);
                this.class741_0 = dataStore;
                while (r.CurrentGroup != Class824.struct18_1 && r.CurrentGroup != Struct18.struct18_0)
                {
                    if (r.CurrentGroup.Code == 0)
                    {
                        switch ((string)r.CurrentGroup.Value)
                        {
                        case "ACDSSCHEMA":
                            Class48 class48 = new Class48();
                            class48.Read(r);
                            dataStore.Schemas.Add(class48);
                            continue;

                        case "ACDSRECORD":
                            Class1027 class1027 = new Class1027();
                            class1027.Read(r);
                            if (class1027.Columns.Count == 2 && class1027.Columns[0].Name == "AcDbDs::ID" && class1027.Columns[1].Name == "ASM_Data")
                            {
                                Class496 column1 = class1027.Columns[0];
                                Class496 column2 = class1027.Columns[1];
                                ulong    handle  = (ulong)column1.Data.Value;
                                Stream   data    = (Stream)column2.Data.Value;
                                dataStore.Add(Enum53.const_2, handle, data);
                                continue;
                            }
                            continue;

                        default:
                            r.method_85();
                            continue;
                        }
                    }
                    else
                    {
                        r.method_85();
                    }
                }
            }