Commit 48b1f8b
Changed files (7)
trunk
product
MyMoney
boot
container
Infrastructure
Container
Windsor
configuration
Presentation
Presenters
Commands
Startup
Views
trunk/product/MyMoney/boot/container/wire_up_the_container.cs
@@ -2,7 +2,6 @@ using System;
using Castle.Windsor;
using MoMoney.Infrastructure.Container.Windsor;
using MoMoney.Infrastructure.Container.Windsor.configuration;
-using MoMoney.Presentation.Model.interaction;
using MoMoney.Utility.Core;
using MoMoney.Utility.Extensions;
using MoMoney.windows.ui;
@@ -11,17 +10,6 @@ namespace MoMoney.boot.container
{
internal class wire_up_the_container : ICommand
{
- readonly Func<ICallback<notification_message>> callback;
-
- public wire_up_the_container() : this(() => new EmptyCallback<notification_message>())
- {
- }
-
- public wire_up_the_container(Func<ICallback<notification_message>> callback)
- {
- this.callback = callback;
- }
-
public void run()
{
Func<IWindsorContainer> container = () => new WindsorContainerFactory().create();
@@ -29,7 +17,7 @@ namespace MoMoney.boot.container
var registry = new WindsorDependencyRegistry(container);
var specification = new ComponentExclusionSpecification();
- var configuration = new ComponentRegistrationConfiguration(callback());
+ var configuration = new ComponentRegistrationConfiguration();
new wire_up_the_essential_services_into_the(registry)
.then(new wire_up_the_mappers_in_to_the(registry))
trunk/product/MyMoney/boot/bootstrap.cs
@@ -1,10 +1,7 @@
using System;
using MoMoney.boot.container;
using MoMoney.Infrastructure.Extensions;
-using MoMoney.Infrastructure.Logging;
-using MoMoney.Infrastructure.Threading;
using MoMoney.Presentation.Presenters.Startup;
-using MoMoney.Presentation.Views.Startup;
using MoMoney.Utility.Extensions;
using MoMoney.windows.ui;
using display_the_splash_screen=MoMoney.Presentation.Presenters.Commands.display_the_splash_screen;
@@ -16,23 +13,17 @@ namespace MoMoney.boot
[STAThread]
static void Main()
{
- Func<ISplashScreenPresenter> presenter = () => bootstrap.presenter();
+ Func<ISplashScreenPresenter> presenter = () => new SplashScreenPresenter();
presenter = presenter.memorize();
var startup_screen = new display_the_splash_screen(presenter).on_a_background_thread();
hookup
.the<global_error_handling>()
.then(startup_screen)
- .then(new wire_up_the_container(() => presenter()))
+ .then<wire_up_the_container>()
.then(startup_screen.Dispose)
.then<start_the_application>()
.run();
}
-
- static SplashScreenPresenter presenter()
- {
- Log.For(typeof (bootstrap)).debug("creating presenter");
- return new SplashScreenPresenter(new IntervalTimer(new TimerFactory()), new SplashScreenView());
- }
}
}
\ No newline at end of file
trunk/product/MyMoney/Infrastructure/Container/Windsor/configuration/ComponentRegistrationConfiguration.cs
@@ -1,5 +1,4 @@
using Castle.MicroKernel.Registration;
-using MoMoney.Presentation.Model.interaction;
using MoMoney.Utility.Core;
using MoMoney.Utility.Extensions;
@@ -11,13 +10,6 @@ namespace MoMoney.Infrastructure.Container.Windsor.configuration
public class ComponentRegistrationConfiguration : IRegistrationConfiguration
{
- readonly ICallback<notification_message> callback;
-
- public ComponentRegistrationConfiguration(ICallback<notification_message> callback)
- {
- this.callback = callback;
- }
-
public void configure(ComponentRegistration registration)
{
new RegisterComponentContract()
@@ -25,7 +17,6 @@ namespace MoMoney.Infrastructure.Container.Windsor.configuration
.then(new ApplyLoggingInterceptor())
//.then(new LogComponent())
.configure(registration);
- callback.complete("registered:{0}".formatted_using(registration.Implementation));
}
}
}
\ No newline at end of file
trunk/product/MyMoney/Presentation/Presenters/Commands/display_the_splash_screen.cs
@@ -8,11 +8,6 @@ namespace MoMoney.Presentation.Presenters.Commands
{
readonly Func<ISplashScreenPresenter> presenter;
- //public display_the_splash_screen()
- // : this(() => new SplashScreenPresenter(new IntervalTimer(new TimerFactory()), new SplashScreenView()))
- //{
- //}
-
public display_the_splash_screen(Func<ISplashScreenPresenter> presenter)
{
this.presenter = presenter;
trunk/product/MyMoney/Presentation/Presenters/Startup/SplashScreenPresenter.cs
@@ -15,6 +15,10 @@ namespace MoMoney.Presentation.Presenters.Startup
readonly ISplashScreenView view;
ISplashScreenState current_state;
+ public SplashScreenPresenter():this(new IntervalTimer(new TimerFactory()), new SplashScreenView())
+ {
+ }
+
public SplashScreenPresenter(ITimer timer, ISplashScreenView view)
{
this.timer = timer;
trunk/product/MyMoney/Presentation/Views/Startup/SplashScreenView.cs
@@ -56,14 +56,7 @@ namespace MoMoney.Presentation.Views.Startup
public void notify(notification_message message)
{
- this.log().debug("notifying the view");
- on_ui_thread(() =>
- {
- this.log().debug(message);
- progress_textbox.Text = message;
- progress_bar.PerformStep();
- progress_bar.Text = message;
- });
+ on_ui_thread(() => { this.log().debug(message); });
}
}
}
\ No newline at end of file
trunk/product/MyMoney/Presentation/Views/Startup/SplashScreenView.Designer.cs
@@ -27,43 +27,22 @@ namespace MoMoney.Presentation.Views.Startup {
/// </summary>
private void InitializeComponent()
{
- this.progress_bar = new System.Windows.Forms.ProgressBar();
- this.progress_textbox = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
- // progress_bar
- //
- this.progress_bar.Location = new System.Drawing.Point(5, 222);
- this.progress_bar.Name = "progress_bar";
- this.progress_bar.Size = new System.Drawing.Size(271, 27);
- this.progress_bar.TabIndex = 0;
- //
- // progress_textbox
- //
- this.progress_textbox.Location = new System.Drawing.Point(13, 183);
- this.progress_textbox.Name = "progress_textbox";
- this.progress_textbox.Size = new System.Drawing.Size(257, 22);
- this.progress_textbox.TabIndex = 1;
- //
// SplashScreenView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(282, 255);
- this.Controls.Add(this.progress_textbox);
- this.Controls.Add(this.progress_bar);
this.Name = "SplashScreenView";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "SplashScreenView";
this.ResumeLayout(false);
- this.PerformLayout();
}
#endregion
- private System.Windows.Forms.ProgressBar progress_bar;
- private System.Windows.Forms.TextBox progress_textbox;
}
}
\ No newline at end of file