/// <summary> /// 내가 관심과목 담은 과목들 리스트 출력 /// </summary> /// <param name="id">현 사용자 아이디</param> public void MyInterestLectures(string id) { drawUI.Category(); for (int index = 0; index < interestLectureList.Count; index++) { if (interestLectureList[index].Id.Equals(id)) { Console.WriteLine(ConvertLength(interestLectureList[index].No, 5) + ConvertLength(interestLectureList[index].Major, 22) + ConvertLength(interestLectureList[index].Number, 13) + ConvertLength(interestLectureList[index].Division, 7) + ConvertLength(interestLectureList[index].Name, 35) + ConvertLength(interestLectureList[index].Completion, 15) + ConvertLength(interestLectureList[index].Grade, 6) + ConvertLength(interestLectureList[index].Credit, 7) + ConvertLength(interestLectureList[index].Time, 30) + ConvertLength(interestLectureList[index].Room, 15) + ConvertLength(interestLectureList[index].Professor, 24) + interestLectureList[index].Language); } } }
/// <summary> /// 내가 찾고자 하는 정보를 가진 과목들의 목록을 출력해준다. /// </summary> /// <param name="input">사용자가 찾고자 검색한 정보</param> /// <param name="mode">무슨 열의 정보인지</param> /// <param name="status">관심과목담기인지 수강신청인지</param> /// <param name="dataControl">데이터 정보들</param> /// <returns>발견한게 몇개인지</returns> public int PrintWeFound(string input, int mode, string status, DataControl dataControl) { Console.SetWindowSize(192, 50); int count = 0; drawUI.Category(); switch (status) { case TimeTableConstants.INTEREST: for (int r = 2; r <= lectureInformation.GetLength(0); r++) { if (!dataControl.InInterestList(lectureInformation[r, 3].ToString())) { continue; } else if (Regex.IsMatch(lectureInformation[r, mode].ToString(), input)) { count++; for (int c = 1; c <= lectureInformation.GetLength(1); c++) { if (lectureInformation[r, c] == null) { Console.Write(PrintModeSelect("", c)); } else { Console.Write(PrintModeSelect(lectureInformation[r, c].ToString(), c)); } } } else { continue; } Console.WriteLine(); } return(count); case TimeTableConstants.REGISTER: for (int r = 2; r <= lectureInformation.GetLength(0); r++) { if (!dataControl.InRegisterList(lectureInformation[r, 3].ToString())) { continue; } else if (Regex.IsMatch(lectureInformation[r, mode].ToString(), input)) { count++; for (int c = 1; c <= lectureInformation.GetLength(1); c++) { if (lectureInformation[r, c] == null) { Console.Write(PrintModeSelect("", c)); } else { Console.Write(PrintModeSelect(lectureInformation[r, c].ToString(), c)); } } } else { continue; } Console.WriteLine(); } return(count); default: return(count); } }