private void LoadCardDecksInfo() { try { MemoryGameService.CardDeckRetrieverServiceClient cardDeckRetrieverServiceClient = new MemoryGameService.CardDeckRetrieverServiceClient(); MemoryGameService.DataTransferObjects.CardDeckInfoDto[] cardDecksInfo = cardDeckRetrieverServiceClient.GetCardDecksInfo(); for (int index = 0; index < cardDecksInfo.Length; index++) { _cardDecksInfoList.Add(cardDecksInfo[index]); } CardDeckComboBox.ItemsSource = _cardDecksInfoList; CardDeckComboBox.DisplayMemberPath = "CardDeckName"; CardDeckComboBox.SelectedValuePath = "CardDeckId"; } catch (EndpointNotFoundException) { MessageBox.Show(Properties.Langs.Resources.ServerConnectionLost); } catch (TimeoutException) { MessageBox.Show(Properties.Langs.Resources.ServerTimeoutError); } catch (CommunicationException) { MessageBox.Show(Properties.Langs.Resources.CommunicationInterrupted); } }
private void LoadCardDeck() { MemoryGameService.CardDeckRetrieverServiceClient cardDeckRetrieverServiceClient = new MemoryGameService.CardDeckRetrieverServiceClient(); _cardDeck = cardDeckRetrieverServiceClient.GetCardDeckAndCards(_selectedCardDeckId); }