mirror of
https://github.com/BluePointLilac/ContextMenuManager.git
synced 2026-01-14 06:04:00 +08:00
AppString.cs section子类化
This commit is contained in:
@@ -15,226 +15,251 @@ namespace ContextMenuManager
|
||||
return value.Replace("\\n", "\n");
|
||||
}
|
||||
|
||||
private static string GetGeneralValue(string key) => GetValue("General", key);
|
||||
private static string GetToolBarValue(string key) => GetValue("ToolBar", key);
|
||||
private static string GetSideBarValue(string key) => GetValue("SideBar", key);
|
||||
private static string GetStatusBarValue(string key) => GetValue("StatusBar", key);
|
||||
private static string GetMessageBoxValue(string key) => GetValue("MessageBox", key);
|
||||
private static string GetMenuValue(string key) => GetValue("Menu", key);
|
||||
private static string GetTextValue(string key) => GetValue("Text", key);
|
||||
private static string GetTipValue(string key) => GetValue("Tip", key);
|
||||
/// <summary>常规</summary>
|
||||
public static class General
|
||||
{
|
||||
private static string GetGeneralValue(string key) => GetValue("General", key);
|
||||
public static string Language = GetGeneralValue("Language");
|
||||
public static string AppName = GetGeneralValue("AppName");
|
||||
}
|
||||
|
||||
#region 常规
|
||||
public static string General_Language = GetGeneralValue("Language");
|
||||
public static string General_AppName = GetGeneralValue("AppName");
|
||||
#endregion
|
||||
#region 工具栏
|
||||
public static string ToolBar_Home = GetToolBarValue("Home");
|
||||
public static string ToolBar_Type = GetToolBarValue("Type");
|
||||
public static string ToolBar_Rule = GetToolBarValue("Rule");
|
||||
public static string ToolBar_About = GetToolBarValue("About");
|
||||
#endregion
|
||||
#region 侧边栏
|
||||
public static string SideBar_File = GetSideBarValue("File");
|
||||
public static string SideBar_Folder = GetSideBarValue("Folder");
|
||||
public static string SideBar_Directory = GetSideBarValue("Directory");
|
||||
public static string SideBar_Background = GetSideBarValue("Background");
|
||||
public static string SideBar_Desktop = GetSideBarValue("Desktop");
|
||||
public static string SideBar_Drive = GetSideBarValue("Drive");
|
||||
public static string SideBar_AllObjects = GetSideBarValue("AllObjects");
|
||||
public static string SideBar_Computer = GetSideBarValue("Computer");
|
||||
public static string SideBar_RecycleBin = GetSideBarValue("RecycleBin");
|
||||
public static string SideBar_Library = GetSideBarValue("Library");
|
||||
public static string SideBar_New = GetSideBarValue("New");
|
||||
public static string SideBar_SendTo = GetSideBarValue("SendTo");
|
||||
public static string SideBar_OpenWith = GetSideBarValue("OpenWith");
|
||||
public static string SideBar_WinX = GetSideBarValue("WinX");
|
||||
/// <summary>工具栏</summary>
|
||||
public static class ToolBar
|
||||
{
|
||||
private static string GetToolBarValue(string key) => GetValue("ToolBar", key);
|
||||
public static string Home = GetToolBarValue("Home");
|
||||
public static string Type = GetToolBarValue("Type");
|
||||
public static string Rule = GetToolBarValue("Rule");
|
||||
public static string About = GetToolBarValue("About");
|
||||
}
|
||||
|
||||
public static string SideBar_LnkFile = GetSideBarValue("LnkFile");
|
||||
public static string SideBar_ExeFile = GetSideBarValue("ExeFile");
|
||||
public static string SideBar_TextFile = GetSideBarValue("TextFile");
|
||||
public static string SideBar_ImageFile = GetSideBarValue("ImageFile");
|
||||
public static string SideBar_VideoFile = GetSideBarValue("VideoFile");
|
||||
public static string SideBar_AudioFile = GetSideBarValue("AudioFile");
|
||||
public static string SideBar_ImageDirectory = GetSideBarValue("ImageDirectory");
|
||||
public static string SideBar_VideoDirectory = GetSideBarValue("VideoDirectory");
|
||||
public static string SideBar_AudioDirectory = GetSideBarValue("AudioDirectory");
|
||||
public static string SideBar_UnknownType = GetSideBarValue("UnknownType");
|
||||
public static string SideBar_CustomType = GetSideBarValue("CustomType");
|
||||
/// <summary>侧边栏</summary>
|
||||
public static class SideBar
|
||||
{
|
||||
private static string GetSideBarValue(string key) => GetValue("SideBar", key);
|
||||
public static string File = GetSideBarValue("File");
|
||||
public static string Folder = GetSideBarValue("Folder");
|
||||
public static string Directory = GetSideBarValue("Directory");
|
||||
public static string Background = GetSideBarValue("Background");
|
||||
public static string Desktop = GetSideBarValue("Desktop");
|
||||
public static string Drive = GetSideBarValue("Drive");
|
||||
public static string AllObjects = GetSideBarValue("AllObjects");
|
||||
public static string Computer = GetSideBarValue("Computer");
|
||||
public static string RecycleBin = GetSideBarValue("RecycleBin");
|
||||
public static string Library = GetSideBarValue("Library");
|
||||
public static string New = GetSideBarValue("New");
|
||||
public static string SendTo = GetSideBarValue("SendTo");
|
||||
public static string OpenWith = GetSideBarValue("OpenWith");
|
||||
public static string WinX = GetSideBarValue("WinX");
|
||||
|
||||
public static string SideBar_GuidBlocked = GetSideBarValue("GuidBlocked");
|
||||
public static string SideBar_ThirdRules = GetSideBarValue("ThirdRules");
|
||||
public static string LnkFile = GetSideBarValue("LnkFile");
|
||||
public static string ExeFile = GetSideBarValue("ExeFile");
|
||||
public static string TextFile = GetSideBarValue("TextFile");
|
||||
public static string ImageFile = GetSideBarValue("ImageFile");
|
||||
public static string VideoFile = GetSideBarValue("VideoFile");
|
||||
public static string AudioFile = GetSideBarValue("AudioFile");
|
||||
public static string ImageDirectory = GetSideBarValue("ImageDirectory");
|
||||
public static string VideoDirectory = GetSideBarValue("VideoDirectory");
|
||||
public static string AudioDirectory = GetSideBarValue("AudioDirectory");
|
||||
public static string UnknownType = GetSideBarValue("UnknownType");
|
||||
public static string CustomType = GetSideBarValue("CustomType");
|
||||
|
||||
public static string SideBar_AboutApp = GetSideBarValue("AboutApp");
|
||||
public static string SideBar_Dictionaries = GetSideBarValue("Dictionaries");
|
||||
public static string SideBar_AppLanguage = GetSideBarValue("AppLanguage");
|
||||
public static string SideBar_Donate = GetSideBarValue("Donate");
|
||||
#endregion
|
||||
#region 状态栏
|
||||
public static string StatusBar_File = GetStatusBarValue("File");
|
||||
public static string StatusBar_Folder = GetStatusBarValue("Folder");
|
||||
public static string StatusBar_Directory = GetStatusBarValue("Directory");
|
||||
public static string StatusBar_Background = GetStatusBarValue("Background");
|
||||
public static string StatusBar_Desktop = GetStatusBarValue("Desktop");
|
||||
public static string StatusBar_Drive = GetStatusBarValue("Drive");
|
||||
public static string StatusBar_AllObjects = GetStatusBarValue("AllObjects");
|
||||
public static string StatusBar_Computer = GetStatusBarValue("Computer");
|
||||
public static string StatusBar_RecycleBin = GetStatusBarValue("RecycleBin");
|
||||
public static string StatusBar_Library = GetStatusBarValue("Library");
|
||||
public static string StatusBar_New = GetStatusBarValue("New");
|
||||
public static string StatusBar_SendTo = GetStatusBarValue("SendTo");
|
||||
public static string StatusBar_OpenWith = GetStatusBarValue("OpenWith");
|
||||
public static string StatusBar_WinX = GetStatusBarValue("WinX");
|
||||
public static string GuidBlocked = GetSideBarValue("GuidBlocked");
|
||||
public static string ThirdRules = GetSideBarValue("ThirdRules");
|
||||
|
||||
public static string StatusBar_LnkFile = GetStatusBarValue("LnkFile");
|
||||
public static string StatusBar_ExeFile = GetStatusBarValue("ExeFile");
|
||||
public static string StatusBar_TextFile = GetStatusBarValue("TextFile");
|
||||
public static string StatusBar_ImageFile = GetStatusBarValue("ImageFile");
|
||||
public static string StatusBar_VideoFile = GetStatusBarValue("VideoFile");
|
||||
public static string StatusBar_AudioFile = GetStatusBarValue("AudioFile");
|
||||
public static string StatusBar_ImageDirectory = GetStatusBarValue("ImageDirectory");
|
||||
public static string StatusBar_VideoDirectory = GetStatusBarValue("VideoDirectory");
|
||||
public static string StatusBar_AudioDirectory = GetStatusBarValue("AudioDirectory");
|
||||
public static string StatusBar_UnknownType = GetStatusBarValue("UnknownType");
|
||||
public static string StatusBar_CustomType = GetStatusBarValue("CustomType");
|
||||
public static string AboutApp = GetSideBarValue("AboutApp");
|
||||
public static string Dictionaries = GetSideBarValue("Dictionaries");
|
||||
public static string AppLanguage = GetSideBarValue("AppLanguage");
|
||||
public static string Donate = GetSideBarValue("Donate");
|
||||
}
|
||||
|
||||
public static string StatusBar_GuidBlocked = GetStatusBarValue("GuidBlocked");
|
||||
public static string StatusBar_ThirdRules = GetStatusBarValue("ThirdRules");
|
||||
#endregion
|
||||
#region 菜单
|
||||
public static string Menu_ChangeText = GetMenuValue("ChangeText");
|
||||
public static string Menu_ItemIcon = GetMenuValue("ItemIcon");
|
||||
public static string Menu_ChangeIcon = GetMenuValue("ChangeIcon");
|
||||
public static string Menu_AddIcon = GetMenuValue("AddIcon");
|
||||
public static string Menu_DeleteIcon = GetMenuValue("DeleteIcon");
|
||||
public static string Menu_ItemPosition = GetMenuValue("ItemPosition");
|
||||
public static string Menu_SetDefault = GetMenuValue("SetDefault");
|
||||
public static string Menu_SetTop = GetMenuValue("SetTop");
|
||||
public static string Menu_SetBottom = GetMenuValue("SetBottom");
|
||||
public static string Menu_OtherAttributes = GetMenuValue("OtherAttributes");
|
||||
public static string Menu_OnlyWithShift = GetMenuValue("OnlyWithShift");
|
||||
public static string Menu_OnlyInExplorer = GetMenuValue("OnlyInExplorer");
|
||||
public static string Menu_NoWorkingDirectory = GetMenuValue("NoWorkingDirectory");
|
||||
public static string Menu_ShowSeparator = GetMenuValue("ShowSeparator");
|
||||
public static string Menu_Details = GetMenuValue("Details");
|
||||
public static string Menu_WebSearch = GetMenuValue("WebSearch");
|
||||
public static string Menu_ChangeCommand = GetMenuValue("ChangeCommand");
|
||||
public static string Menu_FileProperties = GetMenuValue("FileProperties");
|
||||
public static string Menu_FileLocation = GetMenuValue("FileLocation");
|
||||
public static string Menu_RegistryLocation = GetMenuValue("RegistryLocation");
|
||||
public static string Menu_Delete = GetMenuValue("Delete");
|
||||
public static string Menu_DeleteReference = GetMenuValue("DeleteReference");
|
||||
public static string Menu_CopyGuid = GetMenuValue("CopyGuid");
|
||||
public static string Menu_InitialData = GetMenuValue("InitialData");
|
||||
#endregion
|
||||
#region 消息框
|
||||
public static string MessageBox_TextCannotBeEmpty = GetMessageBoxValue("TextCannotBeEmpty");
|
||||
public static string MessageBox_CommandCannotBeEmpty = GetMessageBoxValue("CommandCannotBeEmpty");
|
||||
public static string MessageBox_StringParsingFailed = GetMessageBoxValue("StringParsingFailed");
|
||||
public static string MessageBox_TextLengthCannotExceed80 = GetMessageBoxValue("TextLengthCannotExceed80");
|
||||
public static string MessageBox_ConfirmDeletePermanently = GetMessageBoxValue("ConfirmDeletePermanently");
|
||||
public static string MessageBox_ConfirmDeleteReference = GetMessageBoxValue("ConfirmDeleteReference");
|
||||
public static string MessageBox_ConfirmDelete = GetMessageBoxValue("ConfirmDelete");
|
||||
public static string MessageBox_ConfirmDeleteReferenced = GetMessageBoxValue("ConfirmDeleteReferenced");
|
||||
public static string MessageBox_CannotAddNewItem = GetMessageBoxValue("CannotAddNewItem");
|
||||
public static string MessageBox_UnsupportedFilename = GetMessageBoxValue("UnsupportedFilename");
|
||||
public static string MessageBox_UnsupportedExtension = GetMessageBoxValue("UnsupportedExtension");
|
||||
public static string MessageBox_CannotChangePath = GetMessageBoxValue("CannotChangePath");
|
||||
public static string MessageBox_CopiedToClipboard = GetMessageBoxValue("CopiedToClipboard");
|
||||
public static string MessageBox_UnknownGuid = GetMessageBoxValue("UnknownGuid");
|
||||
public static string MessageBox_HasBeenAdded = GetMessageBoxValue("HasBeenAdded");
|
||||
public static string MessageBox_EditInitialData = GetMessageBoxValue("EditInitialData");
|
||||
public static string MessageBox_PromptIsOpenItem = GetMessageBoxValue("PromptIsOpenItem");
|
||||
public static string MessageBox_RestartApp = GetMessageBoxValue("RestartApp");
|
||||
public static string MessageBox_UpdateApp = GetMessageBoxValue("UpdateApp");
|
||||
#endregion
|
||||
#region 其他文本
|
||||
public static string Text_ItemName = GetTextValue("ItemName");
|
||||
public static string Text_ItemCommand = GetTextValue("ItemCommand");
|
||||
/// <summary>状态栏</summary>
|
||||
public static class StatusBar
|
||||
{
|
||||
private static string GetStatusBarValue(string key) => GetValue("StatusBar", key);
|
||||
public static string File = GetStatusBarValue("File");
|
||||
public static string Folder = GetStatusBarValue("Folder");
|
||||
public static string Directory = GetStatusBarValue("Directory");
|
||||
public static string Background = GetStatusBarValue("Background");
|
||||
public static string Desktop = GetStatusBarValue("Desktop");
|
||||
public static string Drive = GetStatusBarValue("Drive");
|
||||
public static string AllObjects = GetStatusBarValue("AllObjects");
|
||||
public static string Computer = GetStatusBarValue("Computer");
|
||||
public static string RecycleBin = GetStatusBarValue("RecycleBin");
|
||||
public static string Library = GetStatusBarValue("Library");
|
||||
public static string New = GetStatusBarValue("New");
|
||||
public static string SendTo = GetStatusBarValue("SendTo");
|
||||
public static string OpenWith = GetStatusBarValue("OpenWith");
|
||||
public static string WinX = GetStatusBarValue("WinX");
|
||||
|
||||
public static string Text_Single = GetTextValue("Single");
|
||||
public static string Text_Multi = GetTextValue("Multi");
|
||||
public static string LnkFile = GetStatusBarValue("LnkFile");
|
||||
public static string ExeFile = GetStatusBarValue("ExeFile");
|
||||
public static string TextFile = GetStatusBarValue("TextFile");
|
||||
public static string ImageFile = GetStatusBarValue("ImageFile");
|
||||
public static string VideoFile = GetStatusBarValue("VideoFile");
|
||||
public static string AudioFile = GetStatusBarValue("AudioFile");
|
||||
public static string ImageDirectory = GetStatusBarValue("ImageDirectory");
|
||||
public static string VideoDirectory = GetStatusBarValue("VideoDirectory");
|
||||
public static string AudioDirectory = GetStatusBarValue("AudioDirectory");
|
||||
public static string UnknownType = GetStatusBarValue("UnknownType");
|
||||
public static string CustomType = GetStatusBarValue("CustomType");
|
||||
|
||||
public static string Text_EditSubItems = GetTextValue("EditSubItems");
|
||||
public static string Text_Separator = GetTextValue("Separator");
|
||||
public static string Text_InvalidItem = GetTextValue("InvalidItem");
|
||||
public static string Text_CheckReference = GetTextValue("CheckReference");
|
||||
public static string Text_CheckCommon = GetTextValue("CheckCommon");
|
||||
public static string Text_InputGuid = GetTextValue("InputGuid");
|
||||
public static string GuidBlocked = GetStatusBarValue("GuidBlocked");
|
||||
public static string ThirdRules = GetStatusBarValue("ThirdRules");
|
||||
}
|
||||
|
||||
public static string Text_Explore = GetTextValue("Explore");
|
||||
public static string Text_CustomFolder = GetTextValue("CustomFolder");
|
||||
public static string Text_BuildSendtoMenu = GetTextValue("BuildSendtoMenu");
|
||||
public static string Text_UseStoreOpenWith = GetTextValue("UseStoreOpenWith");
|
||||
public static string Text_RestartExplorer = GetTextValue("RestartExplorer");
|
||||
/// <summary>菜单</summary>
|
||||
public static class Menu
|
||||
{
|
||||
private static string GetMenuValue(string key) => GetValue("Menu", key);
|
||||
public static string ChangeText = GetMenuValue("ChangeText");
|
||||
public static string ItemIcon = GetMenuValue("ItemIcon");
|
||||
public static string ChangeIcon = GetMenuValue("ChangeIcon");
|
||||
public static string AddIcon = GetMenuValue("AddIcon");
|
||||
public static string DeleteIcon = GetMenuValue("DeleteIcon");
|
||||
public static string ItemPosition = GetMenuValue("ItemPosition");
|
||||
public static string SetDefault = GetMenuValue("SetDefault");
|
||||
public static string SetTop = GetMenuValue("SetTop");
|
||||
public static string SetBottom = GetMenuValue("SetBottom");
|
||||
public static string OtherAttributes = GetMenuValue("OtherAttributes");
|
||||
public static string OnlyWithShift = GetMenuValue("OnlyWithShift");
|
||||
public static string OnlyInExplorer = GetMenuValue("OnlyInExplorer");
|
||||
public static string NoWorkingDirectory = GetMenuValue("NoWorkingDirectory");
|
||||
public static string ShowSeparator = GetMenuValue("ShowSeparator");
|
||||
public static string Details = GetMenuValue("Details");
|
||||
public static string WebSearch = GetMenuValue("WebSearch");
|
||||
public static string ChangeCommand = GetMenuValue("ChangeCommand");
|
||||
public static string FileProperties = GetMenuValue("FileProperties");
|
||||
public static string FileLocation = GetMenuValue("FileLocation");
|
||||
public static string RegistryLocation = GetMenuValue("RegistryLocation");
|
||||
public static string Delete = GetMenuValue("Delete");
|
||||
public static string DeleteReference = GetMenuValue("DeleteReference");
|
||||
public static string CopyGuid = GetMenuValue("CopyGuid");
|
||||
public static string InitialData = GetMenuValue("InitialData");
|
||||
}
|
||||
|
||||
public static string Text_NewItem = GetTextValue("NewItem");
|
||||
public static string Text_NewShellItem = GetTextValue("NewShellItem");
|
||||
public static string Text_NewSendToItem = GetTextValue("NewSendToItem");
|
||||
public static string Text_NewOpenWithItem = GetTextValue("NewOpenWithItem");
|
||||
public static string Text_NewGuidBlockedItem = GetTextValue("NewGuidBlockedItem");
|
||||
/// <summary>消息框</summary>
|
||||
public static class MessageBox
|
||||
{
|
||||
private static string GetMessageBoxValue(string key) => GetValue("MessageBox", key);
|
||||
public static string TextCannotBeEmpty = GetMessageBoxValue("TextCannotBeEmpty");
|
||||
public static string CommandCannotBeEmpty = GetMessageBoxValue("CommandCannotBeEmpty");
|
||||
public static string StringParsingFailed = GetMessageBoxValue("StringParsingFailed");
|
||||
public static string TextLengthCannotExceed80 = GetMessageBoxValue("TextLengthCannotExceed80");
|
||||
public static string ConfirmDeletePermanently = GetMessageBoxValue("ConfirmDeletePermanently");
|
||||
public static string ConfirmDeleteReference = GetMessageBoxValue("ConfirmDeleteReference");
|
||||
public static string ConfirmDelete = GetMessageBoxValue("ConfirmDelete");
|
||||
public static string ConfirmDeleteReferenced = GetMessageBoxValue("ConfirmDeleteReferenced");
|
||||
public static string CannotAddNewItem = GetMessageBoxValue("CannotAddNewItem");
|
||||
public static string UnsupportedFilename = GetMessageBoxValue("UnsupportedFilename");
|
||||
public static string UnsupportedExtension = GetMessageBoxValue("UnsupportedExtension");
|
||||
public static string CannotChangePath = GetMessageBoxValue("CannotChangePath");
|
||||
public static string CopiedToClipboard = GetMessageBoxValue("CopiedToClipboard");
|
||||
public static string UnknownGuid = GetMessageBoxValue("UnknownGuid");
|
||||
public static string HasBeenAdded = GetMessageBoxValue("HasBeenAdded");
|
||||
public static string EditInitialData = GetMessageBoxValue("EditInitialData");
|
||||
public static string PromptIsOpenItem = GetMessageBoxValue("PromptIsOpenItem");
|
||||
public static string RestartApp = GetMessageBoxValue("RestartApp");
|
||||
public static string UpdateApp = GetMessageBoxValue("UpdateApp");
|
||||
}
|
||||
|
||||
public static string Text_SelectExtension = GetTextValue("SelectExtension");
|
||||
public static string Text_CurrentExtension = GetTextValue("CurrentExtension");
|
||||
/// <summary>其他文本</summary>
|
||||
public static class Text
|
||||
{
|
||||
private static string GetTextValue(string key) => GetValue("Text", key);
|
||||
public static string ItemName = GetTextValue("ItemName");
|
||||
public static string ItemCommand = GetTextValue("ItemCommand");
|
||||
|
||||
public static string Text_DictionaryDescription = GetTextValue("DictionaryDescription");
|
||||
public static string Text_LanguageDictionary = GetTextValue("LanguageDictionary");
|
||||
public static string Text_GuidInfosDictionary = GetTextValue("GuidInfosDictionary");
|
||||
public static string Text_ThridRulesDictionary = GetTextValue("ThridRulesDictionary");
|
||||
public static string Text_CommonItemsDictionary = GetTextValue("CommonItemsDictionary");
|
||||
public static string Text_Translators = GetTextValue("Translators");
|
||||
public static string Text_OtherLanguages = GetTextValue("OtherLanguages");
|
||||
public static string Text_SelectSubMenuMode = GetTextValue("SelectSubMenuMode");
|
||||
public static string Text_AboutApp = GetTextValue("AboutApp");
|
||||
public static string Text_Dictionaries = GetTextValue("Dictionaries");
|
||||
public static string Text_Donate = GetTextValue("Donate");
|
||||
#endregion
|
||||
#region 提示
|
||||
public static string Tip_RestartExplorer = GetTipValue("RestartExplorer");
|
||||
public static string Tip_CustomFolder = GetTipValue("CustomFolder");
|
||||
public static string Tip_SendToDrive = GetTipValue("SendToDrive");
|
||||
public static string Tip_BuildSendtoMenu = GetTipValue("BuildSendtoMenu");
|
||||
public static string Tip_UseStoreOpenWith = GetTipValue("UseStoreOpenWith");
|
||||
public static string Tip_EditSubItems = GetTipValue("EditSubItems");
|
||||
public static string Tip_InvalidItem = GetTipValue("InvalidItem");
|
||||
public static string Tip_AddSeparator = GetTipValue("AddSeparator");
|
||||
public static string Tip_Separator = GetTipValue("Separator");
|
||||
public static string Tip_AddExistingItems = GetTipValue("AddExistingItems");
|
||||
public static string Tip_AddCommonItems = GetTipValue("AddCommonItems");
|
||||
#endregion
|
||||
#region 国际化字符串
|
||||
/// <summary>确定</summary>
|
||||
public static readonly string Ok = ResourceString.GetDirectString("@shell32.dll,-9752");
|
||||
/// <summary>取消</summary>
|
||||
public static readonly string Cancel = ResourceString.GetDirectString("@shell32.dll,-9751");
|
||||
/// <summary>浏览</summary>
|
||||
public static readonly string Browse = ResourceString.GetDirectString("@shell32.dll,-9015");
|
||||
/// <summary>打开</summary>
|
||||
public static readonly string Open = ResourceString.GetDirectString("@shell32.dll,-12850");
|
||||
/// <summary>编辑</summary>
|
||||
public static readonly string Edit = ResourceString.GetDirectString("@shell32.dll,-37398");
|
||||
/// <summary>打印</summary>
|
||||
public static readonly string Print = ResourceString.GetDirectString("@shell32.dll,-31250");
|
||||
/// <summary>搜索</summary>
|
||||
public static readonly string Find = ResourceString.GetDirectString("@shell32.dll,-9031");
|
||||
/// <summary>播放</summary>
|
||||
public static readonly string Play = ResourceString.GetDirectString("@shell32.dll,-31283");
|
||||
/// <summary>以管理员身份运行</summary>
|
||||
public static readonly string Runas = ResourceString.GetDirectString("@shell32.dll,-37417");
|
||||
/// <summary>保存</summary>
|
||||
public static readonly string Save = ResourceString.GetDirectString("@shell32.dll,-38243");
|
||||
/// <summary>程序</summary>
|
||||
public static readonly string Programs = ResourceString.GetDirectString("@shell32.dll,-21782");
|
||||
/// <summary>可移动磁盘</summary>
|
||||
public static readonly string RemovableDrive = ResourceString.GetDirectString("@shell32.dll,-9309");
|
||||
/// <summary>映射网络驱动器</summary>
|
||||
public static readonly string MapNetworkDrive = ResourceString.GetDirectString("@shell32.dll,-31300");
|
||||
/// <summary>断开网络驱动器的连接</summary>
|
||||
public static readonly string DisconnectNetworkDrive = ResourceString.GetDirectString("@shell32.dll,-31304");
|
||||
/// <summary>回收站属性</summary>
|
||||
public static readonly string RecycleBinProperties = ResourceString.GetDirectString("@shell32.dll,-31338");
|
||||
///<summary>文件或文件夹不存在</summary>
|
||||
public static readonly string FileOrFolderNotExists = ResourceString.GetDirectString("@shell32.dll,-4132");
|
||||
#endregion
|
||||
public static string Single = GetTextValue("Single");
|
||||
public static string Multi = GetTextValue("Multi");
|
||||
|
||||
public static string EditSubItems = GetTextValue("EditSubItems");
|
||||
public static string Separator = GetTextValue("Separator");
|
||||
public static string InvalidItem = GetTextValue("InvalidItem");
|
||||
public static string CheckReference = GetTextValue("CheckReference");
|
||||
public static string CheckCommon = GetTextValue("CheckCommon");
|
||||
public static string InputGuid = GetTextValue("InputGuid");
|
||||
|
||||
public static string Explore = GetTextValue("Explore");
|
||||
public static string CustomFolder = GetTextValue("CustomFolder");
|
||||
public static string BuildSendtoMenu = GetTextValue("BuildSendtoMenu");
|
||||
public static string UseStoreOpenWith = GetTextValue("UseStoreOpenWith");
|
||||
public static string RestartExplorer = GetTextValue("RestartExplorer");
|
||||
|
||||
public static string NewItem = GetTextValue("NewItem");
|
||||
public static string NewShellItem = GetTextValue("NewShellItem");
|
||||
public static string NewSendToItem = GetTextValue("NewSendToItem");
|
||||
public static string NewOpenWithItem = GetTextValue("NewOpenWithItem");
|
||||
public static string NewGuidBlockedItem = GetTextValue("NewGuidBlockedItem");
|
||||
|
||||
public static string SelectExtension = GetTextValue("SelectExtension");
|
||||
public static string CurrentExtension = GetTextValue("CurrentExtension");
|
||||
|
||||
public static string DictionaryDescription = GetTextValue("DictionaryDescription");
|
||||
public static string LanguageDictionary = GetTextValue("LanguageDictionary");
|
||||
public static string GuidInfosDictionary = GetTextValue("GuidInfosDictionary");
|
||||
public static string ThridRulesDictionary = GetTextValue("ThridRulesDictionary");
|
||||
public static string CommonItemsDictionary = GetTextValue("CommonItemsDictionary");
|
||||
public static string Translators = GetTextValue("Translators");
|
||||
public static string OtherLanguages = GetTextValue("OtherLanguages");
|
||||
public static string SelectSubMenuMode = GetTextValue("SelectSubMenuMode");
|
||||
public static string AboutApp = GetTextValue("AboutApp");
|
||||
public static string Dictionaries = GetTextValue("Dictionaries");
|
||||
public static string Donate = GetTextValue("Donate");
|
||||
}
|
||||
|
||||
/// <summary>提示文本</summary>
|
||||
public static class Tip
|
||||
{
|
||||
private static string GetTipValue(string key) => GetValue("Tip", key);
|
||||
public static string RestartExplorer = GetTipValue("RestartExplorer");
|
||||
public static string CustomFolder = GetTipValue("CustomFolder");
|
||||
public static string SendToDrive = GetTipValue("SendToDrive");
|
||||
public static string BuildSendtoMenu = GetTipValue("BuildSendtoMenu");
|
||||
public static string UseStoreOpenWith = GetTipValue("UseStoreOpenWith");
|
||||
public static string EditSubItems = GetTipValue("EditSubItems");
|
||||
public static string InvalidItem = GetTipValue("InvalidItem");
|
||||
public static string AddSeparator = GetTipValue("AddSeparator");
|
||||
public static string Separator = GetTipValue("Separator");
|
||||
public static string AddExistingItems = GetTipValue("AddExistingItems");
|
||||
public static string AddCommonItems = GetTipValue("AddCommonItems");
|
||||
}
|
||||
|
||||
/// <summary>国际化字符串</summary>
|
||||
public static class Indirect
|
||||
{
|
||||
/// <summary>确定</summary>
|
||||
public static readonly string Ok = ResourceString.GetDirectString("@shell32.dll,-9752");
|
||||
/// <summary>取消</summary>
|
||||
public static readonly string Cancel = ResourceString.GetDirectString("@shell32.dll,-9751");
|
||||
/// <summary>浏览</summary>
|
||||
public static readonly string Browse = ResourceString.GetDirectString("@shell32.dll,-9015");
|
||||
/// <summary>打开</summary>
|
||||
public static readonly string Open = ResourceString.GetDirectString("@shell32.dll,-12850");
|
||||
/// <summary>编辑</summary>
|
||||
public static readonly string Edit = ResourceString.GetDirectString("@shell32.dll,-37398");
|
||||
/// <summary>打印</summary>
|
||||
public static readonly string Print = ResourceString.GetDirectString("@shell32.dll,-31250");
|
||||
/// <summary>搜索</summary>
|
||||
public static readonly string Find = ResourceString.GetDirectString("@shell32.dll,-9031");
|
||||
/// <summary>播放</summary>
|
||||
public static readonly string Play = ResourceString.GetDirectString("@shell32.dll,-31283");
|
||||
/// <summary>以管理员身份运行</summary>
|
||||
public static readonly string Runas = ResourceString.GetDirectString("@shell32.dll,-37417");
|
||||
/// <summary>保存</summary>
|
||||
public static readonly string Save = ResourceString.GetDirectString("@shell32.dll,-38243");
|
||||
/// <summary>程序</summary>
|
||||
public static readonly string Programs = ResourceString.GetDirectString("@shell32.dll,-21782");
|
||||
/// <summary>可移动磁盘</summary>
|
||||
public static readonly string RemovableDrive = ResourceString.GetDirectString("@shell32.dll,-9309");
|
||||
/// <summary>映射网络驱动器</summary>
|
||||
public static readonly string MapNetworkDrive = ResourceString.GetDirectString("@shell32.dll,-31300");
|
||||
/// <summary>断开网络驱动器的连接</summary>
|
||||
public static readonly string DisconnectNetworkDrive = ResourceString.GetDirectString("@shell32.dll,-31304");
|
||||
/// <summary>回收站属性</summary>
|
||||
public static readonly string RecycleBinProperties = ResourceString.GetDirectString("@shell32.dll,-31338");
|
||||
///<summary>文件或文件夹不存在</summary>
|
||||
public static readonly string FileOrFolderNotExists = ResourceString.GetDirectString("@shell32.dll,-4132");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ namespace BulePointLilac.Controls
|
||||
public sealed class InputDialog : CommonDialog
|
||||
{
|
||||
/// <summary>输入对话框标题</summary>
|
||||
public string Title { get; set; } = AppString.General_AppName;
|
||||
public string Title { get; set; } = AppString.General.AppName;
|
||||
/// <summary>输入对话框文本框文本</summary>
|
||||
public string Text { get; set; }
|
||||
|
||||
@@ -54,14 +54,14 @@ namespace BulePointLilac.Controls
|
||||
{
|
||||
Anchor = AnchorStyles.Bottom | AnchorStyles.Right,
|
||||
DialogResult = DialogResult.OK,
|
||||
Text = AppString.Ok,
|
||||
Text = AppString.Indirect.Ok,
|
||||
AutoSize = true
|
||||
};
|
||||
readonly Button BtnCancel = new Button
|
||||
{
|
||||
Anchor = AnchorStyles.Bottom | AnchorStyles.Right,
|
||||
DialogResult = DialogResult.Cancel,
|
||||
Text = AppString.Cancel,
|
||||
Text = AppString.Indirect.Cancel,
|
||||
AutoSize = true
|
||||
};
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BulePointLilac.Methods
|
||||
{
|
||||
public IniReader(StringBuilder sb)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(sb.ToString())) return;
|
||||
if(string.IsNullOrWhiteSpace(sb.ToString())) return;
|
||||
List<string> lines = sb.ToString().Split(new[] { "\r\n", "\n" },
|
||||
StringSplitOptions.RemoveEmptyEntries).ToList();//拆分为行
|
||||
lines.ForEach(line => line.Trim());
|
||||
@@ -19,13 +19,13 @@ namespace BulePointLilac.Methods
|
||||
|
||||
public IniReader(string filePath)
|
||||
{
|
||||
if (!File.Exists(filePath)) return;
|
||||
if(!File.Exists(filePath)) return;
|
||||
List<string> lines = new List<string>();
|
||||
using (StreamReader reader = new StreamReader(filePath, EncodingType.GetType(filePath)))
|
||||
while (!reader.EndOfStream)
|
||||
using(StreamReader reader = new StreamReader(filePath, EncodingType.GetType(filePath)))
|
||||
while(!reader.EndOfStream)
|
||||
{
|
||||
string line = reader.ReadLine().Trim();
|
||||
if (line != string.Empty) lines.Add(line);
|
||||
if(line != string.Empty) lines.Add(line);
|
||||
}
|
||||
ReadLines(lines);
|
||||
}
|
||||
@@ -39,26 +39,26 @@ namespace BulePointLilac.Methods
|
||||
line => line.StartsWith(";")//移除注释
|
||||
|| (!line.StartsWith("[") && !line.Contains("=")));//移除非section行且非key行
|
||||
|
||||
if (lines.Count == 0) return;
|
||||
if(lines.Count == 0) return;
|
||||
|
||||
List<int> indexs = new List<int> { 0 };
|
||||
for (int i = 1; i < lines.Count; i++)
|
||||
for(int i = 1; i < lines.Count; i++)
|
||||
{
|
||||
if (lines[i].StartsWith("[")) indexs.Add(i);//获取section行号
|
||||
if(lines[i].StartsWith("[")) indexs.Add(i);//获取section行号
|
||||
}
|
||||
indexs.Add(lines.Count);
|
||||
|
||||
for (int i = 0; i < indexs.Count - 1; i++)
|
||||
for(int i = 0; i < indexs.Count - 1; i++)
|
||||
{
|
||||
string section = lines[indexs[i]];
|
||||
int m = section.IndexOf(']') - 1;
|
||||
if (m < 0) continue;
|
||||
if(m < 0) continue;
|
||||
section = section.Substring(1, m);
|
||||
if (rootDic.ContainsKey(section)) continue;
|
||||
if(rootDic.ContainsKey(section)) continue;
|
||||
var keyValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
rootDic.Add(section, keyValues);
|
||||
|
||||
for (int j = indexs[i] + 1; j < indexs[i + 1]; j++)
|
||||
for(int j = indexs[i] + 1; j < indexs[i + 1]; j++)
|
||||
{
|
||||
int k = lines[j].IndexOf('=');
|
||||
string key = lines[j].Substring(0, k).TrimEnd();
|
||||
@@ -70,8 +70,8 @@ namespace BulePointLilac.Methods
|
||||
|
||||
public string GetValue(string section, string key)
|
||||
{
|
||||
if (rootDic.TryGetValue(section, out Dictionary<string, string> sectionDic))
|
||||
if (sectionDic.TryGetValue(key, out string value))
|
||||
if(rootDic.TryGetValue(section, out Dictionary<string, string> sectionDic))
|
||||
if(sectionDic.TryGetValue(key, out string value))
|
||||
return value;
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BulePointLilac.Methods
|
||||
public static DialogResult Show(string text, MessageBoxButtons buttons = MessageBoxButtons.OK,
|
||||
MessageBoxIcon icon = MessageBoxIcon.Warning, string caption = null)
|
||||
{
|
||||
return MessageBox.Show(text, caption ?? AppString.General_AppName, buttons, icon);
|
||||
return MessageBox.Show(text, caption ?? AppString.General.AppName, buttons, icon);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ namespace ContextMenuManager.Controls
|
||||
readonly Label lblInfo = new Label
|
||||
{
|
||||
Font = new Font(SystemFonts.MenuFont.FontFamily, 10F),
|
||||
Text = AppString.Text_Donate,
|
||||
Text = AppString.Text.Donate,
|
||||
AutoSize = true
|
||||
};
|
||||
|
||||
@@ -93,18 +93,18 @@ namespace ContextMenuManager.Controls
|
||||
}
|
||||
|
||||
readonly TabPage[] pages = new TabPage[] {
|
||||
new TabPage(AppString.Text_DictionaryDescription),
|
||||
new TabPage(AppString.Text_LanguageDictionary),
|
||||
new TabPage(AppString.Text_GuidInfosDictionary),
|
||||
new TabPage(AppString.Text_ThridRulesDictionary),
|
||||
new TabPage(AppString.Text_CommonItemsDictionary)
|
||||
new TabPage(AppString.Text.DictionaryDescription),
|
||||
new TabPage(AppString.Text.LanguageDictionary),
|
||||
new TabPage(AppString.Text.GuidInfosDictionary),
|
||||
new TabPage(AppString.Text.ThridRulesDictionary),
|
||||
new TabPage(AppString.Text.CommonItemsDictionary)
|
||||
};
|
||||
readonly AboutAppBox[] boxs = new AboutAppBox[5];
|
||||
readonly ContextMenuStrip cms = new ContextMenuStrip();
|
||||
readonly ToolStripItem[] items = new ToolStripItem[] {
|
||||
new ToolStripMenuItem(AppString.Edit),
|
||||
new ToolStripMenuItem(AppString.Indirect.Edit),
|
||||
new ToolStripSeparator(),
|
||||
new ToolStripMenuItem(AppString.Save)
|
||||
new ToolStripMenuItem(AppString.Indirect.Save)
|
||||
};
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
@@ -174,7 +174,7 @@ namespace ContextMenuManager.Controls
|
||||
{
|
||||
if(hadLoaded) return;
|
||||
hadLoaded = true;
|
||||
boxs[0].Text = AppString.Text_Dictionaries;
|
||||
boxs[0].Text = AppString.Text.Dictionaries;
|
||||
await Task.Run(() => boxs[1].BeginInvoke(new Action<string>(boxs[1].LoadIni), new[] { Properties.Resources.AppLanguageDic }));
|
||||
await Task.Run(() => boxs[2].BeginInvoke(new Action<string>(boxs[2].LoadIni), new[] { Properties.Resources.GuidInfosDic }));
|
||||
await Task.Run(() => boxs[3].BeginInvoke(new Action<string>(boxs[3].LoadXml), new[] { Properties.Resources.ThirdRulesDic }));
|
||||
@@ -204,7 +204,7 @@ namespace ContextMenuManager.Controls
|
||||
|
||||
readonly LinkLabel llbOtherLanguages = new LinkLabel
|
||||
{
|
||||
Text = AppString.Text_OtherLanguages,
|
||||
Text = AppString.Text.OtherLanguages,
|
||||
AutoSize = true
|
||||
};
|
||||
|
||||
@@ -236,7 +236,7 @@ namespace ContextMenuManager.Controls
|
||||
cmbLanguages.Items.Clear();
|
||||
cmbLanguages.Items.Add("(默认) 简体中文");
|
||||
cmbLanguages.SelectedIndex = 0;
|
||||
string str = AppString.Text_Translators + Environment.NewLine;
|
||||
string str = AppString.Text.Translators + Environment.NewLine;
|
||||
DirectoryInfo di = new DirectoryInfo(Program.LanguagesDir);
|
||||
if(di.Exists)
|
||||
{
|
||||
@@ -265,7 +265,7 @@ namespace ContextMenuManager.Controls
|
||||
string path = "default";
|
||||
if(cmbLanguages.SelectedIndex > 0) path = iniPaths[cmbLanguages.SelectedIndex - 1];
|
||||
new IniFileHelper(Program.ConfigIniPath).SetValue("General", "Language", path);
|
||||
MessageBoxEx.Show(AppString.MessageBox_RestartApp, MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
MessageBoxEx.Show(AppString.MessageBox.RestartApp, MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
Application.Restart();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace ContextMenuManager.Controls
|
||||
{
|
||||
public AddCommonButton() : base(AppImage.AddCommon)
|
||||
{
|
||||
MyToolTip.SetToolTip(this, AppString.Tip_AddCommonItems);
|
||||
MyToolTip.SetToolTip(this, AppString.Tip.AddCommonItems);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,8 +13,8 @@ namespace ContextMenuManager.Controls
|
||||
this.Visible = false;
|
||||
this.Dock = DockStyle.Bottom;
|
||||
this.Image = AppImage.Explorer;
|
||||
this.Text = AppString.Text_RestartExplorer;
|
||||
MyToolTip.SetToolTip(BtnRestart, AppString.Tip_RestartExplorer);
|
||||
this.Text = AppString.Text.RestartExplorer;
|
||||
MyToolTip.SetToolTip(BtnRestart, AppString.Tip.RestartExplorer);
|
||||
this.AddCtr(BtnRestart);
|
||||
this.CanMoveForm();
|
||||
BtnRestart.MouseDown += (sender, e) => { Explorer.ReStart(); this.Visible = false; };
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace ContextMenuManager.Controls
|
||||
{
|
||||
this.AcceptButton = btnOk;
|
||||
this.CancelButton = btnCancel;
|
||||
this.Text = AppString.Text_SelectExtension;
|
||||
this.Text = AppString.Text.SelectExtension;
|
||||
this.Font = SystemFonts.MenuFont;
|
||||
this.ShowIcon = this.ShowInTaskbar = false;
|
||||
this.MaximizeBox = this.MinimizeBox = false;
|
||||
@@ -82,7 +82,7 @@ namespace ContextMenuManager.Controls
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBoxEx.Show(AppString.MessageBox_UnsupportedExtension);
|
||||
MessageBoxEx.Show(AppString.MessageBox.UnsupportedExtension);
|
||||
cmbExtension.Focus();
|
||||
}
|
||||
};
|
||||
@@ -98,13 +98,13 @@ namespace ContextMenuManager.Controls
|
||||
};
|
||||
readonly Button btnOk = new Button
|
||||
{
|
||||
Text = AppString.Ok,
|
||||
Text = AppString.Indirect.Ok,
|
||||
AutoSize = true
|
||||
};
|
||||
readonly Button btnCancel = new Button
|
||||
{
|
||||
DialogResult = DialogResult.Cancel,
|
||||
Text = AppString.Cancel,
|
||||
Text = AppString.Indirect.Cancel,
|
||||
AutoSize = true
|
||||
};
|
||||
|
||||
|
||||
@@ -34,11 +34,11 @@ namespace ContextMenuManager.Controls
|
||||
|
||||
private void AddNewItem()
|
||||
{
|
||||
NewItem newItem = new NewItem { Text = AppString.Text_NewGuidBlockedItem };
|
||||
NewItem newItem = new NewItem { Text = AppString.Text.NewGuidBlockedItem };
|
||||
this.AddItem(newItem);
|
||||
newItem.NewItemAdd += (sender, e) =>
|
||||
{
|
||||
using(InputDialog dlg = new InputDialog { Title = AppString.Text_InputGuid })
|
||||
using(InputDialog dlg = new InputDialog { Title = AppString.Text.InputGuid })
|
||||
{
|
||||
if(GuidInfo.TryGetGuid(Clipboard.GetText(), out Guid guid)) dlg.Text = guid.ToString();
|
||||
if(dlg.ShowDialog() != DialogResult.OK) return;
|
||||
@@ -52,14 +52,14 @@ namespace ContextMenuManager.Controls
|
||||
{
|
||||
if(((GuidBlockedItem)Controls[i]).Guid.Equals(guid))
|
||||
{
|
||||
MessageBoxEx.Show(AppString.MessageBox_HasBeenAdded);
|
||||
MessageBoxEx.Show(AppString.MessageBox.HasBeenAdded);
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.InsertItem(new GuidBlockedItem(guid, guidPath), 1);
|
||||
ExplorerRestarter.NeedRestart = true;
|
||||
}
|
||||
else MessageBoxEx.Show(AppString.MessageBox_UnknownGuid);
|
||||
else MessageBoxEx.Show(AppString.MessageBox.UnknownGuid);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace ContextMenuManager.Controls
|
||||
((MyListItem)item).AddCtr(this);
|
||||
this.MouseDown += (sender, e) =>
|
||||
{
|
||||
if(MessageBoxEx.Show(AppString.MessageBox_ConfirmDelete,
|
||||
if(MessageBoxEx.Show(AppString.MessageBox.ConfirmDelete,
|
||||
MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||
item.DeleteMe();
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace ContextMenuManager.Controls
|
||||
|
||||
sealed class ChangeCommandMenuItem : ToolStripMenuItem
|
||||
{
|
||||
public ChangeCommandMenuItem(ITsiCommandItem item) : base(AppString.Menu_ChangeCommand)
|
||||
public ChangeCommandMenuItem(ITsiCommandItem item) : base(AppString.Menu.ChangeCommand)
|
||||
{
|
||||
this.Click += (sender, e) =>
|
||||
{
|
||||
@@ -23,12 +23,12 @@ namespace ContextMenuManager.Controls
|
||||
|
||||
public static string ChangeCommand(string command)
|
||||
{
|
||||
using(InputDialog dlg = new InputDialog { Text = command, Title = AppString.Menu_ChangeCommand })
|
||||
using(InputDialog dlg = new InputDialog { Text = command, Title = AppString.Menu.ChangeCommand })
|
||||
{
|
||||
if(dlg.ShowDialog() != DialogResult.OK) return null;
|
||||
if(string.IsNullOrEmpty(dlg.Text))
|
||||
{
|
||||
MessageBoxEx.Show(AppString.MessageBox_CommandCannotBeEmpty);
|
||||
MessageBoxEx.Show(AppString.MessageBox.CommandCannotBeEmpty);
|
||||
return ChangeCommand(command);
|
||||
}
|
||||
else return dlg.Text;
|
||||
|
||||
@@ -11,11 +11,11 @@ namespace ContextMenuManager.Controls
|
||||
|
||||
sealed class DeleteMeMenuItem : ToolStripMenuItem
|
||||
{
|
||||
public DeleteMeMenuItem(ITsiDeleteItem item) : base(AppString.Menu_Delete)
|
||||
public DeleteMeMenuItem(ITsiDeleteItem item) : base(AppString.Menu.Delete)
|
||||
{
|
||||
this.Click += (sender, e) =>
|
||||
{
|
||||
if(MessageBoxEx.Show(AppString.MessageBox_ConfirmDeletePermanently,
|
||||
if(MessageBoxEx.Show(AppString.MessageBox.ConfirmDeletePermanently,
|
||||
MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||
item.DeleteMe();
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace ContextMenuManager.Controls
|
||||
|
||||
sealed class FileLocationMenuItem : ToolStripMenuItem
|
||||
{
|
||||
public FileLocationMenuItem(ITsiFilePathItem item) : base(AppString.Menu_FileLocation)
|
||||
public FileLocationMenuItem(ITsiFilePathItem item) : base(AppString.Menu.FileLocation)
|
||||
{
|
||||
bool FileExists() => File.Exists(item.ItemFilePath);
|
||||
bool DirExists() => Directory.Exists(item.ItemFilePath);
|
||||
@@ -31,7 +31,7 @@ namespace ContextMenuManager.Controls
|
||||
|
||||
sealed class FilePropertiesMenuItem : ToolStripMenuItem
|
||||
{
|
||||
public FilePropertiesMenuItem(ITsiFilePathItem item) : base(AppString.Menu_FileProperties)
|
||||
public FilePropertiesMenuItem(ITsiFilePathItem item) : base(AppString.Menu.FileProperties)
|
||||
{
|
||||
item.ContextMenuStrip.Opening += (sender, e)
|
||||
=> this.Visible = File.Exists(item.ItemFilePath) || Directory.Exists(item.ItemFilePath);
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace ContextMenuManager.Controls
|
||||
|
||||
sealed class ChangeIconMenuItem : ToolStripMenuItem
|
||||
{
|
||||
public ChangeIconMenuItem(ITsiIconItem item) : base(AppString.Menu_ChangeIcon)
|
||||
public ChangeIconMenuItem(ITsiIconItem item) : base(AppString.Menu.ChangeIcon)
|
||||
{
|
||||
this.Click += (sender, e) =>
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace ContextMenuManager.Controls
|
||||
sealed class RegLocationMenuItem : ToolStripMenuItem
|
||||
{
|
||||
|
||||
public RegLocationMenuItem(ITsiRegPathItem item) : base(AppString.Menu_RegistryLocation)
|
||||
public RegLocationMenuItem(ITsiRegPathItem item) : base(AppString.Menu.RegistryLocation)
|
||||
{
|
||||
this.Click += (sender, e) => ShowPath(item.RegPath, PathType.Registry);
|
||||
item.ContextMenuStrip.Opening += (sender, e) =>
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace ContextMenuManager.Controls
|
||||
|
||||
sealed class ChangeTextMenuItem : ToolStripMenuItem
|
||||
{
|
||||
public ChangeTextMenuItem(ITsiTextItem item) : base(AppString.Menu_ChangeText)
|
||||
public ChangeTextMenuItem(ITsiTextItem item) : base(AppString.Menu.ChangeText)
|
||||
{
|
||||
this.Click += (sender, e) =>
|
||||
{
|
||||
@@ -26,17 +26,17 @@ namespace ContextMenuManager.Controls
|
||||
|
||||
public static string ChangeText(string text)
|
||||
{
|
||||
using(InputDialog dlg = new InputDialog { Text = text, Title = AppString.Menu_ChangeText })
|
||||
using(InputDialog dlg = new InputDialog { Text = text, Title = AppString.Menu.ChangeText })
|
||||
{
|
||||
if(dlg.ShowDialog() != DialogResult.OK) return null;
|
||||
if(dlg.Text.Length == 0)
|
||||
{
|
||||
MessageBoxEx.Show(AppString.MessageBox_TextCannotBeEmpty);
|
||||
MessageBoxEx.Show(AppString.MessageBox.TextCannotBeEmpty);
|
||||
return ChangeText(text);
|
||||
}
|
||||
else if(ResourceString.GetDirectString(dlg.Text).Length == 0)
|
||||
{
|
||||
MessageBoxEx.Show(AppString.MessageBox_StringParsingFailed);
|
||||
MessageBoxEx.Show(AppString.MessageBox.StringParsingFailed);
|
||||
return ChangeText(text);
|
||||
}
|
||||
else return dlg.Text;
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace ContextMenuManager.Controls
|
||||
{
|
||||
public static string EnginePath = "https://www.baidu.com/s?wd=";
|
||||
|
||||
public WebSearchMenuItem(ITsiWebSearchItem item) : base(AppString.Menu_WebSearch)
|
||||
public WebSearchMenuItem(ITsiWebSearchItem item) : base(AppString.Menu.WebSearch)
|
||||
{
|
||||
this.Click += (sender, e) => WebSearch(item.SearchText);
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace ContextMenuManager.Controls
|
||||
public NewItem()
|
||||
{
|
||||
this.Image = AppImage.NewItem;
|
||||
this.Text = AppString.Text_NewItem;
|
||||
this.Text = AppString.Text.NewItem;
|
||||
this.AddCtr(BtnAddNewItem);
|
||||
MyToolTip.SetToolTip(BtnAddNewItem, AppString.Text_NewItem);
|
||||
MyToolTip.SetToolTip(BtnAddNewItem, AppString.Text.NewItem);
|
||||
BtnAddNewItem.MouseDown += (sender, e) => NewItemAdd?.Invoke(null, null);
|
||||
}
|
||||
public event EventHandler NewItemAdd;
|
||||
|
||||
@@ -26,30 +26,30 @@ namespace ContextMenuManager.Controls
|
||||
|
||||
protected readonly Label lblName = new Label
|
||||
{
|
||||
Text = AppString.Text_ItemName,
|
||||
Text = AppString.Text.ItemName,
|
||||
AutoSize = true
|
||||
};
|
||||
protected readonly Label lblCommand = new Label
|
||||
{
|
||||
Text = AppString.Text_ItemCommand,
|
||||
Text = AppString.Text.ItemCommand,
|
||||
AutoSize = true
|
||||
};
|
||||
protected readonly TextBox txtText = new TextBox();
|
||||
protected readonly TextBox txtCommand = new TextBox();
|
||||
protected readonly Button btnBrowse = new Button
|
||||
{
|
||||
Text = AppString.Browse,
|
||||
Text = AppString.Indirect.Browse,
|
||||
AutoSize = true
|
||||
};
|
||||
protected readonly Button btnOk = new Button
|
||||
{
|
||||
Text = AppString.Ok,
|
||||
Text = AppString.Indirect.Ok,
|
||||
AutoSize = true
|
||||
};
|
||||
protected readonly Button btnCancel = new Button
|
||||
{
|
||||
DialogResult = DialogResult.Cancel,
|
||||
Text = AppString.Cancel,
|
||||
Text = AppString.Indirect.Cancel,
|
||||
AutoSize = true
|
||||
};
|
||||
|
||||
|
||||
@@ -31,25 +31,25 @@ namespace ContextMenuManager.Controls
|
||||
protected override void InitializeComponents()
|
||||
{
|
||||
base.InitializeComponents();
|
||||
this.Text = AppString.Text_NewOpenWithItem;
|
||||
this.Text = AppString.Text.NewOpenWithItem;
|
||||
btnBrowse.Click += (sender, e) => BrowseFile();
|
||||
btnOk.Click += (sender, e) =>
|
||||
{
|
||||
if(string.IsNullOrEmpty(ItemText))
|
||||
{
|
||||
MessageBoxEx.Show(AppString.MessageBox_TextCannotBeEmpty);
|
||||
MessageBoxEx.Show(AppString.MessageBox.TextCannotBeEmpty);
|
||||
return;
|
||||
}
|
||||
if(string.IsNullOrWhiteSpace(ItemCommand))
|
||||
{
|
||||
MessageBoxEx.Show(AppString.MessageBox_TextCannotBeEmpty);
|
||||
MessageBoxEx.Show(AppString.MessageBox.TextCannotBeEmpty);
|
||||
return;
|
||||
}
|
||||
FilePath = ObjectPath.ExtractFilePath(ItemCommand);
|
||||
AppRegPath = $@"HKEY_CLASSES_ROOT\Applications\{Path.GetFileName(FilePath)}";
|
||||
if(FilePath == null || RegistryEx.GetRegistryKey(AppRegPath) != null)
|
||||
{
|
||||
MessageBoxEx.Show(AppString.MessageBox_UnsupportedFilename);
|
||||
MessageBoxEx.Show(AppString.MessageBox.UnsupportedFilename);
|
||||
return;
|
||||
}
|
||||
AddNewItem();
|
||||
@@ -61,7 +61,7 @@ namespace ContextMenuManager.Controls
|
||||
{
|
||||
using(OpenFileDialog dlg = new OpenFileDialog())
|
||||
{
|
||||
dlg.Filter = $"{AppString.Programs}|*.exe";
|
||||
dlg.Filter = $"{AppString.Indirect.Programs}|*.exe";
|
||||
if(dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
ItemCommand = $"\"{dlg.FileName}\" \"%1\"";
|
||||
|
||||
@@ -27,20 +27,20 @@ namespace ContextMenuManager.Controls
|
||||
|
||||
readonly RadioButton rdoFile = new RadioButton
|
||||
{
|
||||
Text = AppString.SideBar_File,
|
||||
Text = AppString.SideBar.File,
|
||||
AutoSize = true,
|
||||
Checked = true
|
||||
};
|
||||
readonly RadioButton rdoFolder = new RadioButton
|
||||
{
|
||||
Text = AppString.SideBar_Folder,
|
||||
Text = AppString.SideBar.Folder,
|
||||
AutoSize = true
|
||||
};
|
||||
|
||||
protected override void InitializeComponents()
|
||||
{
|
||||
base.InitializeComponents();
|
||||
this.Text = AppString.Text_NewSendToItem;
|
||||
this.Text = AppString.Text.NewSendToItem;
|
||||
this.Controls.AddRange(new[] { rdoFile, rdoFolder });
|
||||
rdoFile.Top = rdoFolder.Top = btnOk.Top;
|
||||
rdoFile.Left = lblCommand.Left;
|
||||
@@ -56,17 +56,17 @@ namespace ContextMenuManager.Controls
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(ItemText))
|
||||
{
|
||||
MessageBoxEx.Show(AppString.MessageBox_TextCannotBeEmpty);
|
||||
MessageBoxEx.Show(AppString.MessageBox.TextCannotBeEmpty);
|
||||
return;
|
||||
}
|
||||
if(string.IsNullOrWhiteSpace(ItemCommand))
|
||||
{
|
||||
MessageBoxEx.Show(AppString.MessageBox_CommandCannotBeEmpty);
|
||||
MessageBoxEx.Show(AppString.MessageBox.CommandCannotBeEmpty);
|
||||
return;
|
||||
}
|
||||
if(ObjectPath.ExtractFilePath(ItemCommand) == null && !Directory.Exists(ItemCommand))
|
||||
{
|
||||
MessageBoxEx.Show(AppString.FileOrFolderNotExists);
|
||||
MessageBoxEx.Show(AppString.Indirect.FileOrFolderNotExists);
|
||||
return;
|
||||
}
|
||||
AddNewItem();
|
||||
@@ -78,7 +78,7 @@ namespace ContextMenuManager.Controls
|
||||
{
|
||||
using(OpenFileDialog dlg = new OpenFileDialog())
|
||||
{
|
||||
dlg.Filter = $"{AppString.Programs}|*.exe;*.bat;*.cmd;*.vbs;*.vbe;*.jse;*.wsf";
|
||||
dlg.Filter = $"{AppString.Indirect.Programs}|*.exe;*.bat;*.cmd;*.vbs;*.vbe;*.jse;*.wsf";
|
||||
if(dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
ItemCommand = dlg.FileName;
|
||||
|
||||
@@ -36,13 +36,13 @@ namespace ContextMenuManager.Controls
|
||||
|
||||
readonly RadioButton rdoSingle = new RadioButton
|
||||
{
|
||||
Text = AppString.Text_Single,
|
||||
Text = AppString.Text.Single,
|
||||
AutoSize = true,
|
||||
Checked = true
|
||||
};
|
||||
readonly RadioButton rdoMulti = new RadioButton
|
||||
{
|
||||
Text = AppString.Text_Multi,
|
||||
Text = AppString.Text.Multi,
|
||||
AutoSize = true
|
||||
};
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace ContextMenuManager.Controls
|
||||
protected override void InitializeComponents()
|
||||
{
|
||||
base.InitializeComponents();
|
||||
this.Text = AppString.Text_NewShellItem;
|
||||
this.Text = AppString.Text.NewShellItem;
|
||||
this.Controls.AddRange(new[] { rdoSingle, rdoMulti });
|
||||
rdoSingle.Top = rdoMulti.Top = btnOk.Top;
|
||||
rdoSingle.Left = lblCommand.Left;
|
||||
@@ -81,7 +81,7 @@ namespace ContextMenuManager.Controls
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(txtText.Text))
|
||||
{
|
||||
MessageBoxEx.Show(AppString.MessageBox_TextCannotBeEmpty);
|
||||
MessageBoxEx.Show(AppString.MessageBox.TextCannotBeEmpty);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -95,7 +95,7 @@ namespace ContextMenuManager.Controls
|
||||
{
|
||||
using(OpenFileDialog dlg = new OpenFileDialog())
|
||||
{
|
||||
dlg.Filter = $"{AppString.Programs}|*.exe;*.bat;*.cmd;*.pif;*.com";
|
||||
dlg.Filter = $"{AppString.Indirect.Programs}|*.exe;*.bat;*.cmd;*.pif;*.com";
|
||||
if(dlg.ShowDialog() != DialogResult.OK) return;
|
||||
ItemCommand = $"\"{dlg.FileName}\"";
|
||||
ItemText = Path.GetFileNameWithoutExtension(dlg.FileName);
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace ContextMenuManager.Controls
|
||||
{
|
||||
if(ObjectPath.ExtractFilePath(value) != ItemFilePath)
|
||||
{
|
||||
MessageBoxEx.Show(AppString.MessageBox_CannotChangePath);
|
||||
MessageBoxEx.Show(AppString.MessageBox.CannotChangePath);
|
||||
}
|
||||
else Registry.SetValue(RegPath, "", value);
|
||||
}
|
||||
@@ -80,7 +80,7 @@ namespace ContextMenuManager.Controls
|
||||
}
|
||||
}
|
||||
|
||||
public string SearchText => $"{AppString.SideBar_OpenWith} {Text}";
|
||||
public string SearchText => $"{AppString.SideBar.OpenWith} {Text}";
|
||||
public string ItemFilePath { get; private set; }
|
||||
|
||||
public VisibleCheckBox ChkVisible { get; set; }
|
||||
@@ -92,7 +92,7 @@ namespace ContextMenuManager.Controls
|
||||
public FileLocationMenuItem TsiFileLocation { get; set; }
|
||||
public RegLocationMenuItem TsiRegLocation { get; set; }
|
||||
public DeleteMeMenuItem TsiDeleteMe { get; set; }
|
||||
readonly ToolStripMenuItem TsiDetails = new ToolStripMenuItem(AppString.Menu_Details);
|
||||
readonly ToolStripMenuItem TsiDetails = new ToolStripMenuItem(AppString.Menu.Details);
|
||||
|
||||
private void InitializeComponents()
|
||||
{
|
||||
|
||||
@@ -128,9 +128,9 @@ namespace ContextMenuManager.Controls
|
||||
},
|
||||
ItemInfo = new ItemInfo
|
||||
{
|
||||
Text = AppString.Text_CustomFolder,
|
||||
Text = AppString.Text.CustomFolder,
|
||||
Image = AppImage.CustomFolder,
|
||||
Tip = AppString.Tip_CustomFolder,
|
||||
Tip = AppString.Tip.CustomFolder,
|
||||
RestartExplorer = true
|
||||
}
|
||||
};
|
||||
@@ -143,7 +143,7 @@ namespace ContextMenuManager.Controls
|
||||
},
|
||||
ItemInfo = new ItemInfo
|
||||
{
|
||||
Text = $"{AppString.MapNetworkDrive} && {AppString.DisconnectNetworkDrive}",
|
||||
Text = $"{AppString.Indirect.MapNetworkDrive} && {AppString.Indirect.DisconnectNetworkDrive}",
|
||||
Image = AppImage.NetworkDrive,
|
||||
RestartExplorer = true
|
||||
}
|
||||
@@ -157,7 +157,7 @@ namespace ContextMenuManager.Controls
|
||||
},
|
||||
ItemInfo = new ItemInfo
|
||||
{
|
||||
Text = AppString.RecycleBinProperties,
|
||||
Text = AppString.Indirect.RecycleBinProperties,
|
||||
Image = AppImage.RecycleBinProperties,
|
||||
RestartExplorer = true
|
||||
}
|
||||
@@ -171,9 +171,9 @@ namespace ContextMenuManager.Controls
|
||||
},
|
||||
ItemInfo = new ItemInfo
|
||||
{
|
||||
Text = AppString.RemovableDrive,
|
||||
Text = AppString.Indirect.RemovableDrive,
|
||||
Image = AppImage.Drive,
|
||||
Tip = AppString.Tip_SendToDrive,
|
||||
Tip = AppString.Tip.SendToDrive,
|
||||
RestartExplorer = true
|
||||
}
|
||||
};
|
||||
@@ -186,9 +186,9 @@ namespace ContextMenuManager.Controls
|
||||
},
|
||||
ItemInfo = new ItemInfo
|
||||
{
|
||||
Text = AppString.Text_BuildSendtoMenu,
|
||||
Text = AppString.Text.BuildSendtoMenu,
|
||||
Image = AppImage.SendTo,
|
||||
Tip = AppString.Tip_BuildSendtoMenu
|
||||
Tip = AppString.Tip.BuildSendtoMenu
|
||||
}
|
||||
};
|
||||
|
||||
@@ -200,9 +200,9 @@ namespace ContextMenuManager.Controls
|
||||
},
|
||||
ItemInfo = new ItemInfo
|
||||
{
|
||||
Text = AppString.Text_UseStoreOpenWith,
|
||||
Text = AppString.Text.UseStoreOpenWith,
|
||||
Image = AppImage.MicrosoftStore,
|
||||
Tip = AppString.Tip_UseStoreOpenWith
|
||||
Tip = AppString.Tip.UseStoreOpenWith
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -30,14 +30,14 @@ namespace ContextMenuManager.Controls
|
||||
{
|
||||
Anchor = AnchorStyles.Bottom | AnchorStyles.Right,
|
||||
DialogResult = DialogResult.OK,
|
||||
Text = AppString.Ok,
|
||||
Text = AppString.Indirect.Ok,
|
||||
AutoSize = true
|
||||
};
|
||||
protected Button btnCancel = new Button
|
||||
{
|
||||
Anchor = AnchorStyles.Bottom | AnchorStyles.Right,
|
||||
DialogResult = DialogResult.Cancel,
|
||||
Text = AppString.Cancel,
|
||||
Text = AppString.Indirect.Cancel,
|
||||
AutoSize = true
|
||||
};
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace ContextMenuManager.Controls
|
||||
private string FileName => Path.GetFileName(FilePath);
|
||||
private string FileExtension => Path.GetExtension(FilePath);
|
||||
private bool IsShortcut => FileExtension.ToLower() == ".lnk";
|
||||
public string SearchText => $"{AppString.SideBar_SendTo} {Text}";
|
||||
public string SearchText => $"{AppString.SideBar.SendTo} {Text}";
|
||||
|
||||
public string ItemFilePath
|
||||
{
|
||||
@@ -127,7 +127,7 @@ namespace ContextMenuManager.Controls
|
||||
public FileLocationMenuItem TsiFileLocation { get; set; }
|
||||
public DeleteMeMenuItem TsiDeleteMe { get; set; }
|
||||
readonly ToolStripSeparator TsiIconSeparator = new ToolStripSeparator();
|
||||
readonly ToolStripMenuItem TsiDetails = new ToolStripMenuItem(AppString.Menu_Details);
|
||||
readonly ToolStripMenuItem TsiDetails = new ToolStripMenuItem(AppString.Menu.Details);
|
||||
|
||||
private void InitializeComponents()
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace ContextMenuManager.Controls
|
||||
this.ScenePath = scenePath;
|
||||
this.ShellPath = shellPath;
|
||||
this.ShellExPath = shellExPath;
|
||||
this.Text = AppString.Text_CheckCommon;
|
||||
this.Text = AppString.Text.CheckCommon;
|
||||
btnOk.Click += (sender, e) => GetSelectedItems();
|
||||
LoadItems();
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace ContextMenuManager.Controls
|
||||
private string BuckupPath => $@"{ShellExPath}\{(ItemVisible ? CmhParts[1] : CmhParts[0])}\{KeyName}";
|
||||
private bool IsOpenLnkItem => Guid.ToString() == LnkOpenGuid;
|
||||
private bool TryProtectOpenItem => IsOpenLnkItem && MessageBoxEx.Show
|
||||
(AppString.MessageBox_PromptIsOpenItem, MessageBoxButtons.YesNo) != DialogResult.Yes;
|
||||
(AppString.MessageBox.PromptIsOpenItem, MessageBoxButtons.YesNo) != DialogResult.Yes;
|
||||
|
||||
public bool ItemVisible
|
||||
{
|
||||
@@ -90,8 +90,8 @@ namespace ContextMenuManager.Controls
|
||||
public FileLocationMenuItem TsiFileLocation { get; set; }
|
||||
public RegLocationMenuItem TsiRegLocation { get; set; }
|
||||
public DeleteMeMenuItem TsiDeleteMe { get; set; }
|
||||
readonly ToolStripMenuItem TsiDetails = new ToolStripMenuItem(AppString.Menu_Details);
|
||||
readonly ToolStripMenuItem TsiCopyGuid = new ToolStripMenuItem(AppString.Menu_CopyGuid);
|
||||
readonly ToolStripMenuItem TsiDetails = new ToolStripMenuItem(AppString.Menu.Details);
|
||||
readonly ToolStripMenuItem TsiCopyGuid = new ToolStripMenuItem(AppString.Menu.CopyGuid);
|
||||
|
||||
private void InitializeComponents()
|
||||
{
|
||||
@@ -116,7 +116,7 @@ namespace ContextMenuManager.Controls
|
||||
private void CopyGuid()
|
||||
{
|
||||
Clipboard.SetText(Guid.ToString());
|
||||
MessageBoxEx.Show($"{AppString.MessageBox_CopiedToClipboard}:\n{Guid}",
|
||||
MessageBoxEx.Show($"{AppString.MessageBox.CopiedToClipboard}:\n{Guid}",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@ namespace ContextMenuManager.Controls
|
||||
/// <summary>Shell类型菜单特殊注册表项名默认名称</summary>
|
||||
private static readonly Dictionary<string, string> DefaultNames
|
||||
= new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) {
|
||||
{"open", AppString.Open }, {"edit", AppString.Edit }, {"print", AppString.Print },
|
||||
{"find", AppString.Find }, {"play", AppString.Play }, {"runas", AppString.Runas },
|
||||
{"explore", AppString.Text_Explore },//"浏览" 未找到合适的本地化字符串资源
|
||||
{"open", AppString.Indirect.Open }, {"edit", AppString.Indirect.Edit }, {"print", AppString.Indirect.Print },
|
||||
{"find", AppString.Indirect.Find }, {"play", AppString.Indirect.Play }, {"runas", AppString.Indirect.Runas },
|
||||
{"explore", AppString.Text.Explore },//"浏览" 未找到合适的本地化字符串资源
|
||||
};
|
||||
|
||||
/// <summary>菜单项目在菜单中出现的位置</summary>
|
||||
@@ -53,7 +53,7 @@ namespace ContextMenuManager.Controls
|
||||
private bool IsMultiItem => Registry.GetValue(RegPath, "SubCommands", null) != null;
|
||||
protected virtual bool IsSubItem => false;
|
||||
private bool IsOpenItem => KeyName.ToLower() == "open";
|
||||
private bool TryProtectOpenItem => IsOpenItem && MessageBoxEx.Show(AppString.MessageBox_PromptIsOpenItem,
|
||||
private bool TryProtectOpenItem => IsOpenItem && MessageBoxEx.Show(AppString.MessageBox.PromptIsOpenItem,
|
||||
MessageBoxButtons.YesNo) != DialogResult.Yes;
|
||||
|
||||
public string ItemFilePath => GuidInfo.GetFilePath(Guid) ?? ObjectPath.ExtractFilePath(ItemCommand);
|
||||
@@ -178,7 +178,7 @@ namespace ContextMenuManager.Controls
|
||||
{
|
||||
//MUIVerb长度不可超过80,超过80系统会隐藏该菜单项目
|
||||
if(ResourceString.GetDirectString(value).Length >= 80)
|
||||
MessageBoxEx.Show(AppString.MessageBox_TextLengthCannotExceed80);
|
||||
MessageBoxEx.Show(AppString.MessageBox.TextLengthCannotExceed80);
|
||||
else Registry.SetValue(RegPath, "MUIVerb", value);
|
||||
}
|
||||
}
|
||||
@@ -266,17 +266,17 @@ namespace ContextMenuManager.Controls
|
||||
public RegLocationMenuItem TsiRegLocation { get; set; }
|
||||
public DeleteMeMenuItem TsiDeleteMe { get; set; }
|
||||
|
||||
protected readonly ToolStripMenuItem TsiOtherAttributes = new ToolStripMenuItem(AppString.Menu_OtherAttributes);
|
||||
readonly ToolStripMenuItem TsiItemIcon = new ToolStripMenuItem(AppString.Menu_ItemIcon);
|
||||
readonly ToolStripMenuItem TsiDeleteIcon = new ToolStripMenuItem(AppString.Menu_DeleteIcon);
|
||||
readonly ToolStripMenuItem TsiPosition = new ToolStripMenuItem(AppString.Menu_ItemPosition);
|
||||
readonly ToolStripMenuItem TsiDefault = new ToolStripMenuItem(AppString.Menu_SetDefault);
|
||||
readonly ToolStripMenuItem TsiTop = new ToolStripMenuItem(AppString.Menu_SetTop);
|
||||
readonly ToolStripMenuItem TsiBottom = new ToolStripMenuItem(AppString.Menu_SetBottom);
|
||||
readonly ToolStripMenuItem TsiShift = new ToolStripMenuItem(AppString.Menu_OnlyWithShift);
|
||||
readonly ToolStripMenuItem TsiExplorer = new ToolStripMenuItem(AppString.Menu_OnlyInExplorer);
|
||||
readonly ToolStripMenuItem TsiNoWorkDir = new ToolStripMenuItem(AppString.Menu_NoWorkingDirectory);
|
||||
readonly ToolStripMenuItem TsiDetails = new ToolStripMenuItem(AppString.Menu_Details);
|
||||
protected readonly ToolStripMenuItem TsiOtherAttributes = new ToolStripMenuItem(AppString.Menu.OtherAttributes);
|
||||
readonly ToolStripMenuItem TsiItemIcon = new ToolStripMenuItem(AppString.Menu.ItemIcon);
|
||||
readonly ToolStripMenuItem TsiDeleteIcon = new ToolStripMenuItem(AppString.Menu.DeleteIcon);
|
||||
readonly ToolStripMenuItem TsiPosition = new ToolStripMenuItem(AppString.Menu.ItemPosition);
|
||||
readonly ToolStripMenuItem TsiDefault = new ToolStripMenuItem(AppString.Menu.SetDefault);
|
||||
readonly ToolStripMenuItem TsiTop = new ToolStripMenuItem(AppString.Menu.SetTop);
|
||||
readonly ToolStripMenuItem TsiBottom = new ToolStripMenuItem(AppString.Menu.SetBottom);
|
||||
readonly ToolStripMenuItem TsiShift = new ToolStripMenuItem(AppString.Menu.OnlyWithShift);
|
||||
readonly ToolStripMenuItem TsiExplorer = new ToolStripMenuItem(AppString.Menu.OnlyInExplorer);
|
||||
readonly ToolStripMenuItem TsiNoWorkDir = new ToolStripMenuItem(AppString.Menu.NoWorkingDirectory);
|
||||
readonly ToolStripMenuItem TsiDetails = new ToolStripMenuItem(AppString.Menu.Details);
|
||||
readonly PictureButton BtnSubItems = new PictureButton(AppImage.SubItems);
|
||||
|
||||
private void InitializeComponents()
|
||||
@@ -313,7 +313,7 @@ namespace ContextMenuManager.Controls
|
||||
TsiNoWorkDir.Click += (sender, e) => this.NoWorkingDirectory = !TsiNoWorkDir.Checked;
|
||||
ContextMenuStrip.Opening += (sender, e) => RefreshMenuItem();
|
||||
BtnSubItems.MouseDown += (sender, e) => ShowSubItems();
|
||||
MyToolTip.SetToolTip(BtnSubItems, AppString.Tip_EditSubItems);
|
||||
MyToolTip.SetToolTip(BtnSubItems, AppString.Tip.EditSubItems);
|
||||
this.AddCtr(BtnSubItems);
|
||||
}
|
||||
|
||||
@@ -328,12 +328,12 @@ namespace ContextMenuManager.Controls
|
||||
{
|
||||
if(this.HasIcon)
|
||||
{
|
||||
TsiChangeIcon.Text = AppString.Menu_ChangeIcon;
|
||||
TsiChangeIcon.Text = AppString.Menu.ChangeIcon;
|
||||
TsiDeleteIcon.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
TsiChangeIcon.Text = AppString.Menu_AddIcon;
|
||||
TsiChangeIcon.Text = AppString.Menu.AddIcon;
|
||||
TsiDeleteIcon.Visible = false;
|
||||
}
|
||||
TsiDeleteMe.Enabled = !IsOpenItem;
|
||||
@@ -364,7 +364,7 @@ namespace ContextMenuManager.Controls
|
||||
{
|
||||
using(ShellSubMenuDialog dlg = new ShellSubMenuDialog())
|
||||
{
|
||||
dlg.Text = AppString.Text_EditSubItems.Replace("%s", this.Text);
|
||||
dlg.Text = AppString.Text.EditSubItems.Replace("%s", this.Text);
|
||||
dlg.Icon = ResourceIcon.GetIcon(IconPath, IconIndex);
|
||||
dlg.ShowDialog(this.RegPath);
|
||||
}
|
||||
|
||||
@@ -266,12 +266,12 @@ namespace ContextMenuManager.Controls
|
||||
if(Extension == null)
|
||||
{
|
||||
this.Image = AppImage.CustomType;
|
||||
this.Text = AppString.Text_SelectExtension;
|
||||
this.Text = AppString.Text.SelectExtension;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Image = ResourceIcon.GetExtensionIcon(Extension)?.ToBitmap() ?? AppImage.NotFound;
|
||||
this.Text = $"{AppString.Text_CurrentExtension}{Extension}";
|
||||
this.Text = $"{AppString.Text.CurrentExtension}{Extension}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace ContextMenuManager.Controls
|
||||
}
|
||||
}
|
||||
|
||||
public string SearchText => $"{AppString.SideBar_New} {Text}";
|
||||
public string SearchText => $"{AppString.SideBar.New} {Text}";
|
||||
private string Extension => RegPath.Split('\\')[1];
|
||||
private string SnKeyName => RegistryEx.GetKeyName(RegPath);
|
||||
private string BuckupPath => $@"{RegistryEx.GetParentPath(RegPath)}\{(ItemVisible ? SnParts[1] : SnParts[0])}";
|
||||
@@ -159,8 +159,8 @@ namespace ContextMenuManager.Controls
|
||||
public FileLocationMenuItem TsiFileLocation { get; set; }
|
||||
public RegLocationMenuItem TsiRegLocation { get; set; }
|
||||
public DeleteMeMenuItem TsiDeleteMe { get; set; }
|
||||
readonly ToolStripMenuItem TsiDetails = new ToolStripMenuItem(AppString.Menu_Details);
|
||||
readonly ToolStripMenuItem TsiEditData = new ToolStripMenuItem(AppString.Menu_InitialData);
|
||||
readonly ToolStripMenuItem TsiDetails = new ToolStripMenuItem(AppString.Menu.Details);
|
||||
readonly ToolStripMenuItem TsiEditData = new ToolStripMenuItem(AppString.Menu.InitialData);
|
||||
|
||||
private void InitializeComponents()
|
||||
{
|
||||
@@ -191,11 +191,11 @@ namespace ContextMenuManager.Controls
|
||||
|
||||
private void EditInitialData()
|
||||
{
|
||||
if(MessageBoxEx.Show(AppString.MessageBox_EditInitialData,
|
||||
if(MessageBoxEx.Show(AppString.MessageBox.EditInitialData,
|
||||
MessageBoxButtons.YesNo) != DialogResult.Yes) return;
|
||||
using(InputDialog dlg = new InputDialog
|
||||
{
|
||||
Title = AppString.Menu_InitialData,
|
||||
Title = AppString.Menu.InitialData,
|
||||
Text = this.InitialData?.ToString()
|
||||
})
|
||||
{
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace ContextMenuManager.Controls
|
||||
|
||||
public ShellStoreForm()
|
||||
{
|
||||
this.Text = AppString.Text_CheckReference;
|
||||
this.Text = AppString.Text.CheckReference;
|
||||
btnOk.Click += (sender, e) => GetSelectedItems();
|
||||
LoadItems();
|
||||
}
|
||||
|
||||
@@ -81,8 +81,8 @@ namespace ContextMenuManager.Controls
|
||||
{
|
||||
this.AddItem(newItem);
|
||||
newItem.AddCtrs(new[] { btnAddCommon, btnAddExisting, btnAddSeparator });
|
||||
MyToolTip.SetToolTip(btnAddExisting, AppString.Tip_AddExistingItems);
|
||||
MyToolTip.SetToolTip(btnAddSeparator, AppString.Tip_AddSeparator);
|
||||
MyToolTip.SetToolTip(btnAddExisting, AppString.Tip.AddExistingItems);
|
||||
MyToolTip.SetToolTip(btnAddSeparator, AppString.Tip.AddSeparator);
|
||||
newItem.NewItemAdd += (sender, e) => AddNewItem();
|
||||
btnAddCommon.MouseDown += (sender, e) => AddCommonItems();
|
||||
btnAddExisting.MouseDown += (sender, e) => AddExistingItems();
|
||||
@@ -187,7 +187,7 @@ namespace ContextMenuManager.Controls
|
||||
if(item.GetType() == typeof(SubShellItem)) count++;
|
||||
}
|
||||
bool flag = count < 16;
|
||||
if(!flag) MessageBoxEx.Show(AppString.MessageBox_CannotAddNewItem);
|
||||
if(!flag) MessageBoxEx.Show(AppString.MessageBox.CannotAddNewItem);
|
||||
return flag;
|
||||
}
|
||||
|
||||
@@ -244,14 +244,14 @@ namespace ContextMenuManager.Controls
|
||||
|
||||
protected override bool IsSubItem => true;
|
||||
|
||||
readonly ToolStripMenuItem TsiDeleteRef = new ToolStripMenuItem(AppString.Menu_DeleteReference);
|
||||
readonly ToolStripMenuItem TsiDeleteRef = new ToolStripMenuItem(AppString.Menu.DeleteReference);
|
||||
public CommonMultiItemsList Owner { get; private set; }
|
||||
public MoveButton BtnMoveUp { get; set; }
|
||||
public MoveButton BtnMoveDown { get; set; }
|
||||
|
||||
private void DeleteReference()
|
||||
{
|
||||
if(MessageBoxEx.Show(AppString.MessageBox_ConfirmDeleteReference,
|
||||
if(MessageBoxEx.Show(AppString.MessageBox.ConfirmDeleteReference,
|
||||
MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||
{
|
||||
RemoveItem(Owner, this);
|
||||
@@ -260,7 +260,7 @@ namespace ContextMenuManager.Controls
|
||||
|
||||
public override void DeleteMe()
|
||||
{
|
||||
if(MessageBoxEx.Show(AppString.MessageBox_ConfirmDeleteReferenced,
|
||||
if(MessageBoxEx.Show(AppString.MessageBox.ConfirmDeleteReferenced,
|
||||
MessageBoxButtons.YesNo) == DialogResult.Yes) base.DeleteMe();
|
||||
}
|
||||
}
|
||||
@@ -270,14 +270,14 @@ namespace ContextMenuManager.Controls
|
||||
public SeparatorItem(CommonMultiItemsList list)
|
||||
{
|
||||
this.Owner = list;
|
||||
this.Text = AppString.Text_Separator;
|
||||
this.Text = AppString.Text.Separator;
|
||||
this.Image = AppImage.Separator;
|
||||
BtnDelete = new DeleteButton(this);
|
||||
BtnMoveDown = new MoveButton(this, false);
|
||||
BtnMoveUp = new MoveButton(this, true);
|
||||
BtnMoveUp.MouseDown += (sender, e) => MoveItem(this, Owner, true);
|
||||
BtnMoveDown.MouseDown += (sender, e) => MoveItem(this, Owner, false);
|
||||
MyToolTip.SetToolTip(BtnDelete, AppString.Tip_Separator);
|
||||
MyToolTip.SetToolTip(BtnDelete, AppString.Tip.Separator);
|
||||
}
|
||||
|
||||
public DeleteButton BtnDelete { get; set; }
|
||||
@@ -298,14 +298,14 @@ namespace ContextMenuManager.Controls
|
||||
public InvalidItem(CommonMultiItemsList list, string keyName)
|
||||
{
|
||||
this.Owner = list;
|
||||
this.Text = $"{AppString.Text_InvalidItem} {keyName}";
|
||||
this.Text = $"{AppString.Text.InvalidItem} {keyName}";
|
||||
this.Image = AppImage.NotFound.ToTransparent();
|
||||
BtnDelete = new DeleteButton(this);
|
||||
BtnMoveDown = new MoveButton(this, false);
|
||||
BtnMoveUp = new MoveButton(this, true);
|
||||
BtnMoveUp.MouseDown += (sender, e) => MoveItem(this, Owner, true);
|
||||
BtnMoveDown.MouseDown += (sender, e) => MoveItem(this, Owner, false);
|
||||
MyToolTip.SetToolTip(BtnDelete, AppString.Tip_InvalidItem);
|
||||
MyToolTip.SetToolTip(BtnDelete, AppString.Tip.InvalidItem);
|
||||
}
|
||||
|
||||
public DeleteButton BtnDelete { get; set; }
|
||||
@@ -395,7 +395,7 @@ namespace ContextMenuManager.Controls
|
||||
if(item.GetType() == typeof(SubShellItem)) count++;
|
||||
}
|
||||
bool flag = count < 16;
|
||||
if(!flag) MessageBoxEx.Show(AppString.MessageBox_CannotAddNewItem);
|
||||
if(!flag) MessageBoxEx.Show(AppString.MessageBox.CannotAddNewItem);
|
||||
return flag;
|
||||
}
|
||||
|
||||
@@ -424,7 +424,7 @@ namespace ContextMenuManager.Controls
|
||||
}
|
||||
}
|
||||
|
||||
readonly ToolStripMenuItem tsiShowSeparator = new ToolStripMenuItem(AppString.Menu_ShowSeparator);
|
||||
readonly ToolStripMenuItem tsiShowSeparator = new ToolStripMenuItem(AppString.Menu.ShowSeparator);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace ContextMenuManager.Controls
|
||||
{
|
||||
public SubMenuModeForm()
|
||||
{
|
||||
this.Text = AppString.General_AppName;
|
||||
this.Text = AppString.General.AppName;
|
||||
this.FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
this.StartPosition = FormStartPosition.CenterParent;
|
||||
this.ControlBox = this.ShowIcon = this.ShowInTaskbar = false;
|
||||
@@ -31,7 +31,7 @@ namespace ContextMenuManager.Controls
|
||||
readonly Label lblInfo = new Label
|
||||
{
|
||||
AutoSize = true,
|
||||
Text = AppString.Text_SelectSubMenuMode,
|
||||
Text = AppString.Text.SelectSubMenuMode,
|
||||
};
|
||||
|
||||
readonly Panel pnlTop = new Panel
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace ContextMenuManager.Controls
|
||||
|
||||
private IWshRuntimeLibrary.IWshShortcut Shortcut;
|
||||
private Icon ItemIcon => ResourceIcon.GetIcon(IconLocation) ?? Icon.ExtractAssociatedIcon(Shortcut.TargetPath);
|
||||
public string SearchText => $"{AppString.SideBar_WinX} {Text}";
|
||||
public string SearchText => $"{AppString.SideBar.WinX} {Text}";
|
||||
|
||||
public string ItemFilePath
|
||||
{
|
||||
@@ -93,7 +93,7 @@ namespace ContextMenuManager.Controls
|
||||
public FilePropertiesMenuItem TsiFileProperties { get; set; }
|
||||
public FileLocationMenuItem TsiFileLocation { get; set; }
|
||||
public DeleteMeMenuItem TsiDeleteMe { get; set; }
|
||||
readonly ToolStripMenuItem TsiDetails = new ToolStripMenuItem(AppString.Menu_Details);
|
||||
readonly ToolStripMenuItem TsiDetails = new ToolStripMenuItem(AppString.Menu.Details);
|
||||
|
||||
private void InitializeComponents()
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace ContextMenuManager
|
||||
{
|
||||
public MainForm()
|
||||
{
|
||||
this.Text = AppString.General_AppName;
|
||||
this.Text = AppString.General.AppName;
|
||||
this.Controls.Add(new ExplorerRestarter());
|
||||
shellList.Owner = shellNewList.Owner = sendToList.Owner = openWithList.Owner
|
||||
= winXList.Owner = guidBlockedList.Owner = thirdRuleList.Owner = MainBody;
|
||||
@@ -20,10 +20,10 @@ namespace ContextMenuManager
|
||||
}
|
||||
|
||||
readonly MyToolBarButton[] ToolBarButtons = new MyToolBarButton[] {
|
||||
new MyToolBarButton(AppImage.Home, AppString.ToolBar_Home),//主页
|
||||
new MyToolBarButton(AppImage.Type, AppString.ToolBar_Type),//文件类型
|
||||
new MyToolBarButton(AppImage.Star, AppString.ToolBar_Rule),//其他规则
|
||||
new MyToolBarButton(AppImage.About, AppString.ToolBar_About)//关于
|
||||
new MyToolBarButton(AppImage.Home, AppString.ToolBar.Home),//主页
|
||||
new MyToolBarButton(AppImage.Type, AppString.ToolBar.Type),//文件类型
|
||||
new MyToolBarButton(AppImage.Star, AppString.ToolBar.Rule),//其他规则
|
||||
new MyToolBarButton(AppImage.About, AppString.ToolBar.About)//关于
|
||||
};
|
||||
readonly ShellList shellList = new ShellList();
|
||||
readonly ShellNewList shellNewList = new ShellNewList();
|
||||
@@ -34,98 +34,98 @@ namespace ContextMenuManager
|
||||
readonly ThirdRulesList thirdRuleList = new ThirdRulesList();
|
||||
readonly AboutAppBox aboutMeBox = new AboutAppBox
|
||||
{
|
||||
Text = AppString.Text_AboutApp
|
||||
Text = AppString.Text.AboutApp
|
||||
};
|
||||
readonly DonateBox donateBox = new DonateBox();
|
||||
readonly LanguagesBox languagesBox = new LanguagesBox();
|
||||
readonly DictionariesBox dictionariesBox = new DictionariesBox();
|
||||
|
||||
static readonly string[] GeneralItems = {
|
||||
AppString.SideBar_File,
|
||||
AppString.SideBar_Folder,
|
||||
AppString.SideBar_Directory,
|
||||
AppString.SideBar_Background,
|
||||
AppString.SideBar_Desktop,
|
||||
AppString.SideBar_Drive,
|
||||
AppString.SideBar_AllObjects,
|
||||
AppString.SideBar_Computer,
|
||||
AppString.SideBar_RecycleBin,
|
||||
AppString.SideBar_Library,
|
||||
AppString.SideBar.File,
|
||||
AppString.SideBar.Folder,
|
||||
AppString.SideBar.Directory,
|
||||
AppString.SideBar.Background,
|
||||
AppString.SideBar.Desktop,
|
||||
AppString.SideBar.Drive,
|
||||
AppString.SideBar.AllObjects,
|
||||
AppString.SideBar.Computer,
|
||||
AppString.SideBar.RecycleBin,
|
||||
AppString.SideBar.Library,
|
||||
null,
|
||||
AppString.SideBar_New,
|
||||
AppString.SideBar_SendTo,
|
||||
AppString.SideBar_OpenWith,
|
||||
AppString.SideBar.New,
|
||||
AppString.SideBar.SendTo,
|
||||
AppString.SideBar.OpenWith,
|
||||
null,
|
||||
AppString.SideBar_WinX
|
||||
AppString.SideBar.WinX
|
||||
};
|
||||
static readonly string[] GeneralItemInfos = {
|
||||
AppString.StatusBar_File,
|
||||
AppString.StatusBar_Folder,
|
||||
AppString.StatusBar_Directory,
|
||||
AppString.StatusBar_Background,
|
||||
AppString.StatusBar_Desktop,
|
||||
AppString.StatusBar_Drive,
|
||||
AppString.StatusBar_AllObjects,
|
||||
AppString.StatusBar_Computer,
|
||||
AppString.StatusBar_RecycleBin,
|
||||
AppString.StatusBar_Library,
|
||||
AppString.StatusBar.File,
|
||||
AppString.StatusBar.Folder,
|
||||
AppString.StatusBar.Directory,
|
||||
AppString.StatusBar.Background,
|
||||
AppString.StatusBar.Desktop,
|
||||
AppString.StatusBar.Drive,
|
||||
AppString.StatusBar.AllObjects,
|
||||
AppString.StatusBar.Computer,
|
||||
AppString.StatusBar.RecycleBin,
|
||||
AppString.StatusBar.Library,
|
||||
null,
|
||||
AppString.StatusBar_New,
|
||||
AppString.StatusBar_SendTo,
|
||||
AppString.StatusBar_OpenWith,
|
||||
AppString.StatusBar.New,
|
||||
AppString.StatusBar.SendTo,
|
||||
AppString.StatusBar.OpenWith,
|
||||
null,
|
||||
AppString.StatusBar_WinX
|
||||
AppString.StatusBar.WinX
|
||||
};
|
||||
|
||||
static readonly string[] TypeItems = {
|
||||
AppString.SideBar_LnkFile,
|
||||
AppString.SideBar_ExeFile,
|
||||
AppString.SideBar.LnkFile,
|
||||
AppString.SideBar.ExeFile,
|
||||
null,
|
||||
AppString.SideBar_TextFile,
|
||||
AppString.SideBar_ImageFile,
|
||||
AppString.SideBar_VideoFile,
|
||||
AppString.SideBar_AudioFile,
|
||||
AppString.SideBar.TextFile,
|
||||
AppString.SideBar.ImageFile,
|
||||
AppString.SideBar.VideoFile,
|
||||
AppString.SideBar.AudioFile,
|
||||
null,
|
||||
AppString.SideBar_ImageDirectory,
|
||||
AppString.SideBar_VideoDirectory,
|
||||
AppString.SideBar_AudioDirectory,
|
||||
AppString.SideBar.ImageDirectory,
|
||||
AppString.SideBar.VideoDirectory,
|
||||
AppString.SideBar.AudioDirectory,
|
||||
null,
|
||||
AppString.SideBar_UnknownType,
|
||||
AppString.SideBar.UnknownType,
|
||||
null,
|
||||
AppString.SideBar_CustomType
|
||||
AppString.SideBar.CustomType
|
||||
};
|
||||
static readonly string[] TypeItemInfos = {
|
||||
AppString.StatusBar_LnkFile,
|
||||
AppString.StatusBar_ExeFile,
|
||||
AppString.StatusBar.LnkFile,
|
||||
AppString.StatusBar.ExeFile,
|
||||
null,
|
||||
AppString.StatusBar_TextFile,
|
||||
AppString.StatusBar_ImageFile,
|
||||
AppString.StatusBar_VideoFile,
|
||||
AppString.StatusBar_AudioFile,
|
||||
AppString.StatusBar.TextFile,
|
||||
AppString.StatusBar.ImageFile,
|
||||
AppString.StatusBar.VideoFile,
|
||||
AppString.StatusBar.AudioFile,
|
||||
null,
|
||||
AppString.StatusBar_ImageDirectory,
|
||||
AppString.StatusBar_VideoDirectory,
|
||||
AppString.StatusBar_AudioDirectory,
|
||||
AppString.StatusBar.ImageDirectory,
|
||||
AppString.StatusBar.VideoDirectory,
|
||||
AppString.StatusBar.AudioDirectory,
|
||||
null,
|
||||
AppString.StatusBar_UnknownType,
|
||||
AppString.StatusBar.UnknownType,
|
||||
null,
|
||||
AppString.StatusBar_CustomType
|
||||
AppString.StatusBar.CustomType
|
||||
};
|
||||
|
||||
static readonly string[] OtherRuleItems = {
|
||||
AppString.SideBar_GuidBlocked,
|
||||
AppString.SideBar_ThirdRules
|
||||
AppString.SideBar.GuidBlocked,
|
||||
AppString.SideBar.ThirdRules
|
||||
};
|
||||
static readonly string[] OtherRuleItemInfos = {
|
||||
AppString.StatusBar_GuidBlocked,
|
||||
AppString.StatusBar_ThirdRules
|
||||
AppString.StatusBar.GuidBlocked,
|
||||
AppString.StatusBar.ThirdRules
|
||||
};
|
||||
|
||||
static readonly string[] AboutItems = {
|
||||
AppString.SideBar_AboutApp,
|
||||
AppString.SideBar_Dictionaries,
|
||||
AppString.SideBar_AppLanguage,
|
||||
AppString.SideBar_Donate
|
||||
AppString.SideBar.AboutApp,
|
||||
AppString.SideBar.Dictionaries,
|
||||
AppString.SideBar.AppLanguage,
|
||||
AppString.SideBar.Donate
|
||||
};
|
||||
|
||||
private void HideAllParts()
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace ContextMenuManager
|
||||
if(version1.CompareTo(version2) > 0)
|
||||
{
|
||||
string info = reader.GetValue("Update", "Info");
|
||||
if(MessageBoxEx.Show($"{AppString.MessageBox_UpdateApp}{version1}\n{info}",
|
||||
if(MessageBoxEx.Show($"{AppString.MessageBox.UpdateApp}{version1}\n{info}",
|
||||
MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
|
||||
{
|
||||
Process.Start(reader.GetValue("Update", "Url"));
|
||||
|
||||
Reference in New Issue
Block a user