BluePointLilac / ContextMenuManager

🖱️ 纯粹的Windows右键菜单管理程序
https://bluepointlilac.github.io/ContextMenuManager
GNU General Public License v3.0
11.98k stars 607 forks source link

VisibleRegRuleItem 需要使用三态的Swich控件,以应对注册表中的值不存在,或不等于On也不等于Off的情况。 #175

Open heroboy opened 1 year ago

heroboy commented 1 year ago

https://github.com/BluePointLilac/ContextMenuManager/blob/fb5e135c1f6ea145201019766f3ef28f6941e9b0/ContextMenuManager/Controls/RuleItem.cs#L94-L114 根据这段代码会返回true。这是不对的。

例如: https://github.com/BluePointLilac/ContextMenuManager/blob/fb5e135c1f6ea145201019766f3ef28f6941e9b0/ContextMenuManager/Properties/Resources/Texts/DetailedEditDic.xml#L489-L505 在7-zip中CascadedMenu可能是非0非1的,以表示只显示哪些菜单项。如果强行在成0或1,就破坏了原始的状态。(至少要提示一下,原始的值并非OnValue也并非OffValue,做了更改是不可返回的)。 在我的机器上,ElimDupExtract默认也是不存在的,应该属于Off,但是根据上面的代码,却被认为是On。这也是不对的。