예제 #1
0
        /// <summary>
        /// Allows the presenter to set up the view and model.
        /// </summary>
        protected override void Initialize()
        {
            var context    = m_Container.Resolve <IContextAware>();
            var collection = m_Container.Resolve <ICollectNotifications>();

            View.Model = new NotificationModel(context, collection);
        }
예제 #2
0
        /// <summary>
        /// Allows the presenter to set up the view and model.
        /// </summary>
        protected override void Initialize()
        {
            var context         = m_Container.Resolve <IContextAware>();
            var reportCollector = m_Container.Resolve <ICollectProgressReports>();

            View.Model = new ProgressModel(context, reportCollector);
        }
예제 #3
0
        /// <summary>
        /// Allows the presenter to set up the view and model.
        /// </summary>
        protected override void Initialize()
        {
            var context = m_Container.Resolve <IContextAware>();
            var storage = m_Container.Resolve <TimingReportCollection>();

            View.Model = new ProfileModel(context, storage);
        }
예제 #4
0
        /// <summary>
        /// Allows the presenter to set up the view and model.
        /// </summary>
        protected override void Initialize()
        {
            var context = m_Container.Resolve <IContextAware>();
            var command = m_Container.Resolve <CloseProjectCommand>();

            View.Model = new ProjectModel(context, command);
        }
예제 #5
0
        /// <summary>
        /// Allows the presenter to set up the view and model.
        /// </summary>
        protected override void Initialize()
        {
            var context       = m_Container.Resolve <IContextAware>();
            var command       = m_Container.Resolve <SendFeedbackReportCommand>();
            var reportBuilder = m_Container.Resolve <IBuildReports>();

            View.Model = new FeedbackModel(context, command, () => reportBuilder);
        }
예제 #6
0
        /// <summary>
        /// Allows the presenter to set up the view and model.
        /// </summary>
        protected override void Initialize()
        {
            var context         = m_Container.Resolve <IContextAware>();
            var command         = m_Container.Resolve <SendFeedbackReportCommand>();
            var reportCollector = m_Container.Resolve <ICollectFeedbackReports>();
            var fileSystem      = m_Container.Resolve <IFileSystem>();

            View.Model = new ErrorReportsModel(context, command, reportCollector, fileSystem);
        }
예제 #7
0
        /// <summary>
        /// Allows the presenter to set up the view and model.
        /// </summary>
        protected override void Initialize()
        {
            var context = m_Container.Resolve <IContextAware>();

            var serviceFacade = m_Container.Resolve <ILinkToProjects>();
            var project       = serviceFacade.ActiveProject();

            Debug.Assert(project != null, "There should be an active project.");
            View.Model = new ProjectDescriptionModel(context, project);
        }
예제 #8
0
        /// <summary>
        /// Allows the presenter to set up the view and model.
        /// </summary>
        protected override void Initialize()
        {
            var context = m_Container.Resolve <IContextAware>();

            View.Model = new WelcomeModel(context)
            {
                CloseCommand       = CreateCloseCommand(context),
                NewProjectCommand  = CompositeCommandBuilder.CloseWelcomeViewAndInvokeCommand <NewProjectCommand>(m_Container),
                OpenProjectCommand = CompositeCommandBuilder.CloseWelcomeViewAndInvokeCommand <OpenProjectCommand>(m_Container),
            };
        }
예제 #9
0
        /// <summary>
        /// Allows the presenter to set up the view and model.
        /// </summary>
        protected override void Initialize()
        {
            var context         = m_Container.Resolve <IContextAware>();
            var projectFacade   = m_Container.Resolve <ILinkToProjects>();
            var progressTracker = m_Container.Resolve <ITrackSteppingProgress>();

            var model = new DatasetDetailModel(context, progressTracker, projectFacade, Parameter.Dataset)
            {
                SwitchDatasetToEditModeCommand      = new SwitchDatasetToEditModeCommand(Parameter.Dataset),
                SwitchDatasetToExecutingModeCommand = new SwitchDatasetToExecutingModeCommand(Parameter.Dataset),
                CloseCommand = CreateCloseCommand(),
            };

            View.Model = model;
        }
예제 #10
0
        /// <summary>
        /// Allows the presenter to set up the view and model.
        /// </summary>
        protected override void Initialize()
        {
            var context = m_Container.Resolve <IContextAware>();

            View.Model = new MenuModel(context);
            View.Model.NewProjectCommand   = CompositeCommandBuilder.CloseWelcomeViewAndInvokeCommand <NewProjectCommand>(m_Container);
            View.Model.OpenProjectCommand  = CompositeCommandBuilder.CloseWelcomeViewAndInvokeCommand <OpenProjectCommand>(m_Container);
            View.Model.SaveProjectCommand  = m_Container.Resolve <SaveProjectCommand>();
            View.Model.CloseProjectCommand = m_Container.Resolve <CloseProjectCommand>();
            View.Model.ExitCommand         = m_Container.Resolve <ExitCommand>();

            View.Model.UndoCommand = m_Container.Resolve <UndoCommand>();
            View.Model.RedoCommand = m_Container.Resolve <RedoCommand>();

            View.Model.ShowStartPageCommand = m_Container.Resolve <ShowWelcomeViewTabCommand>();
            View.Model.ShowProjectsCommand  = m_Container.Resolve <ShowProjectsTabCommand>();
            View.Model.ShowScriptsCommand   = m_Container.Resolve <ShowScriptsTabCommand>();
            View.Model.AboutCommand         = m_Container.Resolve <ShowAboutWindowCommand>();
        }
예제 #11
0
        /// <summary>
        /// Closes the welcome view and invokes the given command.
        /// </summary>
        /// <typeparam name="T">The type of command that should be invoked.</typeparam>
        /// <param name="container">The IOC container that contains all the UI controls.</param>
        /// <returns>The desired command.</returns>
        public static CompositeCommand CloseWelcomeViewAndInvokeCommand <T>(IDependencyInjectionProxy container) where T : ICommand
        {
            var compositeCommand = new CompositeCommand();

            var command = container.Resolve <T>();

            compositeCommand.RegisterCommand(command);

            var context          = container.Resolve <IContextAware>();
            var closeViewCommand = container.Resolve <CloseViewCommand>(
                new TypedParameter(typeof(IEventAggregator), container.Resolve <IEventAggregator>()),
                new TypedParameter(typeof(string), CommonRegionNames.Content),
                new TypedParameter(typeof(Parameter), new WelcomeParameter(context)));

            compositeCommand.RegisterCommand(
                new CommandSwitchWrapper(
                    () => Settings.Default.CloseWelcomePageAfterProjectLoad,
                    closeViewCommand));

            return(compositeCommand);
        }
        /// <summary>
        /// Allows the presenter to set up the view and model.
        /// </summary>
        protected override void Initialize()
        {
            var context = m_Container.Resolve <IContextAware>();

            View.Model = new SelectScriptLanguageModel(context);
        }
예제 #13
0
        /// <summary>
        /// Allows the presenter to set up the view and model.
        /// </summary>
        protected override void Initialize()
        {
            var context = m_Container.Resolve <IContextAware>();

            View.Model = new ScriptModel(context)
            {
                ScriptLanguage = new ScriptDescriptionModel(context, ScriptLanguage.IronPython),
                SyntaxVerifier = m_Container.Resolve <IHostScripts>().VerifySyntax(ScriptLanguage.IronPython),
            };
            View.OutputPipeBuilder(() => m_Container.Resolve <ISendScriptOutput>());

            var compositeCommand  = CreateCloseCommand();
            var newScriptCommand  = CreateNewScriptCommand();
            var openScriptCommand = CreateOpenScriptCommand();

            View.Model.CloseCommand      = compositeCommand;
            View.Model.NewScriptCommand  = newScriptCommand;
            View.Model.OpenScriptCommand = openScriptCommand;
            View.Model.RunCommand        = m_Container.Resolve <RunScriptCommand>();
            View.Model.CancelRunCommand  = m_Container.Resolve <CancelScriptRunCommand>();
        }
예제 #14
0
        /// <summary>
        /// Allows the presenter to set up the view and model.
        /// </summary>
        protected override void Initialize()
        {
            var context = m_Container.Resolve <IContextAware>();

            View.Model = new MachineSelectorModel(context, Parameter.Suggestions);
        }
예제 #15
0
        /// <summary>
        /// Allows the presenter to set up the view and model.
        /// </summary>
        protected override void Initialize()
        {
            var context = m_Container.Resolve <IContextAware>();

            View.Model = new AboutModel(context);
        }