public void GetLocalCoreVersion() { var core = new Service.Core(Service.Setting.Instance); var version = core.GetCoreVersion(); if (core.IsExecutableExist()) { Assert.AreNotEqual(string.Empty, version); } else { Assert.AreEqual(string.Empty, version); } }
void RefreshCurrentCoreVersion() { var el = labelCoreVersion; Task.Factory.StartNew(() => { var version = core.GetCoreVersion(); var msg = string.IsNullOrEmpty(version) ? I18N("GetCoreVerFail") : string.Format(I18N("CurrentCoreVerIs"), version); try { el.Invoke((MethodInvoker) delegate { el.Text = msg; }); } catch { } }); }