messagebox关不掉,求解...
private void LoadFeatureClass(IDataset pDataSet)
{
if (pDataSet.Type == esriDatasetType.esriDTFeatureDataset)
{
checkedListBox1.Items.Clear();
IFeatureDataset pFDataSet = (IFeatureDataset)pDataSet;
IEnumDataset pEDs = pFDataSet.Subsets;
IDataset pDs = pEDs.Next();
string strVal = string.Empty;
while (pDs != null)
{
checkedListBox1.Items.Add(pDs.Name);
strVal = strVal + pDs.Name + "*";
pDs = pEDs.Next();
}
TopologyClass.LayerNameListAll = strVal;
}
else
{
MessageBox.Show("没找到相关要素集", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
结果弄的就算while循环判断为真,也依然会执行else的语句弹出message,而且要点很多下确定message才能关闭,求解
------解决方案--------------------你这个方法有没有重复调用?
------解决方案--------------------别这么弹窗
委托主线程弹窗
如果弹了就不弹 可以变量控制