Skip to content

Commit

Permalink
更新3.2版本
Browse files Browse the repository at this point in the history
  • Loading branch information
BluePointLilac committed Apr 11, 2021
1 parent 6626329 commit c68f10d
Show file tree
Hide file tree
Showing 80 changed files with 2,222 additions and 1,114 deletions.
Binary file added AppImage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ContextMenuManager.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.1267
# Visual Studio Version 16
VisualStudioVersion = 16.0.31005.135
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ContextMenuManager", "ContextMenuManager\ContextMenuManager.csproj", "{EF7E60E9-3565-42BA-AFB3-7FE73A1B011C}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion ContextMenuManager/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<configuration>
<startup>

<supportedRuntime version="v2.0.50727"/></startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
<runtime>
<legacyCorruptedStateExceptionsPolicy enabled="true"/>
<EnableWindowsFormsHighDpiAutoResizing enabled="true"/>
Expand Down
8 changes: 7 additions & 1 deletion ContextMenuManager/AppConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static AppConfig()
public static string WebThirdRulesDic = $@"{WebDicsDir}\{THIRDRULESDICXML}";
public static string UserThirdRulesDic = $@"{UserDicsDir}\{THIRDRULESDICXML}";
public static string WebEnhanceMenusDic = $@"{WebDicsDir}\{ENHANCEMENUSICXML}";
public static string UserEnhanceMenusDic = $@"{UserDicsDir}\{ENHANCEMENUSICXML}";
public static string UserEnhanceMenusDic = $@"{WebDicsDir}\{ENHANCEMENUSICXML}";
public static string WebUwpModeItemsDic = $@"{UserDicsDir}\{UWPMODEITEMSDICXML}";
public static string UserUwpModeItemsDic = $@"{UserDicsDir}\{UWPMODEITEMSDICXML}";
public static string HashLnkExePath = $@"{ProgramsDir}\HashLnk.exe";
Expand Down Expand Up @@ -159,5 +159,11 @@ public static Version Version
SetGeneralValue("Version", value);
}
}

public static bool HideDisabledItems
{
get => GetGeneralValue("HideDisabledItems") == "1";
set => SetGeneralValue("HideDisabledItems", value ? 1 : 0);
}
}
}
125 changes: 67 additions & 58 deletions ContextMenuManager/AppImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,87 +7,96 @@ namespace ContextMenuManager
public static class AppImage
{
private static readonly double Scale = HighDpi.DpiScale / 1.5;
///<summary>主页图标</summary>
///<summary>主页</summary>
public static readonly Image Home = Resources.Home.ResizeImage(Scale);
///<summary>文件类型图标</summary>
///<summary>文件类型</summary>
public static readonly Image Type = Resources.Type.ResizeImage(Scale);
///<summary>五角星图标</summary>
///<summary>五角星</summary>
public static readonly Image Star = Resources.Star.ResizeImage(Scale);
///<summary>刷新图标</summary>
///<summary>刷新</summary>
public static readonly Image Refresh = Resources.Refresh.ResizeImage(Scale);
///<summary>关于问号图标</summary>
///<summary>关于问号</summary>
public static readonly Image About = Resources.About.ResizeImage(Scale);
///<summary>设置按钮图标</summary>
///<summary>设置按钮</summary>
public static readonly Image Setting = Resources.Setting.ResizeImage(Scale);
///<summary>开关打开状态图片</summary>
///<summary>开关打开状态</summary>
public static readonly Image TurnOn = Resources.TurnOn.ResizeImage(Scale);
///<summary>开关关闭状态图片</summary>
///<summary>开关关闭状态</summary>
public static readonly Image TurnOff = Resources.TurnOff.ResizeImage(Scale);
///<summary>编辑子项图标</summary>
///<summary>编辑子项</summary>
public static readonly Image SubItems = Resources.SubItems.ResizeImage(Scale);
///<summary>删除图标</summary>
///<summary>删除</summary>
public static readonly Image Delete = Resources.Delete.ResizeImage(Scale);
///<summary>添加图标</summary>
///<summary>添加</summary>
public static readonly Image AddNewItem = Resources.Add.ResizeImage(Scale);
///<summary>添加已有项目图标</summary>
///<summary>添加已有项目</summary>
public static readonly Image AddExisting = Resources.AddExisting.ResizeImage(Scale);
///<summary>添加分割线图标</summary>
///<summary>添加分割线</summary>
public static readonly Image AddSeparator = Resources.AddSeparator.ResizeImage(Scale);
///<summary>打开图标</summary>
///<summary>打开</summary>
public static readonly Image Open = Resources.Open.ResizeImage(Scale);
///<summary>下载图标</summary>
///<summary>下载</summary>
public static readonly Image DownLoad = Resources.DownLoad.ResizeImage(Scale);
///<summary>翻译图标</summary>
///<summary>翻译</summary>
public static readonly Image Translate = Resources.Translate.ResizeImage(Scale);
///<summary>上图标</summary>
///<summary></summary>
public static readonly Image Up = Resources.Up.ResizeImage(Scale);
///<summary>下图标</summary>
///<summary></summary>
public static readonly Image Down = Up.RotateImage(RotateFlipType.Rotate180FlipNone);
///<summary>新建项目图标</summary>
///<summary>新建项目</summary>
public static readonly Image NewItem = Resources.NewItem.ResizeImage(Scale);
///<summary>新建文件夹图标</summary>
///<summary>新建文件夹</summary>
public static readonly Image NewFolder = Resources.NewFolder.ResizeImage(Scale);
///<summary>自定义图标</summary>
///<summary>自定义</summary>
public static readonly Image Custom = Resources.Custom.ResizeImage(Scale);
///<summary>选择图标</summary>
///<summary>选择</summary>
public static readonly Image Select = Resources.Select.ResizeImage(Scale);
///<summary>Microsoft Store图标</summary>
///<summary>跳转</summary>
public static readonly Image Jump = Resources.Jump.ResizeImage(Scale);
///<summary>Microsoft Store</summary>
public static readonly Image MicrosoftStore = Resources.MicrosoftStore.ResizeImage(Scale);
///<summary>dll文件默认图标</summary>
public static readonly Image DllDefaultIcon = ResourceIcon.GetExtensionIcon(".dll").ToBitmap();
///<summary>资源不存在图标</summary>
public static readonly Image NotFound = ResourceIcon.GetIcon("imageres.dll", -2).ToBitmap();
///<summary>系统文件</summary>
public static readonly Image SystemFile = GetIconImage("imageres.dll", -67);
///<summary>资源不存在</summary>
public static readonly Image NotFound = GetIconImage("imageres.dll", -2);
///<summary>管理员小盾牌</summary>
public static readonly Image Shield = ResourceIcon.GetIcon("imageres.dll", -78).ToBitmap();
///<summary>资源管理器图标</summary>
public static readonly Image Explorer = ResourceIcon.GetIcon("explorer.exe", 0).ToBitmap();
///<summary>命令提示符图标</summary>
public static readonly Image Cmd = ResourceIcon.GetIcon("cmd.exe", 0).ToBitmap();
///<summary>重启Explorer图标</summary>
public static readonly Image RestartExplorer = ResourceIcon.GetIcon("shell32.dll", 238).ToBitmap();
///<summary>网络驱动器图标</summary>
public static readonly Image NetworkDrive = ResourceIcon.GetIcon("imageres.dll", -33).ToBitmap();
///<summary>发送到图标</summary>
public static readonly Image SendTo = ResourceIcon.GetIcon("imageres.dll", -185).ToBitmap();
///<summary>回收站图标</summary>
public static readonly Image RecycleBin = ResourceIcon.GetIcon("imageres.dll", -55).ToBitmap();
///<summary>此电脑图标</summary>
public static readonly Image Computer = ResourceIcon.GetIcon("imageres.dll", -109).ToBitmap();
///<summary>磁盘图标</summary>
public static readonly Image Drive = ResourceIcon.GetIcon("imageres.dll", -30).ToBitmap();
///<summary>文件图标</summary>
public static readonly Image File = ResourceIcon.GetIcon("imageres.dll", -19).ToBitmap();
///<summary>文件夹图标</summary>
public static readonly Image Folder = ResourceIcon.GetIcon("imageres.dll", -3).ToBitmap();
///<summary>目录图标</summary>
public static readonly Image Directory = ResourceIcon.GetIcon("imageres.dll", -162).ToBitmap();
///<summary目录背景图标</summary>
public static readonly Image Background = ResourceIcon.GetIcon("imageres.dll", 0).ToBitmap();
///<summary>桌面图标</summary>
public static readonly Image Desktop = ResourceIcon.GetIcon("imageres.dll", -183).ToBitmap();
///<summary>所有对象图标</summary>
public static readonly Image AllObjects = ResourceIcon.GetIcon("imageres.dll", -117).ToBitmap();
///<summary>锁定图标</summary>
public static readonly Image Lock = ResourceIcon.GetIcon("imageres.dll", -59).ToBitmap();
public static readonly Image Shield = GetIconImage("imageres.dll", -78);
///<summary>资源管理器</summary>
public static readonly Image Explorer = GetIconImage("explorer.exe", 0);
///<summary>命令提示符</summary>
public static readonly Image Cmd = GetIconImage("cmd.exe", 0);
///<summary>重启Explorer</summary>
public static readonly Image RestartExplorer = GetIconImage("shell32.dll", 238);
///<summary>网络驱动器</summary>
public static readonly Image NetworkDrive = GetIconImage("imageres.dll", -33);
///<summary>发送到</summary>
public static readonly Image SendTo = GetIconImage("imageres.dll", -185);
///<summary>回收站</summary>
public static readonly Image RecycleBin = GetIconImage("imageres.dll", -55);
///<summary>此电脑</summary>
public static readonly Image Computer = GetIconImage("imageres.dll", -109);
///<summary>磁盘</summary>
public static readonly Image Drive = GetIconImage("imageres.dll", -30);
///<summary>文件</summary>
public static readonly Image File = GetIconImage("imageres.dll", -19);
///<summary>文件夹</summary>
public static readonly Image Folder = GetIconImage("imageres.dll", -3);
///<summary>目录</summary>
public static readonly Image Directory = GetIconImage("imageres.dll", -162);
///<summary目录背景</summary>
public static readonly Image Background = GetIconImage("imageres.dll", 0);
///<summary>桌面</summary>
public static readonly Image Desktop = GetIconImage("imageres.dll", -183);
///<summary>所有对象</summary>
public static readonly Image AllObjects = GetIconImage("imageres.dll", -117);
///<summary>锁定</summary>
public static readonly Image Lock = GetIconImage("imageres.dll", -59);
///<summary>快捷方式图标</summary>
public static readonly Image LnkFile = GetIconImage("shell32.dll", -16769);

private static Image GetIconImage(string dllName, int iconIndex)
{
using(Icon icon = ResourceIcon.GetIcon(dllName, iconIndex)) return icon?.ToBitmap();
}
}
}
19 changes: 15 additions & 4 deletions ContextMenuManager/AppString.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public static class SideBar
public static string UwpLnk => GetValue("UwpLnk");
public static string ExeFile => GetValue("ExeFile");
public static string UnknownType => GetValue("UnknownType");
public static string MenuAnalysis => GetValue("MenuAnalysis");
public static string CustomExtension => GetValue("CustomExtension");
public static string PerceivedType => GetValue("PerceivedType");
public static string DirectoryType => GetValue("DirectoryType");
Expand All @@ -65,6 +66,7 @@ public static class SideBar
public static string GuidBlocked => GetValue("GuidBlocked");
public static string DragDrop => GetValue("DragDrop");
public static string PublicReferences => GetValue("PublicReferences");
public static string CustomRegPath => GetValue("CustomRegPath");
public static string IEMenu => GetValue("IEMenu");
public static string AppSetting => GetValue("AppSetting");
public static string AboutApp => GetValue("AboutApp");
Expand Down Expand Up @@ -95,15 +97,16 @@ public static class StatusBar
public static string UwpLnk => GetValue("UwpLnk");
public static string ExeFile => GetValue("ExeFile");
public static string UnknownType => GetValue("UnknownType");
public static string MenuAnalysis => GetValue("MenuAnalysis");
public static string CustomExtension => GetValue("CustomExtension");
public static string PerceivedType => GetValue("PerceivedType");
public static string DirectoryType => GetValue("DirectoryType");
public static string EnhanceMenu => GetValue("EnhanceMenu");
public static string ThirdRules => GetValue("ThirdRules");
public static string OtherAccounts => GetValue("OtherAccounts");
public static string GuidBlocked => GetValue("GuidBlocked");
public static string DragDrop => GetValue("DragDrop");
public static string PublicReferences => GetValue("PublicReferences");
public static string CustomRegPath => GetValue("CustomRegPath");
public static string IEMenu => GetValue("IEMenu");
}

Expand Down Expand Up @@ -149,6 +152,7 @@ public static class Menu
public static string Save => GetValue("Save");
}

/// <summary>对话框子窗口</summary>
public static class Dialog
{
private static string GetValue(string key) => GetStringValue("Dialog", key);
Expand All @@ -159,15 +163,14 @@ public static class Dialog
public static string ItemText => GetValue("ItemText");
public static string ItemCommand => GetValue("ItemCommand");
public static string CommandArguments => GetValue("CommandArguments");
public static string ItemName => GetValue("ItemName");
public static string ItemIcon => GetValue("ItemIcon");
public static string SingleMenu => GetValue("SingleMenu");
public static string MultiMenu => GetValue("MultiMenu");
public static string Public => GetValue("Public");
public static string Private => GetValue("Private");
public static string InputGuid => GetValue("InputGuid");
public static string AddGuidDic => GetValue("AddGuidDic");
public static string DeleteGuidDic => GetValue("DeleteGuidDic");
public static string NoPerceivedType => GetValue("NoPerceivedType");
public static string TextFile => GetValue("TextFile");
public static string DocumentFile => GetValue("DocumentFile");
public static string ImageFile => GetValue("ImageFile");
Expand All @@ -179,6 +182,7 @@ public static class Dialog
public static string ImageDirectory => GetValue("ImageDirectory");
public static string VideoDirectory => GetValue("VideoDirectory");
public static string AudioDirectory => GetValue("AudioDirectory");
public static string EditSubItems => GetValue("EditSubItems");
public static string CheckReference => GetValue("CheckReference");
public static string CheckCopy => GetValue("CheckCopy");
public static string SelectExtension => GetValue("SelectExtension");
Expand All @@ -188,6 +192,7 @@ public static class Dialog
public static string SelectNewItemType => GetValue("SelectNewItemType");
public static string RegistryFile => GetValue("RegistryFile");
public static string SelectGroup => GetValue("SelectGroup");
public static string SelectObjectType => GetValue("SelectObjectType");
public static string TranslateTool => GetValue("TranslateTool");
public static string DefaultText => GetValue("DefaultText");
public static string OldTranslation => GetValue("OldTranslation");
Expand Down Expand Up @@ -218,6 +223,7 @@ public static class MessageBox
public static string HasBeenAdded => GetValue("HasBeenAdded");
public static string EditInitialData => GetValue("EditInitialData");
public static string PromptIsOpenItem => GetValue("PromptIsOpenItem");
public static string SelectRegPath => GetValue("SelectRegPath");
public static string RestartApp => GetValue("RestartApp");
public static string UpdateApp => GetValue("UpdateApp");
public static string FileNotExists => GetValue("FileNotExists");
Expand Down Expand Up @@ -253,7 +259,9 @@ public static class Other
public static string CurrentExtension => GetValue("CurrentExtension");
public static string CurrentPerceivedType => GetValue("CurrentPerceivedType");
public static string CurrentDirectoryType => GetValue("CurrentDirectoryType");
public static string EditSubItems => GetValue("EditSubItems");
public static string CurrentFilePath => GetValue("CurrentFilePath");
public static string CurrentRegPath => GetValue("CurrentRegPath");
public static string SelectRegPath => GetValue("SelectRegPath");
public static string InvalidItem => GetValue("InvalidItem");
public static string Separator => GetValue("Separator");
public static string LockNewMenu => GetValue("LockNewMenu");
Expand All @@ -280,6 +288,8 @@ public static class Other
public static string WinXSortable => GetValue("WinXSortable");
public static string ShowFilePath => GetValue("ShowFilePath");
public static string OpenMoreRegedit => GetValue("OpenMoreRegedit");
public static string HideDisabledItems => GetValue("HideDisabledItems");
public static string SetPerceivedType => GetValue("SetPerceivedType");
}

/// <summary>提示文本</summary>
Expand All @@ -305,6 +315,7 @@ public static class Tip
public static string ConfigPath => GetValue("ConfigPath");
public static string CommandFiles => GetValue("CommandFiles");
public static string CreateGroup => GetValue("CreateGroup");
public static string DropOrSelectObject => GetValue("DropOrSelectObject");
}
}
}
Loading

0 comments on commit c68f10d

Please sign in to comment.