public void InitBoard() { int i = CtrlCard.Init_Board(); if (i <= 0) { ContraHelper.ShowError(L.R("CardHelper.InitFailure", "控制卡初始化失败!")); if (i == 0) { ContraHelper.ShowError(L.R("Cardhelper.NotInstallCard", "没有安装ADT8940A1卡!")); } if (i == -1) { ContraHelper.ShowError(L.R("CardHelper.NotDrive", "没有安装端口驱动程序!")); } if (i == -2) { ContraHelper.ShowError(L.R("CardHelper.PCIError", "PCI桥故障!")); } } SetByRecord(); SetupSpeed(); SetIOMode(); SetLimitMode(); SetupHardStop(); this.Setup_LockPosition(); }
static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) { ContraHelper.ShowError(e.Exception.Message); LogHelper.LogError(e.Exception); }