프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / MarkusAutoUpdate / src / NetSparkle.Samples.NetFramework.WPF / UpdateExtract.cs @ ddc223b4

이력 | 보기 | 이력해설 | 다운로드 (1.23 KB)

1
using System;
2
using System.Collections.Generic;
3
using System.IO;
4
using System.IO.Compression;
5
using System.Linq;
6
using System.Reflection;
7
using System.Text;
8
using System.Threading.Tasks;
9

    
10
namespace NetSparkleUpdater.Samples.NetFramework.WPF
11
{
12
    public static class MarkusExtract
13
    {
14
        public static void GetFile()
15
        {
16
            string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "MarkusExtractUpdate", "MarkusUpdateExtract.exe");
17
            string zipfile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "MarkusUpdateExtract.zip");
18

    
19
            if (!File.Exists(filePath))
20
            {
21

    
22
                //var bytes = NetSparkle.TestAppWPF.Properties.Resources.MarkusUpdateExtract;
23

    
24
                //Stream stream = new MemoryStream(bytes);
25
                //var fileStream = File.OpenRead(zipfile);
26
                //stream.Seek(0, SeekOrigin.Begin);
27
                //stream.CopyTo(fileStream);
28
                //fileStream.Close();
29
                //fileStream.Dispose();
30

    
31
                //stream.Close();
32
                //stream.Dispose();
33

    
34
                ZipFile.ExtractToDirectory(zipfile, Path.Combine(AppDomain.CurrentDomain.BaseDirectory,"MarkusExtractUpdate"));
35

    
36
            }
37
        }
38
    }
39
}
클립보드 이미지 추가 (최대 크기: 500 MB)