Exemple #1
0
        void zipFile()
        {
            string         destinationFile = null;
            string         sourceDirectory = tempDirectory;
            SaveFileDialog saveFileDialog  = new SaveFileDialog();

            saveFileDialog.AddExtension  = true;
            saveFileDialog.ValidateNames = true;
            saveFileDialog.Filter        = "Office Files|" + loadedFileExt;

            DialogResult dialogResult = saveFileDialog.ShowDialog();

            if (dialogResult == DialogResult.OK)
            {
                destinationFile = saveFileDialog.FileName;
            }
            else
            {
                MessageBox.Show("Wystąpił błąd! Spróbuj ponownie.", "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            ZIPService.zip(sourceDirectory, destinationFile);
        }
Exemple #2
0
 void unzipFile(string file)
 {
     ZIPService.unzip(file);
 }