Beispiel #1
0
        private void LoadCutting()
        {
            LC4Cutting cutting = new LC4Cutting();

            Byte[] pad;
            pad                 = m_fmt.ReadBytes(11);
            cutting.Name        = m_fmt.ReadString();
            cutting.SomeString1 = m_fmt.ReadString();
            cutting.Size1       = m_fmt.ReadNumeric();

            cutting.SomeInteger1 = m_fmt.ReadInt32();
            pad = m_fmt.ReadBytes(0x2);
            cutting.SomeInteger2 = m_fmt.ReadInt32();
            pad = m_fmt.ReadBytes(0x2);
            cutting.SomeInteger3 = m_fmt.ReadInt32();
            pad = m_fmt.ReadBytes(0x4);
            cutting.SomeInteger4 = m_fmt.ReadInt32();
            pad = m_fmt.ReadBytes(0x7);
            cutting.SomeInteger5 = m_fmt.ReadInt32();
            pad = m_fmt.ReadBytes(0x3);
            cutting.SomeString2 = m_fmt.ReadString();
            pad = m_fmt.ReadBytes(0x8);
            cutting.SomeInteger6 = m_fmt.ReadInt32();
            cutting.SheetIndex   = m_fmt.ReadInt32();
            pad = m_fmt.ReadBytes(0x7);
            cutting.SomeInteger8 = m_fmt.ReadInt32();

            pad = m_fmt.ReadBytes(0x7);
            Int32 operationsCount = m_fmt.ReadInt32();

            for (Int32 i = 0; i < operationsCount; i++)
            {
                LoadSection(cutting.Sections);
            }
            pad = m_fmt.ReadBytes(0x3);

            cutting.Size2         = m_fmt.ReadNumeric();
            cutting.SomeInteger9  = m_fmt.ReadInt32();
            cutting.SomeInteger10 = m_fmt.ReadInt32();
            cutting.SomeString3   = m_fmt.ReadString();

            pad = m_fmt.ReadBytes(6);
            cutting.SomeInteger11 = m_fmt.ReadInt32();
            pad = m_fmt.ReadBytes(10);

            Int32 variablesCount = m_fmt.ReadInt32();

            for (Int32 i = 0; i < variablesCount; i++)
            {
                cutting.Variables.Add(LoadVariable());
            }

            m_document.Cuttings.Add(cutting);

            cutting.SomeInteger12 = m_fmt.ReadInt32();
            pad = m_fmt.ReadBytes(3);
            cutting.ScrapsSquare  = m_fmt.ReadDouble();
            cutting.TotalSquare   = m_fmt.ReadDouble();
            cutting.RemainsCount  = m_fmt.ReadInt32();
            cutting.RemainsSquare = m_fmt.ReadDouble();
            cutting.DustSquare    = m_fmt.ReadDouble();
            cutting.DetailsCount  = m_fmt.ReadInt32();
            cutting.DetailsSquare = m_fmt.ReadDouble();
            cutting.ScrapPercent  = m_fmt.ReadDouble();
        }