void findCloseTime(List <String> timeList) { if (timeList.Count <= 1) { return; } StepTime time = new StepTime(); for (int i = 0; i < timeList.Count; i++) { if (timeList[i].Contains(CLOSE_START)) { time.startTime = getTime(timeList[i]); //删除当前项避免重复匹配 timeList.RemoveAt(i); i--; continue; } else if (timeList[i].Contains(CLOSE_END)) { time.endTime = getTime(timeList[i]); //删除当前项避免重复匹配 timeList.RemoveAt(i); i--; //退出当前循环 if (time.startTime != null && time.endTime != null) { time.calcTime(); close = time; } return; } } }
void findOpen2Connected(List <String> timeList) { if (timeList.Count <= 1) { return; } StepTime time = new StepTime(); for (int i = 0; i < timeList.Count; i++) { if (timeList[i].Contains(OPEN_START)) { //Console.WriteLine("open:" + timeList[i]); time.startTime = getTime(timeList[i]); continue; } else if (timeList[i].Contains(DHCP_END)) { //Console.WriteLine("open:" + timeList[i]); time.endTime = getTime(timeList[i]); //退出当前循环 if (time.startTime != null && time.endTime != null) { time.calcTime(); open2Connected = time; } return; } } }
void findOpenTime(List <String> timeList) { if (timeList.Count <= 1) { return; } StepTime time = new StepTime(); for (int i = 0; i < timeList.Count; i++) { if (timeList[i].Contains(OPEN_START)) { //Console.WriteLine("open:" + timeList[i]); time.startTime = getTime(timeList[i]); //删除当前项避免重复匹配 timeList.RemoveAt(i); i--; continue; } else if (timeList[i].Contains(OPEN_END)) { // Console.WriteLine("open:" + timeList[i]); time.endTime = getTime(timeList[i]); //删除当前项避免重复匹配 timeList.RemoveAt(i); i--; //退出当前循环 if (time.startTime != null && time.endTime != null) { time.calcTime(); open = time; } return; } } }
void findOpenTime(List<String> timeList) { if (timeList.Count <= 1) return; StepTime time = new StepTime(); for (int i = 0; i < timeList.Count; i++) { if (timeList[i].Contains(OPEN_START)) { //Console.WriteLine("open:" + timeList[i]); time.startTime = getTime(timeList[i]); //删除当前项避免重复匹配 timeList.RemoveAt(i); i--; continue; } else if (timeList[i].Contains(OPEN_END)) { // Console.WriteLine("open:" + timeList[i]); time.endTime = getTime(timeList[i]); //删除当前项避免重复匹配 timeList.RemoveAt(i); i--; //退出当前循环 if (time.startTime != null && time.endTime != null) { time.calcTime(); open = time; } return; } } }
void findOpen2Connected(List<String> timeList) { if (timeList.Count <= 1) return; StepTime time = new StepTime(); for (int i = 0; i < timeList.Count; i++) { if (timeList[i].Contains(OPEN_START)) { //Console.WriteLine("open:" + timeList[i]); time.startTime = getTime(timeList[i]); continue; } else if (timeList[i].Contains(DHCP_END)) { //Console.WriteLine("open:" + timeList[i]); time.endTime = getTime(timeList[i]); //退出当前循环 if (time.startTime != null && time.endTime != null) { time.calcTime(); open2Connected = time; } return; } } }
void findCloseTime(List<String> timeList) { if (timeList.Count <= 1) return; StepTime time = new StepTime(); for (int i = 0; i < timeList.Count; i++) { if (timeList[i].Contains(CLOSE_START)) { time.startTime = getTime(timeList[i]); //删除当前项避免重复匹配 timeList.RemoveAt(i); i--; continue; } else if (timeList[i].Contains(CLOSE_END)) { time.endTime = getTime(timeList[i]); //删除当前项避免重复匹配 timeList.RemoveAt(i); i--; //退出当前循环 if (time.startTime != null && time.endTime != null) { time.calcTime(); close = time; } return; } } }