Exemplo n.º 1
0
 private void btn_createZip_Click(object sender, EventArgs e)
 {
     using (FolderBrowserDialog fbd = new FolderBrowserDialog())
     using (SaveFileDialog sfd = new SaveFileDialog())
     {
         sfd.Title = "Choose save location";
         fbd.Description = "Choose zip folder";
         if (sfd.ShowDialog() == DialogResult.OK && fbd.ShowDialog() == DialogResult.OK)
         {
             ZipPackageFile pack = new ZipPackageFile(fbd.SelectedPath, sfd.FileName);
         }
     }
 }
Exemplo n.º 2
0
        private void btn_openZip_Click(object sender, EventArgs e)
        {
            using (OpenFileDialog ofd = new OpenFileDialog())
            {
                ofd.Title = "Open XZip file";
                ofd.Filter = "All Files (*.*)|*.*|XZip Files (.360.zip)|*.360.zip";
                ofd.FilterIndex = 1;
                if (ofd.ShowDialog() == DialogResult.OK)
                {
                    this.m_zipPackage = new ZipPackageFile(ofd.FileName);
                    this.m_zipPackage.UnSerialize();
                    PopulateListView();
                    this.btn_addFile.Enabled = this.btn_deleteFile.Enabled = this.btn_extractFile.Enabled =
                        this.btn_updateFile.Enabled = this.tbx_rename.Enabled = this.btn_closeZip.Enabled =
                        this.btn_extractAllFiles.Enabled = this.btn_saveZip.Enabled = this.btn_rename.Enabled = true;

                }
            }
        }