Example #1
0
        private static void OnCommandAdded(EventParameters <ICategoryCommand> result)
        {
            if (result.Topic == EventTopicNames.NavigationCommandAdded)
            {
                NavigationCommandCategories.Add(result.Value);
            }

            if (result.Topic == EventTopicNames.DashboardCommandAdded)
            {
                var cat = DashboardCommandCategories.FirstOrDefault(item => item.Category == result.Value.Category);
                if (cat == null)
                {
                    cat = new DashboardCommandCategory(result.Value.Category);
                    DashboardCommandCategories.Add(cat);
                }
                if (result.Value.Order > cat.Order)
                {
                    cat.Order = result.Value.Order;
                }
                cat.AddCommand(result.Value);
            }
        }
Example #2
0
 private static void OnNavigationCommandAdded(EventParameters<ICategoryCommand> obj)
 {
     if (obj.Topic == EventTopicNames.NavigationCommandAdded)
         NavigationCommandCategories.Add(obj.Value);
 }