internal async Task RemoveCommand(string id, bool skipInput)
{
if (!skipInput)
{
using (var inputName = new InputTabName())
{
inputName.FormTitle = "Unfollow";
inputName.FormDescription = Properties.Resources.FRMessage1;
inputName.TabName = id;
if (inputName.ShowDialog(this) != DialogResult.OK)
return;
if (string.IsNullOrWhiteSpace(inputName.TabName))
return;
id = inputName.TabName.Trim();
}
}
using (var dialog = new WaitingDialog(Properties.Resources.RemoveCommandText1))
{
try
{
var task = this.twitterApi.FriendshipsDestroy(id);
await dialog.WaitForAsync(this, task);
}
catch (WebApiException ex)
{
MessageBox.Show(Properties.Resources.FRMessage2 + ex.Message);
return;
}
}
MessageBox.Show(Properties.Resources.FRMessage3);
}