@@ -76,6 +76,7 @@ New server,Новый сервер,未配置的服务器,新伺服器,新規サ | |||||
Move &Up,Выше,上移(&U),上移 (&U),上に移動 (&U) | Move &Up,Выше,上移(&U),上移 (&U),上に移動 (&U) | ||||
Move D&own,Ниже,下移(&O),下移 (&O),下に移動 (&O) | Move D&own,Ниже,下移(&O),下移 (&O),下に移動 (&O) | ||||
deprecated,Устаревшее,不推荐,不推薦,非推奨 | deprecated,Устаревшее,不推荐,不推薦,非推奨 | ||||
"Encryption method {0} not exist, will replace with {1}",,"加密方法{0}不存在,将使用{1}代替",, | |||||
,,,, | ,,,, | ||||
#Statistics Config,,,, | #Statistics Config,,,, | ||||
,,,, | ,,,, | ||||
@@ -79,7 +79,14 @@ namespace Shadowsocks.View | |||||
public static EncryptionMethod GetMethod(string name) | public static EncryptionMethod GetMethod(string name) | ||||
{ | { | ||||
if (!init) Init(); | 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) | private EncryptionMethod(string name, bool deprecated) | ||||