internal async Task FollowCommand(string id)
{
using (var inputName = new InputTabName())
{
inputName.FormTitle = "Follow";
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.FollowCommandText1))
{
try
{
var task = this.twitterApi.FriendshipsCreate(id);
await dialog.WaitForAsync(this, task);
}
catch (WebApiException ex)
{
MessageBox.Show(Properties.Resources.FRMessage2 + ex.Message);
return;
}
}
MessageBox.Show(Properties.Resources.FRMessage3);
}