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