markus / MarkusAutoUpdate / src / NetSparkle.Samples.NetFramework.WPF / UpdateExtract.cs @ 3b938959
이력 | 보기 | 이력해설 | 다운로드 (1.23 KB)
1 | d8f5045e | taeseongkim | 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 | } |