Skip to content

Commit 6116ccb

Browse files
committed
·Subtitles DataBase 程序更新
[ ! ] 修改快捷键: F1 -> Ctrl + F1 F3 -> Ctrl + F3 F5 -> Ctrl + F5 [ * ] 改进「更新数据库」窗口的遮挡关系(不再设置 TopMost)
1 parent 2114e16 commit 6116ccb

File tree

9 files changed

+53
-39
lines changed

9 files changed

+53
-39
lines changed

Subtitles DataBase/Files/changelog.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
v0.20 - 2025.1.14
1+
v0.21 - 2025.1.14
2+
[ ! ] 修改快捷键:
3+
F1 -> Ctrl + F1
4+
F3 -> Ctrl + F3
5+
F5 -> Ctrl + F5
6+
[ * ] 改进「更新数据库」窗口的遮挡关系(不再设置 TopMost)
7+
8+
v0.20 - 2025.1.14
29
[Fix] 修正「打开远程链接」的 URL 错误
310

411
v0.19 - 2024.2.15

Subtitles DataBase/sub_db.exe

0 Bytes
Binary file not shown.

sub_db_source/sub_db/Code/COMMON.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace sub_db
1212
internal class COMMON
1313
{
1414
internal const string m_k_PROGRAM_NAME = "Subtitles Database";
15-
internal const string m_k_VERSION = "v0.20";
15+
internal const string m_k_VERSION = "v0.21";
1616

1717
internal const int m_k_MAX_PROGRESS_VALUE = 10000;
1818

sub_db_source/sub_db/Code/LANGUAGES.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ internal static void change_language(int index)
125125
m_s_current_language_idx = index;
126126

127127
// 顶部菜单按钮
128-
mainform.toolStripButton_UpdateDB.Text = txt(10) + "(F5)"; // 更新数据库
128+
mainform.toolStripButton_UpdateDB.Text = txt(10) + "(Ctrl + F5)"; // 更新数据库
129129
mainform.toolStripButton_Folder.Text = txt(15) + "(Alt + Enter)";// 打开本地文件夹
130-
mainform.toolStripButton_URL.Text = txt(16) + "(F1)"; // 打开远程链接
131-
mainform.toolStripButton_Search.Text = txt(11) + "(F3)"; // 高级查找
130+
mainform.toolStripButton_URL.Text = txt(16) + "(Ctrl + F1)"; // 打开远程链接
131+
mainform.toolStripButton_Search.Text = txt(11) + "(Ctrl + F3)"; // 高级查找
132132
mainform.toolStripSplitButton_Languages.Text = txt(12); // 语言(Languages)
133133
mainform.toolStripButton_Settings.Text = txt(13); // 设置
134134
mainform.toolStripButton_About.Text = txt(14); // 关于

sub_db_source/sub_db/Files/changelog.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
v0.20 - 2025.1.14
1+
v0.21 - 2025.1.14
2+
[ ! ] 修改快捷键:
3+
F1 -> Ctrl + F1
4+
F3 -> Ctrl + F3
5+
F5 -> Ctrl + F5
6+
[ * ] 改进「更新数据库」窗口的遮挡关系(不再设置 TopMost)
7+
8+
v0.20 - 2025.1.14
29
[Fix] 修正「打开远程链接」的 URL 错误
310

411
v0.19 - 2024.2.15

sub_db_source/sub_db/frm_Mainform.Designer.cs

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

sub_db_source/sub_db/frm_Mainform.cs

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ private void frm_Mainform_Load(object sender, EventArgs e)
4040
this.Icon = IMAGE.img2icon(Resource1.Logo);
4141
this.Text = $"{COMMON.m_k_PROGRAM_NAME} {COMMON.m_k_VERSION}";
4242

43+
m_UpdateDatabase.Owner = this;
44+
4345
// 读取配置文件
4446
CONFIG.read_config();
4547

@@ -56,15 +58,11 @@ private void frm_Mainform_Load(object sender, EventArgs e)
5658
*==============================================================*/
5759
private void frm_Mainform_FormClosing(object sender, FormClosingEventArgs e)
5860
{
59-
if(MessageBox.Show( LANGUAGES.txt(1), // 是否要退出程序?
60-
$"{COMMON.m_k_PROGRAM_NAME} {COMMON.m_k_VERSION}",
61-
MessageBoxButtons.YesNo,
62-
MessageBoxIcon.Question,
63-
MessageBoxDefaultButton.Button2 ) == DialogResult.No)
64-
{
65-
e.Cancel = true;
66-
return;
67-
}
61+
e.Cancel = (MessageBox.Show(LANGUAGES.txt(1), // 是否要退出程序?
62+
$"{COMMON.m_k_PROGRAM_NAME} {COMMON.m_k_VERSION}",
63+
MessageBoxButtons.YesNo,
64+
MessageBoxIcon.Question,
65+
MessageBoxDefaultButton.Button2) == DialogResult.No);
6866
}
6967

7068
/*==============================================================
@@ -88,14 +86,14 @@ private void frm_Mainform_Activated(object sender, EventArgs e)
8886
// Alt + Enter
8987
COMMON.RegHotKey(this.Handle, (int)COMMON.e_HotKeyID.OpenDir, COMMON.e_KeyModifiers.Alt, Keys.Enter);
9088

91-
// F1
92-
COMMON.RegHotKey(this.Handle, (int)COMMON.e_HotKeyID.OpenURL, COMMON.e_KeyModifiers.None, Keys.F1);
89+
// Ctrl + F1
90+
COMMON.RegHotKey(this.Handle, (int)COMMON.e_HotKeyID.OpenURL, COMMON.e_KeyModifiers.Ctrl, Keys.F1);
9391

94-
// F3
95-
COMMON.RegHotKey(this.Handle, (int)COMMON.e_HotKeyID.Search, COMMON.e_KeyModifiers.None, Keys.F3);
92+
// Ctrl + F3
93+
COMMON.RegHotKey(this.Handle, (int)COMMON.e_HotKeyID.Search, COMMON.e_KeyModifiers.Ctrl, Keys.F3);
9694

97-
// F5
98-
COMMON.RegHotKey(this.Handle, (int)COMMON.e_HotKeyID.UpdateDB, COMMON.e_KeyModifiers.None, Keys.F5);
95+
// Ctrl + F5
96+
COMMON.RegHotKey(this.Handle, (int)COMMON.e_HotKeyID.UpdateDB, COMMON.e_KeyModifiers.Ctrl, Keys.F5);
9997
}
10098

10199
/*==============================================================

sub_db_source/sub_db/frm_UpdateDatabase.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sub_db_source/sub_db/frm_UpdateDatabase.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ private void frm_UpdateDatabase_Load(object sender, EventArgs e)
4040
*==============================================================*/
4141
private void frm_UpdateDatabase_FormClosing(object sender, FormClosingEventArgs e)
4242
{
43-
e.Cancel = true;
44-
this.Hide();
43+
e.Cancel = (this.Owner != null);
44+
45+
if(e.CloseReason == CloseReason.UserClosing)
46+
this.Hide();
4547
}
4648

4749
/*==============================================================

0 commit comments

Comments
 (0)