如何制作禁用/启用功能?

问题描述:

我有删除功能,如何启用/禁用它?



我有一个ListBox与用户,所以当我选择其中一个我可以删除他。

我需要2个按钮:一个启用/禁用所以当我点击启用它启用时,列表框上的选项卡控件也可以过滤启用/禁用的用户



我不知道如何从这开始,我即时通讯使用MSVS 2015 RC和SQL server 2012

I have a delete funtion, how can I enable / disabled it?

I have a ListBox with users so when I select one of them I can delete him.
I need 2 buttons: one enable / disable so when I click enable it enabless, also a tab control on the listbox to filter enabled / disabled users

I have no idea on how to start with this, I im using MSVS 2015 RC AND SQL server 2012

让您的用户成为班级用户的成员。将 bool 启用成员添加到用户类并一致地使用它。
Make your users members of a class User. Add the bool enable member to User class and use it consistently.