mirror of
https://github.com/BluePointLilac/ContextMenuManager.git
synced 2026-01-14 06:04:00 +08:00
更新3.1版本
This commit is contained in:
@@ -78,7 +78,7 @@ namespace ContextMenuManager
|
||||
public static bool AutoBackup
|
||||
{
|
||||
get => ConfigWriter.GetValue("General", "AutoBackup") != "0";
|
||||
set => ConfigWriter.SetValue("General", "AutoBackup", (value ? 1 : 0).ToString());
|
||||
set => ConfigWriter.SetValue("General", "AutoBackup", value ? 1 : 0);
|
||||
}
|
||||
|
||||
public static DateTime LastCheckUpdateTime
|
||||
@@ -99,14 +99,14 @@ namespace ContextMenuManager
|
||||
}
|
||||
set
|
||||
{
|
||||
ConfigWriter.SetValue("General", "LastCheckUpdateTime", value.ToBinary().ToString());
|
||||
ConfigWriter.SetValue("General", "LastCheckUpdateTime", value.ToBinary());
|
||||
}
|
||||
}
|
||||
|
||||
public static bool ProtectOpenItem
|
||||
{
|
||||
get => ConfigWriter.GetValue("General", "ProtectOpenItem") != "0";
|
||||
set => ConfigWriter.SetValue("General", "ProtectOpenItem", (value ? 1 : 0).ToString());
|
||||
set => ConfigWriter.SetValue("General", "ProtectOpenItem", value ? 1 : 0);
|
||||
}
|
||||
|
||||
public static string EngineUrl
|
||||
@@ -126,19 +126,34 @@ namespace ContextMenuManager
|
||||
public static bool ShowFilePath
|
||||
{
|
||||
get => ConfigWriter.GetValue("General", "ShowFilePath") == "1";
|
||||
set => ConfigWriter.SetValue("General", "ShowFilePath", (value ? 1 : 0).ToString());
|
||||
set => ConfigWriter.SetValue("General", "ShowFilePath", value ? 1 : 0);
|
||||
}
|
||||
|
||||
public static bool WinXSortable
|
||||
{
|
||||
get => ConfigWriter.GetValue("General", "WinXSortable") == "1";
|
||||
set => ConfigWriter.SetValue("General", "WinXSortable", (value ? 1 : 0).ToString());
|
||||
set => ConfigWriter.SetValue("General", "WinXSortable", value ? 1 : 0);
|
||||
}
|
||||
|
||||
public static bool OpenMoreRegedit
|
||||
{
|
||||
get => ConfigWriter.GetValue("General", "OpenMoreRegedit") == "1";
|
||||
set => ConfigWriter.SetValue("General", "OpenMoreRegedit", (value ? 1 : 0).ToString());
|
||||
set => ConfigWriter.SetValue("General", "OpenMoreRegedit", value ? 1 : 0);
|
||||
}
|
||||
|
||||
public static Version Version
|
||||
{
|
||||
get
|
||||
{
|
||||
Version version = new Version();
|
||||
try { version = new Version(ConfigWriter.GetValue("General", "Version")); }
|
||||
catch { }
|
||||
return version;
|
||||
}
|
||||
set
|
||||
{
|
||||
ConfigWriter.SetValue("General", "Version", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
@@ -36,19 +37,24 @@ namespace BluePointLilac.Methods
|
||||
Thread.Sleep(50);
|
||||
SendMessage(hTree, WM_KEYDOWN, VK_RIGHT, null);
|
||||
}
|
||||
else SendMessage(hTree, WM_CHAR, Convert.ToInt16(chr), null);
|
||||
else
|
||||
{
|
||||
SendMessage(hTree, WM_CHAR, Convert.ToInt16(chr), null);
|
||||
}
|
||||
}
|
||||
|
||||
if(!string.IsNullOrEmpty(valueName))
|
||||
if(string.IsNullOrEmpty(valueName)) return;
|
||||
using(RegistryKey key = RegistryEx.GetRegistryKey(regPath))
|
||||
{
|
||||
Thread.Sleep(50);
|
||||
SetForegroundWindow(hList);
|
||||
SetFocus(hList);
|
||||
SendMessage(hList, WM_KEYDOWN, VK_HOME, null);
|
||||
foreach(char chr in Encoding.Default.GetBytes(valueName))
|
||||
{
|
||||
SendMessage(hList, WM_CHAR, Convert.ToInt16(chr), null);
|
||||
}
|
||||
if(key?.GetValue(valueName) == null) return;
|
||||
}
|
||||
Thread.Sleep(50);
|
||||
SetForegroundWindow(hList);
|
||||
SetFocus(hList);
|
||||
SendMessage(hList, WM_KEYDOWN, VK_HOME, null);
|
||||
foreach(char chr in Encoding.Default.GetBytes(valueName))
|
||||
{
|
||||
SendMessage(hList, WM_CHAR, Convert.ToInt16(chr), null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +124,7 @@ namespace BluePointLilac.Methods
|
||||
{
|
||||
using(Process process = Process.Start("notepad.exe"))
|
||||
{
|
||||
Thread.Sleep(200);
|
||||
process.WaitForInputIdle();
|
||||
IntPtr handle = FindWindowEx(process.MainWindowHandle, IntPtr.Zero, "Edit", null);
|
||||
SendMessage(handle, WM_SETTEXT, 0, text);
|
||||
}
|
||||
|
||||
@@ -20,11 +20,14 @@ namespace BluePointLilac.Methods
|
||||
}
|
||||
}
|
||||
|
||||
private static readonly Regex GuidRegex = new Regex(@"[A-F0-9]{8}(\-[A-F0-9]{4}){3}\-[A-F0-9]{12}", RegexOptions.IgnoreCase);
|
||||
|
||||
public static bool IsGuid(string str)
|
||||
{
|
||||
if(string.IsNullOrEmpty(str)) return false;
|
||||
Regex guidRegEx = new Regex(@"[a-fA-F0-9]{8}(\-[a-fA-F0-9]{4}){3}\-[a-fA-F0-9]{12}");
|
||||
return guidRegEx.IsMatch(str);
|
||||
if(str.Length == 38 && str.StartsWith("{") && str.EndsWith("}") && GuidRegex.IsMatch(str)) return true;
|
||||
if(str.Length == 36 && GuidRegex.IsMatch(str)) return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -152,6 +152,11 @@ namespace BluePointLilac.Methods
|
||||
}
|
||||
}
|
||||
|
||||
public void SetValue(string section, string key, object value)
|
||||
{
|
||||
SetValue(section, key, value.ToString());
|
||||
}
|
||||
|
||||
public void SetValue(string section, string key, string value)
|
||||
{
|
||||
SetValue(section, key, ref value, false);
|
||||
|
||||
@@ -279,7 +279,7 @@ namespace ContextMenuManager.Controls
|
||||
MyToolTip.SetToolTip(cmbConfigDir, AppString.Tip.ConfigPath);
|
||||
MyToolTip.SetToolTip(btnConfigDir, AppString.Other.OpenConfigDir);
|
||||
MyToolTip.SetToolTip(btnBackupDir, AppString.Other.OpenBackupDir);
|
||||
MyToolTip.SetToolTip(lblUpdate, AppString.Tip.CheckUpdate + Environment.NewLine
|
||||
MyToolTip.SetToolTip(mliUpdate, AppString.Tip.CheckUpdate + Environment.NewLine
|
||||
+ AppString.Tip.LastCheckUpdateTime + AppConfig.LastCheckUpdateTime.ToLongDateString());
|
||||
cmbConfigDir.Items.AddRange(new[] { AppString.Other.AppDataDir, AppString.Other.AppDir });
|
||||
cmbEngine.Items.AddRange(new[] { "Baidu", "Bing", "Google", "DogeDoge", "Sogou", "360", AppString.Other.CustomEngine });
|
||||
|
||||
@@ -444,7 +444,7 @@ namespace ContextMenuManager.Controls
|
||||
}
|
||||
set
|
||||
{
|
||||
IniWriter.SetValue(Rule.Section, Rule.KeyName, value.ToString());
|
||||
IniWriter.SetValue(Rule.Section, Rule.KeyName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace ContextMenuManager.Controls
|
||||
}
|
||||
}
|
||||
|
||||
public string ValueName => DefaultValue;
|
||||
public string ValueName => null;
|
||||
public Guid Guid { get; set; }
|
||||
public string SearchText => Text;
|
||||
public string ItemFilePath => GuidInfo.GetFilePath(Guid);
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace ContextMenuManager.Controls
|
||||
{
|
||||
this.Text = "ShellExecute";
|
||||
this.AutoSize = true;
|
||||
this.Font = new Font(SystemFonts.DialogFont.FontFamily, 8F);
|
||||
this.Font = new Font(SystemFonts.DialogFont.FontFamily, 8F / 1F.DpiZoom());
|
||||
}
|
||||
|
||||
public string Verb { get; set; }
|
||||
|
||||
@@ -11,5 +11,5 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: Guid("35190ec1-2515-488d-a2e9-825d6ff67aa2")]
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.0.0.0")]
|
||||
[assembly: AssemblyVersion("3.1.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.0.0")]
|
||||
@@ -241,6 +241,8 @@ Icon=..\FreeArc.exe
|
||||
[AD392E40-428C-459F-961E-9B147782D099]
|
||||
Text=UltraISO
|
||||
Icon=.\UltraISO.exe
|
||||
[be86f80b-eb1a-45b4-b4b6-4b12d302b6bc]
|
||||
Text=AntZip
|
||||
|
||||
;----------------杀软------------------
|
||||
[09A47860-11B0-4DA5-AFA5-26D86198A780]
|
||||
@@ -316,6 +318,7 @@ Text=使用瑞星杀毒
|
||||
[0bb81440-5f42-4480-a5f7-770a6f439fc8]
|
||||
Text=IObit Malware Fighter
|
||||
Icon=*,3
|
||||
|
||||
;----------------传输------------------
|
||||
[53D2405C-48AB-4C8A-8F59-CE0610F13BBC]
|
||||
Text=通过QQ发送到
|
||||
|
||||
@@ -16,11 +16,16 @@ namespace ContextMenuManager
|
||||
|
||||
public static void PeriodicUpdate()
|
||||
{
|
||||
Version appVersion = new Version(Application.ProductVersion);
|
||||
//如果上次检测更新时间为一个月以前就进行更新操作
|
||||
if(AppConfig.LastCheckUpdateTime.AddMonths(1).CompareTo(DateTime.Today) < 0)
|
||||
bool flag1 = AppConfig.LastCheckUpdateTime.AddMonths(1).CompareTo(DateTime.Today) < 0;
|
||||
//如果配置文件中的版本号低于程序版本号也进行更新操作
|
||||
bool flag2 = appVersion.CompareTo(AppConfig.Version) > 0;
|
||||
if(flag1 || flag2)
|
||||
{
|
||||
CheckUpdate();
|
||||
AppConfig.LastCheckUpdateTime = DateTime.Today;
|
||||
AppConfig.Version = appVersion;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +40,15 @@ namespace ContextMenuManager
|
||||
private static bool UpdateApp()
|
||||
{
|
||||
IniReader reader = new IniReader(new StringBuilder(GetWebString(UpdateUrl)));
|
||||
Version version1 = new Version(reader.GetValue("Update", "Version"));
|
||||
Version version1;
|
||||
try
|
||||
{
|
||||
version1 = new Version(reader.GetValue("Update", "Version"));
|
||||
}
|
||||
catch
|
||||
{
|
||||
version1 = new Version(Application.ProductVersion);
|
||||
}
|
||||
Version version2 = new Version(Application.ProductVersion);
|
||||
if(version1.CompareTo(version2) > 0)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[Update]
|
||||
Version=3.0.0.0
|
||||
Url=https://github.com/BluePointLilac/ContextMenuManager/releases/download/3.0.0.0/ContextMenuManager.zip
|
||||
Info=【更新描述】\n(1).支持通过GUID添加ShellEx菜单项目;\n(2).添加ShellExecute函数,方便创建更加强大的Shell菜单项目;\n(3).添加WinX菜单创建和排序功能;\n(4).添加IE右键菜单管理和创建功能;\n(5).添加管理和创建右键拖拽菜单项目功能;\n(6).添加了丰富的字典,添加了很多增强菜单;\n(7).整合文件类型管理功能,使管理更加方便;\n(8).添加状态栏实时显示文件路径功能;\n(9).优化程序部分UI,优化部分代码,解决一些已知Bug。
|
||||
Version=3.1.0.0
|
||||
Url=https://github.com/BluePointLilac/ContextMenuManager/releases/download/3.1.0.0/ContextMenuManager.zip
|
||||
Info=【更新描述】\n(1).修复已知bug,优化部分代码。
|
||||
Reference in New Issue
Block a user