예제 #1
0
        public void SaveChunck(Chunck chunck)
        {
            try
            {
                XmlSerializer xmlSerializer = new XmlSerializer(this.GetType());
                xmlSerializer.Serialize(new StreamWriter(chunck.FileDirectory + chunck.FileName), chunck);
            }

            catch (Exception e)
            {
                Log.Messages.Add(e.Message);
            }
        }
예제 #2
0
        public void OpenChunck(Chunck chunck)
        {
            try
            {
                XmlSerializer xmlSerializer = new XmlSerializer(this.GetType());
                chunck = xmlSerializer.Deserialize(new StreamReader(chunck.FileDirectory + chunck.FileName)) as Chunck;
            }

            catch (Exception e)
            {
                Log.Messages.Add(e.Message);
            }
        }