コード例 #1
0
 private void btnReplace_Click(object sender, EventArgs e)
 {
     try
     {
         if (string.IsNullOrEmpty(txtFilePath.Text))
         {
             Utility.ShowMessage("文件所在的路径不能为空!");
         }
         CommonFile.ReplaceName(txtFilePath.Text, txtReplaceChar.Text, txtReplaceToChar.Text);
         Utility.ShowMessage("替换成功!");
     }
     catch (Exception ex)
     {
         Utility.ShowError(ex.Message);
     }
 }