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); }
public bool ReadFromStream(Stream _D2MStreamSource) { _DTXReader = new DTXReader(this); bool _ret = _DTXReader.Open(_D2MStreamSource); _D2MStreamSource.Dispose(); return(_ret); }
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); }