private void comboDataSources_SelectedIndexChanged(object sender, EventArgs e) { __cSources[0].Clear(); //清除所有商品資訊(0=所有商品資訊) int iCount = __cSources.Count; for (int i = iCount - 1; i > 0; i--) { SimpleBoundList <_ProductInfo> cProducts = __cSources[i]; cProducts.Clear(); //清除分類商品資訊 __cSources.RemoveAt(i); //移除分類商品 tabControl_Products.TabPages.RemoveAt(i); //移除分類商品頁籤 } LoadProducts(comboDataSources.Text); RefreshGrid(); }