Ejemplo n.º 1
0
        private void ParseMenu(XPathNodeIterator nodeIterator, List <MenuProperty> IMenu)
        {
            while (nodeIterator.MoveNext())
            {
                string module_code = nodeIterator.Current.GetAttribute("module_code", "");
                if (module_code.ToLower() == "sys09")
                {
                    continue;
                }


                //新建Feed对应的Channel
                MenuProperty menuChannel = new MenuProperty();
                //menuChannel.ModuleId = nodeIterator.Current.GetAttribute("module_id", "");
                //menuChannel.ModuleFather = nodeIterator.Current.GetAttribute("module_father", "");
                menuChannel.ModuleCode = module_code;
                menuChannel.ModuleName = nodeIterator.Current.GetAttribute("module_name", "").Replace("&", "&");//特殊处理快捷键 ;
                menuChannel.ModuleUrl  = nodeIterator.Current.GetAttribute("module_url", "");
                //menuChannel.ModuleGrade = nodeIterator.Current.GetAttribute("module_grade", "");
                menuChannel.ModuleImage    = nodeIterator.Current.GetAttribute("image", "");
                menuChannel.ModuleShort    = nodeIterator.Current.GetAttribute("module_short", "");
                menuChannel.ModuleTarget   = nodeIterator.Current.GetAttribute("module_target", "");
                menuChannel.ModuleQuanxian = nodeIterator.Current.GetAttribute("module_quanxuan", "");

                if (!string.IsNullOrEmpty(menuChannel.ModuleName))
                {
                    if (module_code.ToLower().IndexOf("sys") == -1)
                    {
                        IMenu.Add(menuChannel);
                    }
                    XPathNodeIterator childNodeIterator = nodeIterator.Current.SelectChildren("row", "");
                    ParseMenu(childNodeIterator, IMenu);
                }
            }//end while
        }
Ejemplo n.º 2
0
 set => SetValue(MenuProperty, value);
Ejemplo n.º 3
0
        private void ParseMenu(XPathNodeIterator nodeIterator, List<MenuProperty> IMenu)
        {
            while (nodeIterator.MoveNext())
            {
                string module_code = nodeIterator.Current.GetAttribute("module_code", "");
                if (module_code.ToLower() == "sys09") continue;

                //新建Feed对应的Channel
                MenuProperty menuChannel = new MenuProperty();
                //menuChannel.ModuleId = nodeIterator.Current.GetAttribute("module_id", "");
                //menuChannel.ModuleFather = nodeIterator.Current.GetAttribute("module_father", "");
                menuChannel.ModuleCode = module_code;
                menuChannel.ModuleName = nodeIterator.Current.GetAttribute("module_name", "").Replace("&", "&");//特殊处理快捷键 ;
                menuChannel.ModuleUrl = nodeIterator.Current.GetAttribute("module_url", "");
                //menuChannel.ModuleGrade = nodeIterator.Current.GetAttribute("module_grade", "");
                menuChannel.ModuleImage = nodeIterator.Current.GetAttribute("image", "");
                menuChannel.ModuleShort = nodeIterator.Current.GetAttribute("module_short", "");
                menuChannel.ModuleTarget = nodeIterator.Current.GetAttribute("module_target", "");
                menuChannel.ModuleQuanxian = nodeIterator.Current.GetAttribute("module_quanxuan", "");

                if (!string.IsNullOrEmpty(menuChannel.ModuleName))
                {
                    if(module_code.ToLower().IndexOf("sys")==-1)
                        IMenu.Add(menuChannel);
                    XPathNodeIterator childNodeIterator = nodeIterator.Current.SelectChildren("row", "");
                    ParseMenu(childNodeIterator, IMenu);
                }

            }//end while
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Adds a filter option.
 /// </summary>
 /// <param name="criteria">The criteria to extend.</param>
 /// <param name="field">The field to filter on.</param>
 /// <returns>An instance of <see cref="FilterMenu"/>, which further refines the operator.</returns>
 public static FilterMenu FilteredBy(this MenuCriteria criteria, MenuProperty field)
 {
     return(new FilterMenu(criteria, field));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FilterMenu"/> class.
 /// </summary>
 /// <param name="criteria">The criteria to extend.</param>
 /// <param name="field">The field to filter on.</param>
 public FilterMenu(MenuCriteria criteria, MenuProperty field)
     : base(criteria)
 {
     this.Field = field;
 }