private async Task doReTweetOfficial(bool isConfirm)
{
//公式RT
if (this.ExistCurrentPost)
{
if (!_curPost.CanRetweetBy(this.twitterApi.CurrentUserId))
{
if (this._curPost.IsProtect)
MessageBox.Show("Protected.");
_DoFavRetweetFlags = false;
return;
}
if (_curList.SelectedIndices.Count > 15)
{
MessageBox.Show(Properties.Resources.RetweetLimitText);
_DoFavRetweetFlags = false;
return;
}
else if (_curList.SelectedIndices.Count > 1)
{
string QuestionText = Properties.Resources.RetweetQuestion2;
if (_DoFavRetweetFlags) QuestionText = Properties.Resources.FavoriteRetweetQuestionText1;
switch (MessageBox.Show(QuestionText, "Retweet", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question))
{
case DialogResult.Cancel:
case DialogResult.No:
_DoFavRetweetFlags = false;
return;
}
}
else
{
if (!this._cfgCommon.RetweetNoConfirm)
{
string Questiontext = Properties.Resources.RetweetQuestion1;
if (_DoFavRetweetFlags) Questiontext = Properties.Resources.FavoritesRetweetQuestionText2;
if (isConfirm && MessageBox.Show(Questiontext, "Retweet", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.Cancel)
{
_DoFavRetweetFlags = false;
return;
}
}
}
var statusIds = new List<long>();
foreach (int idx in _curList.SelectedIndices)
{
PostClass post = GetCurTabPost(idx);
if (post.CanRetweetBy(this.twitterApi.CurrentUserId))
statusIds.Add(post.StatusId);
}
await this.RetweetAsync(statusIds);
}
}