Exemplo n.º 1
0
        public bool ReadFromStream(Stream _D2MStreamSource, bool writeToFile = false, string filePath = "")
        {
            _DTXReader = new DTXReader(this);
            bool _ret = _DTXReader.Open(_D2MStreamSource, writeToFile, filePath);

            _D2MStreamSource.Dispose();
            return(_ret);
        }
Exemplo n.º 2
0
        public Stream ReadFromStreamAndDecompress(Stream _D2MStreamSource)
        {
            _DTXReader = new DTXReader(this);
            Stream _ret = _DTXReader.Decompress(_D2MStreamSource);

            _D2MStreamSource.Dispose();
            return(_ret);
        }
Exemplo n.º 3
0
        public bool ReadFromStream(Stream _D2MStreamSource)
        {
            _DTXReader = new DTXReader(this);
            bool _ret = _DTXReader.Open(_D2MStreamSource);

            _D2MStreamSource.Dispose();
            return(_ret);
        }
Exemplo n.º 4
0
        public bool ReadFromFile(string path)
        {
            Stream _D2MStreamSource = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read);

            _DTXReader = new DTXReader(this);
            bool _ret = _DTXReader.Open(_D2MStreamSource);

            if (_ret)
            {
                FilePath = path;
            }

            Trace.WriteLine(string.Format("{0} Ver:{1} Type:{2}", path, Header.Version, Header.ImgType));

            _D2MStreamSource.Dispose();
            return(_ret);
        }