private RestoTimes sGetTimes(string pLine) { RestoTimes lTimes; WordSplit lSplit; lTimes = new RestoTimes(""); lSplit = sGetWord(pLine); if (sTestTime(lSplit.Word)) { lTimes.RestoOpen = lSplit.Word; lSplit = sGetWord(lSplit.Rest); if (lSplit.Word.Equals("pm", StringComparison.OrdinalIgnoreCase)) { lTimes.RestoOpen = sPmTime(lTimes.RestoOpen); } lSplit = sGetWord(lSplit.Rest); lSplit = sGetWord(lSplit.Rest); if (sTestTime(lSplit.Word)) { lTimes.RestoClose = lSplit.Word; lSplit = sGetWord(lSplit.Rest); if (lSplit.Word.Equals("pm", StringComparison.OrdinalIgnoreCase)) { lTimes.RestoClose = sPmTime(lTimes.RestoClose); } if (lSplit.Rest.Length > 0) { lSplit = sGetWord(lSplit.Rest); if (lSplit.Word.Equals("drive", StringComparison.OrdinalIgnoreCase)) { lSplit = sGetWord(lSplit.Rest); lSplit = sGetWord(lSplit.Rest); if (sTestTime(lSplit.Word)) { lTimes.DriveClose = lSplit.Word; lSplit = sGetWord(lSplit.Rest); if (lSplit.Word.Equals("pm", StringComparison.OrdinalIgnoreCase)) { lTimes.DriveClose = sPmTime(lTimes.DriveClose); } } } } } } else { if (sTest24(lSplit.Word)) { lTimes.RestoOpen = "07:00"; lTimes.RestoClose = "06:59"; } } return(lTimes); }
private void sProcessLine(string pLine) { WordSplit lSplit; string lSave; int lStart; int lEnd; RestoTimes lTimes; int lDay; lSplit = sGetWord(pLine); if (!lSplit.Word.Equals("ontbijt", StringComparison.OrdinalIgnoreCase)) { lStart = sTestDay(lSplit.Word); if (lStart >= 0) { lSave = lSplit.Rest; lSplit = sGetWord(lSplit.Rest); if (sTestConnect(lSplit.Word)) { lSplit = sGetWord(lSplit.Rest); lEnd = sTestDay(lSplit.Word); if (lEnd >= 0) { lTimes = sGetTimes(lSplit.Rest); } else { lTimes = new RestoTimes(""); } } else { lEnd = lStart; lTimes = sGetTimes(lSave); } if (lStart > lEnd) { for (lDay = lStart; lDay < mRestoTimes.Length; lDay++) { mRestoTimes[lDay] = lTimes; } for (lDay = 0; lDay <= lEnd; lDay++) { mRestoTimes[lDay] = lTimes; } } else { for (lDay = lStart; lDay <= lEnd; lDay++) { mRestoTimes[lDay] = lTimes; } } } } }
private void sInitRestoTimes() { int lCount; mRestoTimes = new RestoTimes[mDays.Length]; for (lCount = 0; lCount < mRestoTimes.Length; lCount++) { mRestoTimes[lCount] = new RestoTimes(""); } }