From f2912a334a4dd7661f215a20a874c6a43786be08 Mon Sep 17 00:00:00 2001 From: henning Date: Fri, 20 Mar 2020 10:46:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=85=8D=E7=BD=AE(profile)?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=8F=90=E7=A4=BA=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Netch/Forms/MainForm.cs | 9 +++++++++ Netch/Resources/zh-CN | 2 ++ 2 files changed, 11 insertions(+) diff --git a/Netch/Forms/MainForm.cs b/Netch/Forms/MainForm.cs index 4e144327..07cbe84a 100644 --- a/Netch/Forms/MainForm.cs +++ b/Netch/Forms/MainForm.cs @@ -1037,6 +1037,10 @@ namespace Netch.Forms { MessageBox.Show(Utils.i18N.Translate("Please select an mode first"), Utils.i18N.Translate("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information); } + else if (ProfileNameText.Text == "") + { + MessageBox.Show(Utils.i18N.Translate("Please enter a profile name first"), Utils.i18N.Translate("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information); + } else { SaveProfile(index); @@ -1045,6 +1049,11 @@ namespace Netch.Forms } else { + if (ProfileButtons[index].Text == Utils.i18N.Translate("Error") || ProfileButtons[index].Text == Utils.i18N.Translate("None")) + { + MessageBox.Show(Utils.i18N.Translate("No saved profile here. Save a profile first by Ctrl+Click on the button"), Utils.i18N.Translate("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information); + } + try { ProfileNameText.Text = LoadProfile(index); diff --git a/Netch/Resources/zh-CN b/Netch/Resources/zh-CN index a0790c52..f9a1749b 100644 --- a/Netch/Resources/zh-CN +++ b/Netch/Resources/zh-CN @@ -96,6 +96,8 @@ "Please press Stop button first": "请先点击停止按钮", "Please select a server first": "请先选择一个服务器", "Please select an mode first": "请先选择一个模式", + "Please enter a profile name first": "请先为该配置设置一个名称", + "No saved profile here. Save a profile first by Ctrl+Click on the button": "当前按钮下没有保存配置,请先使用ctrl+左键点击该按钮保存一个配置", "Used": "已使用", "Status": "状态",