Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EventListener"/> class.
 /// </summary>
 /// <param name="container">The IOC container.</param>
 /// <param name="dispatcherContext">The dispatcher context.</param>
 protected EventListener(IDependencyInjectionProxy container, IContextAware dispatcherContext)
 {
     m_Container = container;
     m_Context = dispatcherContext;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SelectScriptLanguagePresenter"/> class.
 /// </summary>
 /// <param name="container">The IOC container that is used to retrieve the project facade.</param>
 public SelectScriptLanguagePresenter(IDependencyInjectionProxy container)
 {
     m_Container = container;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NotificationPresenter"/> class.
 /// </summary>
 /// <param name="container">The IOC container that is used to retrieve the commands for the error reports presenter.</param>
 public NotificationPresenter(IDependencyInjectionProxy container)
 {
     m_Container = container;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DatasetGraphPresenter"/> class.
 /// </summary>
 /// <param name="container">The IOC container that is used to retrieve the commands for the dataset presenter.</param>
 public DatasetGraphPresenter(IDependencyInjectionProxy container)
 {
     m_Container = container;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ShowViewEventListener"/> class.
 /// </summary>
 /// <param name="container">The IOC container.</param>
 /// <param name="dispatcherContext">The dispatcher context.</param>
 public ShowViewEventListener(IDependencyInjectionProxy container, IContextAware dispatcherContext)
     : base(container, dispatcherContext)
 {
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MenuPresenter"/> class.
 /// </summary>
 /// <param name="container">The IOC container that is used to retrieve the commands for the menu.</param>
 public MenuPresenter(IDependencyInjectionProxy container)
 {
     m_Container = container;
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MachineSelectorPresenter"/> class.
 /// </summary>
 /// <param name="container">The IOC container that is used to retrieve the project facade.</param>
 public MachineSelectorPresenter(IDependencyInjectionProxy container)
 {
     m_Container = container;
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WelcomePresenter"/> class.
 /// </summary>
 /// <param name="container">The IOC container that is used to retrieve the project facade.</param>
 public WelcomePresenter(IDependencyInjectionProxy container)
 {
     m_Container = container;
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ShowViewEventListener"/> class.
 /// </summary>
 /// <param name="container">The IOC container.</param>
 /// <param name="dispatcherContext">The dispatcher context.</param>
 public ShowViewEventListener(IDependencyInjectionProxy container, IContextAware dispatcherContext)
     : base(container, dispatcherContext)
 {
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProjectDescriptionPresenter"/> class.
 /// </summary>
 /// <param name="container">The IOC container that is used to retrieve the project facade.</param>
 public ProjectDescriptionPresenter(IDependencyInjectionProxy container)
 {
     m_Container = container;
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FeedbackPresenter"/> class.
 /// </summary>
 /// <param name="container">The IOC container that is used to retrieve the commands for the error reports presenter.</param>
 public FeedbackPresenter(IDependencyInjectionProxy container)
 {
     m_Container = container;
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EventListener"/> class.
 /// </summary>
 /// <param name="container">The IOC container.</param>
 /// <param name="dispatcherContext">The dispatcher context.</param>
 protected EventListener(IDependencyInjectionProxy container, IContextAware dispatcherContext)
 {
     m_Container = container;
     m_Context   = dispatcherContext;
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ErrorReportsPresenter"/> class.
 /// </summary>
 /// <param name="container">The IOC container that is used to retrieve the commands for the error reports presenter.</param>
 public ErrorReportsPresenter(IDependencyInjectionProxy container)
 {
     m_Container = container;
 }