コード例 #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);
        }
コード例 #2
0
ファイル: EventListener.cs プロジェクト: pvandervelde/Apollo
 /// <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;
 }
コード例 #3
0
 /// <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;
 }
コード例 #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;
 }
コード例 #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;
 }
コード例 #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)
 {
 }
コード例 #7
0
ファイル: MenuPresenter.cs プロジェクト: rafysanchez/Apollo
 /// <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;
 }
コード例 #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;
 }
コード例 #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;
 }
コード例 #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)
 {
 }
コード例 #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;
 }
コード例 #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;
 }
コード例 #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;
 }
コード例 #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;
 }