示例#1
0
        public void Load()
        {
            if (MenuItems.Count > 0)
            {
                return;
            }

            var lookup = _lookupService.GetMenuItems().ToList();

            foreach (var menu in lookup)
            {
                MenuItems.Add(menu);
            }

            lookup = _lookupService.GetOptions().ToList();
            foreach (var option in lookup)
            {
                Options.Add(option);
            }
        }
示例#2
0
        public void Load()
        {
            if (MenuItems.Count > 0)
            {
                return;
            }

            var lookup = _lookupServices.GetMenuItems().ToList();

            foreach (var item in lookup)
            {
                MenuItems.Add(new NavigationItemViewModel(_eventAggregator, item.Name,
                                                          item.Action, item.Image, item.Color));
            }

            lookup = _lookupServices.GetOptions().ToList();
            foreach (var options in lookup)
            {
                MenuItems.Add(new NavigationItemViewModel(_eventAggregator, options.Name,
                                                          options.Action, options.Image, options.Color));
            }
        }