예제 #1
0
        public MainWindow()
        {
            InitializeComponent();

            MainBoardModel           = new BoardModel();
            MainBoardViewModel       = new BoardViewModel(MainBoardModel);
            MainBoardViewModel.SizeX = SizeX;
            MainBoardViewModel.SizeY = SizeY;

            MainBoardView.DataContext = MainBoardViewModel;
            MainBoardViewModel.Board  = MainBoardModel.CreateBoard(SizeX, SizeY);

            MainPieceDisplayModel     = new PieceDisplayModel();
            MainPieceDisplayViewModel = new PieceDisplayViewModel(MainPieceDisplayModel);
        }
예제 #2
0
 public PieceDisplayViewModel(PieceDisplayModel modelIn)
 {
     model = modelIn;
 }