private void btnPath_Click(object sender, EventArgs e) { string path = FrmDefault.ShowPath(); if (!string.IsNullOrEmpty(path)) { txtSource.Text = path; } }
/// <summary> /// ÏÔʾѡÔñ¿ò /// </summary> /// <returns></returns> public static string ShowPath() { using (FrmDefault frm = new FrmDefault()) { if (frm.ShowDialog() == DialogResult.OK) { return(frm._selectedPath); } } return(null); }