Skip to content

Commit 7953966

Browse files
LightLight
authored andcommitted
Extract the strings of all windows.
1 parent cee36fa commit 7953966

File tree

9 files changed

+87
-29
lines changed

9 files changed

+87
-29
lines changed

SmartSystemMenu/Forms/MainForm.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -397,11 +397,11 @@ private void WindowGetMsg(object sender, WndProcEventArgs e)
397397
{
398398
OverwritePrompt = true,
399399
ValidateNames = true,
400-
Title = "Save Window Screenshot",
401-
FileName = "WindowScreenshot",
402-
DefaultExt = "bmp",
400+
Title = _settings.MenuLanguage.GetStringValue("save_screenshot_title"),
401+
FileName = _settings.MenuLanguage.GetStringValue("save_screenshot_filename"),
402+
DefaultExt = _settings.MenuLanguage.GetStringValue("save_screenshot_default_ext"),
403403
RestoreDirectory = false,
404-
Filter = "Bitmap Image (*.bmp)|*.bmp|Gif Image (*.gif)|*.gif|JPEG Image (*.jpeg)|*.jpeg|Png Image (*.png)|*.png|Tiff Image (*.tiff)|*.tiff|Wmf Image (*.wmf)|*.wmf"
404+
Filter = _settings.MenuLanguage.GetStringValue("save_screenshot_filter")
405405
};
406406
if (dialog.ShowDialog(window.Win32Window) == DialogResult.OK)
407407
{
@@ -570,7 +570,7 @@ private void WindowGetMsg(object sender, WndProcEventArgs e)
570570

571571
case SystemMenu.SC_SIZE_CUSTOM:
572572
{
573-
var sizeForm = new SizeForm(window);
573+
var sizeForm = new SizeForm(window, _settings);
574574
sizeForm.Show(window.Win32Window);
575575
}
576576
break;
@@ -585,7 +585,7 @@ private void WindowGetMsg(object sender, WndProcEventArgs e)
585585

586586
case SystemMenu.SC_TRANS_CUSTOM:
587587
{
588-
var opacityForm = new TransparencyForm(window);
588+
var opacityForm = new TransparencyForm(window, _settings);
589589
opacityForm.Show(window.Win32Window);
590590
}
591591
break;
@@ -600,7 +600,7 @@ private void WindowGetMsg(object sender, WndProcEventArgs e)
600600

601601
case SystemMenu.SC_ALIGN_CUSTOM:
602602
{
603-
var positionForm = new PositionForm(window);
603+
var positionForm = new PositionForm(window, _settings);
604604
positionForm.Show(window.Win32Window);
605605
}
606606
break;

SmartSystemMenu/Forms/PositionForm.Designer.cs

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

SmartSystemMenu/Forms/PositionForm.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
using System;
22
using System.Windows.Forms;
3+
using SmartSystemMenu.Settings;
34

45
namespace SmartSystemMenu.Forms
56
{
67
partial class PositionForm : Form
78
{
89
private Window _window;
910

10-
public PositionForm(Window window)
11+
public PositionForm(Window window, SmartSystemMenuSettings _settins)
1112
{
12-
InitializeComponent();
13+
InitializeComponent(_settins.MenuLanguage);
1314

1415
_window = window;
1516
numericLeft.Value = _window.SizeOnMonitor.Left;

SmartSystemMenu/Forms/SizeForm.Designer.cs

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

SmartSystemMenu/Forms/SizeForm.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
using System;
22
using System.Windows.Forms;
3+
using SmartSystemMenu.Settings;
34

45
namespace SmartSystemMenu.Forms
56
{
67
partial class SizeForm : Form
78
{
89
private Window _window;
910

10-
public SizeForm(Window window)
11+
public SizeForm(Window window, SmartSystemMenuSettings _settings)
1112
{
12-
InitializeComponent();
13+
InitializeComponent(_settings.MenuLanguage);
1314

1415
_window = window;
1516
numericWidth.Value = _window.Size.Width;

SmartSystemMenu/Forms/TransparencyForm.Designer.cs

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

SmartSystemMenu/Forms/TransparencyForm.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
using System;
22
using System.Windows.Forms;
3+
using SmartSystemMenu.Settings;
34

45
namespace SmartSystemMenu.Forms
56
{
67
partial class TransparencyForm : Form
78
{
89
private Window _window;
910

10-
public TransparencyForm(Window window)
11+
public TransparencyForm(Window window, SmartSystemMenuSettings _settings)
1112
{
12-
InitializeComponent();
13+
InitializeComponent(_settings.MenuLanguage);
1314
_window = window;
1415
numericTransparency.Value = _window.Transparency;
1516
}

SmartSystemMenu/SmartSystemMenu.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,20 @@
6060
<stringItem title="lbl_module_path" stringValue="Module Path:" />
6161
<stringItem title="lbl_process_id" stringValue="Process Id:" />
6262
<stringItem title="lbl_thread_id" stringValue="Thread Id:" />
63+
<stringItem title="save_screenshot_title" stringValue="Save Window Screenshot" />
64+
<stringItem title="save_screenshot_filename" stringValue="WindowScreenshot" />
65+
<stringItem title="save_screenshot_default_ext" stringValue="bmp" />
66+
<stringItem title="save_screenshot_filter" stringValue="Bitmap Image (*.bmp)|*.bmp|Gif Image (*.gif)|*.gif|JPEG Image (*.jpeg)|*.jpeg|Png Image (*.png)|*.png|Tiff Image (*.tiff)|*.tiff|Wmf Image (*.wmf)|*.wmf" />
67+
<stringItem title="size_form" stringValue="Set Size" />
68+
<stringItem title="size_btn_apply" stringValue="Apply" />
69+
<stringItem title="lbl_height" stringValue="Height:" />
70+
<stringItem title="lbl_width" stringValue="Width:" />
71+
<stringItem title="trans_form" stringValue="Set Transparency" />
72+
<stringItem title="trans_btn_apply" stringValue="Apply" />
73+
<stringItem title="align_form" stringValue="Set Position" />
74+
<stringItem title="align_btn_apply" stringValue="Apply" />
75+
<stringItem title="lbl_top" stringValue="Top:" />
76+
<stringItem title="lbl_left" stringValue="Left:" />
6377
</en>
6478
<cn>
6579
<stringItem title="information" stringValue="信息" />
@@ -118,6 +132,20 @@
118132
<stringItem title="lbl_module_path" stringValue="模块路径:" />
119133
<stringItem title="lbl_process_id" stringValue="进程 ID:" />
120134
<stringItem title="lbl_thread_id" stringValue="线程 ID:" />
135+
<stringItem title="save_screenshot_title" stringValue="保存窗口截图" />
136+
<stringItem title="save_screenshot_filename" stringValue="WindowScreenshot" />
137+
<stringItem title="save_screenshot_default_ext" stringValue="bmp" />
138+
<stringItem title="save_screenshot_filter" stringValue="位图图像 (*.bmp)|*.bmp|Gif 图像 (*.gif)|*.gif|JPEG 图像 (*.jpeg)|*.jpeg|Png 图像 (*.png)|*.png|Tiff 图像 (*.tiff)|*.tiff|Wmf 图像 (*.wmf)|*.wmf" />
139+
<stringItem title="size_form" stringValue="设置尺寸" />
140+
<stringItem title="size_btn_apply" stringValue="应用" />
141+
<stringItem title="lbl_height" stringValue="高度:" />
142+
<stringItem title="lbl_width" stringValue="宽度:" />
143+
<stringItem title="trans_form" stringValue="设置透明度" />
144+
<stringItem title="trans_btn_apply" stringValue="应用" />
145+
<stringItem title="align_form" stringValue="设置位置" />
146+
<stringItem title="align_btn_apply" stringValue="应用" />
147+
<stringItem title="lbl_top" stringValue="顶部:" />
148+
<stringItem title="lbl_left" stringValue="左侧:" />
121149
</cn>
122150
</menuTitleString>
123151
</menuLanguage>
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)