示例#1
0
        public void setupContext(AnomalousMvcContext context, String name, ResourceProvider resourceProvider, SlideDisplayManager displayManager)
        {
            MvcController     controller  = new MvcController(name);
            RunCommandsAction showCommand = new RunCommandsAction("Show");

            showCommand.addCommand(new CloseAllViewsCommand());
            String timelinePath = Path.Combine(UniqueName, "Timeline.tl");

            if (resourceProvider.exists(timelinePath))
            {
                showCommand.addCommand(new PlayTimelineCommand(timelinePath));
            }
            foreach (var action in triggerActions.Values)
            {
                action.addToController(this, controller, context);
            }
            context.Controllers.add(controller);

            layoutStrategy.createViews(name, showCommand, context, displayManager, this);

            controller.Actions.add(showCommand);
            customizeController(controller, showCommand);
        }