mirror of https://github.com/2dust/v2rayN
切换语言立即执行
parent
c975896c5e
commit
cc3560ab29
|
@ -1465,6 +1465,7 @@ namespace v2rayN.Forms
|
||||||
private void SetCurrentLanguage(string value)
|
private void SetCurrentLanguage(string value)
|
||||||
{
|
{
|
||||||
Utils.RegWriteValue(Global.MyRegPath, Global.MyRegKeyLanguage, value);
|
Utils.RegWriteValue(Global.MyRegPath, Global.MyRegKeyLanguage, value);
|
||||||
|
Application.Restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using v2rayN.Forms;
|
using v2rayN.Forms;
|
||||||
using v2rayN.Properties;
|
using v2rayN.Properties;
|
||||||
|
@ -31,6 +32,7 @@ namespace v2rayN
|
||||||
|
|
||||||
//AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
|
//AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
|
||||||
|
|
||||||
|
Thread.Sleep(300); // 尽量避免切换语言后提示“已经运行”
|
||||||
Process instance = RunningInstance();
|
Process instance = RunningInstance();
|
||||||
if (instance == null)
|
if (instance == null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue