private async void Initializer() { var result = await _hcdzClient.InitializerDevice(); if (result > 0) { LogHelper.WriteLog("错误码:" + result.ToString()); string content = "加载设备失败!"; if (result == 536870921) { content = "License无效!"; } Application.Current.Dispatcher.Invoke(delegate { RadWindow.Alert(new DialogParameters { Content = content, Theme = new Windows8TouchTheme(), Header = "提示", DialogStartupLocation = WindowStartupLocation.CenterOwner, OkButtonContent = "关闭", Owner = Application.Current.MainWindow, }); }); return; } }