private async void revivePlayerButton_Click(object sender, EventArgs e) { if (characterListComboBox.SelectedIndex == -1) { MessageBoxEx.Show(this, "No character selected!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } await TCAction.RevivePlayer(characterListComboBox.Items[characterListComboBox.SelectedIndex].ToString()); }
private async void ReviveChar() { if (string.IsNullOrEmpty(SelectedCharacter)) { _messageService.ShowError("No character selected!"); return; } try { await TCAction.RevivePlayer(SelectedCharacter); } catch (ServerOfflineException ex) { _messageService.ShowError(ex.Message); } }