更新3.3.1.0版本

This commit is contained in:
蓝点lilac
2021-05-15 04:10:30 +08:00
parent 1cac6c3648
commit fcba389c9d
12 changed files with 43 additions and 50 deletions

View File

@@ -58,8 +58,8 @@ namespace ContextMenuManager
private static readonly IniWriter ConfigWriter = new IniWriter(ConfigIni); private static readonly IniWriter ConfigWriter = new IniWriter(ConfigIni);
private static string GetGeneralValue(string key) => ConfigWriter.GetValue("General", key); private static string GetGeneralValue(string key) => ConfigWriter.GetValue("General", key);
private static void SetGeneralValue(string key, object value) => ConfigWriter.SetValue("General", key, value); private static void SetGeneralValue(string key, object value) => ConfigWriter.SetValue("General", key, value);
public static string LanguageIniPath => $@"{LangsDir}\{Language}.ini"; public static string LanguageIniPath => $@"{LangsDir}\{Language}.ini";
public static string Language public static string Language
{ {
get get

View File

@@ -241,6 +241,7 @@ namespace ContextMenuManager
public static string WinXSorted => GetValue("WinXSorted"); public static string WinXSorted => GetValue("WinXSorted");
public static string RestoreDefault => GetValue("RestoreDefault"); public static string RestoreDefault => GetValue("RestoreDefault");
public static string DeleteGroup => GetValue("DeleteGroup"); public static string DeleteGroup => GetValue("DeleteGroup");
public static string FailedToReadNetworkFile => GetValue("FailedToReadNetworkFile");
} }
/// <summary>其他文本</summary> /// <summary>其他文本</summary>

View File

@@ -34,7 +34,7 @@
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
@@ -151,6 +151,9 @@
<Compile Include="BluePointLilac.Methods\SingleInstance.cs" /> <Compile Include="BluePointLilac.Methods\SingleInstance.cs" />
<Compile Include="BluePointLilac.Methods\StringExtension.cs" /> <Compile Include="BluePointLilac.Methods\StringExtension.cs" />
<Compile Include="BluePointLilac.Methods\TextBoxExtension.cs" /> <Compile Include="BluePointLilac.Methods\TextBoxExtension.cs" />
<Compile Include="BluePointLilac.Methods\UAWebClient.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="BluePointLilac.Methods\WindowsOsVersion.cs" /> <Compile Include="BluePointLilac.Methods\WindowsOsVersion.cs" />
<Compile Include="BluePointLilac.Methods\ShellLink.cs" /> <Compile Include="BluePointLilac.Methods\ShellLink.cs" />
<Compile Include="BluePointLilac.Methods\WinXHasher.cs" /> <Compile Include="BluePointLilac.Methods\WinXHasher.cs" />

View File

@@ -291,12 +291,16 @@ namespace ContextMenuManager.Controls
cmbEngine.Items.AddRange(new[] { "Bing", "Baidu", "Google", "DuckDuckGo", "DogeDoge", "Sogou", "360", AppString.Other.CustomEngine }); cmbEngine.Items.AddRange(new[] { "Bing", "Baidu", "Google", "DuckDuckGo", "DogeDoge", "Sogou", "360", AppString.Other.CustomEngine });
cmbUpdate.Items.AddRange(new[] { AppString.Other.OnceAWeek, AppString.Other.OnceAMonth, AppString.Other.OnceASeason, AppString.Other.NeverCheck }); cmbUpdate.Items.AddRange(new[] { AppString.Other.OnceAWeek, AppString.Other.OnceAMonth, AppString.Other.OnceASeason, AppString.Other.NeverCheck });
lblUpdate.Click += (sender, e) => Updater.Update(true);
this.VisibleChanged += (sender, e) => this.Enabled = this.Visible;
btnConfigDir.MouseDown += (sender, e) => ExternalProgram.JumpExplorer(AppConfig.ConfigDir); btnConfigDir.MouseDown += (sender, e) => ExternalProgram.JumpExplorer(AppConfig.ConfigDir);
btnBackupDir.MouseDown += (sender, e) => ExternalProgram.JumpExplorer(AppConfig.BackupDir); btnBackupDir.MouseDown += (sender, e) => ExternalProgram.JumpExplorer(AppConfig.BackupDir);
lblUpdate.Click += (sender, e) => cmbRepo.SelectionChangeCommitted += (sender, e) => AppConfig.RequestUseGithub = cmbRepo.SelectedIndex == 0;
{ chkBackup.MouseDown += (sender, e) => AppConfig.AutoBackup = chkBackup.Checked = !chkBackup.Checked;
if(!Updater.Update()) MessageBoxEx.Show(AppString.Message.VersionIsLatest); chkProtect.MouseDown += (sender, e) => AppConfig.ProtectOpenItem = chkProtect.Checked = !chkProtect.Checked;
}; chkWinXSortable.MouseDown += (sender, e) => AppConfig.WinXSortable = chkWinXSortable.Checked = !chkWinXSortable.Checked;
chkOpenMoreRegedit.MouseDown += (sender, e) => AppConfig.OpenMoreRegedit = chkOpenMoreRegedit.Checked = !chkOpenMoreRegedit.Checked;
chkHideDisabledItems.MouseDown += (sender, e) => AppConfig.HideDisabledItems = chkHideDisabledItems.Checked = !chkHideDisabledItems.Checked;
cmbConfigDir.SelectionChangeCommitted += (sender, e) => cmbConfigDir.SelectionChangeCommitted += (sender, e) =>
{ {
string newPath = (cmbConfigDir.SelectedIndex == 0) ? AppConfig.AppDataConfigDir : AppConfig.AppConfigDir; string newPath = (cmbConfigDir.SelectedIndex == 0) ? AppConfig.AppDataConfigDir : AppConfig.AppConfigDir;
@@ -349,13 +353,6 @@ namespace ContextMenuManager.Controls
} }
AppConfig.UpdateFrequency = day; AppConfig.UpdateFrequency = day;
}; };
this.VisibleChanged += (sender, e) => this.Enabled = this.Visible;
cmbRepo.SelectionChangeCommitted += (sender, e) => AppConfig.RequestUseGithub = cmbRepo.SelectedIndex == 0;
chkBackup.MouseDown += (sender, e) => AppConfig.AutoBackup = chkBackup.Checked = !chkBackup.Checked;
chkProtect.MouseDown += (sender, e) => AppConfig.ProtectOpenItem = chkProtect.Checked = !chkProtect.Checked;
chkWinXSortable.MouseDown += (sender, e) => AppConfig.WinXSortable = chkWinXSortable.Checked = !chkWinXSortable.Checked;
chkOpenMoreRegedit.MouseDown += (sender, e) => AppConfig.OpenMoreRegedit = chkOpenMoreRegedit.Checked = !chkOpenMoreRegedit.Checked;
chkHideDisabledItems.MouseDown += (sender, e) => AppConfig.HideDisabledItems = chkHideDisabledItems.Checked = !chkHideDisabledItems.Checked;
chkShowFilePath.MouseDown += (sender, e) => chkShowFilePath.MouseDown += (sender, e) =>
{ {
chkShowFilePath.Checked = !chkShowFilePath.Checked; chkShowFilePath.Checked = !chkShowFilePath.Checked;

View File

@@ -1,5 +1,6 @@
using BluePointLilac.Methods; using BluePointLilac.Methods;
using System; using System;
using System.ComponentModel;
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
@@ -80,13 +81,11 @@ namespace ContextMenuManager.Controls
string[] values = lines[n].Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries); string[] values = lines[n].Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
dgvDonate.Rows.Add(values); dgvDonate.Rows.Add(values);
} }
dgvDonate.Sort(dgvDonate.Columns[0], ListSortDirection.Descending);
DateTime date = new DateTime(); DateTime date = Convert.ToDateTime(dgvDonate.Rows[0].Cells[0].Value);
float money = 0; float money = 0;
foreach(DataGridViewRow row in dgvDonate.Rows) foreach(DataGridViewRow row in dgvDonate.Rows)
{ {
DateTime temp = Convert.ToDateTime(row.Cells[0].Value);
if(temp > date) date = temp;
money += Convert.ToSingle(row.Cells[3].Value); money += Convert.ToSingle(row.Cells[3].Value);
} }
dgvDonate.Columns[4].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; dgvDonate.Columns[4].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

View File

@@ -40,7 +40,7 @@ namespace ContextMenuManager.Controls
{ {
if(valueXN == null) return; if(valueXN == null) return;
XmlNode szXN = valueXN.SelectSingleNode("REG_SZ"); XmlNode szXN = valueXN.SelectSingleNode("REG_SZ");
XmlNode binaryXN = valueXN.SelectSingleNode("REG_SZ"); XmlNode binaryXN = valueXN.SelectSingleNode("REG_BINARY");
XmlNode dwordXN = valueXN.SelectSingleNode("REG_DWORD"); XmlNode dwordXN = valueXN.SelectSingleNode("REG_DWORD");
XmlNode expand_szXN = valueXN.SelectSingleNode("REG_EXPAND_SZ"); XmlNode expand_szXN = valueXN.SelectSingleNode("REG_EXPAND_SZ");
using(RegistryKey key = RegistryEx.GetRegistryKey(regPath, true, true)) using(RegistryKey key = RegistryEx.GetRegistryKey(regPath, true, true))

View File

@@ -33,7 +33,7 @@ namespace ContextMenuManager.Controls
this.AddItem(groupItem); this.AddItem(groupItem);
XmlDocument doc = new XmlDocument(); XmlDocument doc = new XmlDocument();
try { doc.LoadXml(File.ReadAllText(xmlPath, EncodingType.GetType(xmlPath))); } try { doc.LoadXml(File.ReadAllText(xmlPath, EncodingType.GetType(xmlPath))); }
catch { return; } catch { throw; }
foreach(XmlNode xn in doc.DocumentElement.ChildNodes) foreach(XmlNode xn in doc.DocumentElement.ChildNodes)
{ {
try try
@@ -167,7 +167,6 @@ namespace ContextMenuManager.Controls
{ {
if(!tip.IsNullOrWhiteSpace()) tip += "\n"; if(!tip.IsNullOrWhiteSpace()) tip += "\n";
tip += AppString.Tip.CommandFiles; tip += AppString.Tip.CommandFiles;
//if(System.Diagnostics.Debugger.IsAttached) item.ChkVisible.Checked = item.ItemVisible = true;//调试状态
} }
MyToolTip.SetToolTip(item.ChkVisible, tip); MyToolTip.SetToolTip(item.ChkVisible, tip);
this.AddItem(item); this.AddItem(item);
@@ -199,7 +198,6 @@ namespace ContextMenuManager.Controls
public static bool JudgeOSVersion(XmlElement itemXE) public static bool JudgeOSVersion(XmlElement itemXE)
{ {
//if(System.Diagnostics.Debugger.IsAttached) return true;//调试状态
bool JudgeOne(XmlElement osXE) bool JudgeOne(XmlElement osXE)
{ {
Version ver = new Version(osXE.InnerText); Version ver = new Version(osXE.InnerText);
@@ -232,7 +230,6 @@ namespace ContextMenuManager.Controls
private static bool FileExists(XmlElement itemXE) private static bool FileExists(XmlElement itemXE)
{ {
//if(System.Diagnostics.Debugger.IsAttached) return true;//调试状态
foreach(XmlElement feXE in itemXE.SelectNodes("FileExists")) foreach(XmlElement feXE in itemXE.SelectNodes("FileExists"))
{ {
string path = Environment.ExpandEnvironmentVariables(feXE.InnerText); string path = Environment.ExpandEnvironmentVariables(feXE.InnerText);
@@ -242,6 +239,8 @@ namespace ContextMenuManager.Controls
} }
public static byte[] ConvertToBinary(string value) public static byte[] ConvertToBinary(string value)
{
try
{ {
string[] strs = value.Split(' '); string[] strs = value.Split(' ');
byte[] bs = new byte[strs.Length]; byte[] bs = new byte[strs.Length];
@@ -251,5 +250,7 @@ namespace ContextMenuManager.Controls
} }
return bs; return bs;
} }
catch { return null; }
}
} }
} }

View File

@@ -11,5 +11,5 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
[assembly: Guid("35190ec1-2515-488d-a2e9-825d6ff67aa2")] [assembly: Guid("35190ec1-2515-488d-a2e9-825d6ff67aa2")]
[assembly: AssemblyVersion("3.3.0.0")] [assembly: AssemblyVersion("3.3.1.0")]
[assembly: AssemblyFileVersion("3.3.0.0")] [assembly: AssemblyFileVersion("3.3.1.0")]

View File

@@ -105,7 +105,7 @@ namespace ContextMenuManager.Properties {
///;翻译可帮助作者为此程序提供翻译并提交到Github以下内容中等号右侧内容替换为翻译文本 ///;翻译可帮助作者为此程序提供翻译并提交到Github以下内容中等号右侧内容替换为翻译文本
///;General-Translator为翻译贡献者General-Language为语言名称如en-US 美国英语 ///;General-Translator为翻译贡献者General-Language为语言名称如en-US 美国英语
///;翻译文件保存在Config\languages目录中文件名保存为en-US.ini ///;翻译文件保存在Config\languages目录中文件名保存为en-US.ini
///;翻译说明:暂时不翻译的值保留为空即可,字典内赋值换行使用\n进行转义 ///;翻译说明:暂时不翻译的值保留为空即可,字典内赋值换行使用\r\n或\n进行转义
/// ///
///[General] ///[General]
///Language = zh-CN 简体中文 ///Language = zh-CN 简体中文
@@ -126,7 +126,7 @@ namespace ContextMenuManager.Properties {
///Background = 目录背景 ///Background = 目录背景
///Desktop = 桌面背景 ///Desktop = 桌面背景
///Drive = 磁盘分区 ///Drive = 磁盘分区
///AllObjects [字符串的其余部分被截断]&quot;; 的本地化字符串。 ///AllObje [字符串的其余部分被截断]&quot;; 的本地化字符串。
/// </summary> /// </summary>
internal static string AppLanguageDic { internal static string AppLanguageDic {
get { get {
@@ -407,7 +407,7 @@ namespace ContextMenuManager.Properties {
/// <summary> /// <summary>
/// 查找类似 &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; /// 查找类似 &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
///&lt;!-- 微软在Win10右键菜单中新增的UWP模块, 非Shell、ShellEx类型, ///&lt;!-- 微软在Win10右键菜单中新增的UWP模块, 非Shell、ShellEx类型,
///但是可通过GUID锁定屏蔽来禁用右键菜单项目, ///但是可通过GUID锁定屏蔽来禁用相关右键菜单项目,
///GUID查找位置HKEY_CLASSES_ROOT\PackagedCom\Package\[包名]\Class\[GUID], ///GUID查找位置HKEY_CLASSES_ROOT\PackagedCom\Package\[包名]\Class\[GUID],
///Scene的各子节点为菜单项目出现位置, Item必须有Guid属性 ///Scene的各子节点为菜单项目出现位置, Item必须有Guid属性
///UwpName、Text、Icon、Tip等属性写在GuidInfosDic.ini里面--&gt; ///UwpName、Text、Icon、Tip等属性写在GuidInfosDic.ini里面--&gt;
@@ -420,8 +420,7 @@ namespace ContextMenuManager.Properties {
/// &lt;Item Guid=&apos;9f156763-7844-4dc4-b2b1-901f640f5155&apos;/&gt; /// &lt;Item Guid=&apos;9f156763-7844-4dc4-b2b1-901f640f5155&apos;/&gt;
/// &lt;/Directory&gt; /// &lt;/Directory&gt;
/// &lt;Background&gt; /// &lt;Background&gt;
/// &lt;Item Guid=&apos;9f156763-7844-4dc4-b2b1-901f640f5155&apos;/&gt; /// &lt;Item Guid=&apos;9f156763-7844-4dc4-b2b1-901f640f5155 [字符串的其余部分被截断]&quot;; 的本地化字符串。
/// &lt;/Backg [字符串的其余部分被截断]&quot;; 的本地化字符串。
/// </summary> /// </summary>
internal static string UwpModeItemsDic { internal static string UwpModeItemsDic {
get { get {

View File

@@ -209,6 +209,7 @@ AuthorityProtection = 此菜单注册表项目可能受安全软件保护,\r\n
WinXSorted = 为优化排序功能已对部分项目重新编号,\r\n需要重启文件资源管理器应用效果 WinXSorted = 为优化排序功能已对部分项目重新编号,\r\n需要重启文件资源管理器应用效果
RestoreDefault = 确认还原为默认菜单项目? RestoreDefault = 确认还原为默认菜单项目?
DeleteGroup = 确认永久删除此组及组内所有菜单项目? DeleteGroup = 确认永久删除此组及组内所有菜单项目?
FailedToReadNetworkFile = 网络文件读取失败!
[Tip] [Tip]
RestartExplorer = 重启Explorer会使桌面闪烁片刻, 正常现象无需担心,\r\n或者你也可以稍后重启或注销计算机使你的操作生效 RestartExplorer = 重启Explorer会使桌面闪烁片刻, 正常现象无需担心,\r\n或者你也可以稍后重启或注销计算机使你的操作生效

View File

@@ -279,15 +279,6 @@ Tip属性为鼠标悬浮在开关上时的提示信息从每个Item节点开
<Command Default='osk.exe'/> <Command Default='osk.exe'/>
</SubKey> </SubKey>
</Item> </Item>
<Item KeyName='OpenEdge'>
<OSVersion Compare=">=">10.0</OSVersion>
<Value>
<REG_SZ MUIVerb='打开Edge' Icon='%SystemRoot%\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe'/>
</Value>
<SubKey>
<Command Default='explorer.exe shell:Appsfolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge'/>
</SubKey>
</Item>
<Item KeyName='ShutDownMenu'> <Item KeyName='ShutDownMenu'>
<Value> <Value>
<REG_SZ MUIVerb='关机选项' Icon='shell32.dll,-28' SubCommands='' Position='bottom'/> <REG_SZ MUIVerb='关机选项' Icon='shell32.dll,-28' SubCommands='' Position='bottom'/>

View File

@@ -209,6 +209,7 @@ AuthorityProtection = 此菜单注册表项目可能受安全软件保护,\r\n
WinXSorted = 为优化排序功能已对部分项目重新编号,\r\n需要重启文件资源管理器应用效果 WinXSorted = 为优化排序功能已对部分项目重新编号,\r\n需要重启文件资源管理器应用效果
RestoreDefault = 确认还原为默认菜单项目? RestoreDefault = 确认还原为默认菜单项目?
DeleteGroup = 确认永久删除此组及组内所有菜单项目? DeleteGroup = 确认永久删除此组及组内所有菜单项目?
FailedToReadNetworkFile = 网络文件读取失败!
[Tip] [Tip]
RestartExplorer = 重启Explorer会使桌面闪烁片刻, 正常现象无需担心,\r\n或者你也可以稍后重启或注销计算机使你的操作生效 RestartExplorer = 重启Explorer会使桌面闪烁片刻, 正常现象无需担心,\r\n或者你也可以稍后重启或注销计算机使你的操作生效