From 00c6a9377adc2b98b5f2e74da9fb87c84fbec736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=93=9D=E7=82=B9lilac?= Date: Thu, 10 Dec 2020 18:26:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controls/ShellSubMenuDialog.cs | 18 ++++++++++++++++++ .../Resources/Texts/GuidInfosDic.ini | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ContextMenuManager/Controls/ShellSubMenuDialog.cs b/ContextMenuManager/Controls/ShellSubMenuDialog.cs index 10413ee..ad28da7 100644 --- a/ContextMenuManager/Controls/ShellSubMenuDialog.cs +++ b/ContextMenuManager/Controls/ShellSubMenuDialog.cs @@ -481,9 +481,27 @@ namespace ContextMenuManager.Controls this.Owner = list; BtnMoveUp.MouseDown += (sender, e) => Owner.MoveItem(this, true); BtnMoveDown.MouseDown += (sender, e) => Owner.MoveItem(this, false); + SetItemTextValue(); } public PrivateMultiItemsList Owner { get; private set; } + + private void SetItemTextValue() + { + using(var key = RegistryEx.GetRegistryKey(this.RegPath, true)) + { + bool hasValue = false; + foreach(string valueName in new[] { "MUIVerb", "" }) + { + if(key.GetValue(valueName) != null) + { + hasValue = true; break; + } + } + if(!hasValue) key.SetValue("MUIVerb", this.ItemText); + } + + } } sealed class SeparatorItem : SubSeparatorItem diff --git a/ContextMenuManager/Properties/Resources/Texts/GuidInfosDic.ini b/ContextMenuManager/Properties/Resources/Texts/GuidInfosDic.ini index 2093705..03c3578 100644 --- a/ContextMenuManager/Properties/Resources/Texts/GuidInfosDic.ini +++ b/ContextMenuManager/Properties/Resources/Texts/GuidInfosDic.ini @@ -421,7 +421,7 @@ Text=Balabolka Icon=.\balabolka.exe,0 ;PowerToys PowerRename [0440049f-d1dc-4e46-b27b-98393d79486b] -Text=@*,-101 +Text=@*,-101 ;PowerToys调整图片大小 [51b4d7e5-7568-4234-b4bb-47fb3c016a69] Text=@*,-101 \ No newline at end of file