Exemple #1
0
        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;
        }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
        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);
            });
        }