Пример #1
0
 void HandleShowMenuEvent(IEnumerable <TimelineEvent> plays)
 {
     if (plays == null || !plays.Any())
     {
         return;
     }
     menu.ShowMenu(ViewModel.Model, plays.ToList());
 }
Пример #2
0
 void HandleShowMenuEvent(IEnumerable <TimelineEvent> plays)
 {
     if (plays == null || !plays.Any())
     {
         return;
     }
     menu.ShowMenu(ViewModel.Model, plays.Select(p => new TimelineEventVM()
     {
         Model = p
     }));
 }
        protected override void ShowMenu()
        {
            IEnumerable <IViewModel>      viewModels = GetSelectedViewModels();
            IEnumerable <TimelineEventVM> events     = viewModels.OfType <TimelineEventVM> ();
            PlayerTimelineVM playerVM = viewModels.OfType <PlayerTimelineVM> ().FirstOrDefault();

            if (!events.Any() && playerVM != null)
            {
                events = playerVM.ViewModels.Where(vm => vm.Visible);
                playerMenu.ShowMenu(Project.Model, events.Select(e => e.Model));
            }
            else
            {
                menu.ShowMenu(Project.Model, events.Select(vm => vm.Model).ToList());
            }
        }
        protected override void ShowMenu()
        {
            IEnumerable <IViewModel>      viewModels = GetSelectedViewModels();
            IEnumerable <TimelineEventVM> events     = viewModels.OfType <TimelineEventVM> ();

            EventTypeTimelineVM categoryVM = viewModels.OfType <EventTypeTimelineVM> ().FirstOrDefault();

            if (!events.Any() && categoryVM != null)
            {
                events = categoryVM.ViewModels.Where(vm => vm.Visible);
                eventTypeMenu.ShowMenu(Project.Model, categoryVM.Model, events.Select(vm => vm.Model as LMTimelineEvent).ToList());
            }
            else
            {
                menu.ShowMenu(Project.Model, events.Select(vm => vm.Model).ToList());
            }
        }