private void ClearTab(string tabName, bool showWarning)
{
if (showWarning)
{
string tmp = string.Format(Properties.Resources.ClearTabMenuItem_ClickText1, Environment.NewLine);
if (MessageBox.Show(tmp, tabName + " " + Properties.Resources.ClearTabMenuItem_ClickText2, MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.Cancel)
{
return;
}
}
_statuses.ClearTabIds(tabName);
if (ListTab.SelectedTab.Text == tabName)
{
_anchorPost = null;
_anchorFlag = false;
this.PurgeListViewItemCache();
_curItemIndex = -1;
_curPost = null;
}
foreach (TabPage tb in ListTab.TabPages)
{
if (tb.Text == tabName)
{
((DetailsListView)tb.Tag).VirtualListSize = 0;
tb.ImageIndex = -1;
break;
}
}
if (!this._cfgCommon.TabIconDisp) ListTab.Refresh();
SetMainWindowTitle();
SetStatusLabelUrl();
}