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); }
void unzipFile(string file) { ZIPService.unzip(file); }