private string SelectPath() //彈出一個選擇目錄的對話框 { FolderBrowserDialog path = new FolderBrowserDialog(); path.ShowDialog(); return path.SelectedPath; } private string SelectFile() //彈出一個選擇文件的對話框 { OpenFileDialog file = new OpenFileDialog(); file.ShowDialog(); return file.SafeFileName; }