Skip to content

Commit ed209df

Browse files
LightLight
authored andcommitted
Add support for simplified Chinese.
1 parent 0b24a2c commit ed209df

14 files changed

+371
-297
lines changed

Build/Build.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
<SmartSystemMenuDestFileWin64 Include="$(SmartSystemMenuProjectPath)\SmartSystemMenu64.exe" />
2222
<SmartSystemMenuConfigurationSourceFile Include="$(SmartSystemMenuProjectPath)\SmartSystemMenu.xml" />
2323
<SmartSystemMenuConfigurationDestFile Include="$(ApplicationPath)\SmartSystemMenu.xml" />
24+
<SmartSystemMenuLanguageSourceFile Include="$(SmartSystemMenuProjectPath)\Language.xml" />
25+
<SmartSystemMenuLanguageDestFile Include="$(ApplicationPath)\Language.xml" />
2426
<EmptyTextForFile Include="Empty File" />
2527
</ItemGroup>
2628

@@ -35,6 +37,7 @@
3537
<CallTarget Targets="Build_Release_x32_SmartSystemMenu" />
3638
<CallTarget Targets="Copy_Release_x32_SmartSystemMenu" />
3739
<CallTarget Targets="CopySmartSystemMenuConfigurationFile" />
40+
<CallTarget Targets="CopySmartSystemMenuLanguageFile" />
3841
</Target>
3942

4043
<Target Name="Build_Release_x32_SmartSystemMenuHook">
@@ -99,4 +102,9 @@
99102
<Message Text="Copy $(SmartSystemMenuConfigurationSourceFile) to $(SmartSystemMenuProjectName)" />
100103
<Copy SourceFiles="@(SmartSystemMenuConfigurationSourceFile)" DestinationFiles="@(SmartSystemMenuConfigurationDestFile)" />
101104
</Target>
105+
106+
<Target Name="CopySmartSystemMenuLanguageFile">
107+
<Message Text="Copy $(SmartSystemMenuLanguageSourceFile) to $(SmartSystemMenuProjectName)" />
108+
<Copy SourceFiles="@(SmartSystemMenuLanguageSourceFile)" DestinationFiles="@(SmartSystemMenuLanguageDestFile)" />
109+
</Target>
102110
</Project>

README.md

Lines changed: 41 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,64 @@
11
![SmartSystemMenu](https://user-images.githubusercontent.com/8102586/68280906-8e86b800-0087-11ea-9762-f9eb028bb8fe.png) SmartSystemMenu
22
=============
33

4-
SmartSystemMenu extends system menu of all windows in the system. It appends next custom items to menu:
5-
6-
* **Information.** Shows a dialog with information of the current window and process: the window handle, the window caption, the window style, the window class, the process name, the process id, the path to the process.
7-
* **Roll Up.** Allows to roll up and down the current window.
8-
* **Aero Glass.** Allows to add the "Aero Glass" blur to the current window. (Windows Vista and higher. Mostly for console windows.)
9-
* **Always On Top.** Allows the current window to stay on top of all other windows.
10-
* **Send To Bottom.** Allows to send to bottom the current window.
11-
* **Save Screenshot.** Allows to save the current window screenshot in a file.
12-
* **Open File In Explorer.** Allows to open a process file in a File Explorer.
13-
* **Copy Text To Clipboard.** Allows to copy all window texts (including console, ms office products, etc.) to clipboard.
14-
* **Drag By Mouse.** Allows to drag by mouse the current window.
15-
* **Resize.** Allows to change the size of the current window.
16-
* **Move To.** Allows to move the current window to another monitor.
17-
* **Alignment.** Allows the current window to be aligned with any of the 9 positions on the desktop.
18-
* **Transparency.** Allows to change the transparency of the current window.
19-
* **Priority.** Allows to change the current window's program priority.
20-
* **System Tray.** Allows to minimize the current window to the system tray.
21-
* **Other Windows.** Allows to close and minimize all windows in the system except the current.
22-
* **Start Program.** Allows to start programs which is in the settings.
23-
24-
Screenshots
4+
> 原项目地址: [AlexanderPro/SmartSystemMenu](https://github.com/AlexanderPro/SmartSystemMenu)
5+
>
6+
> 此项目仅是添加了对简体中文的支持。
7+
8+
SmartSystemMenu 扩展了系统中所有窗口的系统菜单。 它会将下面的自定义项目追加到菜单:
9+
10+
* **信息.** 显示一个对话框,其中包含当前窗口和进程的信息:窗口句柄、窗口标题、窗口风格、窗口类、进程名称、进程ID、进程路径。
11+
* **卷起.** 允许将当前窗口向上卷起。
12+
* **毛玻璃效果.** 允许将 "毛玻璃效果" 模糊添加到当前窗口。(Windows Vista 及更高版本。主要用于控制台窗口。)
13+
* **始终在最前面.** 允许当前窗口位于所有其他窗口之上。
14+
* **移至最底层.** 允许将当前窗口发送到底部。
15+
* **保存窗口截图.** 允许将当前窗口的屏幕截图保存到文件中。
16+
* **在资源管理器中打开文件.** 允许在文件资源管理器中打开进程文件。
17+
* **将文本复制到剪贴板.** 允许复制所有窗口文本 (包括控制台、MS Office 产品等) 到剪贴板中。
18+
* **通过鼠标拖动.** 允许通过鼠标拖动当前窗口。
19+
* **调整窗口大小.** 允许更改当前窗口的大小。
20+
* **移动到.** 允许将当前窗口移动到另一个显示器。
21+
* **对齐.** 允许当前窗口与桌面上的9个位置中的任何一个对齐。
22+
* **透明度.** 允许更改当前窗口的透明度。
23+
* **优先级.** 允许更改当前窗口的程序优先级。
24+
* **系统托盘.** 允许将当前窗口最小化到系统托盘。
25+
* **其他窗口.** 允许关闭和最小化系统中除当前窗口之外的所有窗口。
26+
* **启动程序.** 允许启动设置中的程序。
27+
28+
截图
2529
------------------
2630

27-
![alt tag](https://user-images.githubusercontent.com/8102586/76205093-9f4c6380-620a-11ea-81e8-cbc6037c0751.png)
28-
![alt tag](https://user-images.githubusercontent.com/8102586/76205104-a2dfea80-620a-11ea-8fcd-2a7dccaaf139.png)
31+
![Resize](https://cdn.jsdelivr.net/gh/LightAPIs/PicGoImg@master/img/Resize.png)
32+
33+
![Trans](https://cdn.jsdelivr.net/gh/LightAPIs/PicGoImg@master/img/Trans.png)
2934

30-
Requirements
35+
要求
3136
--------------------
3237

33-
* OS Windows XP SP3 and later. Supports x86 and x64 systems.
38+
* OS Windows XP SP3 及更高版本。 支持 x86 x64 系统。
3439
* .NET Framework 4.0
3540

36-
Files
41+
程序文件
3742
--------------------
3843

3944
* SmartSystemMenu.exe
40-
* SmartSystemMenu64.exe (located in resources of SmartSystemMenu.exe module)
45+
* SmartSystemMenu64.exe (位于 SmartSystemMenu.exe 模块的资源中)
4146
* SmartSystemMenuHook.dll
4247
* SmartSystemMenuHook64.dll
4348

44-
Files
49+
此程序具有用于 x86 进程的 SmartSystemMenu.exe 和 SmartSystemMenuHook.dll 模块,用于 x64 进程的 SmartSystemMenu64.exe 和 SmartSystemMenuHook64.dll 模块。当您运行 SmartSystemMenu.exe 时,它还会运行 SmartSystemMenu64.exe。 这两个可执行模块将挂钩 (SmartSystemMenuHook.dll 和 SmartSystemMenuHook64.dll) 加载到所有进程。 当您在系统菜单中选择一项时,挂钩会向可执行模块发送一条消息。之后,模块执行选定的操作:更改窗口的透明度、更改窗口的大小等等。
50+
51+
局限性
4552
--------------------
4653

47-
This program has SmartSystemMenu.exe and SmartSystemMenuHook.dll modules for x86 processes, SmartSystemMenu64.exe and SmartSystemMenuHook64.dll modules for x64 processes. When you run SmartSystemMenu.exe, it also runs SmartSystemMenu64.exe. These two executable modules load hooks (SmartSystemMenuHook.dll and SmartSystemMenuHook64.dll) to all processes. When you select an item in the system menu, the hook sends a message to the executable module. After that, the module performs the selected action: changes the transparency of the window, changes the size of the window, etc.
54+
此工具无法在系统菜单由其自己的进程管理的窗口上正常工作,例如 IE9 及更高版本、Chrome 29 及更高版本等。此外,该工具不能与 Delphi 进程的窗口一起正常工作,因为 Delphi 窗口有一个父 TApplication 窗口。
4855

49-
Limitations
56+
提示
5057
--------------------
5158

52-
This tool can't work properly with a window whose system menu is managed by its own process, for example IE9 and later, Chrome 29 and later, etc. Also the tool doesn't work correctly with windows of delphi processes, because delphi window has a parent TApplication window.
59+
运行 SmartSystemMenu.exe 进程。如果您的操作系统启用了 UAC,系统将显示 UAC 对话框。您不必担心,因为程序需要提升权限。程序执行后,在所有窗口的所有系统菜单中都可以看到自定义项目。
5360

54-
Tips
55-
--------------------
61+
## 中文版本使用方法
62+
63+
运行 SmartSystemMenu.exe 时,会自动检测系统语言环境,若为简体中文或繁体中文,自动应用简体中文语言。
5664

57-
Run SmartSystemMenu.exe process. If your OS has enabled UAC, the system will display a UAC dialog. You do not need to worry because the program needs elevated privileges. After the program has been executed, in all system menus of all windows you can see custom items.

SmartSystemMenu/Forms/MainForm.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ protected override void OnLoad(EventArgs e)
4545
base.OnLoad(e);
4646

4747
var settingsFileName = Path.Combine(AssemblyUtils.AssemblyDirectory, "SmartSystemMenu.xml");
48-
if (File.Exists(settingsFileName))
48+
var languageFileName = Path.Combine(AssemblyUtils.AssemblyDirectory, "Language.xml");
49+
if (File.Exists(settingsFileName) && File.Exists(languageFileName))
4950
{
50-
_settings = SmartSystemMenuSettings.Read(settingsFileName);
51+
_settings = SmartSystemMenuSettings.Read(settingsFileName, languageFileName);
5152
}
5253
#if WIN32
5354
if (Environment.Is64BitOperatingSystem)

SmartSystemMenu/Forms/ProcessExclusionForm.Designer.cs

Lines changed: 12 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SmartSystemMenu/Forms/ProcessExclusionForm.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
using System;
22
using System.IO;
33
using System.Windows.Forms;
4+
using SmartSystemMenu.Settings;
45

56
namespace SmartSystemMenu.Forms
67
{
78
public partial class ProcessExclusionForm : Form
89
{
910
public string ProcessName { get; private set; }
1011

11-
public ProcessExclusionForm(string processName)
12+
public ProcessExclusionForm(string processName, MenuLanguage menuLanguage)
1213
{
14+
_menuLanguage = menuLanguage;
1315
InitializeComponent();
1416
txtFileName.Text = processName;
1517
}
@@ -27,7 +29,7 @@ private void ButtonBrowseFileClick(object sender, EventArgs e)
2729
var dialog = new OpenFileDialog()
2830
{
2931
RestoreDirectory = false,
30-
Filter = "Executables (*.exe)|*.exe|All files (*.*)|*.*"
32+
Filter = _menuLanguage.GetStringValue("process_browse_file_filter")
3133
};
3234

3335
if (dialog.ShowDialog() == DialogResult.OK)

0 commit comments

Comments
 (0)