Ejemplo n.º 1
0
        public static void SaveProgramFile(string in_file_name, TVCMemory in_memory)
        {
            using (FileStream cas_stream = new FileStream(in_file_name, FileMode.Create, FileAccess.ReadWrite, FileShare.None, 4096))
            {
                ProgramStorage storage = new ProgramStorage();

                // get memory content
                in_memory.SaveToProgramStorage(storage);

                SaveCAS(cas_stream, storage);
            }
        }
Ejemplo n.º 2
0
        public static void SaveProgramFile(string in_file_name, TVCMemory in_memory, BASFile.EncodingType in_encoding)
        {
            using (FileStream bas_stream = new FileStream(in_file_name, FileMode.Create, FileAccess.ReadWrite, FileShare.None, 4096))
            {
                ProgramStorage storage = new ProgramStorage();

                // get memory content
                in_memory.SaveToProgramStorage(storage);

                BASFile bas_file = new BASFile();
                bas_file.Encoding = in_encoding;
                bas_file.Save(bas_stream, storage);
            }
        }