我们如何识别相同表单的实例
这是我的问题:我只想显示一次相同表单的每个实例:
for (int l = 0; l < 2; l++)
{
cameraInstance[l].Start();
if (cameraInstance[l].MoveDetection == true)
{
Formes.CameraViewVS f1 = new Formes.CameraViewVS(cameraInstance[l], adresseIPArray[l]);
foreach (Form S in Application.OpenForms)
{
if ((S.GetType() == typeof(Formes.CameraViewVS)) && (cameraInstance[l].adresse == f1.IP))
{
S.Show();
cameraInstance[l].MoveDetection = false;
return;
}
}
f1.Owner = this;
f1.Show();
}
}
Any idea