public void GetLocalCoreVersion() { var core = new Model.BaseClass.CoreServer(); 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 core = new Model.BaseClass.CoreServer(); 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 { } }); }