Ejemplo n.º 1
0
        public void TestGetCoreVersion()
        {
#if DEBUG
            var ver = core.GetCoreVersion();
            Assert.AreEqual(false, string.IsNullOrEmpty(ver));
#endif
        }
Ejemplo n.º 2
0
        public void GetLocalCoreVersion()
        {
            var core    = new V2RayGCon.Lib.V2Ray.Core(Service.Setting.Instance);
            var version = core.GetCoreVersion();

            if (core.IsExecutableExist())
            {
                Assert.AreNotEqual(string.Empty, version);
            }
            else
            {
                Assert.AreEqual(string.Empty, version);
            }
        }
Ejemplo n.º 3
0
        void RefreshLocalV2RayCoreVersion()
        {
            var el = labelCoreVersion;

            Task.Factory.StartNew(() =>
            {
                var core    = new V2RayGCon.Lib.V2Ray.Core(setting);
                var version = core.GetCoreVersion();
                var msg     = string.IsNullOrEmpty(version) ?
                              I18N.GetCoreVerFail :
                              string.Format(I18N.CurrentCoreVerIs, version);
                try
                {
                    VgcApis.Libs.UI.RunInUiThread(
                        el, () => { el.Text = msg; });
                }
                catch { }
            });
        }