feat: add chessboard for simulator
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user