我有一个 3 个单选按钮来控制几个文本框的状态,我为所有 3 个按钮使用一个事件,但是控制文本框的部分似乎可以流线更...必须有更好的方法处理这个事件然后我有什么
Private Sub rdo_SkipBitLockerY_CheckedChanged(sender As RadioButton, e As EventArgs) Handles rdo_SkipBitLockerY.CheckedChanged, rdo_SkipBitLockerN.CheckedChanged, rdo_SkipBitLockerU.CheckedChanged
Select Case sender.Name
Case "rdo_SkipBitLockerY"
txt_BDEDriveLetter.Enabled = True
txt_BDEDriveSize.Enabled = True
txt_BDEInstall.Enabled = True
txt_BDEInstallSuppress.Enabled = True
txt_BDERecoveryKey.Enabled = True
txt_TPMOwnerPassword.Enabled = True
txt_OSDBitLockerStartupKeyDrive.Enabled = True
txt_OSDBitLockerWaitForEncryption.Enabled = True
AttributeRDOTable("SkipBitLocker") = "YES"
Case "rdo_SkipBitLockerN"
txt_BDEDriveLetter.Enabled = False
txt_BDEDriveSize.Enabled = False
txt_BDEInstall.Enabled = False
txt_BDEInstallSuppress.Enabled = False
txt_BDERecoveryKey.Enabled = False
txt_TPMOwnerPassword.Enabled = False
txt_OSDBitLockerStartupKeyDrive.Enabled = False
txt_OSDBitLockerWaitForEncryption.Enabled = False
AttributeRDOTable("SkipBitLocker") = "NO"
Case Else
txt_BDEDriveLetter.Enabled = False
txt_BDEDriveSize.Enabled = False
txt_BDEInstall.Enabled = False
txt_BDEInstallSuppress.Enabled = False
txt_BDERecoveryKey.Enabled = False
txt_TPMOwnerPassword.Enabled = False
txt_OSDBitLockerStartupKeyDrive.Enabled = False
txt_OSDBitLockerWaitForEncryption.Enabled = False
AttributeRDOTable.Remove("SkipBitLocker")
End Select
我能做些什么来减少重复性?