Skip to content

Commit

Permalink
更新3.3.1.0版本
Browse files Browse the repository at this point in the history
  • Loading branch information
BluePointLilac committed May 14, 2021
1 parent 1cac6c3 commit fcba389
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 50 deletions.
2 changes: 1 addition & 1 deletion ContextMenuManager/AppConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ static AppConfig()
private static readonly IniWriter ConfigWriter = new IniWriter(ConfigIni);
private static string GetGeneralValue(string key) => ConfigWriter.GetValue("General", key);
private static void SetGeneralValue(string key, object value) => ConfigWriter.SetValue("General", key, value);

public static string LanguageIniPath => $@"{LangsDir}\{Language}.ini";

public static string Language
{
get
Expand Down
1 change: 1 addition & 0 deletions ContextMenuManager/AppString.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ public static class Message
public static string WinXSorted => GetValue("WinXSorted");
public static string RestoreDefault => GetValue("RestoreDefault");
public static string DeleteGroup => GetValue("DeleteGroup");
public static string FailedToReadNetworkFile => GetValue("FailedToReadNetworkFile");
}

/// <summary>其他文本</summary>
Expand Down
5 changes: 4 additions & 1 deletion ContextMenuManager/ContextMenuManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Optimize>true</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
Expand Down Expand Up @@ -151,6 +151,9 @@
<Compile Include="BluePointLilac.Methods\SingleInstance.cs" />
<Compile Include="BluePointLilac.Methods\StringExtension.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\ShellLink.cs" />
<Compile Include="BluePointLilac.Methods\WinXHasher.cs" />
Expand Down
19 changes: 8 additions & 11 deletions ContextMenuManager/Controls/AboutApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,16 @@ public AppSettingBox()
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 });

lblUpdate.Click += (sender, e) => Updater.Update(true);
this.VisibleChanged += (sender, e) => this.Enabled = this.Visible;
btnConfigDir.MouseDown += (sender, e) => ExternalProgram.JumpExplorer(AppConfig.ConfigDir);
btnBackupDir.MouseDown += (sender, e) => ExternalProgram.JumpExplorer(AppConfig.BackupDir);
lblUpdate.Click += (sender, e) =>
{
if(!Updater.Update()) MessageBoxEx.Show(AppString.Message.VersionIsLatest);
};
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;
cmbConfigDir.SelectionChangeCommitted += (sender, e) =>
{
string newPath = (cmbConfigDir.SelectedIndex == 0) ? AppConfig.AppDataConfigDir : AppConfig.AppConfigDir;
Expand Down Expand Up @@ -349,13 +353,6 @@ public AppSettingBox()
}
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.Checked = !chkShowFilePath.Checked;
Expand Down
7 changes: 3 additions & 4 deletions ContextMenuManager/Controls/DonateListDialog.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using BluePointLilac.Methods;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

Expand Down Expand Up @@ -80,13 +81,11 @@ public void ShowDonateList(string contents)
string[] values = lines[n].Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
dgvDonate.Rows.Add(values);
}

DateTime date = new DateTime();
dgvDonate.Sort(dgvDonate.Columns[0], ListSortDirection.Descending);
DateTime date = Convert.ToDateTime(dgvDonate.Rows[0].Cells[0].Value);
float money = 0;
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);
}
dgvDonate.Columns[4].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
Expand Down
2 changes: 1 addition & 1 deletion ContextMenuManager/Controls/EnhanceMenusItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private static void WriteAttributesValue(XmlNode valueXN, string regPath)
{
if(valueXN == null) return;
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 expand_szXN = valueXN.SelectSingleNode("REG_EXPAND_SZ");
using(RegistryKey key = RegistryEx.GetRegistryKey(regPath, true, true))
Expand Down
19 changes: 10 additions & 9 deletions ContextMenuManager/Controls/EnhanceMenusList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private void LoadDocItems(string xmlPath, GroupPathItem groupItem)
this.AddItem(groupItem);
XmlDocument doc = new XmlDocument();
try { doc.LoadXml(File.ReadAllText(xmlPath, EncodingType.GetType(xmlPath))); }
catch { return; }
catch { throw; }
foreach(XmlNode xn in doc.DocumentElement.ChildNodes)
{
try
Expand Down Expand Up @@ -167,7 +167,6 @@ private void LoadShellItems(XmlElement shellXE, SubGroupItem groupItem)
{
if(!tip.IsNullOrWhiteSpace()) tip += "\n";
tip += AppString.Tip.CommandFiles;
//if(System.Diagnostics.Debugger.IsAttached) item.ChkVisible.Checked = item.ItemVisible = true;//调试状态
}
MyToolTip.SetToolTip(item.ChkVisible, tip);
this.AddItem(item);
Expand Down Expand Up @@ -199,7 +198,6 @@ private void LoadShellExItems(XmlElement shellExXE, SubGroupItem groupItem)

public static bool JudgeOSVersion(XmlElement itemXE)
{
//if(System.Diagnostics.Debugger.IsAttached) return true;//调试状态
bool JudgeOne(XmlElement osXE)
{
Version ver = new Version(osXE.InnerText);
Expand Down Expand Up @@ -232,7 +230,6 @@ bool JudgeOne(XmlElement osXE)

private static bool FileExists(XmlElement itemXE)
{
//if(System.Diagnostics.Debugger.IsAttached) return true;//调试状态
foreach(XmlElement feXE in itemXE.SelectNodes("FileExists"))
{
string path = Environment.ExpandEnvironmentVariables(feXE.InnerText);
Expand All @@ -243,13 +240,17 @@ private static bool FileExists(XmlElement itemXE)

public static byte[] ConvertToBinary(string value)
{
string[] strs = value.Split(' ');
byte[] bs = new byte[strs.Length];
for(int i = 0; i < strs.Length; i++)
try
{
bs[i] = Convert.ToByte(strs[i], 16);
string[] strs = value.Split(' ');
byte[] bs = new byte[strs.Length];
for(int i = 0; i < strs.Length; i++)
{
bs[i] = Convert.ToByte(strs[i], 16);
}
return bs;
}
return bs;
catch { return null; }
}
}
}
4 changes: 2 additions & 2 deletions ContextMenuManager/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("35190ec1-2515-488d-a2e9-825d6ff67aa2")]
[assembly: AssemblyVersion("3.3.0.0")]
[assembly: AssemblyFileVersion("3.3.0.0")]
[assembly: AssemblyVersion("3.3.1.0")]
[assembly: AssemblyFileVersion("3.3.1.0")]
23 changes: 11 additions & 12 deletions ContextMenuManager/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ AuthorityProtection = 此菜单注册表项目可能受安全软件保护,\r\n
WinXSorted = 为优化排序功能已对部分项目重新编号,\r\n需要重启文件资源管理器应用效果
RestoreDefault = 确认还原为默认菜单项目?
DeleteGroup = 确认永久删除此组及组内所有菜单项目?
FailedToReadNetworkFile = 网络文件读取失败!

[Tip]
RestartExplorer = 重启Explorer会使桌面闪烁片刻, 正常现象无需担心,\r\n或者你也可以稍后重启或注销计算机使你的操作生效
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,6 @@ Tip属性为鼠标悬浮在开关上时的提示信息,从每个Item节点开
<Command Default='osk.exe'/>
</SubKey>
</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'>
<Value>
<REG_SZ MUIVerb='关机选项' Icon='shell32.dll,-28' SubCommands='' Position='bottom'/>
Expand Down
1 change: 1 addition & 0 deletions languages/zh-CN.ini
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ AuthorityProtection = 此菜单注册表项目可能受安全软件保护,\r\n
WinXSorted = 为优化排序功能已对部分项目重新编号,\r\n需要重启文件资源管理器应用效果
RestoreDefault = 确认还原为默认菜单项目?
DeleteGroup = 确认永久删除此组及组内所有菜单项目?
FailedToReadNetworkFile = 网络文件读取失败!

[Tip]
RestartExplorer = 重启Explorer会使桌面闪烁片刻, 正常现象无需担心,\r\n或者你也可以稍后重启或注销计算机使你的操作生效
Expand Down

0 comments on commit fcba389

Please sign in to comment.