private void WelcomeFlyPanelComponent_Load(object sender, System.EventArgs e) { var core = new V2RayGCon.Libs.V2Ray.Core(setting); if (!core.IsExecutableExist()) { return; } pnlBasicUsage.Top = pnlDownloadV2RayCore.Top; pnlDownloadV2RayCore.Visible = false; this.Height = pnlBasicUsage.Top + marginBottom; }
public void GetLocalCoreVersion() { var core = new V2RayGCon.Libs.V2Ray.Core(Services.Settings.Instance); var version = core.GetCoreVersion(); if (core.IsExecutableExist()) { Assert.AreNotEqual(string.Empty, version); } else { Assert.AreEqual(string.Empty, version); } }
void RefreshLocalV2RayCoreVersion() { var el = labelCoreVersion; VgcApis.Misc.Utils.RunInBackground(() => { var core = new V2RayGCon.Libs.V2Ray.Core(setting); var version = core.GetCoreVersion(); var msg = string.IsNullOrEmpty(version) ? I18N.GetCoreVerFail : string.Format(I18N.CurrentCoreVerIs, version); VgcApis.Misc.UI.Invoke(() => el.Text = msg); }); }