日期:2014-05-17 浏览次数:21235 次
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
//更改文件名
private void button2_Click(object sender, EventArgs e)
{
if (textBox1.Text != textBox2.Text)
{
File.Move(textBox1.Text, textBox2.Text);
}
//就是这个位置,我想把 textBox1.Text 转换成字符串传递给c的函数,可以办到吗?
}
//选择文件
private void button1_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
textBox1.Text = openFileDialog1.FileName;
textBox2.Text = openFileDialog1.FileName;
}
}