|
本帖最后由 「夜夙」 于 2013-12-27 12:45 编辑
- public:
- /// <summary>
- /// 关闭标签
- /// </summary>
- System::Void CloseTagIE(System::Int32 Index,System::Boolean ALL)
- {
- if (IE->Count>0&&tabControl1->TabPages->Count>0)
- {
- if (ALL)
- {
- while (IE->Count>1)
- {
- for (System::Int32 i=0;i<IE->Count;i++)
- {
- if(IE->Count>1)
- {
- this->Controls->Remove(IE[i]);
- delete IE[i];
- IE->RemoveAt(i);
- tabControl1->TabPages->RemoveAt(i);
- tabControl1->Refresh();
- }
- if (IE->Count==1)
- {
- NavigateBroswer(ReadValue(Name,"#_BlankPage",INIPath),1);
- }
- }
- }
- HTMLIcon->Clear();
- }
- else
- {
- if (IE->Count==1)
- {
- NavigateBroswer(ReadValue(Name,"#_BlankPage",INIPath),1);
- }
- else
- if(IE->Count >1)
- {
- this->Controls->Remove(IE[Index]);
- delete IE[Index];
- IE->RemoveAt(Index);
- if (IE->Count>0)
- {
- if (tabControl1->SelectedIndex<IE->Count-1)
- {
- tabControl1->SelectedIndex=tabControl1->SelectedIndex;
- }
- else
- {
- tabControl1->SelectedIndex=tabControl1->SelectedIndex-1;
- }
- }
- tabControl1->TabPages->RemoveAt(Index);
- tabControl1->Refresh();
- }
- }
- }
- }
复制代码 |
|