关于自动重命名的实现
string strLabel = "";
string strBaseName = this.listView1.Items[listBox1.SelectedIndex].Text;
if (fcx.Boxes.Count == 0)
{
strLabel = strBaseName + "1";
}
else
{
for (int i = 1; i <= fcx.Boxes.Count+1; i++)
{
strLabel = strBaseName + i.ToString();
bool isExist = false;
foreach (Box oBox in fcx.Boxes)
{
if (oBox.Text == strLabel)
{
isExist = true;
}
}
if (isExist)
{
continue;
}
else
{
break;
}
}
}

浙公网安备 33010602011771号