feat: add chessboard for simulator

This commit is contained in:
2025-09-07 17:53:16 +08:00
parent 05fe33769a
commit 83e581f086

View File

@ -126,6 +126,18 @@ namespace HFUTCourseSimulation.Dialog {
Grid.SetRow(cornerLabel, 0);
Grid.SetRowSpan(cornerLabel, 2);
uiCoreGrid.Children.Add(cornerLabel);
// Add chessboard
for (int week = 1; week <= WEEK_NAMES.Length; ++week) {
for (int index = 1; index <= CurrentSemester.indexCount; ++index) {
if ((week + index) % 2 != 0) continue;
var chessboard = new Rectangle();
chessboard.Fill = new SolidColorBrush(Color.FromArgb(10, 0, 0, 0));
Grid.SetColumn(chessboard, week - 1 + 1);
Grid.SetRow(chessboard, index - 1 + 2);
uiCoreGrid.Children.Add((chessboard));
}
}
// Render for week 1
currentWeek = 1;