Exemple #1
0
        public bool Save()
        {
            if (mFileName == null || mBuffer == null)
            {
                return(false);
            }

            uint calc = new Crc16().Calc(ref mBuffer, 0x48, 0x6500);

            WriteNumber(0x22, 2, calc);
            WriteNumber(0x64FC, 2, calc);
            System.IO.File.WriteAllBytes(mFileName, mBuffer);
            return(true);
        }
Exemple #2
0
        public bool Export(String filename)
        {
            if (mFileName == null || mBuffer == null)
            {
                return(false);
            }

            uint calc = new Crc16().Calc(ref mBuffer, 0x48, 0x6500);

            WriteNumber(0x22, 2, calc);
            WriteNumber(0x64FC, 2, calc);
            Byte[] tmp = new Byte[mBuffer.Length - 8];
            Array.Copy(mBuffer, 8, tmp, 0, mBuffer.Length - 8);
            System.IO.File.WriteAllBytes(filename, tmp);
            return(true);
        }