Mistři v programování na #hovnokod

Když selže autodetekce, zda je menu otevřené a v něm vypsané podmenu.

IsOpened = false;
string internalUrl = Tools.RemoveLanguageFromPath(Request.Url.PathAndQuery);
if ((Language == Language.DE || Language == Language.FR || Language == Language.CZ)
    && (
           (
               Language == Language.DE
               && !internalUrl.StartsWith("/template.aspx?pageid=student")
               && !internalUrl.StartsWith("/template.aspx?pageid=schulen")
               && !internalUrl.StartsWith("/disertationst.aspx")
               && !internalUrl.StartsWith("/download.aspx?category=1")
               && !internalUrl.StartsWith("/download.aspx?category=2")
               && !internalUrl.StartsWith("/template.aspx?pageid=aboutus")
               && !internalUrl.StartsWith("/contact.aspx")
               && !internalUrl.StartsWith("/template.aspx?pageid=anfahrt")
               && !internalUrl.StartsWith("/template.aspx?pageid=anfahrt-leipzig")
           )
           || (
               Language == Language.FR
               && !internalUrl.StartsWith("/examples2.aspx?programm=rstab")
               && !internalUrl.StartsWith("/examples2.aspx?programm=rfem")
               && !internalUrl.StartsWith("/download.aspx?category=1")
               && !internalUrl.StartsWith("/download.aspx?category=2")
           )
           || (
               Language == Language.CZ
               && !internalUrl.StartsWith("/template.aspx?pageid=hotline")
               && !internalUrl.StartsWith("/faq.aspx")
               && !internalUrl.StartsWith("/template.aspx?pageid=servicevertrage")
               && !internalUrl.StartsWith("/template.aspx?pageid=updates")
               && !internalUrl.StartsWith("/template.aspx?pageid=schulungen")
               && !internalUrl.StartsWith("/template.aspx?pageid=student")
               && !internalUrl.StartsWith("/template.aspx?pageid=schulen")
               && !internalUrl.StartsWith("/disertationst.aspx")
               && !internalUrl.StartsWith("/download.aspx?category=1")
               && !internalUrl.StartsWith("/download.aspx?category=2")
               && !internalUrl.StartsWith("/template.aspx?pageid=aboutus")
               && !internalUrl.StartsWith("/contact.aspx")
               && !internalUrl.StartsWith("/template.aspx?pageid=anfahrt")
               && !internalUrl.StartsWith("/distributors.aspx")
           )
       )
   )
{
    foreach (MainMenuItem item in Item.Items)
    {
        if (item.Items.Count > 0 && item.Opened)
        {
            IsOpened = true;
            break;
        }
    }
}

Anonymous,