Commit 2fbae1a

mokhan <mokhan@ce5e1baf-6525-42e4-a1b2-857ea38da20a>
2009-04-07 16:23:25
git-svn-id: https://svn.xp-dev.com/svn/mokhan-mo.money@145 ce5e1baf-6525-42e4-a1b2-857ea38da20a
1 parent 9b6122f
Changed files (6)
trunk/product/MyMoney/boot/bootstrap.cs
@@ -8,7 +8,7 @@ using display_the_splash_screen=MoMoney.Presentation.Presenters.Commands.display
 
 namespace MoMoney.boot
 {
-    internal static class bootstrap
+    static internal class bootstrap
     {
         [STAThread]
         static void Main()
trunk/product/MyMoney/boot/start_the_application.cs
@@ -1,4 +1,6 @@
 using System;
+using System.ComponentModel;
+using System.ComponentModel.Design;
 using System.Windows.Forms;
 using MoMoney.Infrastructure.Container;
 using MoMoney.Infrastructure.eventing;
@@ -14,8 +16,8 @@ namespace MoMoney.boot
 {
     internal class start_the_application : ICommand
     {
-        ILoadPresentationModulesCommand command;
-        ICommandProcessor processor;
+        readonly ILoadPresentationModulesCommand command;
+        readonly ICommandProcessor processor;
 
         public start_the_application()
             : this(Lazy.load<ILoadPresentationModulesCommand>(), Lazy.load<ICommandProcessor>())
@@ -43,4 +45,23 @@ namespace MoMoney.boot
             }
         }
     }
+
+    public class ApplicationContainer : Container
+    {
+        readonly IServiceContainer container;
+
+        public ApplicationContainer() : this(new ServiceContainer())
+        {
+        }
+
+        public ApplicationContainer(IServiceContainer container)
+        {
+            this.container = container;
+        }
+
+        protected override object GetService(Type service)
+        {
+            return container.GetService(service) ?? base.GetService(service);
+        }
+    }
 }
\ No newline at end of file
trunk/product/MyMoney/Presentation/Core/ApplicationController.cs
@@ -27,11 +27,11 @@ namespace MoMoney.Presentation.Core
 
         public void run(IPresenter presenter)
         {
+            presenter.run();
             if (presenter.is_an_implementation_of<IContentPresenter>())
             {
                 shell.add(presenter.downcast_to<IContentPresenter>().View);
             }
-            presenter.run();
         }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Presentation/Views/core/ICommandDialog.cs
@@ -0,0 +1,13 @@
+using MoMoney.Utility.Core;
+
+namespace MoMoney.Presentation.Views.core
+{
+    public interface ICommandDialog<Command> where Command : ICommand
+    {
+    }
+
+    public interface IDialogLauncher
+    {
+        void launch<Command>(Command command) where Command : ICommand;
+    }
+}
\ No newline at end of file
trunk/product/MyMoney/Tasks/infrastructure/core/CommandPump.cs
@@ -48,7 +48,7 @@ namespace MoMoney.Tasks.infrastructure.core
 
         public void run<Output, Query>(ICallback<Output> item) where Query : IQuery<Output>
         {
-            run(factory.create_for(item, registry.get_a<Query>()));
+            run(item, registry.get_a<Query>());
         }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/MyMoney.csproj
@@ -199,7 +199,6 @@
     <Compile Include="DataAccess\db40\SessionContextSpecs.cs" />
     <Compile Include="Domain\accounting\billing\BillingExtensions.cs" />
     <Compile Include="Domain\accounting\billing\Company.cs" />
-    <Compile Include="Domain\accounting\billing\CompanySpecs.cs" />
     <Compile Include="Domain\accounting\AccountHolder.cs" />
     <Compile Include="Domain\accounting\AccountHolderSpecs.cs" />
     <Compile Include="Domain\accounting\billing\total_payments_calculator.cs" />
@@ -492,6 +491,7 @@
     <Compile Include="Presentation\Views\core\ApplicationWindow.Designer.cs">
       <DependentUpon>ApplicationWindow.cs</DependentUpon>
     </Compile>
+    <Compile Include="Presentation\Views\core\ICommandDialog.cs" />
     <Compile Include="Presentation\Views\dialogs\ISaveChangesView.cs" />
     <Compile Include="Presentation\Views\dialogs\SaveChangesView.cs">
       <SubType>Form</SubType>