private void button2_Click(object sender, EventArgs e) { if (saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { using (FileSplit fs = new FileSplit()) { fs.Connect(textBox3.Text, saveFileDialog1.FileName); } } }