private void PrintLog(Game gamest, Plan curPlan) {//输出日志: String strLog = ""; strLog = strLog + GameSystem.GetDate(gamest.GameChapter.StMonth, gamest.GameChapter.StDay + gamest.CurTurn - 1) + ":\r\n"; //按照计划依次执行 for (int i = 0; i < 3; i++) { Course curCourse = curPlan.PlanList[i]; GameEventBase curEvent = curPlan.EventList[i]; strLog += GenSingleLog(i, curCourse, curEvent) + "\r\n"; } if (curPlan.PlanList[3].CourseName != "空") { strLog += GenSingleLog(3, curPlan.PlanList[3], curPlan.EventList[3]) + "\r\n"; if (gamest.IfNight == 2) { strLog += "实在是太困了,所以明天上午可能得好好休息了(明天上午将无法安排计划)。\r\n"; } } if (curGame.Buff == -2) { string curLog = $"过高的压力值使我产生了疲劳。(所有学科的能力值都会有所降低。)\r\n"; strLog += curLog; } if (curGame.Buff == 2) { string curLog = $"较低的压力值使我精神抖擞。(所有学科的能力值都会有所提高。)\r\n"; strLog += curLog; } SlowPrint(strLog); }
void UpdateDate() { //渲染日期部分 int newMonth = Gamest.GameChapter.StMonth; int newDay = Gamest.GameChapter.StDay + Gamest.CurTurn; Date.Text = GameSystem.GetDate(newMonth, newDay); TurnText.Text = $"第 {Gamest.CurTurn+1} 天"; }
void AddCourse(Course newCourse) { //当前的课程是否已经考完? bool IsFinished = (newCourse.Deadline < Gamest.CurTurn); //课程小提示 ToolTip newCoursePlanTip = new ToolTip(); newCoursePlanTip.InitialDelay = 500; //添加一门课程的信息 CourseTablePanel.RowCount++; CourseTablePanel.Height += RowHeight; CourseTablePanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, RowHeight)); //课程名项 Label newCourseName = new Label(); newCourseName.Text = newCourse.CourseName; newCourseName.AutoSize = false; newCourseName.Font = new Font("宋体", 9, FontStyle.Bold); newCourseName.ForeColor = FontColor1; newCourseName.TextAlign = ContentAlignment.MiddleCenter; newCourseName.Dock = DockStyle.Fill; newCoursePlanTip.SetToolTip(newCourseName, newCourse.DetailedDescription); CourseTablePanel.Controls.Add(newCourseName, 0, CourseTablePanel.RowCount - 1); //课程考试日期 Label newCourseDDL = new Label(); newCourseDDL.Text = $"{GameSystem.GetDate(Gamest.GameChapter.StMonth,Gamest.GameChapter.StDay+newCourse.Deadline)} {GameSystem.TimeName[newCourse.TestPeriod]}"; newCourseDDL.AutoSize = false; newCourseDDL.Font = new Font("宋体", 9, FontStyle.Bold); newCourseDDL.ForeColor = FontColor1; newCourseDDL.TextAlign = ContentAlignment.MiddleCenter; newCourseDDL.Dock = DockStyle.Fill; CourseTablePanel.Controls.Add(newCourseDDL, 1, CourseTablePanel.RowCount - 1); //课程的能力值 Label newCourseScore = new Label(); if (IsFinished) { newCourseScore.Text = "???"; ToolTip newCourseScoreTip = new ToolTip(); newCourseScoreTip.InitialDelay = 500; newCourseScoreTip.SetToolTip(newCourseScore, "这门课已经考完了,只有等出成绩才能知道分数哦!"); } else { newCourseScore.Text = newCourse.Score.ToString(); ToolTip newCourseScoreTip = new ToolTip(); newCourseScoreTip.InitialDelay = 500; newCourseScoreTip.SetToolTip(newCourseScore, "如果现在考这门课的预计分数,实际考试分数会受到临场发挥影响!"); } newCourseScore.AutoSize = false; newCourseScore.Font = new Font("宋体", 9, FontStyle.Bold); newCourseScore.ForeColor = FontColor1; newCourseScore.TextAlign = ContentAlignment.MiddleCenter; newCourseScore.Dock = DockStyle.Fill; CourseTablePanel.Controls.Add(newCourseScore, 2, CourseTablePanel.RowCount - 1); if (IsFinished) { return; } //添加到中间区(前提是可以复习) Label newCoursePlan = new Label(); newCoursePlan.Name = newCourse.CourseName; newCoursePlan.Text = $"复习{newCourse.CourseName}"; newCoursePlan.AutoSize = false; newCoursePlan.Height = 50; newCoursePlan.Width = 100; newCoursePlan.ForeColor = FontColor1; newCoursePlan.Font = new Font("宋体", 9, FontStyle.Bold); newCoursePlan.TextAlign = ContentAlignment.MiddleCenter; newCoursePlan.Dock = DockStyle.Fill; newCoursePlanTip.SetToolTip(newCoursePlan, newCourse.DetailedDescription); SelectionTable.Controls.Add(newCoursePlan, MidCurCol, MidCurRow); MidCurCol += 1; if (MidCurCol == 3) { MidCurCol = 0; MidCurRow++; } }