切换语言立即执行

pull/453/head
YFdyh000 2020-02-19 03:52:25 +08:00
parent c975896c5e
commit cc3560ab29
2 changed files with 3 additions and 0 deletions

View File

@ -1465,6 +1465,7 @@ namespace v2rayN.Forms
private void SetCurrentLanguage(string value)
{
Utils.RegWriteValue(Global.MyRegPath, Global.MyRegKeyLanguage, value);
Application.Restart();
}

View File

@ -1,6 +1,7 @@
using System;
using System.Diagnostics;
using System.Reflection;
using System.Threading;
using System.Windows.Forms;
using v2rayN.Forms;
using v2rayN.Properties;
@ -31,6 +32,7 @@ namespace v2rayN
//AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
Thread.Sleep(300); // 尽量避免切换语言后提示“已经运行”
Process instance = RunningInstance();
if (instance == null)
{