public CMonitor(CSettings settings) { commonSettings = settings.GetCommonSettings(); g_jifennum = commonSettings.SignConfig.GanJiFen; x_jifennum = commonSettings.SignConfig.XianJiFen; if (g_jifennum < 2 || g_jifennum > 100) { g_jifennum = 2; } if (x_jifennum < 2 || x_jifennum > 100) { x_jifennum = 2; } signLen = new SignLength(); signLen.GAN_LENGTH = ganlen = commonSettings.SignConfig.GanLength; signLen.XIAN_LENGTH = xianlen = commonSettings.SignConfig.XianLength; signLen.CHE_LENGTH = chelen = commonSettings.SignConfig.CheLength; mondata = new CMonData(signLen); mondata_cur = new CMonData(signLen); mondata_old = new CMonData(signLen); g_jifenQueue = new List <CSignals>(g_jifennum); x_jifenQueue = new List <CSignals>(x_jifennum); adminPBGan = settings.SignConfig.AdminPBGan; adminPBXian = settings.SignConfig.AdminPBXian; adminQFGan = settings.SignConfig.AdminQFGan; adminQFXian = settings.SignConfig.AdminQFXian; PBChe = settings.SignConfig.PBChe; PBGan = settings.SignConfig.PBGan; PBXian = settings.SignConfig.PBXian; ganpos = commonSettings.SignConfig.GanPosition; xianpos = commonSettings.SignConfig.XianPosition; chepos = commonSettings.SignConfig.ChePosition; ApplyCommonSettings(); mythread = new Thread(Monitor); regobj = new ArrayList(); }