Commit 4a2ce97
Changed files (39)
trunk
product
MyMoney
boot
Infrastructure
Modules
Presentation
Model
Menu
File
Commands
Presenters
Views
Shell
trunk/product/MyMoney/boot/container/registration/wire_up_the_data_access_components_into_the.cs
@@ -1,5 +1,6 @@
using MoMoney.DataAccess.db40;
using MoMoney.Infrastructure.Container;
+using MoMoney.Infrastructure.transactions2;
using MoMoney.Utility.Core;
namespace MoMoney.boot.container.registration
@@ -16,6 +17,7 @@ namespace MoMoney.boot.container.registration
public void run()
{
register.singleton<ISessionContext, SessionContext>();
+ register.singleton<IDatabaseConfiguration, DatabaseConfiguration>();
}
}
}
\ No newline at end of file
trunk/product/MyMoney/boot/container/registration/wire_up_the_infrastructure_in_to_the.cs
@@ -3,6 +3,7 @@ using MoMoney.Infrastructure.eventing;
using MoMoney.Infrastructure.registries;
using MoMoney.Infrastructure.Threading;
using MoMoney.Infrastructure.transactions;
+using MoMoney.Infrastructure.transactions2;
using MoMoney.Presentation.Model.Projects;
using MoMoney.Utility.Core;
@@ -25,6 +26,8 @@ namespace MoMoney.boot.container.registration
registry.singleton<IProject, CurrentProject>();
registry.transient(typeof (IRegistry<>), typeof (DefaultRegistry<>));
registry.transient(typeof (IUnitOfWorkRegistrationFactory<>), typeof (UnitOfWorkRegistrationFactory<>));
+
+ registry.transient(typeof (ITrackerEntryMapper<>), typeof (TrackerEntryMapper<>));
}
}
}
\ No newline at end of file
trunk/product/MyMoney/boot/container/registration/wire_up_the_presentation_modules.cs
@@ -1,6 +1,7 @@
using System.Reflection;
using MoMoney.Infrastructure.Container;
using MoMoney.Infrastructure.reflection;
+using MoMoney.Modules.Core;
using MoMoney.Presentation.Core;
using MoMoney.Presentation.Model.Menu.File;
using MoMoney.Presentation.Model.Menu.Help;
@@ -44,9 +45,9 @@ namespace MoMoney.boot.container.registration
item
.all_types()
- .where(x => typeof (IPresentationModule).IsAssignableFrom(x))
+ .where(x => typeof (IModule).IsAssignableFrom(x))
.where(x => !x.IsInterface)
- .each(type => registry.transient(typeof (IPresentationModule), type));
+ .each(type => registry.transient(typeof (IModule), type));
}
}
}
\ No newline at end of file
trunk/product/MyMoney/boot/start_the_application.cs
@@ -5,8 +5,8 @@ using MoMoney.Infrastructure.eventing;
using MoMoney.Infrastructure.Extensions;
using MoMoney.Infrastructure.interceptors;
using MoMoney.Infrastructure.Threading;
+using MoMoney.Modules.Core;
using MoMoney.Presentation.Model.messages;
-using MoMoney.Presentation.Presenters.Commands;
using MoMoney.Presentation.Views.Shell;
using MoMoney.Utility.Core;
trunk/product/MyMoney/Infrastructure/transactions2/DatabaseConfiguration.cs
@@ -1,3 +1,4 @@
+using System;
using System.IO;
using MoMoney.Infrastructure.eventing;
using MoMoney.Presentation.Model.messages;
@@ -13,6 +14,7 @@ namespace MoMoney.Infrastructure.transactions2
public class DatabaseConfiguration : IDatabaseConfiguration, IEventSubscriber<NewProjectOpened>
{
IFile path;
+ readonly object mutex = new object();
public DatabaseConfiguration()
{
@@ -21,12 +23,17 @@ namespace MoMoney.Infrastructure.transactions2
public IFile path_to_database()
{
- return path;
+ lock (mutex) return path;
}
public void notify(NewProjectOpened message)
{
- path = new ApplicationFile(Path.GetTempFileName());
+ within_lock(() => path = new ApplicationFile(Path.GetTempFileName()));
+ }
+
+ void within_lock(Action action)
+ {
+ lock (mutex) action();
}
}
}
\ No newline at end of file
trunk/product/MyMoney/Infrastructure/transactions2/IChangeTracker.cs
@@ -3,13 +3,13 @@ using MoMoney.Domain.Core;
namespace MoMoney.Infrastructure.transactions2
{
- public interface IChangeTracker
+ public interface IChangeTracker : IDisposable
{
bool is_dirty();
void commit_to(IDatabase database);
}
- public interface IChangeTracker<T> : IChangeTracker, IDisposable where T : IEntity
+ public interface IChangeTracker<T> : IChangeTracker where T : IEntity
{
void register(T value);
void delete(T entity);
trunk/product/MyMoney/Infrastructure/transactions2/ITrackerEntry.cs
@@ -1,8 +0,0 @@
-namespace MoMoney.Infrastructure.transactions2
-{
- public interface ITrackerEntry<T>
- {
- T current { get; }
- bool has_changes();
- }
-}
\ No newline at end of file
trunk/product/MyMoney/Infrastructure/transactions2/ITrackerEntryMapper.cs
@@ -1,8 +0,0 @@
-using MoMoney.Utility.Core;
-
-namespace MoMoney.Infrastructure.transactions2
-{
- public interface ITrackerEntryMapper<T> : IMapper<T, ITrackerEntry<T>>
- {
- }
-}
\ No newline at end of file
trunk/product/MyMoney/Infrastructure/transactions2/Session.cs
@@ -13,6 +13,7 @@ namespace MoMoney.Infrastructure.transactions2
void save<T>(T entity) where T : IEntity;
void delete<T>(T entity) where T : IEntity;
void flush();
+ bool is_dirty();
}
public class Session : ISession
@@ -65,6 +66,11 @@ namespace MoMoney.Infrastructure.transactions2
transaction = null;
}
+ public bool is_dirty()
+ {
+ return null != transaction && transaction.is_dirty();
+ }
+
public void Dispose()
{
if (null != transaction) transaction.rollback_changes();
trunk/product/MyMoney/Infrastructure/transactions2/SessionFactory.cs
@@ -9,13 +9,11 @@ namespace MoMoney.Infrastructure.transactions2
public class SessionFactory : ISessionFactory
{
readonly IDatabase database;
- readonly IStatementRegistry registry;
readonly IChangeTrackerFactory factory;
- public SessionFactory(IDatabase database, IStatementRegistry registry, IChangeTrackerFactory factory)
+ public SessionFactory(IDatabase database, IChangeTrackerFactory factory)
{
this.database = database;
- this.registry = registry;
this.factory = factory;
}
trunk/product/MyMoney/Infrastructure/transactions2/TrackerEntry.cs
@@ -0,0 +1,43 @@
+using System.Reflection;
+
+namespace MoMoney.Infrastructure.transactions2
+{
+ public interface ITrackerEntry<T>
+ {
+ T current { get; }
+ bool has_changes();
+ }
+
+ public class TrackerEntry<T> : ITrackerEntry<T>
+ {
+ readonly T original;
+
+ public TrackerEntry(T original, T current)
+ {
+ this.original = original;
+ this.current = current;
+ }
+
+ public T current { get; set; }
+
+ public bool has_changes()
+ {
+ var type = original.GetType();
+ var fields = type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance);
+ foreach (var field in fields)
+ {
+ var original_value = field.GetValue(original);
+ var current_value = field.GetValue(current);
+ if (original_value == null && current_value != null)
+ {
+ return true;
+ }
+ if (original_value != null && !original_value.Equals(current_value))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+ }
+}
\ No newline at end of file
trunk/product/MyMoney/Infrastructure/transactions2/TrackerEntryMapper.cs
@@ -0,0 +1,29 @@
+using MoMoney.Infrastructure.cloning;
+using MoMoney.Utility.Core;
+
+namespace MoMoney.Infrastructure.transactions2
+{
+ public interface ITrackerEntryMapper<T> : IMapper<T, ITrackerEntry<T>>
+ {
+ }
+
+ public class TrackerEntryMapper<T> : ITrackerEntryMapper<T>
+ {
+ readonly IPrototype prototype;
+
+ public TrackerEntryMapper(IPrototype prototype)
+ {
+ this.prototype = prototype;
+ }
+
+ public ITrackerEntry<T> map_from(T item)
+ {
+ return new TrackerEntry<T>(create_prototype(item), item);
+ }
+
+ T create_prototype(T item)
+ {
+ return prototype.clone(item);
+ }
+ }
+}
\ No newline at end of file
trunk/product/MyMoney/Infrastructure/transactions2/TrackerEntrySpecs.cs
@@ -0,0 +1,85 @@
+using developwithpassion.bdd.contexts;
+using MoMoney.Domain.Core;
+using MoMoney.Testing.spechelpers.contexts;
+using MoMoney.Testing.spechelpers.core;
+
+namespace MoMoney.Infrastructure.transactions2
+{
+ public class TrackerEntrySpecs
+ {
+ }
+
+ public abstract class behaves_like_tracker_entry : concerns_for<ITrackerEntry<Pillow>>
+ {
+ }
+
+ public class when_comparing_the_current_instance_of_a_component_with_its_original_and_it_has_changes :
+ behaves_like_tracker_entry
+ {
+ it should_indicate_that_there_are_changes = () => result.should_be_true();
+
+ because b = () => { result = sut.has_changes(); };
+
+ public override ITrackerEntry<Pillow> create_sut()
+ {
+ return new TrackerEntry<Pillow>(new Pillow("pink"), new Pillow("yellow"));
+ }
+
+ static bool result;
+ }
+
+ public class when_the_original_instance_has_a_null_field_that_is_now_not_null :
+ behaves_like_tracker_entry
+ {
+ it should_indicate_that_there_are_changes = () => result.should_be_true();
+
+ because b = () => { result = sut.has_changes(); };
+
+ public override ITrackerEntry<Pillow> create_sut()
+ {
+ return new TrackerEntry<Pillow>(new Pillow(null), new Pillow("yellow"));
+ }
+
+ static bool result;
+ }
+
+ public class when_the_original_instance_had_a_non_null_field_and_the_current_instance_has_a_null_field :
+ behaves_like_tracker_entry
+ {
+ it should_indicate_that_there_are_changes = () => result.should_be_true();
+
+ because b = () => { result = sut.has_changes(); };
+
+ public override ITrackerEntry<Pillow> create_sut()
+ {
+ return new TrackerEntry<Pillow>(new Pillow("green"), new Pillow(null));
+ }
+
+ static bool result;
+ }
+
+ public class when_the_original_instance_has_the_same_value_as_the_current_instance :
+ behaves_like_tracker_entry
+ {
+ it should_indicate_that_there_are_no_changes = () => result.should_be_false();
+
+ because b = () => { result = sut.has_changes(); };
+
+ public override ITrackerEntry<Pillow> create_sut()
+ {
+ return new TrackerEntry<Pillow>(new Pillow("green"), new Pillow("green"));
+ }
+
+ static bool result;
+ }
+
+ public class Pillow : Entity<Pillow>
+ {
+ readonly string color;
+
+ public Pillow(string color)
+ {
+ this.color = color;
+ }
+ }
+}
\ No newline at end of file
trunk/product/MyMoney/Infrastructure/transactions2/Transaction.cs
@@ -1,4 +1,5 @@
using System;
+using System.Linq;
using System.Collections.Generic;
using MoMoney.Domain.Core;
using MoMoney.Utility.Extensions;
@@ -8,9 +9,9 @@ namespace MoMoney.Infrastructure.transactions2
public interface ITransaction
{
IIdentityMap<Guid, T> create_for<T>() where T : IEntity;
- //void mark_for_deletion<T>(T entity) where T : IEntity;
void commit_changes();
void rollback_changes();
+ bool is_dirty();
}
public class Transaction : ITransaction
@@ -38,7 +39,13 @@ namespace MoMoney.Infrastructure.transactions2
public void rollback_changes()
{
- throw new NotImplementedException();
+ change_trackers.each(x => x.Value.Dispose());
+ change_trackers.Clear();
+ }
+
+ public bool is_dirty()
+ {
+ return change_trackers.Values.Count(x => x.is_dirty()) > 0;
}
IChangeTracker<T> get_change_tracker_for<T>() where T : IEntity
trunk/product/MyMoney/Infrastructure/transactions2/UnitOfWorkInterceptor.cs
@@ -0,0 +1,35 @@
+using Castle.Core.Interceptor;
+using MoMoney.Infrastructure.eventing;
+using MoMoney.Presentation.Model.messages;
+
+namespace MoMoney.Infrastructure.transactions2
+{
+ public interface IUnitOfWorkInterceptor : IInterceptor
+ {
+ }
+
+ public class UnitOfWorkInterceptor : IUnitOfWorkInterceptor
+ {
+ readonly IEventAggregator broker;
+ readonly ISessionFactory factory;
+
+ public UnitOfWorkInterceptor(IEventAggregator broker, ISessionFactory factory)
+ {
+ this.broker = broker;
+ this.factory = factory;
+ }
+
+ public void Intercept(IInvocation invocation)
+ {
+ using (var session = factory.create())
+ {
+ invocation.Proceed();
+ if (session.is_dirty())
+ {
+ session.flush();
+ broker.publish<UnsavedChangesEvent>();
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
trunk/product/MyMoney/Modules/Core/IModule.cs
@@ -0,0 +1,8 @@
+using MoMoney.Utility.Core;
+
+namespace MoMoney.Modules.Core
+{
+ public interface IModule : ICommand
+ {
+ }
+}
\ No newline at end of file
trunk/product/MyMoney/Presentation/Presenters/Commands/LoadPresentationModulesCommand.cs → trunk/product/MyMoney/Modules/Core/LoadPresentationModulesCommand.cs
@@ -1,9 +1,8 @@
using MoMoney.Infrastructure.Threading;
-using MoMoney.Presentation.Core;
using MoMoney.Utility.Core;
using MoMoney.Utility.Extensions;
-namespace MoMoney.Presentation.Presenters.Commands
+namespace MoMoney.Modules.Core
{
public interface ILoadPresentationModulesCommand : ICommand
{
@@ -11,10 +10,10 @@ namespace MoMoney.Presentation.Presenters.Commands
public class LoadPresentationModulesCommand : ILoadPresentationModulesCommand
{
- readonly IRegistry<IPresentationModule> registry;
+ readonly IRegistry<IModule> registry;
readonly ICommandProcessor processor;
- public LoadPresentationModulesCommand(IRegistry<IPresentationModule> registry, ICommandProcessor processor)
+ public LoadPresentationModulesCommand(IRegistry<IModule> registry, ICommandProcessor processor)
{
this.registry = registry;
this.processor = processor;
trunk/product/MyMoney/Presentation/Presenters/Commands/LoadPresentationModulesCommandSpecs.cs → trunk/product/MyMoney/Modules/Core/LoadPresentationModulesCommandSpecs.cs
@@ -1,12 +1,11 @@
using developwithpassion.bdd.contexts;
using MoMoney.Infrastructure.Threading;
-using MoMoney.Presentation.Core;
using MoMoney.Testing.MetaData;
using MoMoney.Testing.spechelpers.contexts;
using MoMoney.Testing.spechelpers.core;
using MoMoney.Utility.Core;
-namespace MoMoney.Presentation.Presenters.Commands
+namespace MoMoney.Modules.Core
{
[Concern(typeof (LoadPresentationModulesCommand))]
public class when_loading_the_application_shell : concerns_for<ILoadPresentationModulesCommand, LoadPresentationModulesCommand>
@@ -15,16 +14,16 @@ namespace MoMoney.Presentation.Presenters.Commands
context c = () =>
{
- registry = the_dependency<IRegistry<IPresentationModule>>();
+ registry = the_dependency<IRegistry<IModule>>();
processor = the_dependency<ICommandProcessor>();
- module = an<IPresentationModule>();
+ module = an<IModule>();
when_the(registry).is_told_to(r => r.all()).it_will_return(module);
};
because b = () => sut.run();
- static IRegistry<IPresentationModule> registry;
- static IPresentationModule module;
+ static IRegistry<IModule> registry;
+ static IModule module;
static ICommandProcessor processor;
}
}
\ No newline at end of file
trunk/product/MyMoney/Presentation/Presenters/Menu/ApplicationMenuModule.cs → trunk/product/MyMoney/Modules/ApplicationMenuModule.cs
@@ -1,12 +1,13 @@
using MoMoney.Infrastructure.eventing;
-using MoMoney.Presentation.Core;
+using MoMoney.Modules.Core;
using MoMoney.Presentation.Model.Menu;
using MoMoney.Presentation.Model.messages;
using MoMoney.Presentation.Presenters.Commands;
+using MoMoney.Presentation.Presenters.Menu;
-namespace MoMoney.Presentation.Presenters.Menu
+namespace MoMoney.Modules
{
- public interface IApplicationMenuModule : IPresentationModule,
+ public interface IApplicationMenuModule : IModule,
IEventSubscriber<NewProjectOpened>,
IEventSubscriber<ClosingProjectEvent>,
IEventSubscriber<SavedChangesEvent>,
trunk/product/MyMoney/Modules/ApplicationShellModule.cs
@@ -0,0 +1,25 @@
+using MoMoney.Modules.Core;
+using MoMoney.Presentation.Presenters.Commands;
+using MoMoney.Presentation.Presenters.Shell;
+
+namespace MoMoney.Modules
+{
+ public interface IApplicationShellModule : IModule
+ {
+ }
+
+ public class ApplicationShellModule : IApplicationShellModule
+ {
+ readonly IRunPresenterCommand command;
+
+ public ApplicationShellModule(IRunPresenterCommand command)
+ {
+ this.command = command;
+ }
+
+ public void run()
+ {
+ command.run<IApplicationShellPresenter>();
+ }
+ }
+}
\ No newline at end of file
trunk/product/MyMoney/Modules/DatabaseModule.cs
@@ -0,0 +1,27 @@
+using MoMoney.Infrastructure.eventing;
+using MoMoney.Infrastructure.transactions2;
+using MoMoney.Modules.Core;
+
+namespace MoMoney.Modules
+{
+ public interface IDatabaseModule : IModule
+ {
+ }
+
+ public class DatabaseModule : IDatabaseModule
+ {
+ readonly IDatabaseConfiguration configuration;
+ readonly IEventAggregator broker;
+
+ public DatabaseModule(IDatabaseConfiguration configuration, IEventAggregator broker)
+ {
+ this.configuration = configuration;
+ this.broker = broker;
+ }
+
+ public void run()
+ {
+ broker.subscribe(configuration);
+ }
+ }
+}
\ No newline at end of file
trunk/product/MyMoney/Presentation/Presenters/Shell/GettingStartedModule.cs → trunk/product/MyMoney/Modules/GettingStartedModule.cs
@@ -1,11 +1,12 @@
using MoMoney.Infrastructure.eventing;
-using MoMoney.Presentation.Core;
+using MoMoney.Modules.Core;
using MoMoney.Presentation.Model.messages;
using MoMoney.Presentation.Presenters.Commands;
+using MoMoney.Presentation.Presenters.Shell;
-namespace MoMoney.Presentation.Presenters.Shell
+namespace MoMoney.Modules
{
- public interface IGettingStartedModule : IPresentationModule,
+ public interface IGettingStartedModule : IModule,
IEventSubscriber<NewProjectOpened>,
IEventSubscriber<ClosingProjectEvent>
{
trunk/product/MyMoney/Presentation/Presenters/Shell/GettingStartedModuleSpecs.cs → trunk/product/MyMoney/Modules/GettingStartedModuleSpecs.cs
@@ -5,7 +5,7 @@ using MoMoney.Presentation.Presenters.Commands;
using MoMoney.Testing.spechelpers.contexts;
using MoMoney.Testing.spechelpers.core;
-namespace MoMoney.Presentation.Presenters.Shell
+namespace MoMoney.Modules
{
public class GettingStartedModuleSpecs
{
trunk/product/MyMoney/Presentation/Presenters/Navigation/MainMenuModule.cs → trunk/product/MyMoney/Modules/MainMenuModule.cs
@@ -1,11 +1,12 @@
using MoMoney.Infrastructure.eventing;
-using MoMoney.Presentation.Core;
+using MoMoney.Modules.Core;
using MoMoney.Presentation.Model.messages;
using MoMoney.Presentation.Presenters.Commands;
+using MoMoney.Presentation.Presenters.Navigation;
-namespace MoMoney.Presentation.Presenters.Navigation
+namespace MoMoney.Modules
{
- public interface IMainMenuModule : IPresentationModule, IEventSubscriber<NewProjectOpened>
+ public interface IMainMenuModule : IModule, IEventSubscriber<NewProjectOpened>
{
}
trunk/product/MyMoney/Presentation/Presenters/Shell/ToolbarModule.cs → trunk/product/MyMoney/Modules/ToolbarModule.cs
@@ -1,12 +1,13 @@
using MoMoney.Infrastructure.eventing;
-using MoMoney.Presentation.Core;
+using MoMoney.Modules.Core;
using MoMoney.Presentation.Model.Menu;
using MoMoney.Presentation.Model.messages;
using MoMoney.Presentation.Presenters.Commands;
+using MoMoney.Presentation.Presenters.Shell;
-namespace MoMoney.Presentation.Presenters.Shell
+namespace MoMoney.Modules
{
- public interface IToolbarModule : IPresentationModule,
+ public interface IToolbarModule : IModule,
IEventSubscriber<NewProjectOpened>,
IEventSubscriber<ClosingProjectEvent>,
IEventSubscriber<SavedChangesEvent>,
trunk/product/MyMoney/Presentation/Core/IPresentationModule.cs
@@ -1,8 +0,0 @@
-using MoMoney.Utility.Core;
-
-namespace MoMoney.Presentation.Core
-{
- public interface IPresentationModule : ICommand
- {
- }
-}
\ No newline at end of file
trunk/product/MyMoney/Presentation/Model/Menu/File/Commands/NewCommandSpecs.cs
@@ -1,6 +1,6 @@
using developwithpassion.bdd.contexts;
+using MoMoney.Modules.Core;
using MoMoney.Presentation.Model.Projects;
-using MoMoney.Presentation.Presenters.Commands;
using MoMoney.Testing.MetaData;
using MoMoney.Testing.spechelpers.contexts;
using MoMoney.Testing.spechelpers.core;
trunk/product/MyMoney/Presentation/Presenters/Menu/Help/about_the_application_presenter_specs.cs → trunk/product/MyMoney/Presentation/Presenters/Menu/Help/AboutTheApplicationPresenterSpecs.cs
File renamed without changes
trunk/product/MyMoney/Presentation/Presenters/Shell/ApplicationShellPresenter.cs
@@ -6,7 +6,7 @@ using MoMoney.Presentation.Views.Shell;
namespace MoMoney.Presentation.Presenters.Shell
{
- public interface IApplicationShellPresenter : IPresentationModule, IEventSubscriber<ClosingProjectEvent>
+ public interface IApplicationShellPresenter : IPresenter, IEventSubscriber<ClosingProjectEvent>
{
void shut_down();
}
trunk/product/MyMoney/Presentation/Presenters/Shell/NotificationIconPresenter.cs
@@ -1,13 +1,13 @@
using System.Net.NetworkInformation;
using MoMoney.Infrastructure.eventing;
-using MoMoney.Presentation.Core;
+using MoMoney.Modules.Core;
using MoMoney.Presentation.Model.messages;
using MoMoney.Presentation.Resources;
using MoMoney.Presentation.Views.Shell;
namespace MoMoney.Presentation.Presenters.Shell
{
- public interface INotificationIconPresenter : IPresentationModule,
+ public interface INotificationIconPresenter : IModule,
IEventSubscriber<ClosingTheApplication>,
IEventSubscriber<NewProjectOpened>
{
trunk/product/MyMoney/Presentation/Presenters/Shell/StatusBarPresenter.cs
@@ -1,6 +1,6 @@
using MoMoney.Domain.Core;
using MoMoney.Infrastructure.eventing;
-using MoMoney.Presentation.Core;
+using MoMoney.Modules.Core;
using MoMoney.Presentation.Model.messages;
using MoMoney.Presentation.Resources;
using MoMoney.Presentation.Views.Shell;
@@ -8,7 +8,7 @@ using MoMoney.Utility.Extensions;
namespace MoMoney.Presentation.Presenters.Shell
{
- public interface IStatusBarPresenter : IPresentationModule,
+ public interface IStatusBarPresenter : IModule,
IEventSubscriber<SavedChangesEvent>,
IEventSubscriber<NewProjectOpened>,
IEventSubscriber<ClosingTheApplication>,
trunk/product/MyMoney/Presentation/Presenters/Shell/TaskTrayPresenter.cs
@@ -1,11 +1,11 @@
using MoMoney.Infrastructure.eventing;
-using MoMoney.Presentation.Core;
+using MoMoney.Modules.Core;
using MoMoney.Presentation.Model.messages;
using MoMoney.Presentation.Views.Shell;
namespace MoMoney.Presentation.Presenters.Shell
{
- public interface ITaskTrayPresenter : IPresentationModule,
+ public interface ITaskTrayPresenter : IModule,
IEventSubscriber<SavedChangesEvent>,
IEventSubscriber<NewProjectOpened>
{
trunk/product/MyMoney/Presentation/Presenters/Shell/TitleBarPresenter.cs
@@ -1,12 +1,12 @@
using MoMoney.Infrastructure.eventing;
-using MoMoney.Presentation.Core;
+using MoMoney.Modules.Core;
using MoMoney.Presentation.Model.messages;
using MoMoney.Presentation.Model.Projects;
using MoMoney.Presentation.Views.Shell;
namespace MoMoney.Presentation.Presenters.Shell
{
- public interface ITitleBarPresenter : IPresentationModule,
+ public interface ITitleBarPresenter : IModule,
IEventSubscriber<UnsavedChangesEvent>,
IEventSubscriber<SavedChangesEvent>,
IEventSubscriber<NewProjectOpened>,
trunk/product/MyMoney/Presentation/Presenters/Shell/UnhandledErrorPresenter.cs
@@ -1,4 +1,5 @@
using MoMoney.Infrastructure.eventing;
+using MoMoney.Modules.Core;
using MoMoney.Presentation.Core;
using MoMoney.Presentation.Model.messages;
using MoMoney.Presentation.Presenters.Commands;
@@ -6,7 +7,7 @@ using MoMoney.Presentation.Views.Shell;
namespace MoMoney.Presentation.Presenters.Shell
{
- public interface IUnhandledErrorPresenter : IPresentationModule, IPresenter,
+ public interface IUnhandledErrorPresenter : IModule, IPresenter,
IEventSubscriber<unhandled_error_occurred>
{
void restart_application();
trunk/product/MyMoney/Presentation/Views/Shell/LogFileView.Designer.cs
@@ -34,13 +34,16 @@
// ux_log_file
//
this.ux_log_file.BackColor = System.Drawing.Color.Black;
+ this.ux_log_file.CausesValidation = false;
this.ux_log_file.Dock = System.Windows.Forms.DockStyle.Fill;
this.ux_log_file.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ux_log_file.ForeColor = System.Drawing.Color.White;
+ this.ux_log_file.HideSelection = false;
this.ux_log_file.Location = new System.Drawing.Point(0, 0);
- this.ux_log_file.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.ux_log_file.Margin = new System.Windows.Forms.Padding(4);
this.ux_log_file.Multiline = true;
this.ux_log_file.Name = "ux_log_file";
+ this.ux_log_file.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.ux_log_file.Size = new System.Drawing.Size(389, 327);
this.ux_log_file.TabIndex = 0;
//
@@ -50,7 +53,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(389, 327);
this.Controls.Add(this.ux_log_file);
- this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "LogFileView";
this.TabText = "LogFileView";
this.Text = "LogFileView";
trunk/product/MyMoney/MyMoney.csproj
@@ -310,15 +310,17 @@
<Compile Include="Infrastructure\transactions2\IDatabase.cs" />
<Compile Include="Infrastructure\transactions2\IStatement.cs" />
<Compile Include="Infrastructure\transactions2\IStatementRegistry.cs" />
- <Compile Include="Infrastructure\transactions2\ITrackerEntry.cs" />
- <Compile Include="Infrastructure\transactions2\ITrackerEntryMapper.cs" />
<Compile Include="Infrastructure\transactions2\Session.cs" />
<Compile Include="Infrastructure\transactions2\SessionFactory.cs" />
<Compile Include="Infrastructure\transactions2\SessionFactorySpecs.cs" />
<Compile Include="Infrastructure\transactions2\SessionSpecs.cs" />
<Compile Include="Infrastructure\transactions2\StatementRegistry.cs" />
+ <Compile Include="Infrastructure\transactions2\TrackerEntry.cs" />
+ <Compile Include="Infrastructure\transactions2\TrackerEntryMapper.cs" />
+ <Compile Include="Infrastructure\transactions2\TrackerEntrySpecs.cs" />
<Compile Include="Infrastructure\transactions2\Transaction.cs" />
<Compile Include="Infrastructure\transactions2\TransactionSpecs.cs" />
+ <Compile Include="Infrastructure\transactions2\UnitOfWorkInterceptor.cs" />
<Compile Include="Infrastructure\transactions\IUnitOfWorkRegistrationFactory.cs" />
<Compile Include="Infrastructure\transactions\NullUnitOfWork.cs" />
<Compile Include="Infrastructure\transactions\UnitOfWork.cs" />
@@ -330,6 +332,8 @@
<Compile Include="Infrastructure\transactions\UnitOfWorkRegistry.cs" />
<Compile Include="Infrastructure\transactions\UnitOfWorkRegistrySpecs.cs" />
<Compile Include="Infrastructure\transactions\unit_of_work_specs.cs" />
+ <Compile Include="Modules\ApplicationShellModule.cs" />
+ <Compile Include="Modules\DatabaseModule.cs" />
<Compile Include="Presentation\Core\IContentPresenter.cs" />
<Compile Include="Presentation\Databindings\date_time_picker_property_binding.cs" />
<Compile Include="Presentation\Databindings\date_time_property_binding_specs.cs" />
@@ -411,7 +415,7 @@
<Compile Include="Presentation\Presenters\income\dto\monthly_summary_dto.cs" />
<Compile Include="Presentation\Presenters\income\ViewIncomeHistoryPresenter.cs" />
<Compile Include="Presentation\Presenters\Menu\Help\AboutTheApplicationPresenter.cs" />
- <Compile Include="Presentation\Presenters\Menu\ApplicationMenuModule.cs" />
+ <Compile Include="Modules\ApplicationMenuModule.cs" />
<Compile Include="Presentation\Presenters\Menu\ApplicationMenuPresenter.cs" />
<Compile Include="Presentation\Model\messages\new_project_opened.cs" />
<Compile Include="Presentation\Model\messages\saved_changes_event.cs" />
@@ -424,22 +428,22 @@
<Compile Include="Presentation\Presenters\Navigation\ExpandoBuilder.cs" />
<Compile Include="Presentation\Presenters\Navigation\ExpandoItemBuilder.cs" />
<Compile Include="Presentation\Presenters\Navigation\IActionTaskPaneFactory.cs" />
- <Compile Include="Presentation\Presenters\Navigation\MainMenuModule.cs" />
- <Compile Include="Presentation\Presenters\Navigation\NavigationModule.cs" />
+ <Compile Include="Modules\MainMenuModule.cs" />
+ <Compile Include="Modules\NavigationModule.cs" />
<Compile Include="Presentation\Presenters\Shell\ApplicationShellPresenter.cs" />
- <Compile Include="Presentation\Presenters\Shell\GettingStartedModule.cs" />
- <Compile Include="Presentation\Presenters\Shell\GettingStartedModuleSpecs.cs" />
+ <Compile Include="Modules\GettingStartedModule.cs" />
+ <Compile Include="Modules\GettingStartedModuleSpecs.cs" />
<Compile Include="Presentation\Presenters\Shell\GettingStartedPresenter.cs" />
<Compile Include="Presentation\Presenters\Shell\GettingStartedPresenterSpecs.cs" />
<Compile Include="Presentation\Presenters\Shell\LogFilePresenter.cs" />
<Compile Include="Presentation\Presenters\Shell\LogFileViewPresenterSpecs.cs" />
- <Compile Include="Presentation\Presenters\Shell\ToolbarModule.cs" />
+ <Compile Include="Modules\ToolbarModule.cs" />
<Compile Include="Presentation\Presenters\Shell\ToolBarPresenter.cs" />
<Compile Include="Presentation\Presenters\Navigation\MainMenuPresenter.cs" />
<Compile Include="Presentation\Presenters\Navigation\NavigationPresenter.cs" />
<Compile Include="Presentation\Presenters\Navigation\NavigationPresenterSpecs.cs" />
<Compile Include="Presentation\Presenters\reporting\ReportPresenter.cs" />
- <Compile Include="Presentation\Presenters\Commands\LoadPresentationModulesCommandSpecs.cs" />
+ <Compile Include="Modules\Core\LoadPresentationModulesCommandSpecs.cs" />
<Compile Include="Presentation\Presenters\Shell\NotificationIconPresenterSpecs.cs" />
<Compile Include="Presentation\Presenters\Shell\TaskTrayPresenter.cs" />
<Compile Include="Presentation\Presenters\Shell\TitleBarPresenter.cs" />
@@ -653,7 +657,7 @@
<Compile Include="Presentation\Databindings\TextBoxDataBindingSpecs.cs" />
<Compile Include="Presentation\Databindings\text_property_binding.cs" />
<Compile Include="Presentation\Presenters\Commands\display_the_splash_screen.cs" />
- <Compile Include="Presentation\Core\IPresentationModule.cs" />
+ <Compile Include="Modules\Core\IModule.cs" />
<Compile Include="Utility\Core\OrSpecificationSpecs.cs" />
<Compile Include="Utility\Core\PredicateSpecification.cs" />
<Compile Include="Utility\Core\PredicateSpecificationSpecs.cs" />
@@ -680,7 +684,7 @@
<Compile Include="Infrastructure\Logging\Log4NetLogging\Log4NetLogger.cs" />
<Compile Include="Infrastructure\Logging\Log4NetLogging\Log4NetLogFactory.cs" />
<Compile Include="Infrastructure\Logging\LogSpecs.cs" />
- <Compile Include="Presentation\Presenters\Menu\Help\about_the_application_presenter_specs.cs" />
+ <Compile Include="Presentation\Presenters\Menu\Help\AboutTheApplicationPresenterSpecs.cs" />
<Compile Include="Presentation\Presenters\Shell\NotificationIconPresenter.cs" />
<Compile Include="Presentation\Presenters\Shell\StatusBarPresenter.cs" />
<Compile Include="Presentation\Presenters\Shell\StatusBarPresenterSpecs.cs" />
@@ -730,7 +734,7 @@
<Compile Include="Presentation\Core\ApplicationController.cs" />
<Compile Include="Presentation\Core\IPresenter.cs" />
<Compile Include="Infrastructure\Container\IDependencyRegistry.cs" />
- <Compile Include="Presentation\Presenters\Commands\LoadPresentationModulesCommand.cs" />
+ <Compile Include="Modules\Core\LoadPresentationModulesCommand.cs" />
<Compile Include="boot\bootstrap.cs" />
<EmbeddedResource Include="Presentation\Views\AddCompanyView.resx">
<DependentUpon>AddCompanyView.cs</DependentUpon>
@@ -832,7 +836,6 @@
<ItemGroup>
<Folder Include="DataAccess\sqlcompact\" />
<Folder Include="Infrastructure\caching\" />
- <Folder Include="Presentation\module\" />
<Folder Include="Presentation\Views\Menu\Mappers\" />
<Folder Include="Tasks\domain\" />
<Folder Include="Tasks\Stubs\" />