visual studio 2010 C# 菜单项以及工具栏如何和同一form的按钮关联
菜单项Clean和Clean键实现同样的代码,我又不想重复按钮的代码,请问有什么办法将菜单Clean的click事件和Cancel键的Click事件关联起来?
private void tbClean_Click(object sender, EventArgs e) { txCal.ResetText(); txDesc.ResetText(); txFileName.ResetText(); txFullFillName.ResetText(); txRootVer.ResetText(); txSoft.ResetText(); txSubVer.ResetText(); txType.ResetText(); } private void cleanToolStripMenuItem_Click(object sender, EventArgs e) { } private void tlClean_Click(object sender, EventArgs e) { }