重命名控制方法在Windows窗体应用程序 [英] Rename control methods in Windows Forms application

查看:327
本文介绍了重命名控制方法在Windows窗体应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始在C#编码,并一直在试图让一个GUI应用程序。我做了一个菜单条和写了一些代码的菜单项。对于点击该菜单项的方法,自动命名为openToolStripMenuItem_Click。

I have just started coding in C#, and have been attempting to make a GUI application. I made a menu strip and wrote some code for one of the menu items. The method for clicking that menu item was automatically named "openToolStripMenuItem_Click".

在性能,我决定菜单项的名字从开放到拯救改变的,但该方法的名称保持不变,这是相当刺激性。我如何当我重新命名它的控制来自动调节方法名?

In the properties I decided to change the name of the menu item from "open" to "save", but the method name remains the same, which is quite irritating. How do I get it to automatically adjust the method names when I rename a control?

推荐答案

这不是自动完成。一个好方法是右键单击该方法名称,并使用重构+重命名。

This is not done automatically. A good way is to right-click the method name and use refactor + rename.

这篇关于重命名控制方法在Windows窗体应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆