public static MenuSection GetSection(string configFile)
        {
            MenuSection section = new MenuSection();

            section.GetSection(configFile, SectionName);
            return(section);
        }
 static MenuFactory()
 {
     defaultMenu = new MenuTemplate();
     Configuration.MenuSection menuSection = Configuration.MenuSection.GetSection();
     if (menuSection != null)
     {
         defaultMenu.ItemContainers = CreateItems(menuSection.Items, new List <IMenuItemContainer>());
     }
 }
 public static void RegisterAreaMenu(string menuName, string menuFileName)
 {
     lock (menuTemplates)
     {
         Configuration.MenuSection menuSection = Configuration.MenuSection.GetSection(menuFileName);
         if (menuSection != null)
         {
             MenuTemplate areaMenu = new MenuTemplate();
             areaMenu.ItemContainers = CreateItems(menuSection.Items, new List <IMenuItemContainer>());
             menuTemplates.Add(menuName, areaMenu);
         }
     }
 }
Beispiel #4
0
 public static MenuSection GetSection(string configFile)
 {
     MenuSection section = new MenuSection();
     section.GetSection(configFile, SectionName);
     return section;
 }