Skip to content

Commit

Permalink
[WPFUI] fix release build
Browse files Browse the repository at this point in the history
Fix release build
  • Loading branch information
manbearian authored Dec 24, 2022
2 parents ddaf6c6 + ad48020 commit 457c2ad
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions WPF_UI/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@ public MainWindow()
{
InitializeComponent();

#if !DEBUG
#if RELEASE
debugModeMenuItem.IsEnabled = false;
#endif

foreach (var pieceId in (Enum.GetValues(typeof(PieceIdentity)) as PieceIdentity[]).OrderBy(piece => piece.Name()))
foreach (var pieceId in (Enum.GetValues(typeof(PieceIdentity)) as PieceIdentity[]).EmptyIfNull().OrderBy(piece => piece.Name()))
{
var blackMenuItem = new MenuItem() { Header = pieceId.Name() };
var whiteMenuItem = new MenuItem() { Header = pieceId.Name() };

pieceMenuItems.Add(blackMenuItem, new Piece(Player.Black, pieceId));
pieceMenuItems.Add(blackMenuItem, new Piece(PlayerColor.Black, pieceId));
addBlackPieceMenuItem.Items.Add(blackMenuItem);
pieceMenuItems.Add(whiteMenuItem, new Piece(Player.White, pieceId));
pieceMenuItems.Add(whiteMenuItem, new Piece(PlayerColor.White, pieceId));
addWhitePieceMenuItem.Items.Add(whiteMenuItem);
}
#endif

gameBoard.IsRotated = Properties.Settings.Default.RotateBoard;

Expand Down

0 comments on commit 457c2ad

Please sign in to comment.