Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            OpenFileDialog dig = new OpenFileDialog();

            if (dig.ShowDialog() == DialogResult.OK)
            {
                using (ZipFileReader reader = new ZipFileReader(dig.FileName))
                {
                    string file = "MD" + Path.GetFileNameWithoutExtension(dig.FileName).Substring(2) + ".txt";
                    byte[] data = reader.ReadFile(file);
                    string temp = ASCIIEncoding.ASCII.GetString(data);
                }
            }
        }
Beispiel #2
0
 public void Setup()
 {
     _sut = new ZipFileReader(Path.Combine(TestContext.CurrentContext.TestDirectory, "test.zip"));
 }
 public override void Execute(string[] commandArgs)
 {
     const string FilePath = @"C:\Users\Rosen\Documents\GitHub\SupermarketsChain.git\trunk\Sources\Sales-Reports.zip";
     var zipFileReader = new ZipFileReader();
     this.Engine.OutputWriter.Write(zipFileReader.ReadZipFile(FilePath));
 }