private bool IsNameUsedByView(string name, ViewFolder folderToCheck, object ignoreObject)
{
foreach (View view in folderToCheck.Views)
{
if ((view.Name.ToUpper() == name) && (view != ignoreObject))
{
return true;
}
}
foreach (ViewFolder subFolder in folderToCheck.SubFolders)
{
if (IsNameUsedByView(name, subFolder, ignoreObject))
{
return true;
}
}
return false;
}