コード例 #1
0
        private DrawGeneratorInfo GetDefaultGenerateInfo()
        {
            var path = Path.Combine(Path.GetTempPath(), "Simple.SAMS.Defaults.pcdf");

            using (var stream = this.GetType().Assembly.GetManifestResourceStream(this.GetType(), "Defaults.pcdf"))
                using (var fileStream = File.OpenWrite(path))
                {
                    stream.CopyTo(fileStream);
                }

            var result = new DrawGeneratorInfo();

            result.Read(path);
            return(result);
        }
コード例 #2
0
        private DrawGeneratorInfo GetDefaultGenerateInfo()
        {
            var path = Path.Combine(Path.GetTempPath(), "Simple.SAMS.Defaults.pcdf");
            using (var stream = this.GetType().Assembly.GetManifestResourceStream(this.GetType(), "Defaults.pcdf"))
            using(var fileStream = File.OpenWrite(path))
            {
                stream.CopyTo(fileStream);
            }

            var result = new DrawGeneratorInfo();
            result.Read(path);
            return result;
        }