void InitJxp() { ServerInfo p0 = new ServerInfo(); p0.server_Ip = config.ReadConfig(ParamStr, configStr, sysInfo.param[12]); p0.server_Port = config.ReadConfig(ParamStr, configStr, sysInfo.param[13]); Jxp = new JxpDevice(p0); Jxp.DeviceName = devName1; Jxp.DeviceId = Constant.devicePropertyA; Jxp.OpenTcpClient(); }
public static int getLangId() { int id = 0; ConfigFileManager langXml = new ConfigFileManager(Constant.ConfigParamFilePath); string idsstr = langXml.ReadConfig(langStr); if (!int.TryParse(idsstr, out id)) { id = 0; } return(id); }
public void ReadData() { string[] s2 = cfg.ReadConfig(prjCfg.demoStr, prjCfg.ListStr).Split(prjCfg.splitChar); setData(s2); sData(s2); }
public EvokDTWork() { PsLstAuto = new List <DTPlcInfoSimple>(); PsLstAuto.Add(autoMesOutInPs); PsLstAuto.Add(dbcOutInPs); PsLstAuto.Add(ltbcOutInPs); PsLstAuto.Add(safeOutInPs); PsLstAuto.Add(prodOutInPs); prodOutInPs.IsParam = false; PsLstAuto.Add(lcOutInPs); PsLstAuto.Add(stopOutInPs); PsLstAuto.Add(cutDoneOutInPs); PsLstAuto.Add(plcHandlebarCodeOutInPs); PsLstAuto.Add(ldsCountInOutPs); PsLstAuto.Add(pauseOutPs); PsLstAuto.Add(startOutPs); PsLstAuto.Add(resetOutPs); PsLstAuto.Add(autoSLOutPs); PsLstAuto.Add(pageShiftOutPs); PsLstAuto.Add(emgStopInPs); PsLstAuto.Add(startInPs); PsLstAuto.Add(resetInPs); PsLstAuto.Add(pauseInPs); PsLstAuto.Add(autoSLInPs); PsLstAuto.Add(autoCCInPs); PsLstAuto.Add(clInPs); PsLstAuto.Add(slInPs); PsLstAuto.Add(alarm1InPs); PsLstAuto.Add(alarm2InPs); PsLstAuto.Add(alarm3InPs); PsLstAuto.Add(alarm4InPs); PsLstAuto.Add(alarm5InPs); PsLstAuto.Add(alarm6InPs); PsLstAuto.Add(alarm7InPs); PsLstAuto.Add(alarm8InPs); PsLstAuto.Add(alarm9InPs); PsLstAuto.Add(alarm10InPs); PsLstAuto.Add(alarm11InPs); PsLstAuto.Add(alarm12InPs); PsLstAuto.Add(alarm13InPs); PsLstAuto.Add(alarm14InPs); PsLstAuto.Add(alarm15InPs); PsLstAuto.Add(alarm16InPs); PsLstAuto.Add(startCountInOutPs); PsLstHand = new List <DTPlcInfoSimple>(); PsLstParam = new List <DTPlcInfoSimple>(); PsLstIO = new List <DTPlcInfoSimple>(); UserDataTable = new DataTable(); AllPlcSimpleLst = new List <List <DTPlcInfoSimple> >(); AllPlcSimpleLst.Add(psLstAuto); AllPlcSimpleLst.Add(psLstHand); AllPlcSimpleLst.Add(psLstParam); AllPlcSimpleLst.Add(PsLstIO); paramFile = new ConfigFileManager(); if (File.Exists(Constant.ConfigParamFilePath)) { paramFile.LoadFile(Constant.ConfigParamFilePath); if (!int.TryParse(paramFile.ReadConfig(Constant.printBarcodeMode), out printBarCodeMode)) { MessageBox.Show(Constant.ErrorParamConfigFile); ConstantMethod.AppExit(); } } else { MessageBox.Show(Constant.ConfigParamFilePath + Constant.ErrorParamConfigFile); ConstantMethod.AppExit(); } LogManager.WriteProgramLog(Constant.Start); }