private void CopyStot()
{
string clstr = "";
StringBuilder sb = new StringBuilder();
bool IsProtected = false;
bool isDm = false;
if (this._curTab != null && this._statuses.GetTabByName(this._curTab.Text) != null) isDm = this._statuses.GetTabByName(this._curTab.Text).TabType == MyCommon.TabUsageType.DirectMessage;
foreach (int idx in _curList.SelectedIndices)
{
PostClass post = _statuses.Tabs[_curTab.Text][idx];
if (post.IsDeleted) continue;
if (!isDm)
{
if (post.RetweetedId != null)
sb.AppendFormat("{0}:{1} [https://twitter.com/{0}/status/{2}]{3}", post.ScreenName, post.TextSingleLine, post.RetweetedId, Environment.NewLine);
else
sb.AppendFormat("{0}:{1} [https://twitter.com/{0}/status/{2}]{3}", post.ScreenName, post.TextSingleLine, post.StatusId, Environment.NewLine);
}
else
{
sb.AppendFormat("{0}:{1} [{2}]{3}", post.ScreenName, post.TextSingleLine, post.StatusId, Environment.NewLine);
}
}
if (IsProtected)
{
MessageBox.Show(Properties.Resources.CopyStotText1);
}
if (sb.Length > 0)
{
clstr = sb.ToString();
try
{
Clipboard.SetDataObject(clstr, false, 5, 100);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}