Browse Source

Merge pull request #2819 from studentmain/cipher-not-exist

show message when cipher not exist
tags/4.1.9.3
Allen Zhu GitHub 4 years ago
parent
commit
b915e5a63f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions
  1. +1
    -0
      shadowsocks-csharp/Data/i18n.csv
  2. +8
    -1
      shadowsocks-csharp/View/ConfigForm.cs

+ 1
- 0
shadowsocks-csharp/Data/i18n.csv View File

@@ -76,6 +76,7 @@ New server,Новый сервер,未配置的服务器,新伺服器,新規サ
Move &Up,Выше,上移(&U),上移 (&U),上に移動 (&U)
Move D&own,Ниже,下移(&O),下移 (&O),下に移動 (&O)
deprecated,Устаревшее,不推荐,不推薦,非推奨
"Encryption method {0} not exist, will replace with {1}",,"加密方法{0}不存在,将使用{1}代替",,
,,,,
#Statistics Config,,,,
,,,,


+ 8
- 1
shadowsocks-csharp/View/ConfigForm.cs View File

@@ -79,7 +79,14 @@ namespace Shadowsocks.View
public static EncryptionMethod GetMethod(string name)
{
if (!init) Init();
return methodByName[name];
bool success = methodByName.TryGetValue(name, out EncryptionMethod method);
if (!success)
{
string defaultMethod = Server.DefaultMethod;
MessageBox.Show(I18N.GetString("Encryption method {0} not exist, will replace with {1}", name, defaultMethod), I18N.GetString("Shadowsocks"));
return methodByName[defaultMethod];
}
return method;
}
private EncryptionMethod(string name, bool deprecated)


Loading…
Cancel
Save