Пример #1
0
        public BoardPageViewModel(INavigationService navigationService, IBoardService boardService)
        {
            this.navigationService = navigationService;
            this.boardService      = boardService;

            NotationViewModel = new NotationViewModel(boardService);
        }
Пример #2
0
        private async void LoadFrom(string data)
        {
            if (!boardService.LoadFrom(data))
            {
                var dialog = new MessageDialog("Could not load PGN/FEN. The content is invalid or not supported.");
                dialog.Commands.Add(new UICommand {
                    Label = "OK", Id = 0
                });
                await dialog.ShowAsync();

                return;
            }

            BoardViewModel.RefreshSquares();
            NotationViewModel.ReloadMoves();
        }
Пример #3
0
 public void ReloadBoard(SideColor changedPerspectiveColor)
 {
     BoardViewModel.RefreshBoard(changedPerspectiveColor);
     NotationViewModel.ReloadMoves();
 }