Well, I'm using openfiledialog
to open files, but the software needs to receive files or folders, because it compresses and zips ( .zip
) to then make a symmetric cipher.
I searched through a number of sites and the like, and I did not find a way to use the same dialog to open both types.
private void btn_criptografar_Click(object sender, EventArgs e)
{
//Abre o dialogo para abrir arquivos e pastas.
if (openFileCrypt.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
textBoxShowPath.Text = openFileCrypt.FileName;
FileStream inStream = File.OpenRead(textBoxShowPath.Text);