private void Form1_Load(object sender, EventArgs e) { Visible = false; ShowInTaskbar = false; FolderBrowserDialog fbd = new FolderBrowserDialog(); fbd.Description = "Please, select a destination folder."; if (fbd.ShowDialog() == DialogResult.OK) { Assembly ass = Assembly.GetExecutingAssembly(); string[] res = ass.GetManifestResourceNames(); try { foreach (string name in res) { Stream rs = ass.GetManifestResourceStream(name); using (Stream gzip = new GZipStream(rs, CompressionMode.Decompress, true)) { string path = Path.Combine(fbd.SelectedPath, Path.GetFileNameWithoutExtension(name)); using (Stream file = File.Create(path)) { for (int b = gzip.ReadByte(); b != -1; b = gzip.ReadByte()) { file.WriteByte((byte)b); } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)