public async void LoadBoard() { if (ActiveUser.IsActive == true && ShortBoard != null) { ReadBoardDTO dto = await BoardService.GetBoard(ActiveUser.Instance.LoggedUser.Token, ShortBoard.BoardId); if (dto != null) { Board = new ReadBoard(dto); if (Board.IsAdmin == true) { DeleteBoardCommandVisible = true; } UsersViewModel = new UsersListViewModel(Board.Users, Board.IsAdmin, Board.BoardId); CardListViewModel = new CardListListViewModel(Board.CardLists, Board.BoardId, this); //Subscribe to board MQService.Instance.SubscribeToExchange(ShortBoard.ExchangeName); } else { ShowMessageBox(null, "Error getting board."); } } else { ShowMessageBox(null, "Error getting user."); } }
public void Read() { Wyczysc(); game.Board.CleanBoard(); Deserializacja deserializacja = new Deserializacja(game); if (deserializacja.IsReadDeserializacja()) { Window(); ReadBoard fill = new ReadBoard(game, this, deserializacja.ShowListField()); time_label.Text = game.Time.ToString(); procent = ((double)game.ShowedField / (double)game.Board.FieldCountWithOutMine) * 100;/// procent_label.Text = procent.ToString("0.00") + "%"; mine_label.Text = game.Board.MineCount.ToString(); timer.Start(); lose_b.Visible = true; } else { nowaGraToolStripMenuItem_Click(this, null); } }