Commit 457091b
Changed files (106)
product
client
boot
boot
container
registration
Modules
presentation
Core
Model
Menu
Reporting
Presenters
Views
Winforms
service.contracts
Application
service.infrastructure
threading
commons
infrastructure
proxies
reflection
infrastructure.thirdparty
product/client/boot/boot/container/registration/auto_wire_components_in_to_the_specs.cs
@@ -1,78 +1,78 @@
-using System;
-using developwithpassion.bdd.contexts;
-using Gorilla.Commons.Infrastructure.Reflection;
-using gorilla.commons.infrastructure.thirdparty;
-using gorilla.commons.infrastructure.thirdparty.Castle.Windsor.Configuration;
-using Gorilla.Commons.Testing;
-using MbUnit.Framework;
-
-namespace MoMoney.boot.container.registration
-{
- [Ignore("I am not sure why but line 19 throws a BadImageFormatException")]
- public abstract class behaves_like_auto_registering_components_into_container :
- concerns_for<IStartupCommand, auto_wire_components_in_to_the>
- {
- context c = () =>
- {
- exclusions_criteria = the_dependency<ComponentExclusionSpecification>();
- builder = the_dependency<DependencyRegistration>();
- };
-
- public override IStartupCommand create_sut()
- {
- return new auto_wire_components_in_to_the(builder, exclusions_criteria);
- }
-
- static protected DependencyRegistration builder;
- static protected ComponentExclusionSpecification exclusions_criteria;
- }
-
- public class when_registering_all_the_components_from_an_assembly :
- behaves_like_auto_registering_components_into_container
- {
- it should_register_each_component_by_its_last_interface =
- () => builder.was_told_to(x => x.transient(interface_type, component_with_multiple_interfaces));
-
- it should_register_components_with_no_interface_by_their_actual_type =
- () => builder.was_told_to(x => x.transient(component_with_no_interface, component_with_no_interface));
-
- it should_not_register_components_that_violate_the_exclusion_policy =
- () => builder.was_not_told_to(x => x.transient(bad_type, bad_type));
-
- context c = () =>
- {
- assembly = an<Assembly>();
- interface_type = typeof (ITestComponent);
- component_with_multiple_interfaces = typeof (TestComponent);
- component_with_no_interface = typeof (ComponentNoInterface);
- bad_type = typeof (BadComponent);
-
- when_the(assembly).is_told_to(x => x.all_types())
- .it_will_return(component_with_multiple_interfaces, component_with_no_interface,
- bad_type);
- when_the(exclusions_criteria).is_told_to(x => x.is_satisfied_by(bad_type))
- .it_will_return(false);
- };
-
- because b = () => sut.run(assembly);
-
-
- static Assembly assembly;
- static Type component_with_multiple_interfaces;
- static Type interface_type;
- static Type component_with_no_interface;
- static Type bad_type;
- }
-
- public interface IBaseComponent {}
-
- public interface ITestComponent {}
-
- public class BaseComponent : IBaseComponent {}
-
- public class TestComponent : BaseComponent, ITestComponent {}
-
- public class ComponentNoInterface {}
-
- public class BadComponent {}
+using System;
+using developwithpassion.bdd.contexts;
+using Gorilla.Commons.Infrastructure.Reflection;
+using gorilla.commons.infrastructure.thirdparty;
+using gorilla.commons.infrastructure.thirdparty.Castle.Windsor.Configuration;
+using Gorilla.Commons.Testing;
+using MbUnit.Framework;
+
+namespace MoMoney.boot.container.registration
+{
+ [Ignore("I am not sure why but line 19 throws a BadImageFormatException")]
+ public abstract class behaves_like_auto_registering_components_into_container :
+ concerns_for<IStartupCommand, AutoWireComponentsInToThe>
+ {
+ context c = () =>
+ {
+ exclusions_criteria = the_dependency<ComponentExclusionSpecification>();
+ builder = the_dependency<DependencyRegistration>();
+ };
+
+ public override IStartupCommand create_sut()
+ {
+ return new AutoWireComponentsInToThe(builder, exclusions_criteria);
+ }
+
+ static protected DependencyRegistration builder;
+ static protected ComponentExclusionSpecification exclusions_criteria;
+ }
+
+ public class when_registering_all_the_components_from_an_assembly :
+ behaves_like_auto_registering_components_into_container
+ {
+ it should_register_each_component_by_its_last_interface =
+ () => builder.was_told_to(x => x.transient(interface_type, component_with_multiple_interfaces));
+
+ it should_register_components_with_no_interface_by_their_actual_type =
+ () => builder.was_told_to(x => x.transient(component_with_no_interface, component_with_no_interface));
+
+ it should_not_register_components_that_violate_the_exclusion_policy =
+ () => builder.was_not_told_to(x => x.transient(bad_type, bad_type));
+
+ context c = () =>
+ {
+ assembly = an<Assembly>();
+ interface_type = typeof (ITestComponent);
+ component_with_multiple_interfaces = typeof (TestComponent);
+ component_with_no_interface = typeof (ComponentNoInterface);
+ bad_type = typeof (BadComponent);
+
+ when_the(assembly).is_told_to(x => x.all_types())
+ .it_will_return(component_with_multiple_interfaces, component_with_no_interface,
+ bad_type);
+ when_the(exclusions_criteria).is_told_to(x => x.is_satisfied_by(bad_type))
+ .it_will_return(false);
+ };
+
+ because b = () => sut.run(assembly);
+
+
+ static Assembly assembly;
+ static Type component_with_multiple_interfaces;
+ static Type interface_type;
+ static Type component_with_no_interface;
+ static Type bad_type;
+ }
+
+ public interface IBaseComponent {}
+
+ public interface ITestComponent {}
+
+ public class BaseComponent : IBaseComponent {}
+
+ public class TestComponent : BaseComponent, ITestComponent {}
+
+ public class ComponentNoInterface {}
+
+ public class BadComponent {}
}
\ No newline at end of file
product/client/boot/boot/container/registration/auto_wire_components_in_to_the.cs โ product/client/boot/boot/container/registration/AutoWireComponentsInToThe.cs
@@ -1,43 +1,37 @@
-using System;
-using Gorilla.Commons.Infrastructure.Reflection;
-using gorilla.commons.infrastructure.thirdparty;
-using gorilla.commons.infrastructure.thirdparty.Castle.Windsor.Configuration;
-using gorilla.commons.utility;
-
-namespace MoMoney.boot.container.registration
-{
- public class auto_wire_components_in_to_the : IStartupCommand
- {
- readonly DependencyRegistration registrar;
- readonly ComponentExclusionSpecification exclusion_policy;
-
- public auto_wire_components_in_to_the(DependencyRegistration registrar)
- : this(registrar, new ComponentExclusionSpecificationImplementation()) {}
-
- public auto_wire_components_in_to_the(DependencyRegistration registration,
- ComponentExclusionSpecification exclusion_policy)
- {
- registrar = registration;
- this.exclusion_policy = exclusion_policy;
- }
-
- public void run()
- {
- run(new ApplicationAssembly(System.Reflection.Assembly.GetExecutingAssembly()));
- }
-
- public void run(Assembly item)
- {
- item
- .all_types()
- .where(x => !exclusion_policy.is_satisfied_by(x))
- .each(x => add_registration_for(x));
- }
-
- void add_registration_for(Type type)
- {
- if (type.GetInterfaces().Length > 0) registrar.transient(type.first_interface(), type);
- else registrar.transient(type, type);
- }
- }
+using System;
+using Gorilla.Commons.Infrastructure.Reflection;
+using gorilla.commons.infrastructure.thirdparty;
+using gorilla.commons.infrastructure.thirdparty.Castle.Windsor.Configuration;
+using gorilla.commons.utility;
+
+namespace MoMoney.boot.container.registration
+{
+ public class AutoWireComponentsInToThe : IStartupCommand
+ {
+ readonly DependencyRegistration registrar;
+ readonly ComponentExclusionSpecification exclusion_policy;
+
+ public AutoWireComponentsInToThe(DependencyRegistration registrar)
+ : this(registrar, new ComponentExclusionSpecificationImplementation()) {}
+
+ public AutoWireComponentsInToThe(DependencyRegistration registration,
+ ComponentExclusionSpecification exclusion_policy)
+ {
+ registrar = registration;
+ this.exclusion_policy = exclusion_policy;
+ }
+
+ public void run(Assembly item)
+ {
+ item
+ .all_types(exclusion_policy.not())
+ .each(x => add_registration_for(x));
+ }
+
+ void add_registration_for(Type type)
+ {
+ if (type.GetInterfaces().Length > 0) registrar.transient(type.first_interface(), type);
+ else registrar.transient(type, type);
+ }
+ }
}
\ No newline at end of file
product/client/boot/boot/container/registration/IStartupCommand.cs
@@ -1,7 +1,7 @@
-using Gorilla.Commons.Infrastructure.Reflection;
-using gorilla.commons.utility;
-
-namespace MoMoney.boot.container.registration
-{
- public interface IStartupCommand : Command, ParameterizedCommand<Assembly> {}
+using Gorilla.Commons.Infrastructure.Reflection;
+using gorilla.commons.utility;
+
+namespace MoMoney.boot.container.registration
+{
+ public interface IStartupCommand : ParameterizedCommand<Assembly> {}
}
\ No newline at end of file
product/client/boot/boot/container/registration/wire_up_the_data_access_components_into_the.cs โ product/client/boot/boot/container/registration/WireUpTheDataAccessComponentsIntoThe.cs
@@ -1,42 +1,43 @@
-using Gorilla.Commons.Infrastructure.Cloning;
-using Gorilla.Commons.Infrastructure.Container;
-using gorilla.commons.infrastructure.thirdparty;
-using gorilla.commons.utility;
-using MoMoney.boot.container.registration.proxy_configuration;
-using momoney.database;
-using momoney.database.db4o;
-using momoney.database.transactions;
-using momoney.service.infrastructure.transactions;
-using MoMoney.Service.Infrastructure.Transactions;
-
-namespace MoMoney.boot.container.registration
-{
- class wire_up_the_data_access_components_into_the : Command
- {
- readonly DependencyRegistration register;
-
- public wire_up_the_data_access_components_into_the(DependencyRegistration registry)
- {
- register = registry;
- }
-
- public void run()
- {
- register.singleton<IDatabase, ObjectDatabase>();
- register.singleton(() => Resolve.the<IDatabase>().downcast_to<IDatabaseConfiguration>());
- register.transient<ISessionProvider, SessionProvider>();
- register.proxy<ISession, NoConfiguration<ISession>>(
- () => Resolve.the<ISessionProvider>().get_the_current_session());
-
- register.transient<IUnitOfWorkInterceptor, UnitOfWorkInterceptor>();
- register.transient<IUnitOfWorkFactory, UnitOfWorkFactory>();
- register.transient<ISessionFactory, SessionFactory>();
- register.transient<IChangeTrackerFactory, ChangeTrackerFactory>();
- register.transient<DatabaseCommandRegistry, ObjectDatabaseCommandRegistry>();
- register.transient<IConnectionFactory, ConnectionFactory>();
- register.transient<IConfigureDatabaseStep, ConfigureDatabaseStep>();
- register.transient<IConfigureObjectContainerStep, ConfigureObjectContainerStep>();
- register.transient<IPrototype, Prototype>();
- }
- }
+using Gorilla.Commons.Infrastructure.Cloning;
+using Gorilla.Commons.Infrastructure.Container;
+using Gorilla.Commons.Infrastructure.Reflection;
+using gorilla.commons.infrastructure.thirdparty;
+using gorilla.commons.utility;
+using MoMoney.boot.container.registration.proxy_configuration;
+using momoney.database;
+using momoney.database.db4o;
+using momoney.database.transactions;
+using momoney.service.infrastructure.transactions;
+using MoMoney.Service.Infrastructure.Transactions;
+
+namespace MoMoney.boot.container.registration
+{
+ class WireUpTheDataAccessComponentsIntoThe : IStartupCommand
+ {
+ readonly DependencyRegistration register;
+
+ public WireUpTheDataAccessComponentsIntoThe(DependencyRegistration registry)
+ {
+ register = registry;
+ }
+
+ public void run(Assembly item)
+ {
+ register.singleton<IDatabase, ObjectDatabase>();
+ register.singleton(() => Resolve.the<IDatabase>().downcast_to<IDatabaseConfiguration>());
+ register.transient<ISessionProvider, SessionProvider>();
+ register.proxy<ISession, NoConfiguration<ISession>>(
+ () => Resolve.the<ISessionProvider>().get_the_current_session());
+
+ register.transient<IUnitOfWorkInterceptor, UnitOfWorkInterceptor>();
+ register.transient<IUnitOfWorkFactory, UnitOfWorkFactory>();
+ register.transient<ISessionFactory, SessionFactory>();
+ register.transient<IChangeTrackerFactory, ChangeTrackerFactory>();
+ register.transient<DatabaseCommandRegistry, ObjectDatabaseCommandRegistry>();
+ register.transient<IConnectionFactory, ConnectionFactory>();
+ register.transient<IConfigureDatabaseStep, ConfigureDatabaseStep>();
+ register.transient<IConfigureObjectContainerStep, ConfigureObjectContainerStep>();
+ register.transient<IPrototype, Prototype>();
+ }
+ }
}
\ No newline at end of file
product/client/boot/boot/container/registration/wire_up_the_essential_services_into_the.cs โ product/client/boot/boot/container/registration/WireUpTheEssentialServicesIntoThe.cs
@@ -1,24 +1,24 @@
-using Gorilla.Commons.Infrastructure.Logging;
-using gorilla.commons.infrastructure.thirdparty;
-using gorilla.commons.infrastructure.thirdparty.Log4Net;
-using gorilla.commons.utility;
-
-namespace MoMoney.boot.container.registration
-{
- class wire_up_the_essential_services_into_the : Command
- {
- readonly DependencyRegistration registration;
-
- public wire_up_the_essential_services_into_the(DependencyRegistration registration)
- {
- this.registration = registration;
- }
-
- public void run()
- {
- registration.singleton(() => registration);
- registration.singleton(() => registration.build());
- registration.singleton<LogFactory, Log4NetLogFactory>();
- }
- }
+using Gorilla.Commons.Infrastructure.Logging;
+using Gorilla.Commons.Infrastructure.Reflection;
+using gorilla.commons.infrastructure.thirdparty;
+using gorilla.commons.infrastructure.thirdparty.Log4Net;
+
+namespace MoMoney.boot.container.registration
+{
+ class WireUpTheEssentialServicesIntoThe : IStartupCommand
+ {
+ readonly DependencyRegistration registration;
+
+ public WireUpTheEssentialServicesIntoThe(DependencyRegistration registration)
+ {
+ this.registration = registration;
+ }
+
+ public void run(Assembly item)
+ {
+ registration.singleton(() => registration);
+ registration.singleton(() => registration.build());
+ registration.singleton<LogFactory, Log4NetLogFactory>();
+ }
+ }
}
\ No newline at end of file
product/client/boot/boot/container/registration/wire_up_the_infrastructure_in_to_the.cs โ product/client/boot/boot/container/registration/WireUpTheInfrastructureInToThe.cs
@@ -1,54 +1,55 @@
-using System.ComponentModel;
-using System.Deployment.Application;
-using Gorilla.Commons.Infrastructure.Registries;
-using gorilla.commons.infrastructure.thirdparty;
-using gorilla.commons.utility;
-using momoney.database.transactions;
-using MoMoney.Presentation.Model.Projects;
-using MoMoney.Presentation.Presenters;
-using MoMoney.Service.Infrastructure.Eventing;
-using momoney.service.infrastructure.threading;
-using MoMoney.Service.Infrastructure.Threading;
-using momoney.service.infrastructure.updating;
-using MoMoney.Service.Infrastructure.Updating;
-
-namespace MoMoney.boot.container.registration
-{
- class wire_up_the_infrastructure_in_to_the : Command
- {
- readonly DependencyRegistration registry;
-
- public wire_up_the_infrastructure_in_to_the(DependencyRegistration registry)
- {
- this.registry = registry;
- }
-
- public void run()
- {
- registry.singleton<EventAggregator, SynchronizedEventAggregator>();
- registry.singleton<ITimer, IntervalTimer>();
- registry.singleton<IProjectController, ProjectController>();
- registry.transient(typeof (Registry<>), typeof (DefaultRegistry<>));
- registry.transient(typeof (ITrackerEntryMapper<>), typeof (TrackerEntryMapper<>));
- registry.transient(typeof (IKey<>), typeof (TypedKey<>));
- registry.transient(typeof (ComponentFactory<>), typeof (DefaultConstructorFactory<>));
- //registry.singleton<IContext>(() => new Context(new Hashtable()));
- registry.singleton<IContext>(() => new PerThread());
-
- registry.singleton(() => AsyncOperationManager.SynchronizationContext);
- registry.singleton(() => AsyncOperationManager.CreateOperation(new object()));
- registry.singleton(
- () => ApplicationDeployment.IsNetworkDeployed ? ApplicationDeployment.CurrentDeployment : null);
- registry.singleton(
- () =>
- ApplicationDeployment.IsNetworkDeployed
- ? (IDeployment) new CurrentDeployment()
- : (IDeployment) new NullDeployment());
-
- registry.transient<ICommandPump, CommandPump>();
- registry.transient<CommandFactory, SynchronizedCommandFactory>();
- registry.transient<ISynchronizationContextFactory, SynchronizationContextFactory>();
- registry.singleton<CommandProcessor, AsynchronousCommandProcessor>();
- }
- }
+using System.ComponentModel;
+using System.Deployment.Application;
+using Gorilla.Commons.Infrastructure.Reflection;
+using Gorilla.Commons.Infrastructure.Registries;
+using gorilla.commons.infrastructure.thirdparty;
+using gorilla.commons.utility;
+using momoney.database.transactions;
+using MoMoney.Presentation.Model.Projects;
+using MoMoney.Presentation.Presenters;
+using MoMoney.Service.Infrastructure.Eventing;
+using momoney.service.infrastructure.threading;
+using MoMoney.Service.Infrastructure.Threading;
+using momoney.service.infrastructure.updating;
+using MoMoney.Service.Infrastructure.Updating;
+
+namespace MoMoney.boot.container.registration
+{
+ class WireUpTheInfrastructureInToThe : IStartupCommand
+ {
+ readonly DependencyRegistration registry;
+
+ public WireUpTheInfrastructureInToThe(DependencyRegistration registry)
+ {
+ this.registry = registry;
+ }
+
+ public void run(Assembly item)
+ {
+ registry.singleton<EventAggregator, SynchronizedEventAggregator>();
+ registry.singleton<ITimer, IntervalTimer>();
+ registry.singleton<IProjectController, ProjectController>();
+ registry.transient(typeof (Registry<>), typeof (DefaultRegistry<>));
+ registry.transient(typeof (ITrackerEntryMapper<>), typeof (TrackerEntryMapper<>));
+ registry.transient(typeof (IKey<>), typeof (TypedKey<>));
+ registry.transient(typeof (ComponentFactory<>), typeof (DefaultConstructorFactory<>));
+ //registry.singleton<IContext>(() => new Context(new Hashtable()));
+ registry.singleton<IContext>(() => new PerThread());
+
+ registry.singleton(() => AsyncOperationManager.SynchronizationContext);
+ registry.singleton(() => AsyncOperationManager.CreateOperation(new object()));
+ registry.singleton(
+ () => ApplicationDeployment.IsNetworkDeployed ? ApplicationDeployment.CurrentDeployment : null);
+ registry.singleton(
+ () =>
+ ApplicationDeployment.IsNetworkDeployed
+ ? (IDeployment) new CurrentDeployment()
+ : (IDeployment) new NullDeployment());
+
+ registry.transient<ICommandPump, CommandPump>();
+ registry.transient<CommandFactory, SynchronizedCommandFactory>();
+ registry.transient<ISynchronizationContextFactory, SynchronizationContextFactory>();
+ registry.singleton<CommandProcessor, AsynchronousCommandProcessor>();
+ }
+ }
}
\ No newline at end of file
product/client/boot/boot/container/registration/wire_up_the_mappers_in_to_the.cs โ product/client/boot/boot/container/registration/WireUpTheMappersInToThe.cs
@@ -1,41 +1,42 @@
-using System;
-using gorilla.commons.infrastructure.thirdparty;
-using gorilla.commons.utility;
-using MoMoney.Domain.Accounting;
-using MoMoney.DTO;
-
-namespace MoMoney.boot.container.registration
-{
- class wire_up_the_mappers_in_to_the : Command
- {
- readonly DependencyRegistration registry;
-
- public wire_up_the_mappers_in_to_the(DependencyRegistration registry)
- {
- this.registry = registry;
- }
-
- public void run()
- {
- registry.transient(typeof (Mapper<,>), typeof (AnonymousMapper<,>));
- //registry.singleton(()=> Mappers.bill_mapper);
- registry.singleton<Converter<Bill, BillInformationDTO>>(
- () => x =>
- new BillInformationDTO
- {
- company_name = x.company_to_pay.name,
- the_amount_owed = x.the_amount_owed.ToString(),
- due_date = x.due_date.to_date_time(),
- });
- registry.singleton<Converter<Company, CompanyDTO>>(() => x => new CompanyDTO {id = x.id, name = x.name});
-
- registry.singleton<Converter<Income, IncomeInformationDTO>>(
- () => x => new IncomeInformationDTO
- {
- amount = x.amount_tendered.to_string(),
- company = x.company.to_string(),
- recieved_date = x.date_of_issue.to_string(),
- });
- }
- }
+using System;
+using Gorilla.Commons.Infrastructure.Reflection;
+using gorilla.commons.infrastructure.thirdparty;
+using gorilla.commons.utility;
+using MoMoney.Domain.Accounting;
+using MoMoney.DTO;
+
+namespace MoMoney.boot.container.registration
+{
+ class WireUpTheMappersInToThe : IStartupCommand
+ {
+ readonly DependencyRegistration registry;
+
+ public WireUpTheMappersInToThe(DependencyRegistration registry)
+ {
+ this.registry = registry;
+ }
+
+ public void run(Assembly item)
+ {
+ registry.transient(typeof (Mapper<,>), typeof (AnonymousMapper<,>));
+ //registry.singleton(()=> Mappers.bill_mapper);
+ registry.singleton<Converter<Bill, BillInformationDTO>>(
+ () => x =>
+ new BillInformationDTO
+ {
+ company_name = x.company_to_pay.name,
+ the_amount_owed = x.the_amount_owed.ToString(),
+ due_date = x.due_date.to_date_time(),
+ });
+ registry.singleton<Converter<Company, CompanyDTO>>(() => x => new CompanyDTO {id = x.id, name = x.name});
+
+ registry.singleton<Converter<Income, IncomeInformationDTO>>(
+ () => x => new IncomeInformationDTO
+ {
+ amount = x.amount_tendered.to_string(),
+ company = x.company.to_string(),
+ recieved_date = x.date_of_issue.to_string(),
+ });
+ }
+ }
}
\ No newline at end of file
product/client/boot/boot/container/registration/wire_up_the_presentation_modules.cs โ product/client/boot/boot/container/registration/WireUpThePresentationModules.cs
@@ -1,60 +1,63 @@
-using System;
-using Gorilla.Commons.Infrastructure.Reflection;
-using gorilla.commons.infrastructure.thirdparty;
-using gorilla.commons.infrastructure.thirdparty.Castle.DynamicProxy;
-using gorilla.commons.utility;
-using MoMoney.boot.container.registration.proxy_configuration;
-using MoMoney.Presentation;
-using MoMoney.Presentation.Core;
-using MoMoney.Presentation.Model.Menu.File;
-using MoMoney.Presentation.Model.Menu.Help;
-using MoMoney.Presentation.Model.Menu.window;
-using momoney.presentation.presenters;
-using MoMoney.Presentation.Views;
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace MoMoney.boot.container.registration
-{
- class wire_up_the_presentation_modules : Command, ParameterizedCommand<Assembly>
- {
- readonly DependencyRegistration registry;
-
- public wire_up_the_presentation_modules(DependencyRegistration registry)
- {
- this.registry = registry;
- }
-
- public void run()
- {
- run(new ApplicationAssembly(System.Reflection.Assembly.GetExecutingAssembly()));
- }
-
- public void run(Assembly item)
- {
- Func<IApplicationController> target =
- () => new ApplicationController(Lazy.load<Shell>(), Lazy.load<PresenterFactory>(), Lazy.load<EventAggregator>());
- registry.proxy<IApplicationController, SynchronizedConfiguration<IApplicationController>>(target.memorize());
- registry.transient(typeof (IRunThe<>), typeof (RunThe<>));
- registry.transient<IFileMenu, FileMenu>();
- registry.transient<IWindowMenu, WindowMenu>();
- registry.transient<IHelpMenu, HelpMenu>();
- registry.singleton<ISaveChangesCommand,SaveChangesPresenter>();
-
- item
- .all_types()
- .where(x => typeof (Presenter).IsAssignableFrom(x))
- .where(x => !x.IsInterface)
- .where(x => !x.IsAbstract)
- .where(x => !x.IsGenericType)
- .each(type => registry.transient(typeof (Presenter), type));
-
- item
- .all_types()
- .where(x => typeof (IModule).IsAssignableFrom(x))
- .where(x => !x.IsInterface)
- .where(x => !x.IsAbstract)
- .where(x => !x.IsGenericType)
- .each(type => registry.transient(typeof (IModule), type));
- }
- }
+using System;
+using Autofac.Builder;
+using Gorilla.Commons.Infrastructure.Reflection;
+using gorilla.commons.infrastructure.thirdparty;
+using gorilla.commons.infrastructure.thirdparty.Castle.DynamicProxy;
+using gorilla.commons.utility;
+using MoMoney.boot.container.registration.proxy_configuration;
+using MoMoney.Presentation;
+using MoMoney.Presentation.Core;
+using MoMoney.Presentation.Model.Menu.File;
+using MoMoney.Presentation.Model.Menu.Help;
+using MoMoney.Presentation.Model.Menu.window;
+using momoney.presentation.presenters;
+using MoMoney.Presentation.Views;
+using MoMoney.Service.Infrastructure.Eventing;
+
+namespace MoMoney.boot.container.registration
+{
+ class WireUpThePresentationModules : IStartupCommand
+ {
+ readonly DependencyRegistration registry;
+
+ public WireUpThePresentationModules(DependencyRegistration registry)
+ {
+ this.registry = registry;
+ }
+
+ public void run(Assembly item)
+ {
+ Func<IApplicationController> target = () => new ApplicationController(Lazy.load<Shell>(), Lazy.load<PresenterFactory>(), Lazy.load<EventAggregator>());
+ registry.proxy<IApplicationController, SynchronizedConfiguration<IApplicationController>>(target.memorize());
+
+ registry.transient(typeof (IRunThe<>), typeof (RunThe<>));
+ registry.transient<IFileMenu, FileMenu>();
+ registry.transient<IWindowMenu, WindowMenu>();
+ registry.transient<IHelpMenu, HelpMenu>();
+ registry.singleton<ISaveChangesCommand, SaveChangesPresenter>();
+
+ item
+ .all_classes_that_implement<Presenter>()
+ .each(type => registry.transient(typeof (Presenter), type));
+
+ item
+ .all_classes_that_implement<IModule>()
+ .each(type => registry.transient(typeof (IModule), type));
+ }
+ }
+
+ static public class ProxyExtensions
+ {
+ static public T proxy<T>(this Configuration<ProxyBuilder<T>> configuration, Func<T> target)
+ {
+ var proxy_builder = new CastleDynamicProxyBuilder<T>();
+ configuration.configure(proxy_builder);
+ return proxy_builder.create_proxy_for(target);
+ }
+
+ static public T proxy<T, Configuration>(this Func<T> target) where Configuration : Configuration<ProxyBuilder<T>>, new()
+ {
+ return proxy(new Configuration(), target);
+ }
+ }
}
\ No newline at end of file
product/client/boot/boot/container/registration/wire_up_the_reports_in_to_the.cs โ product/client/boot/boot/container/registration/WireUpTheReportsInToThe.cs
@@ -1,31 +1,31 @@
-using System.Collections.Generic;
-using gorilla.commons.infrastructure.thirdparty;
-using gorilla.commons.utility;
-using MoMoney.DTO;
-using MoMoney.Presentation.Core;
-using MoMoney.Presentation.Presenters;
-using MoMoney.Presentation.Views;
-using MoMoney.Presentation.Winforms.Views;
-using MoMoney.Service.Contracts.Application;
-
-namespace MoMoney.boot.container.registration
-{
- class wire_up_the_reports_in_to_the : Command
- {
- readonly DependencyRegistration registry;
-
- public wire_up_the_reports_in_to_the(DependencyRegistration registry)
- {
- this.registry = registry;
- }
-
- public void run()
- {
- registry.singleton<IReportViewer, ReportViewer>();
- registry.transient(typeof (Presenter), typeof (ReportPresenter<IViewAllBillsReport, IEnumerable<BillInformationDTO>, IGetAllBillsQuery>));
- registry.singleton<IViewAllBillsReport, ViewAllBillsReport>();
- registry.transient(typeof (Presenter), typeof (ReportPresenter<IViewAllIncomeReport, IEnumerable<IncomeInformationDTO>, IGetAllIncomeQuery>));
- registry.singleton<IViewAllIncomeReport, ViewAllIncomeReport>();
- }
- }
+using System.Collections.Generic;
+using Gorilla.Commons.Infrastructure.Reflection;
+using gorilla.commons.infrastructure.thirdparty;
+using MoMoney.DTO;
+using MoMoney.Presentation.Core;
+using MoMoney.Presentation.Presenters;
+using MoMoney.Presentation.Views;
+using MoMoney.Presentation.Winforms.Views;
+using MoMoney.Service.Contracts.Application;
+
+namespace MoMoney.boot.container.registration
+{
+ class WireUpTheReportsInToThe : IStartupCommand
+ {
+ readonly DependencyRegistration registry;
+
+ public WireUpTheReportsInToThe(DependencyRegistration registry)
+ {
+ this.registry = registry;
+ }
+
+ public void run(Assembly item)
+ {
+ registry.singleton<IReportViewer, ReportViewer>();
+ registry.transient(typeof (Presenter), typeof (ReportPresenter<IViewAllBillsReport, IEnumerable<BillInformationDTO>, IGetAllBillsQuery>));
+ registry.singleton<IViewAllBillsReport, ViewAllBillsReport>();
+ registry.transient(typeof (Presenter), typeof (ReportPresenter<IViewAllIncomeReport, IEnumerable<IncomeInformationDTO>, IGetAllIncomeQuery>));
+ registry.singleton<IViewAllIncomeReport, ViewAllIncomeReport>();
+ }
+ }
}
\ No newline at end of file
product/client/boot/boot/container/registration/wire_up_the_services_in_to_the.cs โ product/client/boot/boot/container/registration/WireUpTheServicesInToThe.cs
@@ -1,59 +1,60 @@
-using gorilla.commons.infrastructure.thirdparty;
-using gorilla.commons.infrastructure.thirdparty.Castle.DynamicProxy;
-using gorilla.commons.utility;
-using MoMoney.boot.container.registration.proxy_configuration;
-using MoMoney.Domain.Accounting;
-using MoMoney.Domain.repositories;
-using MoMoney.DTO;
-using MoMoney.Service.Application;
-using MoMoney.Service.Contracts.Application;
-
-namespace MoMoney.boot.container.registration
-{
- class wire_up_the_services_in_to_the : Command
- {
- readonly DependencyRegistration registry;
-
- public wire_up_the_services_in_to_the(DependencyRegistration registry)
- {
- this.registry = registry;
- }
-
- public void run()
- {
- wire_up_queries();
- wire_up_the_commands();
- }
-
- void wire_up_queries()
- {
- registry.proxy<IGetAllCompanysQuery, ServiceLayerConfiguration<IGetAllCompanysQuery>>(
- () =>
- new GetAllCompanysQuery(Lazy.load<ICompanyRepository>(), Lazy.load<Mapper<Company, CompanyDTO>>()));
- registry.proxy<IGetAllBillsQuery, ServiceLayerConfiguration<IGetAllBillsQuery>>(
- () =>
- new GetAllBillsQuery(Lazy.load<IBillRepository>(), Lazy.load<Mapper<Bill, BillInformationDTO>>()));
- registry.proxy<IGetAllIncomeQuery, ServiceLayerConfiguration<IGetAllIncomeQuery>>(
- () =>
- new GetAllIncomeQuery(Lazy.load<IIncomeRepository>(),
- Lazy.load<Mapper<Income, IncomeInformationDTO>>()));
- registry.proxy<IGetTheCurrentCustomerQuery, ServiceLayerConfiguration<IGetTheCurrentCustomerQuery>>(
- () => new GetTheCurrentCustomerQuery(Lazy.load<IAccountHolderRepository>()));
- }
-
- void wire_up_the_commands()
- {
- registry.proxy<IRegisterNewCompanyCommand, ServiceLayerConfiguration<IRegisterNewCompanyCommand>>(
- () =>
- new RegisterNewCompanyCommand(Lazy.load<ICompanyFactory>(), Lazy.load<Notification>(),
- Lazy.load<ICompanyRepository>()));
- registry.proxy<ISaveNewBillCommand, ServiceLayerConfiguration<ISaveNewBillCommand>>(
- () => new SaveNewBillCommand(Lazy.load<ICompanyRepository>(), Lazy.load<IGetTheCurrentCustomerQuery>()));
-
- registry.proxy<IAddNewIncomeCommand, ServiceLayerConfiguration<IAddNewIncomeCommand>>(
- () =>
- new AddNewIncomeCommand(Lazy.load<IGetTheCurrentCustomerQuery>(), Lazy.load<Notification>(),
- Lazy.load<IIncomeRepository>(), Lazy.load<ICompanyRepository>()));
- }
- }
+using Gorilla.Commons.Infrastructure.Reflection;
+using gorilla.commons.infrastructure.thirdparty;
+using gorilla.commons.infrastructure.thirdparty.Castle.DynamicProxy;
+using gorilla.commons.utility;
+using MoMoney.boot.container.registration.proxy_configuration;
+using MoMoney.Domain.Accounting;
+using MoMoney.Domain.repositories;
+using MoMoney.DTO;
+using MoMoney.Service.Application;
+using MoMoney.Service.Contracts.Application;
+
+namespace MoMoney.boot.container.registration
+{
+ class WireUpTheServicesInToThe : IStartupCommand
+ {
+ readonly DependencyRegistration registry;
+
+ public WireUpTheServicesInToThe(DependencyRegistration registry)
+ {
+ this.registry = registry;
+ }
+
+ void wire_up_queries()
+ {
+ registry.proxy<IGetAllCompanysQuery, ServiceLayerConfiguration<IGetAllCompanysQuery>>(
+ () =>
+ new GetAllCompanysQuery(Lazy.load<ICompanyRepository>(), Lazy.load<Mapper<Company, CompanyDTO>>()));
+ registry.proxy<IGetAllBillsQuery, ServiceLayerConfiguration<IGetAllBillsQuery>>(
+ () =>
+ new GetAllBillsQuery(Lazy.load<IBillRepository>(), Lazy.load<Mapper<Bill, BillInformationDTO>>()));
+ registry.proxy<IGetAllIncomeQuery, ServiceLayerConfiguration<IGetAllIncomeQuery>>(
+ () =>
+ new GetAllIncomeQuery(Lazy.load<IIncomeRepository>(),
+ Lazy.load<Mapper<Income, IncomeInformationDTO>>()));
+ registry.proxy<IGetTheCurrentCustomerQuery, ServiceLayerConfiguration<IGetTheCurrentCustomerQuery>>(
+ () => new GetTheCurrentCustomerQuery(Lazy.load<IAccountHolderRepository>()));
+ }
+
+ void wire_up_the_commands()
+ {
+ registry.proxy<IRegisterNewCompanyCommand, ServiceLayerConfiguration<IRegisterNewCompanyCommand>>(
+ () =>
+ new RegisterNewCompanyCommand(Lazy.load<ICompanyFactory>(), Lazy.load<Notification>(),
+ Lazy.load<ICompanyRepository>()));
+ registry.proxy<ISaveNewBillCommand, ServiceLayerConfiguration<ISaveNewBillCommand>>(
+ () => new SaveNewBillCommand(Lazy.load<ICompanyRepository>(), Lazy.load<IGetTheCurrentCustomerQuery>()));
+
+ registry.proxy<IAddNewIncomeCommand, ServiceLayerConfiguration<IAddNewIncomeCommand>>(
+ () =>
+ new AddNewIncomeCommand(Lazy.load<IGetTheCurrentCustomerQuery>(), Lazy.load<Notification>(),
+ Lazy.load<IIncomeRepository>(), Lazy.load<ICompanyRepository>()));
+ }
+
+ public void run(Assembly item)
+ {
+ wire_up_queries();
+ wire_up_the_commands();
+ }
+ }
}
\ No newline at end of file
product/client/boot/boot/container/registration/wire_up_the_views_in_to_the.cs โ product/client/boot/boot/container/registration/WireUpTheViewsInToThe.cs
@@ -1,46 +1,55 @@
-using System.ComponentModel;
-using System.Windows.Forms;
-using gorilla.commons.infrastructure.thirdparty;
-using gorilla.commons.utility;
-using momoney.presentation.views;
-using MoMoney.Presentation.Views;
-using MoMoney.Presentation.Winforms.Views;
-
-namespace MoMoney.boot.container.registration
-{
- class wire_up_the_views_in_to_the : Command
- {
- readonly DependencyRegistration register;
-
- public wire_up_the_views_in_to_the(DependencyRegistration registry)
- {
- register = registry;
- }
-
- public void run()
- {
- var shell = new ApplicationShell();
- register.singleton<Shell>(() => shell);
- register.singleton<IWin32Window>(() => shell);
- register.singleton<ISynchronizeInvoke>(() => shell);
- register.singleton<IRegionManager>(() => shell);
- register.singleton(() => shell);
- register.singleton<IAboutApplicationView, AboutTheApplicationView>();
- register.singleton<ISplashScreenView, SplashScreenView>();
- register.singleton<INavigationView, NavigationView>();
- register.singleton<IAddCompanyView, AddCompanyView>();
- register.singleton<IViewAllBills, ViewAllBills>();
- register.singleton<IAddBillPaymentView, AddBillPaymentView>();
- register.singleton<IMainMenuView, MainMenuView>();
- register.singleton<IAddNewIncomeView, AddNewIncomeView>();
- register.singleton<IViewIncomeHistory, ViewAllIncome>();
- register.transient<ISaveChangesView, SaveChangesView>();
- register.transient<ICheckForUpdatesView, CheckForUpdatesView>();
- register.singleton<INotificationIconView, NotificationIconView>();
- register.singleton<IStatusBarView, StatusBarView>();
- register.transient<IUnhandledErrorView, UnhandledErrorView>();
- register.singleton<IGettingStartedView, WelcomeScreen>();
- register.singleton<ILogFileView, LogFileView>();
- }
- }
+using System.ComponentModel;
+using System.Windows.Forms;
+using Gorilla.Commons.Infrastructure.Reflection;
+using gorilla.commons.infrastructure.thirdparty;
+using gorilla.commons.utility;
+using momoney.presentation.views;
+using MoMoney.Presentation.Views;
+using MoMoney.Presentation.Winforms.Views;
+using View = momoney.presentation.views.View;
+
+namespace MoMoney.boot.container.registration
+{
+ class WireUpTheViewsInToThe : IStartupCommand
+ {
+ readonly DependencyRegistration register;
+
+ public WireUpTheViewsInToThe(DependencyRegistration registry)
+ {
+ register = registry;
+ }
+
+ public void run(Assembly item)
+ {
+ var shell = new ApplicationShell();
+ register.singleton<Shell>(() => shell);
+ register.singleton<IWin32Window>(() => shell);
+ register.singleton<ISynchronizeInvoke>(() => shell);
+ register.singleton<IRegionManager>(() => shell);
+ register.singleton(() => shell);
+ register.singleton<IAboutApplicationView, AboutTheApplicationView>();
+ register.singleton<ISplashScreenView, SplashScreenView>();
+ register.singleton<INavigationView, NavigationView>();
+ register.singleton<IAddCompanyView, AddCompanyView>();
+ register.singleton<IViewAllBills, ViewAllBills>();
+ register.singleton<IAddBillPaymentView, AddBillPaymentView>();
+ register.singleton<IMainMenuView, MainMenuView>();
+ register.singleton<IAddNewIncomeView, AddNewIncomeView>();
+ register.singleton<IViewIncomeHistory, ViewAllIncome>();
+ register.singleton<INotificationIconView, NotificationIconView>();
+ register.singleton<IStatusBarView, StatusBarView>();
+ register.singleton<IGettingStartedView, WelcomeScreen>();
+ register.singleton<ILogFileView, LogFileView>();
+
+ register.transient<ISaveChangesView, SaveChangesView>();
+ register.transient<ICheckForUpdatesView, CheckForUpdatesView>();
+ register.transient<IUnhandledErrorView, UnhandledErrorView>();
+
+
+ item.all_classes_that_implement<View>().each(x =>
+ {
+ register.singleton(typeof (View), x);
+ });
+ }
+ }
}
\ No newline at end of file
product/client/boot/boot/container/wire_up_the_container.cs
@@ -1,36 +0,0 @@
-using Gorilla.Commons.Infrastructure.Container;
-using gorilla.commons.infrastructure.thirdparty;
-using gorilla.commons.infrastructure.thirdparty.Autofac;
-using gorilla.commons.utility;
-using MoMoney.boot.container.registration;
-
-namespace MoMoney.boot.container
-{
- class wire_up_the_container : Command
- {
- readonly DependencyRegistration registry;
-
- public wire_up_the_container() : this(new AutofacDependencyRegistryBuilder()) {}
-
- public wire_up_the_container(DependencyRegistration registry)
- {
- this.registry = registry;
- }
-
- public void run()
- {
- new auto_wire_components_in_to_the(registry)
- .then(new wire_up_the_essential_services_into_the(registry))
- .then(new wire_up_the_data_access_components_into_the(registry))
- .then(new wire_up_the_infrastructure_in_to_the(registry))
- .then(new wire_up_the_mappers_in_to_the(registry))
- .then(new wire_up_the_services_in_to_the(registry))
- .then(new wire_up_the_presentation_modules(registry))
- .then(new wire_up_the_views_in_to_the(registry))
- .then(new wire_up_the_reports_in_to_the(registry))
- .run();
-
- Resolve.initialize_with(registry.build());
- }
- }
-}
\ No newline at end of file
product/client/boot/boot/container/WireUpTheContainer.cs
@@ -0,0 +1,32 @@
+using Autofac.Builder;
+using Gorilla.Commons.Infrastructure.Container;
+using Gorilla.Commons.Infrastructure.Reflection;
+using gorilla.commons.infrastructure.thirdparty.Autofac;
+using gorilla.commons.utility;
+using MoMoney.boot.container.registration;
+using Assembly = System.Reflection.Assembly;
+
+namespace MoMoney.boot.container
+{
+ class WireUpTheContainer : Command
+ {
+ public void run()
+ {
+ var builder = new ContainerBuilder();
+ var registry = new AutofacDependencyRegistryBuilder(builder);
+
+ new AutoWireComponentsInToThe(registry)
+ .then(new WireUpTheEssentialServicesIntoThe(registry))
+ .then(new WireUpTheDataAccessComponentsIntoThe(registry))
+ .then(new WireUpTheInfrastructureInToThe(registry))
+ .then(new WireUpTheMappersInToThe(registry))
+ .then(new WireUpTheServicesInToThe(registry))
+ .then(new WireUpThePresentationModules(registry))
+ .then(new WireUpTheViewsInToThe(registry))
+ .then(new WireUpTheReportsInToThe(registry))
+ .run(new ApplicationAssembly(Assembly.GetExecutingAssembly()));
+
+ Resolve.initialize_with(registry.build());
+ }
+ }
+}
\ No newline at end of file
product/client/boot/boot/display_the_splash_screen.cs โ product/client/boot/boot/DisplayTheSplashScreen.cs
@@ -1,26 +1,26 @@
-using System;
-using gorilla.commons.Utility;
-using MoMoney.Presentation.Presenters;
-
-namespace MoMoney.boot
-{
- public class display_the_splash_screen : DisposableCommand
- {
- readonly Func<ISplashScreenPresenter> presenter;
-
- public display_the_splash_screen(Func<ISplashScreenPresenter> presenter)
- {
- this.presenter = presenter;
- }
-
- public void run()
- {
- presenter().run();
- }
-
- public void Dispose()
- {
- presenter().Dispose();
- }
- }
+using System;
+using gorilla.commons.Utility;
+using MoMoney.Presentation.Presenters;
+
+namespace MoMoney.boot
+{
+ public class DisplayTheSplashScreen : DisposableCommand
+ {
+ readonly Func<ISplashScreenPresenter> presenter;
+
+ public DisplayTheSplashScreen(Func<ISplashScreenPresenter> presenter)
+ {
+ this.presenter = presenter;
+ }
+
+ public void run()
+ {
+ presenter().run();
+ }
+
+ public void Dispose()
+ {
+ presenter().Dispose();
+ }
+ }
}
\ No newline at end of file
product/client/boot/boot/global_error_handling.cs โ product/client/boot/boot/GlobalErrorHandling.cs
@@ -1,25 +1,25 @@
-using System;
-using System.Windows.Forms;
-using Gorilla.Commons.Infrastructure.Container;
-using Gorilla.Commons.Infrastructure.Logging;
-using gorilla.commons.utility;
-using momoney.presentation.model.eventing;
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace MoMoney.boot
-{
- class global_error_handling : Command
- {
- public void run()
- {
- Application.ThreadException += (sender, e) => handle(e.Exception);
- AppDomain.CurrentDomain.UnhandledException += (o, e) => handle(e.ExceptionObject.downcast_to<Exception>());
- }
-
- void handle(Exception e)
- {
- e.add_to_log();
- Resolve.the<EventAggregator>().publish(new UnhandledErrorOccurred(e));
- }
- }
+using System;
+using System.Windows.Forms;
+using Gorilla.Commons.Infrastructure.Container;
+using Gorilla.Commons.Infrastructure.Logging;
+using gorilla.commons.utility;
+using momoney.presentation.model.eventing;
+using MoMoney.Service.Infrastructure.Eventing;
+
+namespace MoMoney.boot
+{
+ class GlobalErrorHandling : Command
+ {
+ public void run()
+ {
+ Application.ThreadException += (sender, e) => handle(e.Exception);
+ AppDomain.CurrentDomain.UnhandledException += (o, e) => handle(e.ExceptionObject.downcast_to<Exception>());
+ }
+
+ void handle(Exception e)
+ {
+ e.add_to_log();
+ Resolve.the<EventAggregator>().publish(new UnhandledErrorOccurred(e));
+ }
+ }
}
\ No newline at end of file
product/client/boot/boot/hookup.cs
@@ -1,10 +1,10 @@
-namespace momoney.boot
-{
- class hookup
- {
- static public Command the<Command>() where Command : gorilla.commons.utility.Command, new()
- {
- return new Command();
- }
- }
+namespace momoney.boot
+{
+ class Hookup
+ {
+ static public Command the<Command>() where Command : gorilla.commons.utility.Command, new()
+ {
+ return new Command();
+ }
+ }
}
\ No newline at end of file
product/client/boot/boot/start_the_application.cs โ product/client/boot/boot/StartTheApplication.cs
@@ -1,33 +1,33 @@
-using gorilla.commons.infrastructure.thirdparty.Castle.DynamicProxy;
-using gorilla.commons.utility;
-using MoMoney.Modules.Core;
-using momoney.service.infrastructure.threading;
-using MoMoney.Service.Infrastructure.Threading;
-
-namespace MoMoney.boot
-{
- class start_the_application : Command
- {
- readonly IBackgroundThread thread;
- readonly ILoadPresentationModulesCommand command;
- readonly CommandProcessor processor;
-
- public start_the_application(IBackgroundThread thread)
- : this(thread, Lazy.load<ILoadPresentationModulesCommand>(), Lazy.load<CommandProcessor>()) {}
-
- public start_the_application(IBackgroundThread thread, ILoadPresentationModulesCommand command,
- CommandProcessor processor)
- {
- this.thread = thread;
- this.command = command;
- this.processor = processor;
- }
-
- public void run()
- {
- command.run();
- processor.add(() => thread.Dispose());
- processor.run();
- }
- }
+using gorilla.commons.infrastructure.thirdparty.Castle.DynamicProxy;
+using gorilla.commons.utility;
+using MoMoney.Modules.Core;
+using momoney.service.infrastructure.threading;
+using MoMoney.Service.Infrastructure.Threading;
+
+namespace MoMoney.boot
+{
+ class StartTheApplication : Command
+ {
+ readonly IBackgroundThread thread;
+ readonly ILoadPresentationModulesCommand command;
+ readonly CommandProcessor processor;
+
+ public StartTheApplication(IBackgroundThread thread)
+ : this(thread, Lazy.load<ILoadPresentationModulesCommand>(), Lazy.load<CommandProcessor>()) {}
+
+ public StartTheApplication(IBackgroundThread thread, ILoadPresentationModulesCommand command,
+ CommandProcessor processor)
+ {
+ this.thread = thread;
+ this.command = command;
+ this.processor = processor;
+ }
+
+ public void run()
+ {
+ command.run();
+ processor.add(() => thread.Dispose());
+ processor.run();
+ }
+ }
}
\ No newline at end of file
product/client/boot/boot/WindowsFormsApplication.cs
@@ -1,97 +1,78 @@
-using System;
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Diagnostics;
-using System.Globalization;
-using System.Security.Principal;
-using System.Threading;
-using System.Windows.Forms;
-using Gorilla.Commons.Infrastructure.Container;
-using Gorilla.Commons.Infrastructure.Logging;
-using gorilla.commons.utility;
-using momoney.boot;
-using MoMoney.boot.container;
-using momoney.presentation.model.eventing;
-using MoMoney.Presentation.Presenters;
-using MoMoney.Service.Infrastructure.Eventing;
-using momoney.service.infrastructure.threading;
-
-namespace MoMoney.boot
-{
- public class WindowsFormsApplication<Shell> : Command where Shell : Form
- {
- protected WindowsFormsApplication()
- {
- Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- }
-
- public void run()
- {
- using (new LogTime())
- {
- Func<ISplashScreenPresenter> presenter = () => new SplashScreenPresenter();
- presenter = presenter.memorize();
-
- var startup_screen = new display_the_splash_screen(presenter).on_a_background_thread();
-
- AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
- hookup
- .the<global_error_handling>()
- .then(startup_screen)
- .then<wire_up_the_container>()
- .then(new start_the_application(startup_screen))
- .run();
- }
- start();
- }
-
- void start()
- {
- try
- {
- Application.Run(Resolve.the<Shell>());
- }
- catch (Exception e)
- {
- this.log().error(e);
- Resolve.the<EventAggregator>().publish(new UnhandledErrorOccurred(e));
- }
- }
- }
-
- public class LogTime : IDisposable
- {
- Stopwatch stopwatch;
-
- public LogTime()
- {
- stopwatch = new Stopwatch();
- stopwatch.Start();
- }
-
- public void Dispose()
- {
- stopwatch.Stop();
- this.log().debug("application startup took: {0}", stopwatch.Elapsed);
- }
- }
-
- 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);
- }
- }
+using System;
+using System.Diagnostics;
+using System.Globalization;
+using System.Security.Principal;
+using System.Threading;
+using System.Windows.Forms;
+using Gorilla.Commons.Infrastructure.Container;
+using Gorilla.Commons.Infrastructure.Logging;
+using gorilla.commons.utility;
+using momoney.boot;
+using MoMoney.boot.container;
+using momoney.presentation.model.eventing;
+using MoMoney.Presentation.Presenters;
+using MoMoney.Service.Infrastructure.Eventing;
+using momoney.service.infrastructure.threading;
+
+namespace MoMoney.boot
+{
+ public class WindowsFormsApplication<Shell> : Command where Shell : Form
+ {
+ protected WindowsFormsApplication()
+ {
+ Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ }
+
+ public void run()
+ {
+ using (new LogTime())
+ {
+ Func<ISplashScreenPresenter> presenter = () => new SplashScreenPresenter();
+ presenter = presenter.memorize();
+
+ var startup_screen = new DisplayTheSplashScreen(presenter).on_a_background_thread();
+
+ AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
+ Hookup
+ .the<GlobalErrorHandling>()
+ .then(startup_screen)
+ .then<WireUpTheContainer>()
+ .then(new StartTheApplication(startup_screen))
+ .run();
+ }
+ start();
+ }
+
+ void start()
+ {
+ try
+ {
+ Application.Run(Resolve.the<Shell>());
+ }
+ catch (Exception e)
+ {
+ this.log().error(e);
+ Resolve.the<EventAggregator>().publish(new UnhandledErrorOccurred(e));
+ }
+ }
+ }
+
+ public class LogTime : IDisposable
+ {
+ Stopwatch stopwatch;
+
+ public LogTime()
+ {
+ stopwatch = new Stopwatch();
+ stopwatch.Start();
+ }
+
+ public void Dispose()
+ {
+ stopwatch.Stop();
+ this.log().debug("application startup took: {0}", stopwatch.Elapsed);
+ }
+ }
}
\ No newline at end of file
product/client/boot/Modules/Core/ILoadPresentationModulesCommand.cs
@@ -1,6 +1,6 @@
-using gorilla.commons.utility;
-
-namespace MoMoney.Modules.Core
-{
- public interface ILoadPresentationModulesCommand : Command {}
+using gorilla.commons.utility;
+
+namespace MoMoney.Modules.Core
+{
+ public interface ILoadPresentationModulesCommand : Command {}
}
\ No newline at end of file
product/client/boot/Modules/Core/LoadPresentationModulesCommand.cs
@@ -1,29 +1,29 @@
-using gorilla.commons.utility;
-using MoMoney.Presentation;
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace MoMoney.Modules.Core
-{
- public class LoadPresentationModulesCommand : ILoadPresentationModulesCommand
- {
- Registry<IModule> registry;
- EventAggregator broker;
-
- public LoadPresentationModulesCommand(Registry<IModule> registry, EventAggregator broker)
- {
- this.registry = registry;
- this.broker = broker;
- }
-
- public void run()
- {
- registry
- .all()
- .each(x =>
- {
- broker.subscribe(x);
- x.run();
- });
- }
- }
+using gorilla.commons.utility;
+using MoMoney.Presentation;
+using MoMoney.Service.Infrastructure.Eventing;
+
+namespace MoMoney.Modules.Core
+{
+ public class LoadPresentationModulesCommand : ILoadPresentationModulesCommand
+ {
+ Registry<IModule> registry;
+ EventAggregator broker;
+
+ public LoadPresentationModulesCommand(Registry<IModule> registry, EventAggregator broker)
+ {
+ this.registry = registry;
+ this.broker = broker;
+ }
+
+ public void run()
+ {
+ registry
+ .all()
+ .each(x =>
+ {
+ broker.subscribe(x);
+ x.run();
+ });
+ }
+ }
}
\ No newline at end of file
product/client/boot/Modules/ApplicationMenuModule.cs
@@ -1,51 +1,51 @@
-using MoMoney.Presentation;
-using momoney.presentation.model.eventing;
-using MoMoney.Presentation.Model.Menu;
-using momoney.presentation.presenters;
-using MoMoney.Presentation.Presenters;
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace MoMoney.Modules
-{
- public class ApplicationMenuModule :
- IModule,
- EventSubscriber<NewProjectOpened>,
- EventSubscriber<ClosingProjectEvent>,
- EventSubscriber<SavedChangesEvent>,
- EventSubscriber<UnsavedChangesEvent>
- {
- readonly EventAggregator broker;
- readonly IRunPresenterCommand command;
-
- public ApplicationMenuModule(EventAggregator broker, IRunPresenterCommand command)
- {
- this.broker = broker;
- this.command = command;
- }
-
- public void run()
- {
- command.run<ApplicationMenuPresenter>();
- }
-
- public void notify(NewProjectOpened message)
- {
- broker.publish<IMenuItem>(x => x.refresh());
- }
-
- public void notify(ClosingProjectEvent message)
- {
- broker.publish<IMenuItem>(x => x.refresh());
- }
-
- public void notify(SavedChangesEvent message)
- {
- broker.publish<IMenuItem>(x => x.refresh());
- }
-
- public void notify(UnsavedChangesEvent message)
- {
- broker.publish<IMenuItem>(x => x.refresh());
- }
- }
+using MoMoney.Presentation;
+using momoney.presentation.model.eventing;
+using MoMoney.Presentation.Model.Menu;
+using momoney.presentation.presenters;
+using MoMoney.Presentation.Presenters;
+using MoMoney.Service.Infrastructure.Eventing;
+
+namespace MoMoney.Modules
+{
+ public class ApplicationMenuModule :
+ IModule,
+ EventSubscriber<NewProjectOpened>,
+ EventSubscriber<ClosingProjectEvent>,
+ EventSubscriber<SavedChangesEvent>,
+ EventSubscriber<UnsavedChangesEvent>
+ {
+ readonly EventAggregator broker;
+ readonly IRunPresenterCommand command;
+
+ public ApplicationMenuModule(EventAggregator broker, IRunPresenterCommand command)
+ {
+ this.broker = broker;
+ this.command = command;
+ }
+
+ public void run()
+ {
+ command.run<ApplicationMenuPresenter>();
+ }
+
+ public void notify(NewProjectOpened message)
+ {
+ broker.publish<IMenuItem>(x => x.refresh());
+ }
+
+ public void notify(ClosingProjectEvent message)
+ {
+ broker.publish<IMenuItem>(x => x.refresh());
+ }
+
+ public void notify(SavedChangesEvent message)
+ {
+ broker.publish<IMenuItem>(x => x.refresh());
+ }
+
+ public void notify(UnsavedChangesEvent message)
+ {
+ broker.publish<IMenuItem>(x => x.refresh());
+ }
+ }
}
\ No newline at end of file
product/client/boot/Modules/ApplicationShellModule.cs
@@ -1,25 +1,21 @@
-using MoMoney.Presentation;
-using momoney.presentation.presenters;
-using MoMoney.Presentation.Presenters;
-
-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<ApplicationShellPresenter>();
- }
- }
+using MoMoney.Presentation;
+using momoney.presentation.presenters;
+using MoMoney.Presentation.Presenters;
+
+namespace MoMoney.Modules
+{
+ public class ApplicationShellModule : IModule
+ {
+ readonly IRunPresenterCommand command;
+
+ public ApplicationShellModule(IRunPresenterCommand command)
+ {
+ this.command = command;
+ }
+
+ public void run()
+ {
+ command.run<ApplicationShellPresenter>();
+ }
+ }
}
\ No newline at end of file
product/client/boot/Modules/DatabaseModule.cs
@@ -1,22 +1,23 @@
-using momoney.database;
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace MoMoney.Modules
-{
- public class DatabaseModule : IDatabaseModule
- {
- readonly IDatabaseConfiguration configuration;
- readonly EventAggregator broker;
-
- public DatabaseModule(IDatabaseConfiguration configuration, EventAggregator broker)
- {
- this.configuration = configuration;
- this.broker = broker;
- }
-
- public void run()
- {
- broker.subscribe(configuration);
- }
- }
+using momoney.database;
+using MoMoney.Presentation;
+using MoMoney.Service.Infrastructure.Eventing;
+
+namespace MoMoney.Modules
+{
+ public class DatabaseModule : IModule
+ {
+ readonly IDatabaseConfiguration configuration;
+ readonly EventAggregator broker;
+
+ public DatabaseModule(IDatabaseConfiguration configuration, EventAggregator broker)
+ {
+ this.configuration = configuration;
+ this.broker = broker;
+ }
+
+ public void run()
+ {
+ broker.subscribe(configuration);
+ }
+ }
}
\ No newline at end of file
product/client/boot/Modules/GettingStartedModule.cs
@@ -1,36 +1,36 @@
-using MoMoney.Presentation;
-using momoney.presentation.model.eventing;
-using momoney.presentation.presenters;
-using MoMoney.Presentation.Presenters;
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace MoMoney.Modules
-{
- public class GettingStartedModule :
- IModule,
- EventSubscriber<NewProjectOpened>,
- EventSubscriber<ClosingProjectEvent>
- {
- IRunPresenterCommand command;
-
- public GettingStartedModule(IRunPresenterCommand command)
- {
- this.command = command;
- }
-
- public void run()
- {
- command.run<GettingStartedPresenter>();
- }
-
- public void notify(NewProjectOpened message)
- {
- run();
- }
-
- public void notify(ClosingProjectEvent message)
- {
- run();
- }
- }
+using MoMoney.Presentation;
+using momoney.presentation.model.eventing;
+using momoney.presentation.presenters;
+using MoMoney.Presentation.Presenters;
+using MoMoney.Service.Infrastructure.Eventing;
+
+namespace MoMoney.Modules
+{
+ public class GettingStartedModule :
+ IModule,
+ EventSubscriber<NewProjectOpened>,
+ EventSubscriber<ClosingProjectEvent>
+ {
+ IRunPresenterCommand command;
+
+ public GettingStartedModule(IRunPresenterCommand command)
+ {
+ this.command = command;
+ }
+
+ public void run()
+ {
+ command.run<GettingStartedPresenter>();
+ }
+
+ public void notify(NewProjectOpened message)
+ {
+ run();
+ }
+
+ public void notify(ClosingProjectEvent message)
+ {
+ run();
+ }
+ }
}
\ No newline at end of file
product/client/boot/Modules/IDatabaseModule.cs
@@ -1,8 +0,0 @@
-using MoMoney.Presentation;
-
-namespace MoMoney.Modules
-{
- public interface IDatabaseModule : IModule
- {
- }
-}
\ No newline at end of file
product/client/presentation/Presenters/NotificationIconModule.cs โ product/client/boot/Modules/NotificationIconModule.cs
@@ -1,37 +1,37 @@
-using System.Net.NetworkInformation;
-using MoMoney.Presentation;
-using momoney.presentation.model.eventing;
-using momoney.presentation.views;
-using MoMoney.Presentation.Winforms.Resources;
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace momoney.presentation.presenters
-{
- public class NotificationIconModule : IModule,
- EventSubscriber<ClosingTheApplication>,
- EventSubscriber<NewProjectOpened>
- {
- readonly INotificationIconView view;
-
- public NotificationIconModule(INotificationIconView view)
- {
- this.view = view;
- }
-
- public void run()
- {
- NetworkChange.NetworkAvailabilityChanged += (o, e) => view.display(ApplicationIcons.Application, e.IsAvailable ? "Connected To A Network" : "Disconnected From Network");
- view.display(ApplicationIcons.Application, "mokhan.ca");
- }
-
- public void notify(ClosingTheApplication message)
- {
- view.Dispose();
- }
-
- public void notify(NewProjectOpened message)
- {
- view.opened_new_project();
- }
- }
+using System.Net.NetworkInformation;
+using MoMoney.Presentation;
+using momoney.presentation.model.eventing;
+using momoney.presentation.views;
+using MoMoney.Presentation.Winforms.Resources;
+using MoMoney.Service.Infrastructure.Eventing;
+
+namespace momoney.modules
+{
+ public class NotificationIconModule : IModule,
+ EventSubscriber<ClosingTheApplication>,
+ EventSubscriber<NewProjectOpened>
+ {
+ readonly INotificationIconView view;
+
+ public NotificationIconModule(INotificationIconView view)
+ {
+ this.view = view;
+ }
+
+ public void run()
+ {
+ NetworkChange.NetworkAvailabilityChanged += (o, e) => view.display(ApplicationIcons.Application, e.IsAvailable ? "Connected To A Network" : "Disconnected From Network");
+ view.display(ApplicationIcons.Application, "mokhan.ca");
+ }
+
+ public void notify(ClosingTheApplication message)
+ {
+ view.Dispose();
+ }
+
+ public void notify(NewProjectOpened message)
+ {
+ view.opened_new_project();
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Presenters/NotificationIconPresenterSpecs.cs โ product/client/boot/Modules/NotificationIconPresenterSpecs.cs
@@ -1,26 +1,26 @@
-using developwithpassion.bdd.contexts;
-using Gorilla.Commons.Testing;
-using momoney.presentation.views;
-using MoMoney.Presentation.Winforms.Resources;
-
-namespace momoney.presentation.presenters
-{
- [Concern(typeof (NotificationIconModule))]
- public abstract class behaves_like_notification_icon_presenter : concerns_for<NotificationIconModule>
- {
- context c = () =>
- {
- view = the_dependency<INotificationIconView>();
- };
-
- static protected INotificationIconView view;
- }
-
- public class when_initializing_the_notification_icon : behaves_like_notification_icon_presenter
- {
- it should_ask_the_view_to_display_the_correct_icon_and_text =
- () => view.was_told_to(v => v.display(ApplicationIcons.Application, "mokhan.ca"));
-
- because b = () => sut.run();
- }
+using developwithpassion.bdd.contexts;
+using Gorilla.Commons.Testing;
+using momoney.presentation.views;
+using MoMoney.Presentation.Winforms.Resources;
+
+namespace momoney.modules
+{
+ [Concern(typeof (NotificationIconModule))]
+ public abstract class behaves_like_notification_icon_presenter : concerns_for<NotificationIconModule>
+ {
+ context c = () =>
+ {
+ view = the_dependency<INotificationIconView>();
+ };
+
+ static protected INotificationIconView view;
+ }
+
+ public class when_initializing_the_notification_icon : behaves_like_notification_icon_presenter
+ {
+ it should_ask_the_view_to_display_the_correct_icon_and_text =
+ () => view.was_told_to(v => v.display(ApplicationIcons.Application, "mokhan.ca"));
+
+ because b = () => sut.run();
+ }
}
\ No newline at end of file
product/client/presentation/Presenters/StatusBarModule.cs โ product/client/boot/Modules/StatusBarModule.cs
@@ -1,74 +1,73 @@
-using System;
-using gorilla.commons.utility;
-using Gorilla.Commons.Utility;
-using momoney.presentation.model.eventing;
-using MoMoney.Presentation.Views;
-using MoMoney.Presentation.Winforms.Resources;
-using MoMoney.Service.Infrastructure.Eventing;
-using MoMoney.Service.Infrastructure.Threading;
-
-namespace MoMoney.Presentation.Presenters
-{
- public class StatusBarModule :
- IModule,
- EventSubscriber<SavedChangesEvent>,
- EventSubscriber<NewProjectOpened>,
- EventSubscriber<ClosingTheApplication>,
- EventSubscriber<UnsavedChangesEvent>,
- EventSubscriber<StartedRunningCommand>,
- EventSubscriber<FinishedRunningCommand>,
- EventSubscriber<ClosingProjectEvent>
- {
- readonly IStatusBarView view;
- readonly EventAggregator broker;
- readonly ITimer timer;
-
- public StatusBarModule(IStatusBarView view, EventAggregator broker, ITimer timer)
- {
- this.view = view;
- this.broker = broker;
- this.timer = timer;
- }
-
- public void run()
- {
- view.display(ApplicationIcons.blue_circle, "...");
- }
-
- public void notify(SavedChangesEvent message)
- {
- view.display(ApplicationIcons.floppy_disk, "Last Saved: {0}".formatted_using(Clock.now()));
- }
-
- public void notify(NewProjectOpened message)
- {
- view.display(ApplicationIcons.green_circle, "Ready");
- }
-
- public void notify(ClosingTheApplication message)
- {
- view.display(ApplicationIcons.hour_glass, "Good Bye!");
- }
-
- public void notify(ClosingProjectEvent message)
- {
- view.display(ApplicationIcons.grey_circle, "Closed");
- }
-
- public void notify(UnsavedChangesEvent message)
- {
- view.display(ApplicationIcons.red_circle, "Don't forget to save your work...");
- }
-
- public void notify(StartedRunningCommand message)
- {
- timer.start_notifying(view, new TimeSpan(1));
- }
-
- public void notify(FinishedRunningCommand message)
- {
- timer.stop_notifying(view);
- view.reset_progress_bar();
- }
- }
+using System;
+using gorilla.commons.utility;
+using Gorilla.Commons.Utility;
+using MoMoney.Presentation;
+using momoney.presentation.model.eventing;
+using MoMoney.Presentation.Views;
+using MoMoney.Presentation.Winforms.Resources;
+using MoMoney.Service.Infrastructure.Eventing;
+using MoMoney.Service.Infrastructure.Threading;
+
+namespace momoney.modules
+{
+ public class StatusBarModule :
+ IModule,
+ EventSubscriber<SavedChangesEvent>,
+ EventSubscriber<NewProjectOpened>,
+ EventSubscriber<ClosingTheApplication>,
+ EventSubscriber<UnsavedChangesEvent>,
+ EventSubscriber<StartedRunningCommand>,
+ EventSubscriber<FinishedRunningCommand>,
+ EventSubscriber<ClosingProjectEvent>
+ {
+ readonly IStatusBarView view;
+ readonly ITimer timer;
+
+ public StatusBarModule(IStatusBarView view, ITimer timer)
+ {
+ this.view = view;
+ this.timer = timer;
+ }
+
+ public void run()
+ {
+ view.display(ApplicationIcons.blue_circle, "...");
+ }
+
+ public void notify(SavedChangesEvent message)
+ {
+ view.display(ApplicationIcons.floppy_disk, "Last Saved: {0}".formatted_using(Clock.now()));
+ }
+
+ public void notify(NewProjectOpened message)
+ {
+ view.display(ApplicationIcons.green_circle, "Ready");
+ }
+
+ public void notify(ClosingTheApplication message)
+ {
+ view.display(ApplicationIcons.hour_glass, "Good Bye!");
+ }
+
+ public void notify(ClosingProjectEvent message)
+ {
+ view.display(ApplicationIcons.grey_circle, "Closed");
+ }
+
+ public void notify(UnsavedChangesEvent message)
+ {
+ view.display(ApplicationIcons.red_circle, "Don't forget to save your work...");
+ }
+
+ public void notify(StartedRunningCommand message)
+ {
+ timer.start_notifying(view, new TimeSpan(1));
+ }
+
+ public void notify(FinishedRunningCommand message)
+ {
+ timer.stop_notifying(view);
+ view.reset_progress_bar();
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Presenters/StatusBarPresenterSpecs.cs โ product/client/boot/Modules/StatusBarPresenterSpecs.cs
@@ -1,24 +1,24 @@
-using developwithpassion.bdd.contexts;
-using Gorilla.Commons.Testing;
-using momoney.presentation.model.eventing;
-using MoMoney.Presentation.Views;
-using MoMoney.Presentation.Winforms.Resources;
-
-namespace MoMoney.Presentation.Presenters
-{
- [Concern(typeof (StatusBarModule))]
- public class when_initializing_the_status_bar : concerns_for<StatusBarModule>
- {
- it should_display_a_ready_message =
- () => view.was_told_to(v => v.display(ApplicationIcons.green_circle, "Ready"));
-
- context c = () =>
- {
- view = the_dependency<IStatusBarView>();
- };
-
- because b = () => sut.notify(new NewProjectOpened(""));
-
- static IStatusBarView view;
- }
+using developwithpassion.bdd.contexts;
+using Gorilla.Commons.Testing;
+using momoney.presentation.model.eventing;
+using MoMoney.Presentation.Views;
+using MoMoney.Presentation.Winforms.Resources;
+
+namespace momoney.modules
+{
+ [Concern(typeof (StatusBarModule))]
+ public class when_initializing_the_status_bar : concerns_for<StatusBarModule>
+ {
+ it should_display_a_ready_message =
+ () => view.was_told_to(v => v.display(ApplicationIcons.green_circle, "Ready"));
+
+ context c = () =>
+ {
+ view = the_dependency<IStatusBarView>();
+ };
+
+ because b = () => sut.notify(new NewProjectOpened(""));
+
+ static IStatusBarView view;
+ }
}
\ No newline at end of file
product/client/presentation/Presenters/TaskTrayPresenter.cs โ product/client/boot/Modules/TaskTrayPresenter.cs
@@ -1,49 +1,49 @@
-using gorilla.commons.utility;
-using MoMoney.Presentation;
-using momoney.presentation.model.eventing;
-using momoney.presentation.views;
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace momoney.presentation.presenters
-{
- public class TaskTrayPresenter :
- IModule,
- EventSubscriber<SavedChangesEvent>,
- EventSubscriber<StartedRunningCommand>,
- EventSubscriber<FinishedRunningCommand>,
- EventSubscriber<NewProjectOpened>
- {
- readonly ITaskTrayMessageView view;
-
- public TaskTrayPresenter(ITaskTrayMessageView view)
- {
- this.view = view;
- }
-
- public void run()
- {
- view.display("Welcome!");
- view.display("Visit http://mokhan.ca for more information!");
- }
-
- public void notify(SavedChangesEvent message)
- {
- view.display("successfully saved changes");
- }
-
- public void notify(NewProjectOpened message)
- {
- view.display("opened {0}", message.path);
- }
-
- public void notify(StartedRunningCommand message)
- {
- view.display("Running... {0}".formatted_using(message.running_action));
- }
-
- public void notify(FinishedRunningCommand message)
- {
- view.display("Finished... {0}".formatted_using(message.completed_action));
- }
- }
+using gorilla.commons.utility;
+using MoMoney.Presentation;
+using momoney.presentation.model.eventing;
+using momoney.presentation.views;
+using MoMoney.Service.Infrastructure.Eventing;
+
+namespace momoney.modules
+{
+ public class TaskTrayPresenter :
+ IModule,
+ EventSubscriber<SavedChangesEvent>,
+ EventSubscriber<StartedRunningCommand>,
+ EventSubscriber<FinishedRunningCommand>,
+ EventSubscriber<NewProjectOpened>
+ {
+ readonly ITaskTrayMessageView view;
+
+ public TaskTrayPresenter(ITaskTrayMessageView view)
+ {
+ this.view = view;
+ }
+
+ public void run()
+ {
+ view.display("Welcome!");
+ view.display("Visit http://mokhan.ca for more information!");
+ }
+
+ public void notify(SavedChangesEvent message)
+ {
+ view.display("successfully saved changes");
+ }
+
+ public void notify(NewProjectOpened message)
+ {
+ view.display("opened {0}", message.path);
+ }
+
+ public void notify(StartedRunningCommand message)
+ {
+ view.display("Running... {0}".formatted_using(message.running_action));
+ }
+
+ public void notify(FinishedRunningCommand message)
+ {
+ view.display("Finished... {0}".formatted_using(message.completed_action));
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Presenters/TitleBarPresenter.cs โ product/client/boot/Modules/TitleBarPresenter.cs
@@ -1,51 +1,51 @@
-using MoMoney.Presentation;
-using momoney.presentation.model.eventing;
-using MoMoney.Presentation.Model.Projects;
-using MoMoney.Presentation.Views;
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace momoney.presentation.presenters
-{
- public class TitleBarPresenter :
- IModule,
- EventSubscriber<UnsavedChangesEvent>,
- EventSubscriber<SavedChangesEvent>,
- EventSubscriber<NewProjectOpened>,
- EventSubscriber<ClosingProjectEvent>
- {
- readonly ITitleBar view;
- readonly IProjectController project;
-
- public TitleBarPresenter(ITitleBar view, IProjectController project)
- {
- this.view = view;
- this.project = project;
- }
-
- public void run()
- {
- view.display(project.name());
- }
-
- public void notify(UnsavedChangesEvent dto)
- {
- view.append_asterik();
- }
-
- public void notify(SavedChangesEvent message)
- {
- view.display(project.name());
- view.remove_asterik();
- }
-
- public void notify(NewProjectOpened message)
- {
- view.display(project.name());
- }
-
- public void notify(ClosingProjectEvent message)
- {
- view.display(project.name());
- }
- }
+using MoMoney.Presentation;
+using momoney.presentation.model.eventing;
+using MoMoney.Presentation.Model.Projects;
+using MoMoney.Presentation.Views;
+using MoMoney.Service.Infrastructure.Eventing;
+
+namespace momoney.modules
+{
+ public class TitleBarPresenter :
+ IModule,
+ EventSubscriber<UnsavedChangesEvent>,
+ EventSubscriber<SavedChangesEvent>,
+ EventSubscriber<NewProjectOpened>,
+ EventSubscriber<ClosingProjectEvent>
+ {
+ readonly ITitleBar view;
+ readonly IProjectController project;
+
+ public TitleBarPresenter(ITitleBar view, IProjectController project)
+ {
+ this.view = view;
+ this.project = project;
+ }
+
+ public void run()
+ {
+ view.display(project.name());
+ }
+
+ public void notify(UnsavedChangesEvent dto)
+ {
+ view.append_asterik();
+ }
+
+ public void notify(SavedChangesEvent message)
+ {
+ view.display(project.name());
+ view.remove_asterik();
+ }
+
+ public void notify(NewProjectOpened message)
+ {
+ view.display(project.name());
+ }
+
+ public void notify(ClosingProjectEvent message)
+ {
+ view.display(project.name());
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Presenters/TitleBarPresenterSpecs.cs โ product/client/boot/Modules/TitleBarPresenterSpecs.cs
@@ -1,44 +1,44 @@
-using developwithpassion.bdd.contexts;
-using Gorilla.Commons.Testing;
-using momoney.presentation.model.eventing;
-using MoMoney.Presentation.Model.Projects;
-using MoMoney.Presentation.Views;
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace momoney.presentation.presenters
-{
- [Concern(typeof (TitleBarPresenter))]
- public abstract class behaves_like_a_title_bar_presenter : concerns_for<TitleBarPresenter>
- {
- context c = () =>
- {
- project = the_dependency<IProjectController>();
- view = the_dependency<ITitleBar>();
- broker = the_dependency<EventAggregator>();
- };
-
- protected static ITitleBar view;
- protected static EventAggregator broker;
- protected static IProjectController project;
- }
-
- public class when_initializing_the_title_bar_for_the_first_time : behaves_like_a_title_bar_presenter
- {
- it should_display_the_name_of_the_file_that_is_opened = () => view.was_told_to(x => x.display("untitled.mo"));
-
- context c = () => when_the(project).is_told_to(x => x.name()).it_will_return("untitled.mo");
-
- because b = () => sut.run();
- }
-
- public class when_there_are_unsaved_changes_in_the_project : behaves_like_a_title_bar_presenter
- {
- it should_display_an_asterik_in_the_title = () => view.was_told_to(x => x.append_asterik());
-
- context c = () => { dto = new UnsavedChangesEvent(); };
-
- because b = () => sut.notify(dto);
-
- static UnsavedChangesEvent dto;
- }
+using developwithpassion.bdd.contexts;
+using Gorilla.Commons.Testing;
+using momoney.presentation.model.eventing;
+using MoMoney.Presentation.Model.Projects;
+using MoMoney.Presentation.Views;
+using MoMoney.Service.Infrastructure.Eventing;
+
+namespace momoney.modules
+{
+ [Concern(typeof (TitleBarPresenter))]
+ public abstract class behaves_like_a_title_bar_presenter : concerns_for<TitleBarPresenter>
+ {
+ context c = () =>
+ {
+ project = the_dependency<IProjectController>();
+ view = the_dependency<ITitleBar>();
+ broker = the_dependency<EventAggregator>();
+ };
+
+ protected static ITitleBar view;
+ protected static EventAggregator broker;
+ protected static IProjectController project;
+ }
+
+ public class when_initializing_the_title_bar_for_the_first_time : behaves_like_a_title_bar_presenter
+ {
+ it should_display_the_name_of_the_file_that_is_opened = () => view.was_told_to(x => x.display("untitled.mo"));
+
+ context c = () => when_the(project).is_told_to(x => x.name()).it_will_return("untitled.mo");
+
+ because b = () => sut.run();
+ }
+
+ public class when_there_are_unsaved_changes_in_the_project : behaves_like_a_title_bar_presenter
+ {
+ it should_display_an_asterik_in_the_title = () => view.was_told_to(x => x.append_asterik());
+
+ context c = () => { dto = new UnsavedChangesEvent(); };
+
+ because b = () => sut.notify(dto);
+
+ static UnsavedChangesEvent dto;
+ }
}
\ No newline at end of file
product/client/boot/boot.csproj
@@ -1,243 +1,253 @@
-๏ปฟ<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{2DB82691-BF15-4538-8C5E-6BF8F4F875A9}</ProjectGuid>
- <OutputType>WinExe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>momoney</RootNamespace>
- <AssemblyName>momoney</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="ActiveReports6, Version=6.0.1797.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\active.reports\ActiveReports6.dll</HintPath>
- </Reference>
- <Reference Include="bdddoc, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\test\bdd.doc\bdddoc.dll</HintPath>
- </Reference>
- <Reference Include="Castle.Core, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\castle\Castle.Core.dll</HintPath>
- </Reference>
- <Reference Include="developwithpassion.bdd, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\test\developwithpassion\developwithpassion.bdd.dll</HintPath>
- </Reference>
- <Reference Include="gorilla.testing, Version=2009.5.5.194, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\test\gorilla\gorilla.testing.dll</HintPath>
- </Reference>
- <Reference Include="JetBrains.Annotations, Version=4.1.933.3, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\jetbrains\JetBrains.Annotations.dll</HintPath>
- </Reference>
- <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\log4net\log4net.dll</HintPath>
- </Reference>
- <Reference Include="MbUnit.Framework, Version=2.4.2.130, Culture=neutral, PublicKeyToken=5e72ecd30bc408d5">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\tools\mbunit\MbUnit.Framework.dll</HintPath>
- </Reference>
- <Reference Include="PresentationCore">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="PresentationFramework">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="Rhino.Mocks, Version=3.5.0.1337, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\test\rhino.mocks\Rhino.Mocks.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.ComponentModel.Composition, Version=2008.11.24.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\managed.extensibility.framework\System.ComponentModel.Composition.dll</HintPath>
- </Reference>
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Design" />
- <Reference Include="System.Xml.Linq">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Deployment" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
- <Reference Include="UIAutomationProvider">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="WeifenLuo.WinFormsUI.Docking, Version=2.3.3392.19652, Culture=neutral, PublicKeyToken=b602bcfb76b4e90d, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\dock.panel.suite\WeifenLuo.WinFormsUI.Docking.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="boot\container\ComponentExclusionSpecification.cs" />
- <Compile Include="boot\container\ComponentExclusionSpecificationSpecs.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="boot\container\registration\auto_wire_components_in_to_the.cs" />
- <Compile Include="boot\container\registration\auto_wire_components_in_to_the_specs.cs" />
- <Compile Include="boot\container\registration\IContainerStartup.cs" />
- <Compile Include="boot\container\registration\IStartupCommand.cs" />
- <Compile Include="boot\container\registration\mapping\Mappers.cs" />
- <Compile Include="boot\container\registration\mapping\DelegateTargetAction.cs" />
- <Compile Include="boot\container\registration\mapping\ExpressionSourceEvaluator.cs" />
- <Compile Include="boot\container\registration\mapping\FuncInitializationStep.cs" />
- <Compile Include="boot\container\registration\mapping\IMap.cs" />
- <Compile Include="boot\container\registration\mapping\IMapInitializationStep.cs" />
- <Compile Include="boot\container\registration\mapping\IMappingStep.cs" />
- <Compile Include="boot\container\registration\mapping\IMappingStepFactory.cs" />
- <Compile Include="boot\container\registration\mapping\ImmutablePropertyException.cs" />
- <Compile Include="boot\container\registration\mapping\IPropertyResolver.cs" />
- <Compile Include="boot\container\registration\mapping\ISourceEvaluator.cs" />
- <Compile Include="boot\container\registration\mapping\ITargetAction.cs" />
- <Compile Include="boot\container\registration\mapping\ITargetActionFactory.cs" />
- <Compile Include="boot\container\registration\mapping\Map.cs" />
- <Compile Include="boot\container\registration\mapping\MappingStep.cs" />
- <Compile Include="boot\container\registration\mapping\MappingStepFactory.cs" />
- <Compile Include="boot\container\registration\mapping\MissingInitializationStep.cs" />
- <Compile Include="boot\container\registration\mapping\PropertyResolutionException.cs" />
- <Compile Include="boot\container\registration\mapping\PropertyResolver.cs" />
- <Compile Include="boot\container\registration\mapping\TargetActionFactory.cs" />
- <Compile Include="boot\container\registration\proxy_configuration\InterceptingFilter.cs" />
- <Compile Include="boot\container\registration\proxy_configuration\InterceptingFilterFactory.cs" />
- <Compile Include="boot\container\registration\proxy_configuration\InterceptingFilterFactorySpecs.cs" />
- <Compile Include="boot\container\registration\proxy_configuration\InterceptingFilterSpecs.cs" />
- <Compile Include="boot\container\registration\proxy_configuration\NoConfiguration.cs" />
- <Compile Include="boot\container\registration\proxy_configuration\NotifyProgressInterceptor.cs" />
- <Compile Include="boot\container\registration\proxy_configuration\SecuringProxy.cs" />
- <Compile Include="boot\container\registration\proxy_configuration\SecuringProxySpecs.cs" />
- <Compile Include="boot\container\registration\proxy_configuration\ServiceLayerConfiguration.cs" />
- <Compile Include="boot\container\registration\proxy_configuration\SynchronizedConfiguration.cs" />
- <Compile Include="boot\container\registration\proxy_configuration\UnitOfWorkInterceptor.cs" />
- <Compile Include="boot\container\registration\wire_up_the_infrastructure_in_to_the.cs" />
- <Compile Include="boot\container\tear_down_the_container.cs" />
- <Compile Include="boot\container\registration\wire_up_the_data_access_components_into_the.cs" />
- <Compile Include="boot\container\registration\wire_up_the_presentation_modules.cs" />
- <Compile Include="boot\container\registration\wire_up_the_services_in_to_the.cs" />
- <Compile Include="boot\container\type_extensions.cs" />
- <Compile Include="boot\display_the_splash_screen.cs" />
- <Compile Include="boot\global_error_handling.cs" />
- <Compile Include="boot\WindowsFormsApplication.cs" />
- <Compile Include="modules\ApplicationShellModule.cs" />
- <Compile Include="modules\core\ILoadPresentationModulesCommand.cs" />
- <Compile Include="modules\DatabaseModule.cs" />
- <Compile Include="modules\ApplicationMenuModule.cs" />
- <Compile Include="modules\IDatabaseModule.cs" />
- <Compile Include="modules\MainMenuModule.cs" />
- <Compile Include="modules\NavigationModule.cs" />
- <Compile Include="modules\GettingStartedModule.cs" />
- <Compile Include="modules\ToolbarModule.cs" />
- <Compile Include="modules\core\LoadPresentationModulesCommandSpecs.cs" />
- <Compile Include="boot\hookup.cs" />
- <Compile Include="modules\core\LoadPresentationModulesCommand.cs" />
- <Compile Include="bootstrap.cs" />
- <EmbeddedResource Include="Properties\Resources.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Resources.Designer.cs</LastGenOutput>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <Compile Include="Properties\Resources.Designer.cs">
- <AutoGen>True</AutoGen>
- <DependentUpon>Resources.resx</DependentUpon>
- <DesignTime>True</DesignTime>
- </Compile>
- <None Include="Properties\Settings.settings">
- <Generator>SettingsSingleFileGenerator</Generator>
- <LastGenOutput>Settings.Designer.cs</LastGenOutput>
- </None>
- <Compile Include="Properties\Settings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DependentUpon>Settings.settings</DependentUpon>
- <DesignTimeSharedInput>True</DesignTimeSharedInput>
- </Compile>
- <Compile Include="boot\start_the_application.cs" />
- <Compile Include="boot\container\wire_up_the_container.cs" />
- <Compile Include="boot\container\registration\wire_up_the_essential_services_into_the.cs" />
- <Compile Include="boot\container\registration\wire_up_the_mappers_in_to_the.cs" />
- <Compile Include="boot\container\registration\wire_up_the_reports_in_to_the.cs" />
- <Compile Include="boot\container\registration\wire_up_the_views_in_to_the.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\commons\infrastructure.thirdparty.log4net\infrastructure.thirdparty.log4net.csproj">
- <Project>{6BDCB0C1-51E1-435A-93D8-CA02BF8E409C}</Project>
- <Name>infrastructure.thirdparty.log4net</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\commons\infrastructure.thirdparty\infrastructure.thirdparty.csproj">
- <Project>{04DC09B4-5DF9-44A6-8DD1-05941F0D0228}</Project>
- <Name>infrastructure.thirdparty</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\commons\infrastructure\infrastructure.csproj">
- <Project>{AA5EEED9-4531-45F7-AFCD-AD9717D2E405}</Project>
- <Name>infrastructure</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\commons\utility\utility.csproj">
- <Project>{DD8FD29E-7424-415C-9BA3-7D9F6ECBA161}</Project>
- <Name>utility %28commons\utility%29</Name>
- </ProjectReference>
- <ProjectReference Include="..\database\database.csproj">
- <Project>{580E68A8-EDEE-4350-8BBE-A053645B0F83}</Project>
- <Name>database</Name>
- </ProjectReference>
- <ProjectReference Include="..\Domain\domain.csproj">
- <Project>{BE790BCC-4412-473F-9D0A-5AA48FE7A74F}</Project>
- <Name>domain</Name>
- </ProjectReference>
- <ProjectReference Include="..\DTO\dto.csproj">
- <Project>{ACF52FAB-435B-48C9-A383-C787CB2D8000}</Project>
- <Name>dto</Name>
- </ProjectReference>
- <ProjectReference Include="..\Presentation\presentation.csproj">
- <Project>{D7C83DB3-492D-4514-8C53-C57AD8E7ACE7}</Project>
- <Name>presentation</Name>
- </ProjectReference>
- <ProjectReference Include="..\service.infrastructure\service.infrastructure.csproj">
- <Project>{81412692-F3EE-4FBF-A7C7-69454DD1BD46}</Project>
- <Name>service.infrastructure</Name>
- </ProjectReference>
- <ProjectReference Include="..\Service\service.csproj">
- <Project>{7EA4C557-6EF2-4B1F-85C8-5B3F51BAD8DB}</Project>
- <Name>service</Name>
- </ProjectReference>
- <ProjectReference Include="..\Service.Contracts\service.contracts.csproj">
- <Project>{41D2B68B-031B-44FF-BAC5-7752D9E29F94}</Project>
- <Name>service.contracts</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
+๏ปฟ<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{2DB82691-BF15-4538-8C5E-6BF8F4F875A9}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>momoney</RootNamespace>
+ <AssemblyName>momoney</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="ActiveReports6, Version=6.0.1797.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\active.reports\ActiveReports6.dll</HintPath>
+ </Reference>
+ <Reference Include="Autofac, Version=1.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\auto.fac\Autofac.dll</HintPath>
+ </Reference>
+ <Reference Include="bdddoc, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\test\bdd.doc\bdddoc.dll</HintPath>
+ </Reference>
+ <Reference Include="Castle.Core, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\castle\Castle.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="developwithpassion.bdd, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\test\developwithpassion\developwithpassion.bdd.dll</HintPath>
+ </Reference>
+ <Reference Include="gorilla.testing, Version=2009.5.5.194, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\test\gorilla\gorilla.testing.dll</HintPath>
+ </Reference>
+ <Reference Include="JetBrains.Annotations, Version=4.1.933.3, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\jetbrains\JetBrains.Annotations.dll</HintPath>
+ </Reference>
+ <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\log4net\log4net.dll</HintPath>
+ </Reference>
+ <Reference Include="MbUnit.Framework, Version=2.4.2.130, Culture=neutral, PublicKeyToken=5e72ecd30bc408d5">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\tools\mbunit\MbUnit.Framework.dll</HintPath>
+ </Reference>
+ <Reference Include="PresentationCore">
+ <RequiredTargetFramework>3.0</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="PresentationFramework">
+ <RequiredTargetFramework>3.0</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="Rhino.Mocks, Version=3.5.0.1337, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\test\rhino.mocks\Rhino.Mocks.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition, Version=2008.11.24.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\managed.extensibility.framework\System.ComponentModel.Composition.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Design" />
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Deployment" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ <Reference Include="UIAutomationProvider">
+ <RequiredTargetFramework>3.0</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="WeifenLuo.WinFormsUI.Docking, Version=2.3.3392.19652, Culture=neutral, PublicKeyToken=b602bcfb76b4e90d, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\dock.panel.suite\WeifenLuo.WinFormsUI.Docking.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="boot\container\ComponentExclusionSpecification.cs" />
+ <Compile Include="boot\container\ComponentExclusionSpecificationSpecs.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="boot\container\registration\AutoWireComponentsInToThe.cs" />
+ <Compile Include="boot\container\registration\auto_wire_components_in_to_the_specs.cs" />
+ <Compile Include="boot\container\registration\IContainerStartup.cs" />
+ <Compile Include="boot\container\registration\IStartupCommand.cs" />
+ <Compile Include="boot\container\registration\mapping\Mappers.cs" />
+ <Compile Include="boot\container\registration\mapping\DelegateTargetAction.cs" />
+ <Compile Include="boot\container\registration\mapping\ExpressionSourceEvaluator.cs" />
+ <Compile Include="boot\container\registration\mapping\FuncInitializationStep.cs" />
+ <Compile Include="boot\container\registration\mapping\IMap.cs" />
+ <Compile Include="boot\container\registration\mapping\IMapInitializationStep.cs" />
+ <Compile Include="boot\container\registration\mapping\IMappingStep.cs" />
+ <Compile Include="boot\container\registration\mapping\IMappingStepFactory.cs" />
+ <Compile Include="boot\container\registration\mapping\ImmutablePropertyException.cs" />
+ <Compile Include="boot\container\registration\mapping\IPropertyResolver.cs" />
+ <Compile Include="boot\container\registration\mapping\ISourceEvaluator.cs" />
+ <Compile Include="boot\container\registration\mapping\ITargetAction.cs" />
+ <Compile Include="boot\container\registration\mapping\ITargetActionFactory.cs" />
+ <Compile Include="boot\container\registration\mapping\Map.cs" />
+ <Compile Include="boot\container\registration\mapping\MappingStep.cs" />
+ <Compile Include="boot\container\registration\mapping\MappingStepFactory.cs" />
+ <Compile Include="boot\container\registration\mapping\MissingInitializationStep.cs" />
+ <Compile Include="boot\container\registration\mapping\PropertyResolutionException.cs" />
+ <Compile Include="boot\container\registration\mapping\PropertyResolver.cs" />
+ <Compile Include="boot\container\registration\mapping\TargetActionFactory.cs" />
+ <Compile Include="boot\container\registration\proxy_configuration\InterceptingFilter.cs" />
+ <Compile Include="boot\container\registration\proxy_configuration\InterceptingFilterFactory.cs" />
+ <Compile Include="boot\container\registration\proxy_configuration\InterceptingFilterFactorySpecs.cs" />
+ <Compile Include="boot\container\registration\proxy_configuration\InterceptingFilterSpecs.cs" />
+ <Compile Include="boot\container\registration\proxy_configuration\NoConfiguration.cs" />
+ <Compile Include="boot\container\registration\proxy_configuration\NotifyProgressInterceptor.cs" />
+ <Compile Include="boot\container\registration\proxy_configuration\SecuringProxy.cs" />
+ <Compile Include="boot\container\registration\proxy_configuration\SecuringProxySpecs.cs" />
+ <Compile Include="boot\container\registration\proxy_configuration\ServiceLayerConfiguration.cs" />
+ <Compile Include="boot\container\registration\proxy_configuration\SynchronizedConfiguration.cs" />
+ <Compile Include="boot\container\registration\proxy_configuration\UnitOfWorkInterceptor.cs" />
+ <Compile Include="boot\container\registration\WireUpTheInfrastructureInToThe.cs" />
+ <Compile Include="boot\container\tear_down_the_container.cs" />
+ <Compile Include="boot\container\registration\WireUpTheDataAccessComponentsIntoThe.cs" />
+ <Compile Include="boot\container\registration\WireUpThePresentationModules.cs" />
+ <Compile Include="boot\container\registration\WireUpTheServicesInToThe.cs" />
+ <Compile Include="boot\container\type_extensions.cs" />
+ <Compile Include="boot\DisplayTheSplashScreen.cs" />
+ <Compile Include="boot\GlobalErrorHandling.cs" />
+ <Compile Include="boot\WindowsFormsApplication.cs" />
+ <Compile Include="modules\ApplicationShellModule.cs" />
+ <Compile Include="modules\core\ILoadPresentationModulesCommand.cs" />
+ <Compile Include="modules\DatabaseModule.cs" />
+ <Compile Include="modules\ApplicationMenuModule.cs" />
+ <Compile Include="modules\MainMenuModule.cs" />
+ <Compile Include="modules\NavigationModule.cs" />
+ <Compile Include="modules\GettingStartedModule.cs" />
+ <Compile Include="modules\NotificationIconModule.cs" />
+ <Compile Include="modules\NotificationIconPresenterSpecs.cs" />
+ <Compile Include="modules\StatusBarModule.cs" />
+ <Compile Include="modules\StatusBarPresenterSpecs.cs" />
+ <Compile Include="modules\TaskTrayPresenter.cs" />
+ <Compile Include="modules\TitleBarPresenter.cs" />
+ <Compile Include="modules\TitleBarPresenterSpecs.cs" />
+ <Compile Include="modules\ToolbarModule.cs" />
+ <Compile Include="modules\core\LoadPresentationModulesCommandSpecs.cs" />
+ <Compile Include="boot\hookup.cs" />
+ <Compile Include="modules\core\LoadPresentationModulesCommand.cs" />
+ <Compile Include="bootstrap.cs" />
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Resources.resx</DependentUpon>
+ <DesignTime>True</DesignTime>
+ </Compile>
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ <Compile Include="boot\StartTheApplication.cs" />
+ <Compile Include="boot\container\WireUpTheContainer.cs" />
+ <Compile Include="boot\container\registration\WireUpTheEssentialServicesIntoThe.cs" />
+ <Compile Include="boot\container\registration\WireUpTheMappersInToThe.cs" />
+ <Compile Include="boot\container\registration\WireUpTheReportsInToThe.cs" />
+ <Compile Include="boot\container\registration\WireUpTheViewsInToThe.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\commons\infrastructure.thirdparty.log4net\infrastructure.thirdparty.log4net.csproj">
+ <Project>{6BDCB0C1-51E1-435A-93D8-CA02BF8E409C}</Project>
+ <Name>infrastructure.thirdparty.log4net</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\commons\infrastructure.thirdparty\infrastructure.thirdparty.csproj">
+ <Project>{04DC09B4-5DF9-44A6-8DD1-05941F0D0228}</Project>
+ <Name>infrastructure.thirdparty</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\commons\infrastructure\infrastructure.csproj">
+ <Project>{AA5EEED9-4531-45F7-AFCD-AD9717D2E405}</Project>
+ <Name>infrastructure</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\commons\utility\utility.csproj">
+ <Project>{DD8FD29E-7424-415C-9BA3-7D9F6ECBA161}</Project>
+ <Name>utility %28commons\utility%29</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\database\database.csproj">
+ <Project>{580E68A8-EDEE-4350-8BBE-A053645B0F83}</Project>
+ <Name>database</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Domain\domain.csproj">
+ <Project>{BE790BCC-4412-473F-9D0A-5AA48FE7A74F}</Project>
+ <Name>domain</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\DTO\dto.csproj">
+ <Project>{ACF52FAB-435B-48C9-A383-C787CB2D8000}</Project>
+ <Name>dto</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Presentation\presentation.csproj">
+ <Project>{D7C83DB3-492D-4514-8C53-C57AD8E7ACE7}</Project>
+ <Name>presentation</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\service.infrastructure\service.infrastructure.csproj">
+ <Project>{81412692-F3EE-4FBF-A7C7-69454DD1BD46}</Project>
+ <Name>service.infrastructure</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Service\service.csproj">
+ <Project>{7EA4C557-6EF2-4B1F-85C8-5B3F51BAD8DB}</Project>
+ <Name>service</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Service.Contracts\service.contracts.csproj">
+ <Project>{41D2B68B-031B-44FF-BAC5-7752D9E29F94}</Project>
+ <Name>service.contracts</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
</Project>
\ No newline at end of file
product/client/presentation/Core/ApplicationController.cs
@@ -1,31 +1,31 @@
-using MoMoney.Presentation.Views;
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace MoMoney.Presentation.Core
-{
- public interface IApplicationController
- {
- void run<Presenter>() where Presenter : Core.Presenter;
- }
-
- public class ApplicationController : IApplicationController
- {
- Shell shell;
- PresenterFactory presenter_factory;
- EventAggregator broker;
-
- public ApplicationController(Shell shell, PresenterFactory presenter_factory, EventAggregator broker)
- {
- this.presenter_factory = presenter_factory;
- this.broker = broker;
- this.shell = shell;
- }
-
- public void run<Presenter>() where Presenter : Core.Presenter
- {
- var presenter = presenter_factory.create<Presenter>();
- broker.subscribe(presenter);
- presenter.present(shell);
- }
- }
+using MoMoney.Presentation.Views;
+using MoMoney.Service.Infrastructure.Eventing;
+
+namespace MoMoney.Presentation.Core
+{
+ public interface IApplicationController
+ {
+ void run<Presenter>() where Presenter : Core.Presenter;
+ }
+
+ public class ApplicationController : IApplicationController
+ {
+ Shell shell;
+ PresenterFactory presenter_factory;
+ EventAggregator broker;
+
+ public ApplicationController(Shell shell, PresenterFactory presenter_factory, EventAggregator broker)
+ {
+ this.presenter_factory = presenter_factory;
+ this.broker = broker;
+ this.shell = shell;
+ }
+
+ public void run<Presenter>() where Presenter : Core.Presenter
+ {
+ var presenter = presenter_factory.create<Presenter>();
+ broker.subscribe(presenter);
+ presenter.present(shell);
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Core/CachedPresenterFactory.cs
@@ -1,31 +1,25 @@
-using Gorilla.Commons.Infrastructure.Logging;
-using gorilla.commons.utility;
-
-namespace MoMoney.Presentation.Core
-{
- public interface PresenterFactory
- {
- Presenter create<Presenter>() where Presenter : Core.Presenter;
- }
-
- public class CachedPresenterFactory : PresenterFactory
- {
- IPresenterRegistry presenters;
- ViewFactory view_factory;
-
- public CachedPresenterFactory(IPresenterRegistry presenters, ViewFactory view_factory)
- {
- this.presenters = presenters;
- this.view_factory = view_factory;
- }
-
- public Presenter create<Presenter>() where Presenter : Core.Presenter
- {
- var presenter = presenters.find_an_implementation_of<Core.Presenter, Presenter>();
- var view = view_factory.create_for<Presenter>();
- this.log().debug("attaching {0} to {1}", view, presenter);
- view.attach_to(presenter);
- return presenter;
- }
- }
+using gorilla.commons.utility;
+
+namespace MoMoney.Presentation.Core
+{
+ public class CachedPresenterFactory : PresenterFactory
+ {
+ IPresenterRegistry presenters;
+ ViewFactory view_factory;
+
+ public CachedPresenterFactory(IPresenterRegistry presenters, ViewFactory view_factory)
+ {
+ this.presenters = presenters;
+ this.view_factory = view_factory;
+ }
+
+ public TPresenter create<TPresenter>() where TPresenter : Presenter
+ {
+ var presenter = presenters.find_an_implementation_of<Presenter, TPresenter>();
+ view_factory
+ .create_for<TPresenter>()
+ .attach_to(presenter);
+ return presenter;
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Core/CachingViewFactory.cs
@@ -1,72 +0,0 @@
-using System;
-using System.ComponentModel;
-using System.Linq;
-using Gorilla.Commons.Infrastructure.Logging;
-using gorilla.commons.utility;
-using momoney.presentation.views;
-
-namespace MoMoney.Presentation.Core
-{
- public interface ViewFactory
- {
- IView<Presenter> create_for<Presenter>() where Presenter : Core.Presenter;
- }
-
- public class CachingViewFactory : ViewFactory
- {
- Registry<IView> views;
-
- public CachingViewFactory(Registry<IView> views)
- {
- this.views = views;
- }
-
- public IView<Presenter> create_for<Presenter>() where Presenter : Core.Presenter
- {
- if (views.all().Any(x => typeof (IView<Presenter>).IsAssignableFrom(x.GetType())))
- {
- return views.find_an_implementation_of<IView, IView<Presenter>>();
- }
- this.log().debug("cannot find a view for {0}", typeof (Presenter));
- return Null<Presenter>.View;
- }
-
- class Null<T> : IView<T> where T : Presenter
- {
- static public readonly IView<T> View = new Null<T>();
-
- public void attach_to(T presenter)
- {
- }
-
- public ControlAction<EventArgs> activated { get; set; }
-
- public ControlAction<EventArgs> deactivated { get; set; }
-
- public ControlAction<EventArgs> closed { get; set; }
-
- public ControlAction<CancelEventArgs> closing { get; set; }
-
- public IAsyncResult BeginInvoke(Delegate method, object[] args)
- {
- return null;
- }
-
- public object EndInvoke(IAsyncResult result)
- {
- return new object();
- }
-
- public object Invoke(Delegate method, object[] args)
- {
- return new object();
- }
-
- public bool InvokeRequired { get; set; }
-
- public void Dispose()
- {
- }
- }
- }
-}
\ No newline at end of file
product/client/presentation/Core/PresenterFactory.cs
@@ -0,0 +1,7 @@
+namespace MoMoney.Presentation.Core
+{
+ public interface PresenterFactory
+ {
+ TPresenter create<TPresenter>() where TPresenter : Presenter;
+ }
+}
\ No newline at end of file
product/client/presentation/Core/TabPresenter.cs
@@ -1,25 +1,28 @@
-using momoney.presentation.views;
-using MoMoney.Presentation.Views;
-
-namespace MoMoney.Presentation.Core
-{
- public abstract class TabPresenter<T> : IContentPresenter where T : IDockedContentView
- {
- protected readonly T view;
-
- protected TabPresenter(T view)
- {
- this.view = view;
- }
-
- protected virtual void present()
- {
- }
-
- public void present(Shell shell)
- {
- shell.add(view);
- present();
- }
- }
+using momoney.presentation.views;
+using MoMoney.Presentation.Views;
+
+namespace MoMoney.Presentation.Core
+{
+ public abstract class TabPresenter<Tab> : IContentPresenter where Tab : IDockedContentView
+ {
+ protected readonly Tab view;
+
+ protected TabPresenter(Tab view)
+ {
+ this.view = view;
+ }
+
+ protected virtual void present() {}
+
+ public void present(Shell shell)
+ {
+ shell.add(view);
+ present();
+ }
+
+ public override string ToString()
+ {
+ return GetType().Name;
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Core/ViewFactory.cs
@@ -0,0 +1,9 @@
+using momoney.presentation.views;
+
+namespace MoMoney.Presentation.Core
+{
+ public interface ViewFactory
+ {
+ View<TPresenter> create_for<TPresenter>() where TPresenter : Presenter;
+ }
+}
\ No newline at end of file
product/client/presentation/Core/ViewRegistry.cs
@@ -0,0 +1,63 @@
+using System;
+using System.Linq;
+using Gorilla.Commons.Infrastructure.Logging;
+using gorilla.commons.utility;
+using momoney.presentation.views;
+
+namespace MoMoney.Presentation.Core
+{
+ public class CachingViewFactory : ViewFactory
+ {
+ Registry<View> views;
+
+ public CachingViewFactory(Registry<View> views)
+ {
+ this.views = views;
+ }
+
+ public View<Presenter> create_for<Presenter>() where Presenter : Core.Presenter
+ {
+ if (views.all().Any(x =>
+ {
+ //this.log().debug("is {0} a {1} = {2}", x, typeof (View<Presenter>).Name, typeof (View<Presenter>).IsAssignableFrom(x.GetType()));
+ return typeof (View<Presenter>).IsAssignableFrom(x.GetType());
+ }))
+ {
+ return views.find_an_implementation_of<View, View<Presenter>>();
+ }
+ this.log().debug("cannot find a view for {0}", typeof (Presenter).Name);
+ return Null<Presenter>.View;
+ }
+
+ class Null<T> : View<T> where T : Presenter
+ {
+ static public readonly View<T> View = new Null<T>();
+
+ public void attach_to(T presenter) {}
+
+ public IAsyncResult BeginInvoke(Delegate method, object[] args)
+ {
+ return null;
+ }
+
+ public object EndInvoke(IAsyncResult result)
+ {
+ return new object();
+ }
+
+ public object Invoke(Delegate method, object[] args)
+ {
+ return new object();
+ }
+
+ public bool InvokeRequired { get; set; }
+
+ public void Dispose() {}
+
+ public override string ToString()
+ {
+ return typeof (Null<T>).ToString();
+ }
+ }
+ }
+}
\ No newline at end of file
product/client/presentation/Model/Menu/File/CloseWindowCommand.cs
@@ -1,22 +1,22 @@
-using gorilla.commons.utility;
-using MoMoney.Presentation.Views;
-
-namespace momoney.presentation.model.menu.file
-{
- public interface ICloseWindowCommand : Command {}
-
- public class CloseWindowCommand : ICloseWindowCommand
- {
- readonly Shell shell;
-
- public CloseWindowCommand(Shell shell)
- {
- this.shell = shell;
- }
-
- public void run()
- {
- shell.close_the_active_window();
- }
- }
+using gorilla.commons.utility;
+using MoMoney.Presentation.Views;
+
+namespace momoney.presentation.model.menu.file
+{
+ public interface ICloseWindowCommand : Command {}
+
+ public class CloseWindowCommand : ICloseWindowCommand
+ {
+ readonly Shell shell;
+
+ public CloseWindowCommand(Shell shell)
+ {
+ this.shell = shell;
+ }
+
+ public void run()
+ {
+ shell.close_the_active_window();
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Model/Menu/SubMenu.cs
@@ -1,22 +1,24 @@
-using System.Collections.Generic;
-using System.Windows.Forms;
-using gorilla.commons.utility;
-
-namespace MoMoney.Presentation.Model.Menu
-{
- public abstract class SubMenu : ISubMenu
- {
- public abstract string name { get; }
-
- public abstract IEnumerable<IMenuItem> all_menu_items();
-
- public void add_to(MenuStrip strip)
- {
- strip.SuspendLayout();
- var menu_item = new ToolStripMenuItem(name);
- strip.Items.Add(menu_item);
- all_menu_items().each(x => menu_item.DropDownItems.Add(x.build()));
- strip.ResumeLayout();
- }
- }
+using System.Collections.Generic;
+using System.Windows.Forms;
+using gorilla.commons.utility;
+using MoMoney.Presentation.Winforms.Helpers;
+
+namespace MoMoney.Presentation.Model.Menu
+{
+ public abstract class SubMenu : ISubMenu
+ {
+ public abstract string name { get; }
+
+ public abstract IEnumerable<IMenuItem> all_menu_items();
+
+ public void add_to(MenuStrip strip)
+ {
+ using (new SuspendLayout(strip))
+ {
+ var menu_item = new ToolStripMenuItem(name);
+ strip.Items.Add(menu_item);
+ all_menu_items().each(x => menu_item.DropDownItems.Add(x.build()));
+ }
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Model/Reporting/IBindReportTo.cs
@@ -1,6 +1,6 @@
-using gorilla.commons.utility;
-
-namespace MoMoney.Presentation.Model.reporting
-{
- public interface IBindReportTo<T, Query> : IReport, ParameterizedCommand<T> where Query : Query<T> {}
+using gorilla.commons.utility;
+
+namespace MoMoney.Presentation.Model.reporting
+{
+ public interface IBindReportTo<T, TQuery> : IReport, ParameterizedCommand<T> where TQuery : Query<T> {}
}
\ No newline at end of file
product/client/presentation/Model/Reporting/ReportBindingExtensions.cs
@@ -1,22 +1,22 @@
-using System;
-using System.Linq.Expressions;
-using DataDynamics.ActiveReports;
-using gorilla.commons.utility;
-
-namespace MoMoney.Presentation.Model.reporting
-{
- static public class ReportBindingExtensions
- {
- static public void bind_to<T, K>(this ARControl control, Expression<Func<T, K>> func)
- {
- if (func.Body.is_an_implementation_of<MemberExpression>())
- {
- control.DataField = func.Body.downcast_to<MemberExpression>().Member.Name;
- }
- else
- {
- control.DataField = func.Body.downcast_to<UnaryExpression>().Method.Name;
- }
- }
- }
+using System;
+using System.Linq.Expressions;
+using DataDynamics.ActiveReports;
+using gorilla.commons.utility;
+
+namespace MoMoney.Presentation.Model.reporting
+{
+ static public class ReportBindingExtensions
+ {
+ static public void bind_to<T, K>(this ARControl control, Expression<Func<T, K>> func)
+ {
+ if (func.Body.is_an_implementation_of<MemberExpression>())
+ {
+ control.DataField = func.Body.downcast_to<MemberExpression>().Member.Name;
+ }
+ else
+ {
+ control.DataField = func.Body.downcast_to<UnaryExpression>().Method.Name;
+ }
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Presenters/AboutTheApplicationPresenter.cs
@@ -1,12 +1,12 @@
-using MoMoney.Presentation.Core;
-using momoney.presentation.views;
-
-namespace momoney.presentation.presenters
-{
- public class AboutTheApplicationPresenter : TabPresenter<IAboutApplicationView>
- {
- public AboutTheApplicationPresenter(IAboutApplicationView view) : base(view)
- {
- }
- }
+using MoMoney.Presentation.Core;
+using momoney.presentation.views;
+
+namespace momoney.presentation.presenters
+{
+ public class AboutTheApplicationPresenter : TabPresenter<IAboutApplicationView>
+ {
+ public AboutTheApplicationPresenter(IAboutApplicationView view) : base(view)
+ {
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Presenters/ApplicationMenuPresenter.cs
@@ -1,23 +1,23 @@
-using System.Windows.Forms;
-using gorilla.commons.utility;
-using MoMoney.Presentation.Core;
-using MoMoney.Presentation.Model.Menu;
-using MoMoney.Presentation.Views;
-
-namespace momoney.presentation.presenters
-{
- public class ApplicationMenuPresenter : Presenter
- {
- ISubMenuRegistry registry;
-
- public ApplicationMenuPresenter(ISubMenuRegistry registry)
- {
- this.registry = registry;
- }
-
- public void present(Shell shell)
- {
- shell.region<MenuStrip>(x => registry.all().each(y => y.add_to(x)));
- }
- }
+using System.Windows.Forms;
+using gorilla.commons.utility;
+using MoMoney.Presentation.Core;
+using MoMoney.Presentation.Model.Menu;
+using MoMoney.Presentation.Views;
+
+namespace momoney.presentation.presenters
+{
+ public class ApplicationMenuPresenter : Presenter
+ {
+ ISubMenuRegistry registry;
+
+ public ApplicationMenuPresenter(ISubMenuRegistry registry)
+ {
+ this.registry = registry;
+ }
+
+ public void present(Shell shell)
+ {
+ shell.region<MenuStrip>(x => registry.all().each(y => y.add_to(x)));
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Presenters/ApplicationShellPresenter.cs
@@ -1,45 +1,45 @@
-using System;
-using MoMoney.Presentation.Core;
-using momoney.presentation.model.eventing;
-using momoney.presentation.model.menu.file;
-using MoMoney.Presentation.Views;
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace momoney.presentation.presenters
-{
- public class ApplicationShellPresenter : Presenter, EventSubscriber<ClosingProjectEvent>
- {
- IExitCommand command;
-
- Action shutdown = () =>
- {
- };
-
- protected ApplicationShellPresenter()
- {
- }
-
- public ApplicationShellPresenter(IExitCommand command)
- {
- this.command = command;
- }
-
- public virtual void present(Shell shell)
- {
- shutdown = () =>
- {
- shell.close_all_windows();
- };
- }
-
- public virtual void notify(ClosingProjectEvent message)
- {
- shutdown();
- }
-
- public virtual void shut_down()
- {
- command.run();
- }
- }
+using System;
+using MoMoney.Presentation.Core;
+using momoney.presentation.model.eventing;
+using momoney.presentation.model.menu.file;
+using MoMoney.Presentation.Views;
+using MoMoney.Service.Infrastructure.Eventing;
+
+namespace momoney.presentation.presenters
+{
+ public class ApplicationShellPresenter : Presenter, EventSubscriber<ClosingProjectEvent>
+ {
+ IExitCommand command;
+
+ Action shutdown = () =>
+ {
+ };
+
+ protected ApplicationShellPresenter()
+ {
+ }
+
+ public ApplicationShellPresenter(IExitCommand command)
+ {
+ this.command = command;
+ }
+
+ public virtual void present(Shell shell)
+ {
+ shutdown = () =>
+ {
+ shell.close_all_windows();
+ };
+ }
+
+ public virtual void notify(ClosingProjectEvent message)
+ {
+ shutdown();
+ }
+
+ public virtual void shut_down()
+ {
+ command.run();
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Presenters/DisplayTheSplashScreen.cs
@@ -1,34 +1,34 @@
-using System;
-using MoMoney.Presentation.Presenters;
-using momoney.presentation.views;
-using MoMoney.Service.Infrastructure.Threading;
-
-namespace momoney.presentation.presenters
-{
- public class DisplayTheSplashScreen : ISplashScreenState
- {
- readonly ITimer timer;
- readonly ISplashScreenView view;
- readonly ISplashScreenPresenter presenter;
-
- public DisplayTheSplashScreen(ITimer timer, ISplashScreenView view, ISplashScreenPresenter presenter)
- {
- this.timer = timer;
- this.view = view;
- this.presenter = presenter;
- timer.start_notifying(presenter, new TimeSpan(50));
- }
-
- public void update()
- {
- if (view.current_opacity() < 1)
- {
- view.increment_the_opacity();
- }
- else
- {
- timer.stop_notifying(presenter);
- }
- }
- }
+using System;
+using MoMoney.Presentation.Presenters;
+using momoney.presentation.views;
+using MoMoney.Service.Infrastructure.Threading;
+
+namespace momoney.presentation.presenters
+{
+ public class DisplayTheSplashScreen : ISplashScreenState
+ {
+ readonly ITimer timer;
+ readonly ISplashScreenView view;
+ readonly ISplashScreenPresenter presenter;
+
+ public DisplayTheSplashScreen(ITimer timer, ISplashScreenView view, ISplashScreenPresenter presenter)
+ {
+ this.timer = timer;
+ this.view = view;
+ this.presenter = presenter;
+ timer.start_notifying(presenter, new TimeSpan(50));
+ }
+
+ public void update()
+ {
+ if (view.current_opacity() < 1)
+ {
+ view.increment_the_opacity();
+ }
+ else
+ {
+ timer.stop_notifying(presenter);
+ }
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Presenters/hide_the_splash_screen.cs โ product/client/presentation/Presenters/HideTheSplashScreen.cs
@@ -1,35 +1,35 @@
-using System;
-using MoMoney.Presentation.Presenters;
-using momoney.presentation.views;
-using MoMoney.Service.Infrastructure.Threading;
-
-namespace momoney.presentation.presenters
-{
- public class hide_the_splash_screen : ISplashScreenState
- {
- readonly ITimer timer;
- readonly ISplashScreenView view;
- readonly ISplashScreenPresenter presenter;
-
- public hide_the_splash_screen(ITimer timer, ISplashScreenView view, ISplashScreenPresenter presenter)
- {
- this.timer = timer;
- this.view = view;
- this.presenter = presenter;
- timer.start_notifying(presenter, new TimeSpan(50));
- }
-
- public void update()
- {
- if (view.current_opacity() == 0)
- {
- timer.stop_notifying(presenter);
- view.close_the_screen();
- }
- else
- {
- view.decrement_the_opacity();
- }
- }
- }
+using System;
+using MoMoney.Presentation.Presenters;
+using momoney.presentation.views;
+using MoMoney.Service.Infrastructure.Threading;
+
+namespace momoney.presentation.presenters
+{
+ public class HideTheSplashScreen : ISplashScreenState
+ {
+ readonly ITimer timer;
+ readonly ISplashScreenView view;
+ readonly ISplashScreenPresenter presenter;
+
+ public HideTheSplashScreen(ITimer timer, ISplashScreenView view, ISplashScreenPresenter presenter)
+ {
+ this.timer = timer;
+ this.view = view;
+ this.presenter = presenter;
+ timer.start_notifying(presenter, new TimeSpan(50));
+ }
+
+ public void update()
+ {
+ if (view.current_opacity() == 0)
+ {
+ timer.stop_notifying(presenter);
+ view.close_the_screen();
+ }
+ else
+ {
+ view.decrement_the_opacity();
+ }
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Presenters/ISplashScreenState.cs
@@ -1,7 +1,7 @@
-namespace momoney.presentation.presenters
-{
- public interface ISplashScreenState
- {
- void update();
- }
+namespace momoney.presentation.presenters
+{
+ public interface ISplashScreenState
+ {
+ void update();
+ }
}
\ No newline at end of file
product/client/presentation/Presenters/LogFilePresenter.cs
@@ -1,22 +1,22 @@
-using MoMoney.Presentation.Core;
-using momoney.presentation.views;
-using momoney.service.infrastructure.logging;
-
-namespace momoney.presentation.presenters
-{
- public class LogFilePresenter : TabPresenter<ILogFileView>
- {
- ILogFileTasks tasks;
-
- public LogFilePresenter(ILogFileView view, ILogFileTasks tasks) : base(view)
- {
- this.tasks = tasks;
- }
-
- protected override void present()
- {
- view.display(tasks.get_the_path_to_the_log_file());
- view.run(tasks.get_the_contents_of_the_log_file());
- }
- }
+using MoMoney.Presentation.Core;
+using momoney.presentation.views;
+using momoney.service.infrastructure.logging;
+
+namespace momoney.presentation.presenters
+{
+ public class LogFilePresenter : TabPresenter<ILogFileView>
+ {
+ ILogFileTasks tasks;
+
+ public LogFilePresenter(ILogFileView view, ILogFileTasks tasks) : base(view)
+ {
+ this.tasks = tasks;
+ }
+
+ protected override void present()
+ {
+ view.display(tasks.get_the_path_to_the_log_file());
+ view.run(tasks.get_the_contents_of_the_log_file());
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Presenters/ReportPresenter.cs
@@ -1,27 +1,27 @@
-using Gorilla.Commons.Infrastructure.Container;
-using gorilla.commons.utility;
-using MoMoney.Presentation.Core;
-using MoMoney.Presentation.Model.reporting;
-using MoMoney.Presentation.Views;
-
-namespace MoMoney.Presentation.Presenters
-{
- public class ReportPresenter<Report, T, Query> : TabPresenter<IReportViewer>
- where Report : IBindReportTo<T, Query>
- where Query : Query<T>
- {
- readonly DependencyRegistry registry;
-
- public ReportPresenter(IReportViewer view, DependencyRegistry registry) : base(view)
- {
- this.registry = registry;
- }
-
- protected override void present()
- {
- var report = registry.get_a<Report>();
- report.run(registry.get_a<Query>().fetch());
- view.display(report);
- }
- }
+using Gorilla.Commons.Infrastructure.Container;
+using gorilla.commons.utility;
+using MoMoney.Presentation.Core;
+using MoMoney.Presentation.Model.reporting;
+using MoMoney.Presentation.Views;
+
+namespace MoMoney.Presentation.Presenters
+{
+ public class ReportPresenter<Report, T, Query> : TabPresenter<IReportViewer>
+ where Report : IBindReportTo<T, Query>
+ where Query : Query<T>
+ {
+ readonly DependencyRegistry registry;
+
+ public ReportPresenter(IReportViewer view, DependencyRegistry registry) : base(view)
+ {
+ this.registry = registry;
+ }
+
+ protected override void present()
+ {
+ var report = registry.get_a<Report>();
+ report.run(registry.get_a<Query>().fetch());
+ view.display(report);
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Presenters/RunThe.cs
@@ -1,25 +1,25 @@
-using gorilla.commons.utility;
-using MoMoney.Presentation.Core;
-using MoMoney.Service.Infrastructure.Threading;
-
-namespace momoney.presentation.presenters
-{
- public interface IRunThe<TPresenter> : Command where TPresenter : Presenter {}
-
- public class RunThe<TPresenter> : IRunThe<TPresenter> where TPresenter : Presenter
- {
- readonly IApplicationController controller;
- readonly CommandProcessor processor;
-
- public RunThe(IApplicationController controller, CommandProcessor processor)
- {
- this.controller = controller;
- this.processor = processor;
- }
-
- public void run()
- {
- processor.add(() => controller.run<TPresenter>());
- }
- }
+using gorilla.commons.utility;
+using MoMoney.Presentation.Core;
+using MoMoney.Service.Infrastructure.Threading;
+
+namespace momoney.presentation.presenters
+{
+ public interface IRunThe<TPresenter> : Command where TPresenter : Presenter {}
+
+ public class RunThe<TPresenter> : IRunThe<TPresenter> where TPresenter : Presenter
+ {
+ readonly IApplicationController controller;
+ readonly CommandProcessor processor;
+
+ public RunThe(IApplicationController controller, CommandProcessor processor)
+ {
+ this.controller = controller;
+ this.processor = processor;
+ }
+
+ public void run()
+ {
+ processor.add(() => controller.run<TPresenter>());
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Presenters/SplashScreenPresenter.cs
@@ -1,42 +1,42 @@
-using gorilla.commons.Utility;
-using momoney.presentation.presenters;
-using momoney.presentation.views;
-using MoMoney.Presentation.Winforms.Views;
-using momoney.service.infrastructure.threading;
-using MoMoney.Service.Infrastructure.Threading;
-
-namespace MoMoney.Presentation.Presenters
-{
- public interface ISplashScreenPresenter : DisposableCommand, ITimerClient {}
-
- public class SplashScreenPresenter : ISplashScreenPresenter
- {
- readonly ITimer timer;
- readonly ISplashScreenView view;
- ISplashScreenState current_state;
-
- public SplashScreenPresenter() : this(new IntervalTimer(), new SplashScreenView()) {}
-
- public SplashScreenPresenter(ITimer timer, ISplashScreenView view)
- {
- this.timer = timer;
- this.view = view;
- }
-
- public void run()
- {
- view.display();
- current_state = new DisplayTheSplashScreen(timer, view, this);
- }
-
- public void Dispose()
- {
- current_state = new hide_the_splash_screen(timer, view, this);
- }
-
- public void notify()
- {
- current_state.update();
- }
- }
+using gorilla.commons.Utility;
+using momoney.presentation.presenters;
+using momoney.presentation.views;
+using MoMoney.Presentation.Winforms.Views;
+using momoney.service.infrastructure.threading;
+using MoMoney.Service.Infrastructure.Threading;
+
+namespace MoMoney.Presentation.Presenters
+{
+ public interface ISplashScreenPresenter : DisposableCommand, ITimerClient {}
+
+ public class SplashScreenPresenter : ISplashScreenPresenter
+ {
+ readonly ITimer timer;
+ readonly ISplashScreenView view;
+ ISplashScreenState current_state;
+
+ public SplashScreenPresenter() : this(new IntervalTimer(), new SplashScreenView()) {}
+
+ public SplashScreenPresenter(ITimer timer, ISplashScreenView view)
+ {
+ this.timer = timer;
+ this.view = view;
+ }
+
+ public void run()
+ {
+ view.display();
+ current_state = new DisplayTheSplashScreen(timer, view, this);
+ }
+
+ public void Dispose()
+ {
+ current_state = new HideTheSplashScreen(timer, view, this);
+ }
+
+ public void notify()
+ {
+ current_state.update();
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Presenters/UnhandledErrorPresenter.cs
@@ -1,40 +1,36 @@
-using MoMoney.Presentation;
-using MoMoney.Presentation.Core;
-using momoney.presentation.model.eventing;
-using momoney.presentation.views;
-using MoMoney.Presentation.Views;
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace momoney.presentation.presenters
-{
- public class UnhandledErrorPresenter : IModule, Presenter, EventSubscriber<UnhandledErrorOccurred>
- {
- readonly IUnhandledErrorView view;
- readonly IRestartCommand restart;
-
- public UnhandledErrorPresenter(IUnhandledErrorView view, IRestartCommand command)
- {
- this.view = view;
- restart = command;
- }
-
- public void present(Shell shell)
- {
- }
-
- public void notify(UnhandledErrorOccurred message)
- {
- view.attach_to(this);
- view.display(message.error);
- }
-
- public void restart_application()
- {
- restart.run();
- }
-
- public void run()
- {
- }
- }
+using MoMoney.Presentation;
+using MoMoney.Presentation.Core;
+using momoney.presentation.model.eventing;
+using momoney.presentation.views;
+using MoMoney.Presentation.Views;
+using MoMoney.Service.Infrastructure.Eventing;
+
+namespace momoney.presentation.presenters
+{
+ public class UnhandledErrorPresenter : IModule, DialogPresenter, EventSubscriber<UnhandledErrorOccurred>
+ {
+ readonly IUnhandledErrorView view;
+ readonly IRestartCommand restart;
+
+ public UnhandledErrorPresenter(IUnhandledErrorView view, IRestartCommand command)
+ {
+ this.view = view;
+ restart = command;
+ }
+
+ public void present(Shell shell) {}
+
+ public void notify(UnhandledErrorOccurred message)
+ {
+ view.attach_to(this);
+ view.display(message.error);
+ }
+
+ public void restart_application()
+ {
+ restart.run();
+ }
+
+ public void run() {}
+ }
}
\ No newline at end of file
product/client/presentation/Views/Dialog.cs
@@ -0,0 +1,8 @@
+using MoMoney.Presentation.Core;
+
+namespace momoney.presentation.views
+{
+ public interface Dialog<TPresenter> : View<TPresenter> where TPresenter : DialogPresenter
+ {
+ }
+}
\ No newline at end of file
product/client/presentation/Views/IAboutApplicationView.cs
@@ -1,6 +1,6 @@
-namespace momoney.presentation.views
-{
- public interface IAboutApplicationView : IDockedContentView
- {
- }
+using momoney.presentation.presenters;
+
+namespace momoney.presentation.views
+{
+ public interface IAboutApplicationView : IDockedContentView, View<AboutTheApplicationPresenter> {}
}
\ No newline at end of file
product/client/presentation/Views/IAddBillPaymentView.cs
@@ -1,12 +1,12 @@
-using System.Collections.Generic;
-using gorilla.commons.utility;
-using MoMoney.DTO;
-using momoney.presentation.presenters;
-
-namespace momoney.presentation.views
-{
- public interface IAddBillPaymentView : IDockedContentView,
- IView<AddBillPaymentPresenter>,
- Callback<IEnumerable<CompanyDTO>>,
- Callback<IEnumerable<BillInformationDTO>> {}
+using System.Collections.Generic;
+using gorilla.commons.utility;
+using MoMoney.DTO;
+using momoney.presentation.presenters;
+
+namespace momoney.presentation.views
+{
+ public interface IAddBillPaymentView : IDockedContentView,
+ View<AddBillPaymentPresenter>,
+ Callback<IEnumerable<CompanyDTO>>,
+ Callback<IEnumerable<BillInformationDTO>> {}
}
\ No newline at end of file
product/client/presentation/Views/IAddCompanyView.cs
@@ -1,12 +1,12 @@
-using System.Collections.Generic;
-using gorilla.commons.utility;
-using MoMoney.DTO;
-using MoMoney.Presentation.Presenters;
-using momoney.presentation.views;
-
-namespace MoMoney.Presentation.Views
-{
- public interface IAddCompanyView : IDockedContentView,
- IView<AddCompanyPresenter>,
- Callback<IEnumerable<CompanyDTO>> {}
+using System.Collections.Generic;
+using gorilla.commons.utility;
+using MoMoney.DTO;
+using MoMoney.Presentation.Presenters;
+using momoney.presentation.views;
+
+namespace MoMoney.Presentation.Views
+{
+ public interface IAddCompanyView : IDockedContentView,
+ View<AddCompanyPresenter>,
+ Callback<IEnumerable<CompanyDTO>> {}
}
\ No newline at end of file
product/client/presentation/Views/IAddNewIncomeView.cs
@@ -1,13 +1,13 @@
-using System.Collections.Generic;
-using gorilla.commons.utility;
-using MoMoney.DTO;
-using MoMoney.Presentation.Presenters;
-using momoney.presentation.views;
-
-namespace MoMoney.Presentation.Views
-{
- public interface IAddNewIncomeView : IDockedContentView,
- IView<AddNewIncomePresenter>,
- Callback<IEnumerable<CompanyDTO>>,
- Callback<IEnumerable<IncomeInformationDTO>> {}
+using System.Collections.Generic;
+using gorilla.commons.utility;
+using MoMoney.DTO;
+using MoMoney.Presentation.Presenters;
+using momoney.presentation.views;
+
+namespace MoMoney.Presentation.Views
+{
+ public interface IAddNewIncomeView : IDockedContentView,
+ View<AddNewIncomePresenter>,
+ Callback<IEnumerable<CompanyDTO>>,
+ Callback<IEnumerable<IncomeInformationDTO>> {}
}
\ No newline at end of file
product/client/presentation/Views/IApplicationWindow.cs
@@ -1,12 +1,12 @@
-using System.Windows.Forms;
-
-namespace momoney.presentation.views
-{
- public interface IApplicationWindow : IView
- {
- IApplicationWindow titled(string title);
- IApplicationWindow create_tool_tip_for(string title, string caption, Control control);
- IApplicationWindow try_to_reduce_flickering();
- IApplicationWindow top_most();
- }
+using System.Windows.Forms;
+
+namespace momoney.presentation.views
+{
+ public interface IApplicationWindow : View
+ {
+ IApplicationWindow titled(string title);
+ IApplicationWindow create_tool_tip_for(string title, string caption, Control control);
+ IApplicationWindow try_to_reduce_flickering();
+ IApplicationWindow top_most();
+ }
}
\ No newline at end of file
product/client/presentation/Views/ICheckForUpdatesView.cs
@@ -1,15 +1,15 @@
-using gorilla.commons.utility;
-using Gorilla.Commons.Utility;
-using momoney.presentation.presenters;
-using momoney.service.infrastructure.updating;
-
-namespace momoney.presentation.views
-{
- public interface ICheckForUpdatesView : IDialog<CheckForUpdatesPresenter>, Callback<ApplicationVersion>
- {
- void display();
- void downloaded(Percent percentage_complete);
- void update_complete();
- void close();
- }
+using gorilla.commons.utility;
+using Gorilla.Commons.Utility;
+using momoney.presentation.presenters;
+using momoney.service.infrastructure.updating;
+
+namespace momoney.presentation.views
+{
+ public interface ICheckForUpdatesView : Dialog<CheckForUpdatesPresenter>, Callback<ApplicationVersion>
+ {
+ void display();
+ void downloaded(Percent percentage_complete);
+ void update_complete();
+ void close();
+ }
}
\ No newline at end of file
product/client/presentation/Views/ICommandDialog.cs
@@ -1,4 +0,0 @@
-namespace momoney.presentation.views
-{
- public interface ICommandDialog<Command> where Command : gorilla.commons.utility.Command {}
-}
\ No newline at end of file
product/client/presentation/Views/IDialog.cs
@@ -1,8 +0,0 @@
-using MoMoney.Presentation.Core;
-
-namespace momoney.presentation.views
-{
- public interface IDialog<Presenter> : IView<Presenter> where Presenter : DialogPresenter
- {
- }
-}
\ No newline at end of file
product/client/presentation/Views/IDockedContentView.cs
@@ -1,9 +1,9 @@
-using WeifenLuo.WinFormsUI.Docking;
-
-namespace momoney.presentation.views
-{
- public interface IDockedContentView : IDockContent, IView
- {
- void add_to(DockPanel panel);
- }
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace momoney.presentation.views
+{
+ public interface IDockedContentView : IDockContent, View
+ {
+ void add_to(DockPanel panel);
+ }
}
\ No newline at end of file
product/client/presentation/Views/IGettingStartedView.cs
@@ -1,9 +1,9 @@
-using momoney.presentation.presenters;
-
-namespace momoney.presentation.views
-{
- public interface IGettingStartedView : IDockedContentView,
- IView<GettingStartedPresenter>
- {
- }
+using momoney.presentation.presenters;
+
+namespace momoney.presentation.views
+{
+ public interface IGettingStartedView : IDockedContentView,
+ View<GettingStartedPresenter>
+ {
+ }
}
\ No newline at end of file
product/client/presentation/Views/ILogFileView.cs
@@ -1,9 +1,10 @@
-using gorilla.commons.utility;
-
-namespace momoney.presentation.views
-{
- public interface ILogFileView : IDockedContentView, Callback<string>
- {
- void display(string file_path);
- }
+using gorilla.commons.utility;
+using momoney.presentation.presenters;
+
+namespace momoney.presentation.views
+{
+ public interface ILogFileView : IDockedContentView, Callback<string>, View<LogFilePresenter>
+ {
+ void display(string file_path);
+ }
}
\ No newline at end of file
product/client/presentation/Views/IMainMenuView.cs
@@ -1,10 +1,11 @@
-using momoney.presentation.presenters;
-using momoney.presentation.views;
-
-namespace MoMoney.Presentation.Views
-{
- public interface IMainMenuView : IDockedContentView
- {
- void add(IActionTaskPaneFactory factory);
- }
+using momoney.presentation.presenters;
+using MoMoney.Presentation.Presenters;
+using momoney.presentation.views;
+
+namespace MoMoney.Presentation.Views
+{
+ public interface IMainMenuView : IDockedContentView, View<MainMenuPresenter>
+ {
+ void add(IActionTaskPaneFactory factory);
+ }
}
\ No newline at end of file
product/client/presentation/Views/IReportViewer.cs
@@ -1,10 +1,10 @@
-using MoMoney.Presentation.Model.reporting;
-using momoney.presentation.views;
-
-namespace MoMoney.Presentation.Views
-{
- public interface IReportViewer : IDockedContentView
- {
- void display(IReport report);
- }
+using MoMoney.Presentation.Model.reporting;
+using momoney.presentation.views;
+
+namespace MoMoney.Presentation.Views
+{
+ public interface IReportViewer : IDockedContentView
+ {
+ void display(IReport report);
+ }
}
\ No newline at end of file
product/client/presentation/Views/ISaveChangesView.cs
@@ -1,9 +1,9 @@
-using MoMoney.Presentation.Model.Menu.File;
-
-namespace momoney.presentation.views
-{
- public interface ISaveChangesView : IDialog<SaveChangesPresenter>
- {
- void prompt_user_to_save();
- }
+using MoMoney.Presentation.Model.Menu.File;
+
+namespace momoney.presentation.views
+{
+ public interface ISaveChangesView : Dialog<SaveChangesPresenter>
+ {
+ void prompt_user_to_save();
+ }
}
\ No newline at end of file
product/client/presentation/Views/IUnhandledErrorView.cs
@@ -1,10 +1,10 @@
-using System;
-using momoney.presentation.presenters;
-
-namespace momoney.presentation.views
-{
- public interface IUnhandledErrorView : IView<UnhandledErrorPresenter>
- {
- void display(Exception exception);
- }
+using System;
+using momoney.presentation.presenters;
+
+namespace momoney.presentation.views
+{
+ public interface IUnhandledErrorView : Dialog<UnhandledErrorPresenter>
+ {
+ void display(Exception exception);
+ }
}
\ No newline at end of file
product/client/presentation/Views/IView.cs
@@ -1,14 +0,0 @@
-using System;
-using System.ComponentModel;
-
-namespace momoney.presentation.views
-{
- public interface IView : ISynchronizeInvoke, IDisposable
- {
- }
-
- public interface IView<Presenter> : IView where Presenter : MoMoney.Presentation.Core.Presenter
- {
- void attach_to(Presenter presenter);
- }
-}
\ No newline at end of file
product/client/presentation/Views/IViewAllBills.cs
@@ -1,14 +1,14 @@
-using System.Collections.Generic;
-using gorilla.commons.utility;
-using MoMoney.DTO;
-using momoney.presentation.presenters;
-using momoney.presentation.views;
-
-namespace MoMoney.Presentation.Views
-{
- public interface IViewAllBills : IDockedContentView,
- IView<ViewAllBillsPresenter>,
- Callback<IEnumerable<BillInformationDTO>>
- {
- }
+using System.Collections.Generic;
+using gorilla.commons.utility;
+using MoMoney.DTO;
+using momoney.presentation.presenters;
+using momoney.presentation.views;
+
+namespace MoMoney.Presentation.Views
+{
+ public interface IViewAllBills : IDockedContentView,
+ View<ViewAllBillsPresenter>,
+ Callback<IEnumerable<BillInformationDTO>>
+ {
+ }
}
\ No newline at end of file
product/client/presentation/Views/IViewIncomeHistory.cs
@@ -1,15 +1,15 @@
-using System.Collections.Generic;
-using gorilla.commons.utility;
-using MoMoney.DTO;
-using MoMoney.Presentation.Presenters;
-using momoney.presentation.views;
-
-namespace MoMoney.Presentation.Views
-{
- public interface IViewIncomeHistory : IDockedContentView,
- IView<ViewIncomeHistoryPresenter>,
- Callback<IEnumerable<IncomeInformationDTO>>
-
- {
- }
+using System.Collections.Generic;
+using gorilla.commons.utility;
+using MoMoney.DTO;
+using MoMoney.Presentation.Presenters;
+using momoney.presentation.views;
+
+namespace MoMoney.Presentation.Views
+{
+ public interface IViewIncomeHistory : IDockedContentView,
+ View<ViewIncomeHistoryPresenter>,
+ Callback<IEnumerable<IncomeInformationDTO>>
+
+ {
+ }
}
\ No newline at end of file
product/client/presentation/Views/View.cs
@@ -0,0 +1,14 @@
+using System;
+using System.ComponentModel;
+
+namespace momoney.presentation.views
+{
+ public interface View : ISynchronizeInvoke, IDisposable
+ {
+ }
+
+ public interface View<Presenter> : View where Presenter : MoMoney.Presentation.Core.Presenter
+ {
+ void attach_to(Presenter presenter);
+ }
+}
\ No newline at end of file
product/client/presentation/Winforms/Helpers/BitmapRegion.cs
@@ -1,125 +1,125 @@
-using System.Drawing;
-using System.Drawing.Drawing2D;
-using System.Windows.Forms;
-
-namespace MoMoney.Presentation.Winforms.Helpers
-{
- public static class BitmapRegion
- {
- /// <summary>
- /// create and apply the region on the supplied control
- /// </summary>
- /// <param name="control">The Control object to apply the region to</param>
- /// <param name="bitmap">The Bitmap object to create the region from</param>
- public static void CreateControlRegion(Control control, Bitmap bitmap)
- {
- // Return if control and bitmap are null
- if (control == null || bitmap == null)
- return;
-
- // Set our control's size to be the same as the bitmap + 6 pixels so that the borders don't affect it.
- control.Width = bitmap.Width;
- control.Height = bitmap.Height;
-
- // Check if we are dealing with Form here
- if (control is Form)
- {
- // Cast to a Form object
- var form = (Form) control;
-
- // Set our form's size to be a little larger that the bitmap just
- // in case the form's border style is not set to none in the first place
- form.Width += 15;
- form.Height += 35;
-
- // No border
- form.FormBorderStyle = FormBorderStyle.None;
-
- // Set bitmap as the background image
- form.BackgroundImage = bitmap;
-
- // Calculate the graphics path based on the bitmap supplied
- var graphicsPath = CalculateControlGraphicsPath(bitmap);
-
- // Apply new region
- form.Region = new Region(graphicsPath);
- }
-
- // Check if we are dealing with Button here
- else if (control is Button)
- {
- // Cast to a button object
- var button = (Button) control;
-
- // Do not show button text
- button.Text = "";
-
- // Change cursor to hand when over button
- button.Cursor = Cursors.Hand;
-
- // Set background image of button
- button.BackgroundImage = bitmap;
-
- // Calculate the graphics path based on the bitmap supplied
- var graphicsPath = CalculateControlGraphicsPath(bitmap);
-
- // Apply new region
- button.Region = new Region(graphicsPath);
- }
- }
-
- /// <summary>
- /// Calculate the graphics path that representing the figure in the bitmap
- /// excluding the transparent color which is the top left pixel.
- /// </summary>
- /// <param name="bitmap">The Bitmap object to calculate our graphics path from</param>
- /// <returns>Calculated graphics path</returns>
- static GraphicsPath CalculateControlGraphicsPath(Bitmap bitmap)
- {
- // create GraphicsPath for our bitmap calculation
- var graphicsPath = new GraphicsPath();
-
- // Use the top left pixel as our transparent color
- var colorTransparent = bitmap.GetPixel(0, 0);
-
- // This is to store the column value where an opaque pixel is first found.
- // This value will determine where we start scanning for trailing opaque pixels.
- var colOpaquePixel = 0;
-
- // Go through all rows (Y axis)
- for (var row = 0; row < bitmap.Height; row ++)
- {
- // Reset value
- colOpaquePixel = 0;
-
- // Go through all columns (X axis)
- for (var col = 0; col < bitmap.Width; col ++)
- {
- // If this is an opaque pixel, mark it and search for anymore trailing behind
- if (bitmap.GetPixel(col, row) != colorTransparent)
- {
- // Opaque pixel found, mark current position
- colOpaquePixel = col;
-
- // create another variable to set the current pixel position
- var colNext = col;
-
- // Starting from current found opaque pixel, search for anymore opaque pixels
- // trailing behind, until a transparent pixel is found or minimum width is reached
- for (colNext = colOpaquePixel; colNext < bitmap.Width; colNext ++)
- if (bitmap.GetPixel(colNext, row) == colorTransparent)
- break;
-
- // Form a rectangle for line of opaque pixels found and add it to our graphics path
- graphicsPath.AddRectangle(new Rectangle(colOpaquePixel, row, colNext - colOpaquePixel, 1));
-
- // No need to scan the line of opaque pixels just found
- col = colNext;
- }
- }
- }
- // Return calculated graphics path
- return graphicsPath;
- }
- }
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Windows.Forms;
+
+namespace MoMoney.Presentation.Winforms.Helpers
+{
+ public static class BitmapRegion
+ {
+ /// <summary>
+ /// create and apply the region on the supplied control
+ /// </summary>
+ /// <param name="control">The Control object to apply the region to</param>
+ /// <param name="bitmap">The Bitmap object to create the region from</param>
+ public static void CreateControlRegion(Control control, Bitmap bitmap)
+ {
+ // Return if control and bitmap are null
+ if (control == null || bitmap == null)
+ return;
+
+ // Set our control's size to be the same as the bitmap + 6 pixels so that the borders don't affect it.
+ control.Width = bitmap.Width;
+ control.Height = bitmap.Height;
+
+ // Check if we are dealing with Form here
+ if (control is Form)
+ {
+ // Cast to a Form object
+ var form = (Form) control;
+
+ // Set our form's size to be a little larger that the bitmap just
+ // in case the form's border style is not set to none in the first place
+ form.Width += 15;
+ form.Height += 35;
+
+ // No border
+ form.FormBorderStyle = FormBorderStyle.None;
+
+ // Set bitmap as the background image
+ form.BackgroundImage = bitmap;
+
+ // Calculate the graphics path based on the bitmap supplied
+ var graphicsPath = CalculateControlGraphicsPath(bitmap);
+
+ // Apply new region
+ form.Region = new Region(graphicsPath);
+ }
+
+ // Check if we are dealing with Button here
+ else if (control is Button)
+ {
+ // Cast to a button object
+ var button = (Button) control;
+
+ // Do not show button text
+ button.Text = "";
+
+ // Change cursor to hand when over button
+ button.Cursor = Cursors.Hand;
+
+ // Set background image of button
+ button.BackgroundImage = bitmap;
+
+ // Calculate the graphics path based on the bitmap supplied
+ var graphicsPath = CalculateControlGraphicsPath(bitmap);
+
+ // Apply new region
+ button.Region = new Region(graphicsPath);
+ }
+ }
+
+ /// <summary>
+ /// Calculate the graphics path that representing the figure in the bitmap
+ /// excluding the transparent color which is the top left pixel.
+ /// </summary>
+ /// <param name="bitmap">The Bitmap object to calculate our graphics path from</param>
+ /// <returns>Calculated graphics path</returns>
+ static GraphicsPath CalculateControlGraphicsPath(Bitmap bitmap)
+ {
+ // create GraphicsPath for our bitmap calculation
+ var graphicsPath = new GraphicsPath();
+
+ // Use the top left pixel as our transparent color
+ var colorTransparent = bitmap.GetPixel(0, 0);
+
+ // This is to store the column value where an opaque pixel is first found.
+ // This value will determine where we start scanning for trailing opaque pixels.
+ var colOpaquePixel = 0;
+
+ // Go through all rows (Y axis)
+ for (var row = 0; row < bitmap.Height; row ++)
+ {
+ // Reset value
+ colOpaquePixel = 0;
+
+ // Go through all columns (X axis)
+ for (var col = 0; col < bitmap.Width; col ++)
+ {
+ // If this is an opaque pixel, mark it and search for anymore trailing behind
+ if (bitmap.GetPixel(col, row) != colorTransparent)
+ {
+ // Opaque pixel found, mark current position
+ colOpaquePixel = col;
+
+ // create another variable to set the current pixel position
+ var colNext = col;
+
+ // Starting from current found opaque pixel, search for anymore opaque pixels
+ // trailing behind, until a transparent pixel is found or minimum width is reached
+ for (colNext = colOpaquePixel; colNext < bitmap.Width; colNext ++)
+ if (bitmap.GetPixel(colNext, row) == colorTransparent)
+ break;
+
+ // Form a rectangle for line of opaque pixels found and add it to our graphics path
+ graphicsPath.AddRectangle(new Rectangle(colOpaquePixel, row, colNext - colOpaquePixel, 1));
+
+ // No need to scan the line of opaque pixels just found
+ col = colNext;
+ }
+ }
+ }
+ // Return calculated graphics path
+ return graphicsPath;
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Winforms/Helpers/SuspendLayout.cs
@@ -1,21 +1,21 @@
-using System;
-using System.Windows.Forms;
-
-namespace MoMoney.Presentation.Winforms.Helpers
-{
- public class SuspendLayout : IDisposable
- {
- readonly Control control;
-
- public SuspendLayout(Control control)
- {
- this.control = control;
- control.SuspendLayout();
- }
-
- public void Dispose()
- {
- control.ResumeLayout();
- }
- }
+using System;
+using System.Windows.Forms;
+
+namespace MoMoney.Presentation.Winforms.Helpers
+{
+ public class SuspendLayout : IDisposable
+ {
+ readonly Control control;
+
+ public SuspendLayout(Control control)
+ {
+ this.control = control;
+ control.SuspendLayout();
+ }
+
+ public void Dispose()
+ {
+ control.ResumeLayout();
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Winforms/Views/AboutTheApplicationView.cs
@@ -1,32 +1,37 @@
-using System;
-using System.Reflection;
-using gorilla.commons.utility;
-using momoney.presentation.views;
-using MoMoney.Presentation.Winforms.Resources;
-
-namespace MoMoney.Presentation.Winforms.Views
-{
- public partial class AboutTheApplicationView : ApplicationDockedWindow, IAboutApplicationView
- {
- public AboutTheApplicationView()
- {
- InitializeComponent();
- }
-
- protected override void OnLoad(EventArgs e)
- {
- var assembly = GetType().Assembly;
- labelProductName.Text = assembly.get_attribute<AssemblyProductAttribute>().Product;
- labelVersion.Text = string.Format("Version {0} {0}", assembly_version);
- uxCopyright.Text = assembly.get_attribute<AssemblyCopyrightAttribute>().Copyright;
- uxCompanyName.Text = assembly.get_attribute<AssemblyCompanyAttribute>().Company;
- uxDescription.Text = assembly.get_attribute<AssemblyDescriptionAttribute>().Description;
- ux_logo.Image = ApplicationImages.Splash;
- }
-
- string assembly_version
- {
- get { return GetType().Assembly.GetName().Version.ToString(); }
- }
- }
+using System;
+using System.Reflection;
+using gorilla.commons.utility;
+using momoney.presentation.presenters;
+using momoney.presentation.views;
+using MoMoney.Presentation.Winforms.Resources;
+
+namespace MoMoney.Presentation.Winforms.Views
+{
+ public partial class AboutTheApplicationView : ApplicationDockedWindow, IAboutApplicationView
+ {
+ public AboutTheApplicationView()
+ {
+ InitializeComponent();
+ }
+
+ protected override void OnLoad(EventArgs e)
+ {
+ var assembly = GetType().Assembly;
+ labelProductName.Text = assembly.get_attribute<AssemblyProductAttribute>().Product;
+ labelVersion.Text = string.Format("Version {0} {0}", assembly_version);
+ uxCopyright.Text = assembly.get_attribute<AssemblyCopyrightAttribute>().Copyright;
+ uxCompanyName.Text = assembly.get_attribute<AssemblyCompanyAttribute>().Company;
+ uxDescription.Text = assembly.get_attribute<AssemblyDescriptionAttribute>().Description;
+ ux_logo.Image = ApplicationImages.Splash;
+ }
+
+ string assembly_version
+ {
+ get { return GetType().Assembly.GetName().Version.ToString(); }
+ }
+
+ public void attach_to(AboutTheApplicationPresenter presenter)
+ {
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Winforms/Views/AddCompanyView.cs
@@ -1,54 +1,55 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Windows.Forms;
-using Gorilla.Commons.Infrastructure.Logging;
-using MoMoney.DTO;
-using MoMoney.Presentation.Presenters;
-using momoney.presentation.views;
-using MoMoney.Presentation.Views;
-using MoMoney.Presentation.Winforms.Databinding;
-using MoMoney.Presentation.Winforms.Resources;
-using gorilla.commons.utility;
-
-namespace MoMoney.Presentation.Winforms.Views
-{
- public partial class AddCompanyView : ApplicationDockedWindow, IAddCompanyView
- {
- ControlAction<EventArgs> submit_button = x => {};
- readonly RegisterNewCompany dto;
-
- public AddCompanyView()
- {
- InitializeComponent();
- titled("Add A Company")
- .icon(ApplicationIcons.AddCompany);
- dto = new RegisterNewCompany();
-
- companiesListView.View = View.LargeIcon;
- companiesListView.LargeImageList = new ImageList();
- ApplicationIcons.all().each(x => companiesListView.LargeImageList.Images.Add(x.name_of_the_icon, x));
- companiesListView.Columns.Add("Name");
-
- ux_submit_button.Click += (x, y) => submit_button(y);
- ux_cancel_button.Click += (x, y) => Close();
- }
-
- public void attach_to(AddCompanyPresenter presenter)
- {
- this.log().debug("attaching add company presenter");
- ux_company_name.bind_to(dto, x => x.company_name);
- submit_button = x =>
- {
- this.log().debug("clicked on submit button");
- presenter.submit(dto);
- };
- }
-
- public void run(IEnumerable<CompanyDTO> companies)
- {
- companiesListView.Items.Clear();
- companiesListView.Items.AddRange(companies.Select(x => new ListViewItem(x.name, 0)).ToArray());
- }
- }
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows.Forms;
+using Gorilla.Commons.Infrastructure.Logging;
+using MoMoney.DTO;
+using MoMoney.Presentation.Presenters;
+using momoney.presentation.views;
+using MoMoney.Presentation.Views;
+using MoMoney.Presentation.Winforms.Databinding;
+using MoMoney.Presentation.Winforms.Resources;
+using gorilla.commons.utility;
+using View = System.Windows.Forms.View;
+
+namespace MoMoney.Presentation.Winforms.Views
+{
+ public partial class AddCompanyView : ApplicationDockedWindow, IAddCompanyView
+ {
+ ControlAction<EventArgs> submit_button = x => {};
+ readonly RegisterNewCompany dto;
+
+ public AddCompanyView()
+ {
+ InitializeComponent();
+ titled("Add A Company")
+ .icon(ApplicationIcons.AddCompany);
+ dto = new RegisterNewCompany();
+
+ companiesListView.View = View.LargeIcon;
+ companiesListView.LargeImageList = new ImageList();
+ ApplicationIcons.all().each(x => companiesListView.LargeImageList.Images.Add(x.name_of_the_icon, x));
+ companiesListView.Columns.Add("Name");
+
+ ux_submit_button.Click += (x, y) => submit_button(y);
+ ux_cancel_button.Click += (x, y) => Close();
+ }
+
+ public void attach_to(AddCompanyPresenter presenter)
+ {
+ this.log().debug("attaching add company presenter");
+ ux_company_name.bind_to(dto, x => x.company_name);
+ submit_button = x =>
+ {
+ this.log().debug("clicked on submit button");
+ presenter.submit(dto);
+ };
+ }
+
+ public void run(IEnumerable<CompanyDTO> companies)
+ {
+ companiesListView.Items.Clear();
+ companiesListView.Items.AddRange(companies.Select(x => new ListViewItem(x.name, 0)).ToArray());
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Winforms/Views/ApplicationDockedWindow.cs
@@ -1,92 +1,91 @@
-using System.Linq;
-using System.Windows.Forms;
-using gorilla.commons.utility;
-using MoMoney.Presentation.Views;
-using MoMoney.Presentation.Winforms.Helpers;
-using MoMoney.Presentation.Winforms.Resources;
-using WeifenLuo.WinFormsUI.Docking;
-
-namespace MoMoney.Presentation.Winforms.Views
-{
- public partial class ApplicationDockedWindow : DockContent, IApplicationDockedWindow
- {
- DockState dock_state;
-
- public ApplicationDockedWindow()
- {
- InitializeComponent();
- Icon = ApplicationIcons.Application;
- dock_state = DockState.Document;
- HideOnClose = true;
- }
-
- public IApplicationDockedWindow create_tool_tip_for(string title, string caption, Control control)
- {
- var tip = new ToolTip {IsBalloon = true, ToolTipTitle = title};
- tip.SetToolTip(control, caption);
- control.Controls.Add(new ControlAdapter(tip));
- return this;
- }
-
- public IApplicationDockedWindow titled(string title, params object[] arguments)
- {
- TabText = title.formatted_using(arguments);
- return this;
- }
-
- public IApplicationDockedWindow icon(ApplicationIcon icon)
- {
- Icon = icon;
- return this;
- }
-
- public IApplicationDockedWindow cannot_be_closed()
- {
- CloseButton = false;
- CloseButtonVisible = false;
- return this;
- }
-
- public IApplicationDockedWindow docked_to(DockState state)
- {
- dock_state = state;
- return this;
- }
-
- public void add_to(DockPanel panel)
- {
- using (new SuspendLayout(panel))
- {
- //if (window_is_already_contained_in(panel))
- // remove_from(panel);
-
- Show(panel, dock_state);
- }
- }
-
- //void remove_from(DockPanel panel)
- //{
- // using (new SuspendLayout(panel))
- // {
- // //var panel_to_remove = get_window_from(panel);
- // //panel_to_remove.DockHandler.Close();
- // //panel_to_remove.DockHandler.Dispose();
- // }
- //}
-
- //IDockContent get_window_from(DockPanel panel)
- //{
- // return panel.Documents.Single(matches);
- //}
-
- //bool window_is_already_contained_in(DockPanel panel)
- //{
- // return panel.Documents.Count(matches) > 0;
- //}
-
- //bool matches(IDockContent x)
- //{
- // return x.DockHandler.TabText.Equals(TabText);
- //}
- }
+using System.Windows.Forms;
+using gorilla.commons.utility;
+using MoMoney.Presentation.Views;
+using MoMoney.Presentation.Winforms.Helpers;
+using MoMoney.Presentation.Winforms.Resources;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace MoMoney.Presentation.Winforms.Views
+{
+ public partial class ApplicationDockedWindow : DockContent, IApplicationDockedWindow
+ {
+ DockState dock_state;
+
+ public ApplicationDockedWindow()
+ {
+ InitializeComponent();
+ Icon = ApplicationIcons.Application;
+ dock_state = DockState.Document;
+ HideOnClose = true;
+ }
+
+ public IApplicationDockedWindow create_tool_tip_for(string title, string caption, Control control)
+ {
+ var tip = new ToolTip {IsBalloon = true, ToolTipTitle = title};
+ tip.SetToolTip(control, caption);
+ control.Controls.Add(new ControlAdapter(tip));
+ return this;
+ }
+
+ public IApplicationDockedWindow titled(string title, params object[] arguments)
+ {
+ TabText = title.formatted_using(arguments);
+ return this;
+ }
+
+ public IApplicationDockedWindow icon(ApplicationIcon icon)
+ {
+ Icon = icon;
+ return this;
+ }
+
+ public IApplicationDockedWindow cannot_be_closed()
+ {
+ CloseButton = false;
+ CloseButtonVisible = false;
+ return this;
+ }
+
+ public IApplicationDockedWindow docked_to(DockState state)
+ {
+ dock_state = state;
+ return this;
+ }
+
+ public void add_to(DockPanel panel)
+ {
+ using (new SuspendLayout(panel))
+ {
+ //if (window_is_already_contained_in(panel))
+ // remove_from(panel);
+
+ Show(panel, dock_state);
+ }
+ }
+
+ //void remove_from(DockPanel panel)
+ //{
+ // using (new SuspendLayout(panel))
+ // {
+ // //var panel_to_remove = get_window_from(panel);
+ // //panel_to_remove.DockHandler.Close();
+ // //panel_to_remove.DockHandler.Dispose();
+ // }
+ //}
+
+ //IDockContent get_window_from(DockPanel panel)
+ //{
+ // return panel.Documents.Single(matches);
+ //}
+
+ //bool window_is_already_contained_in(DockPanel panel)
+ //{
+ // return panel.Documents.Count(matches) > 0;
+ //}
+
+ //bool matches(IDockContent x)
+ //{
+ // return x.DockHandler.TabText.Equals(TabText);
+ //}
+ }
}
\ No newline at end of file
product/client/presentation/Winforms/Views/ApplicationShell.cs
@@ -1,80 +1,83 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.ComponentModel.Composition;
-using System.Windows.Forms;
-using gorilla.commons.utility;
-using momoney.presentation.presenters;
-using momoney.presentation.views;
-using MoMoney.Presentation.Views;
-using MoMoney.Presentation.Winforms.Helpers;
-
-namespace MoMoney.Presentation.Winforms.Views
-{
- [Export(typeof (Shell))]
- public partial class ApplicationShell : ApplicationWindow, Shell
- {
- readonly IDictionary<string, IComponent> regions;
- ControlAction<EventArgs> closed_action = x => { };
-
- public ApplicationShell()
- {
- InitializeComponent();
- regions = new Dictionary<string, IComponent>
- {
- {GetType().FullName, this},
- {typeof (Form).FullName, this},
- {ux_main_menu_strip.GetType().FullName, ux_main_menu_strip},
- {ux_dock_panel.GetType().FullName, ux_dock_panel},
- {ux_tool_bar_strip.GetType().FullName, ux_tool_bar_strip},
- {ux_status_bar.GetType().FullName, ux_status_bar},
- {notification_icon.GetType().FullName, notification_icon},
- {status_bar_label.GetType().FullName, status_bar_label},
- {status_bar_progress_bar.GetType().FullName, status_bar_progress_bar}
- };
- Closed += (o, e) => closed_action(e);
- }
-
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
- try_to_reduce_flickering();
- }
-
- public void attach_to(ApplicationShellPresenter presenter)
- {
- closed_action = x => presenter.shut_down();
- }
-
- public void add(IDockedContentView view)
- {
- view.add_to(ux_dock_panel);
- }
-
- public void region<Region>(Action<Region> action) where Region : IComponent
- {
- ensure_that_the_region_exists<Region>();
- action(regions[typeof (Region).FullName].downcast_to<Region>());
- }
-
- public void close_the_active_window()
- {
- ux_dock_panel.ActiveDocument.DockHandler.Close();
- }
-
- public void close_all_windows()
- {
- using (new SuspendLayout(ux_dock_panel))
- while (ux_dock_panel.Contents.Count > 0)
- {
- ux_dock_panel.Contents[0].DockHandler.Close();
- }
- }
-
- void ensure_that_the_region_exists<T>()
- {
- if (!regions.ContainsKey(typeof (T).FullName))
- throw new Exception("Could not find region: {0}".formatted_using(typeof (T)));
- }
- }
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.ComponentModel.Composition;
+using System.Linq;
+using System.Windows.Forms;
+using gorilla.commons.utility;
+using momoney.presentation.presenters;
+using momoney.presentation.views;
+using MoMoney.Presentation.Views;
+using MoMoney.Presentation.Winforms.Helpers;
+
+namespace MoMoney.Presentation.Winforms.Views
+{
+ [Export(typeof (Shell))]
+ public partial class ApplicationShell : ApplicationWindow, Shell
+ {
+ readonly IDictionary<string, IComponent> regions;
+ ControlAction<EventArgs> closed_action = x => { };
+
+ public ApplicationShell()
+ {
+ InitializeComponent();
+ regions = new Dictionary<string, IComponent>
+ {
+ {GetType().FullName, this},
+ {typeof (Form).FullName, this},
+ {ux_main_menu_strip.GetType().FullName, ux_main_menu_strip},
+ {ux_dock_panel.GetType().FullName, ux_dock_panel},
+ {ux_tool_bar_strip.GetType().FullName, ux_tool_bar_strip},
+ {ux_status_bar.GetType().FullName, ux_status_bar},
+ {notification_icon.GetType().FullName, notification_icon},
+ {status_bar_label.GetType().FullName, status_bar_label},
+ {status_bar_progress_bar.GetType().FullName, status_bar_progress_bar}
+ };
+ Closed += (o, e) => closed_action(e);
+ }
+
+ protected override void OnLoad(EventArgs e)
+ {
+ base.OnLoad(e);
+ try_to_reduce_flickering();
+ }
+
+ public void attach_to(ApplicationShellPresenter presenter)
+ {
+ closed_action = x => presenter.shut_down();
+ }
+
+ public void add(IDockedContentView view)
+ {
+ view.add_to(ux_dock_panel);
+ }
+
+ public void region<Region>(Action<Region> action) where Region : IComponent
+ {
+ ensure_that_the_region_exists<Region>();
+ action(regions[typeof (Region).FullName].downcast_to<Region>());
+ }
+
+ public void close_the_active_window()
+ {
+ //ux_dock_panel.ActiveDocument.DockHandler.Hide();
+ //ux_dock_panel.ActiveDocument.DockHandler.Close();
+ }
+
+ public void close_all_windows()
+ {
+ using (new SuspendLayout(ux_dock_panel))
+ while (ux_dock_panel.Contents.Count > 0)
+ {
+ ux_dock_panel.Contents[0].DockHandler.Hide();
+ //ux_dock_panel.Contents[0].DockHandler.Close();
+ }
+ }
+
+ void ensure_that_the_region_exists<T>()
+ {
+ if (!regions.ContainsKey(typeof (T).FullName))
+ throw new Exception("Could not find region: {0}".formatted_using(typeof (T)));
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Winforms/Views/LogFileView.cs
@@ -1,24 +1,27 @@
-using momoney.presentation.views;
-using MoMoney.Presentation.Winforms.Resources;
-
-namespace MoMoney.Presentation.Winforms.Views
-{
- public partial class LogFileView : ApplicationDockedWindow, ILogFileView
- {
- public LogFileView()
- {
- InitializeComponent();
- }
-
- public void display(string file_path)
- {
- titled("Log File - {0}", file_path)
- .icon(ApplicationIcons.ViewLog);
- }
-
- public void run(string file_contents)
- {
- ux_log_file.Text = file_contents;
- }
- }
+using momoney.presentation.presenters;
+using momoney.presentation.views;
+using MoMoney.Presentation.Winforms.Resources;
+
+namespace MoMoney.Presentation.Winforms.Views
+{
+ public partial class LogFileView : ApplicationDockedWindow, ILogFileView
+ {
+ public LogFileView()
+ {
+ InitializeComponent();
+ }
+
+ public void display(string file_path)
+ {
+ titled("Log File - {0}", file_path)
+ .icon(ApplicationIcons.ViewLog);
+ }
+
+ public void run(string file_contents)
+ {
+ ux_log_file.Text = file_contents;
+ }
+
+ public void attach_to(LogFilePresenter presenter) {}
+ }
}
\ No newline at end of file
product/client/presentation/Winforms/Views/MainMenuView.cs
@@ -1,28 +1,33 @@
-using momoney.presentation.presenters;
-using MoMoney.Presentation.Views;
-using MoMoney.Presentation.Winforms.Helpers;
-using MoMoney.Presentation.Winforms.Resources;
-using WeifenLuo.WinFormsUI.Docking;
-
-namespace MoMoney.Presentation.Winforms.Views
-{
- public partial class MainMenuView : ApplicationDockedWindow, IMainMenuView
- {
- public MainMenuView()
- {
- InitializeComponent();
-
- titled("Main Menu")
- .icon(ApplicationIcons.FileExplorer)
- .cannot_be_closed()
- .docked_to(DockState.DockLeft);
-
- ux_system_task_pane.UseClassicTheme();
- }
-
- public void add(IActionTaskPaneFactory factory)
- {
- using (ux_system_task_pane.suspend_layout()) ux_system_task_pane.Expandos.Add(factory.create());
- }
- }
+using momoney.presentation.presenters;
+using MoMoney.Presentation.Presenters;
+using MoMoney.Presentation.Views;
+using MoMoney.Presentation.Winforms.Helpers;
+using MoMoney.Presentation.Winforms.Resources;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace MoMoney.Presentation.Winforms.Views
+{
+ public partial class MainMenuView : ApplicationDockedWindow, IMainMenuView
+ {
+ public MainMenuView()
+ {
+ InitializeComponent();
+
+ titled("Main Menu")
+ .icon(ApplicationIcons.FileExplorer)
+ .cannot_be_closed()
+ .docked_to(DockState.DockLeft);
+
+ ux_system_task_pane.UseClassicTheme();
+ }
+
+ public void add(IActionTaskPaneFactory factory)
+ {
+ using (ux_system_task_pane.suspend_layout()) ux_system_task_pane.Expandos.Add(factory.create());
+ }
+
+ public void attach_to(MainMenuPresenter presenter)
+ {
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Winforms/Views/ReportViewer.cs
@@ -1,23 +1,23 @@
-using DataDynamics.ActiveReports;
-using gorilla.commons.utility;
-using MoMoney.Presentation.Model.reporting;
-using MoMoney.Presentation.Views;
-
-namespace MoMoney.Presentation.Winforms.Views
-{
- public partial class ReportViewer : ApplicationDockedWindow, IReportViewer
- {
- public ReportViewer()
- {
- InitializeComponent();
- }
-
- public void display(IReport report)
- {
- var the_active_report = report.downcast_to<ActiveReport>();
- the_active_report.Run();
- ux_report_viewer.Document = the_active_report.Document;
- titled(report.name);
- }
- }
+using DataDynamics.ActiveReports;
+using gorilla.commons.utility;
+using MoMoney.Presentation.Model.reporting;
+using MoMoney.Presentation.Views;
+
+namespace MoMoney.Presentation.Winforms.Views
+{
+ public partial class ReportViewer : ApplicationDockedWindow, IReportViewer
+ {
+ public ReportViewer()
+ {
+ InitializeComponent();
+ }
+
+ public void display(IReport report)
+ {
+ var the_active_report = report.downcast_to<ActiveReport>();
+ the_active_report.Run();
+ ux_report_viewer.Document = the_active_report.Document;
+ titled(report.name);
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Winforms/Views/SaveChangesView.cs
@@ -1,59 +1,59 @@
-using System;
-using System.ComponentModel;
-using System.Windows.Forms;
-using MoMoney.Presentation.Model.Menu.File;
-using momoney.presentation.views;
-using MoMoney.Presentation.Winforms.Resources;
-
-namespace MoMoney.Presentation.Winforms.Views
-{
- public partial class SaveChangesView : ApplicationWindow, ISaveChangesView
- {
- readonly IWin32Window window;
- bool can_be_closed;
- ControlAction<EventArgs> save_action = x => { };
- ControlAction<EventArgs> do_not_save_action = x => { };
- ControlAction<EventArgs> cancel_action = x => { };
- ControlAction<CancelEventArgs> closing_action = x => { };
-
- public SaveChangesView(IWin32Window window)
- {
- this.window = window;
- InitializeComponent();
- ux_image.Image = ApplicationImages.Splash;
- ux_image.SizeMode = PictureBoxSizeMode.StretchImage;
-
- titled("Unsaved Changes")
- .create_tool_tip_for("Save", "Save the document, and then close it.", save_button)
- .create_tool_tip_for("Don't Save", "Discard any unsaved changes.", do_not_save_button)
- .create_tool_tip_for("Cancel", "Go back.", cancel_button);
-
- save_button.Click += (sender, e) => save_action(e);
- do_not_save_button.Click += (sender, e) => do_not_save_action(e);
- cancel_button.Click += (sender, e) => cancel_action(e);
- Closing += (sender, e) => closing_action(e);
- }
-
- public void attach_to(SaveChangesPresenter presenter)
- {
- can_be_closed = false;
- save_action = x => { execute(presenter.save); };
- do_not_save_action = x => { execute(presenter.dont_save); };
- cancel_action = x => { execute(presenter.cancel); };
- closing_action = x => { if (!can_be_closed) presenter.cancel(); };
- }
-
- public void prompt_user_to_save()
- {
- ShowDialog(window);
- }
-
- void execute(Action action)
- {
- can_be_closed = true;
- Hide();
- Close();
- action();
- }
- }
+using System;
+using System.ComponentModel;
+using System.Windows.Forms;
+using MoMoney.Presentation.Model.Menu.File;
+using momoney.presentation.views;
+using MoMoney.Presentation.Winforms.Resources;
+
+namespace MoMoney.Presentation.Winforms.Views
+{
+ public partial class SaveChangesView : ApplicationWindow, ISaveChangesView
+ {
+ readonly IWin32Window window;
+ bool can_be_closed;
+ ControlAction<EventArgs> save_action = x => { };
+ ControlAction<EventArgs> do_not_save_action = x => { };
+ ControlAction<EventArgs> cancel_action = x => { };
+ ControlAction<CancelEventArgs> closing_action = x => { };
+
+ public SaveChangesView(IWin32Window window)
+ {
+ this.window = window;
+ InitializeComponent();
+ ux_image.Image = ApplicationImages.Splash;
+ ux_image.SizeMode = PictureBoxSizeMode.StretchImage;
+
+ titled("Unsaved Changes")
+ .create_tool_tip_for("Save", "Save the document, and then close it.", save_button)
+ .create_tool_tip_for("Don't Save", "Discard any unsaved changes.", do_not_save_button)
+ .create_tool_tip_for("Cancel", "Go back.", cancel_button);
+
+ save_button.Click += (sender, e) => save_action(e);
+ do_not_save_button.Click += (sender, e) => do_not_save_action(e);
+ cancel_button.Click += (sender, e) => cancel_action(e);
+ Closing += (sender, e) => closing_action(e);
+ }
+
+ public void attach_to(SaveChangesPresenter presenter)
+ {
+ can_be_closed = false;
+ save_action = x => { execute(presenter.save); };
+ do_not_save_action = x => { execute(presenter.dont_save); };
+ cancel_action = x => { execute(presenter.cancel); };
+ closing_action = x => { if (!can_be_closed) presenter.cancel(); };
+ }
+
+ public void prompt_user_to_save()
+ {
+ ShowDialog(window);
+ }
+
+ void execute(Action action)
+ {
+ can_be_closed = true;
+ Hide();
+ Close();
+ action();
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Winforms/Views/WelcomeScreen.cs
@@ -1,31 +1,33 @@
-using momoney.presentation.model.menu.file;
-using momoney.presentation.presenters;
-using momoney.presentation.views;
-using MoMoney.Presentation.Winforms.Helpers;
-using MoMoney.Presentation.Winforms.Resources;
-
-namespace MoMoney.Presentation.Winforms.Views
-{
- public partial class WelcomeScreen : ApplicationDockedWindow, IGettingStartedView
- {
- public WelcomeScreen()
- {
- InitializeComponent();
- titled("Getting Started").icon(ApplicationIcons.Home);
-
- ux_open_existing_file_button.will_be_shown_as(ApplicationImages.OpenExistingFile)
- .when_hovered_over_will_show(ApplicationImages.OpenExistingFileSelected)
- .will_execute<IOpenCommand>(() => true)
- .with_tool_tip("Open Existing File", "Open an existing project.");
-
- ux_create_new_file_button.will_be_shown_as(ApplicationImages.CreateNewFile)
- .when_hovered_over_will_show(ApplicationImages.CreateNewFileSelected)
- .will_execute<INewCommand>(() => true)
- .with_tool_tip("Create New File", "Create a new project.");
- }
-
- public void attach_to(GettingStartedPresenter presenter)
- {
- }
- }
+using momoney.presentation.model.menu.file;
+using momoney.presentation.presenters;
+using momoney.presentation.views;
+using MoMoney.Presentation.Winforms.Helpers;
+using MoMoney.Presentation.Winforms.Resources;
+
+namespace MoMoney.Presentation.Winforms.Views
+{
+ public partial class WelcomeScreen : ApplicationDockedWindow, IGettingStartedView
+ {
+ public WelcomeScreen()
+ {
+ InitializeComponent();
+ titled("Getting Started").icon(ApplicationIcons.Home);
+
+ ux_open_existing_file_button
+ .will_be_shown_as(ApplicationImages.OpenExistingFile)
+ .when_hovered_over_will_show(ApplicationImages.OpenExistingFileSelected)
+ .will_execute<IOpenCommand>(() => true)
+ .with_tool_tip("Open Existing File", "Open an existing project.");
+
+ ux_create_new_file_button
+ .will_be_shown_as(ApplicationImages.CreateNewFile)
+ .when_hovered_over_will_show(ApplicationImages.CreateNewFileSelected)
+ .will_execute<INewCommand>(() => true)
+ .with_tool_tip("Create New File", "Create a new project.");
+ }
+
+ public void attach_to(GettingStartedPresenter presenter)
+ {
+ }
+ }
}
\ No newline at end of file
product/client/presentation/IModule.cs
@@ -1,6 +1,6 @@
-using gorilla.commons.utility;
-
-namespace MoMoney.Presentation
-{
- public interface IModule : Command {}
+using gorilla.commons.utility;
+
+namespace MoMoney.Presentation
+{
+ public interface IModule : Command {}
}
\ No newline at end of file
product/client/presentation/Presentation.csproj
@@ -1,582 +1,576 @@
-๏ปฟ<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{D7C83DB3-492D-4514-8C53-C57AD8E7ACE7}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>momoney.presentation</RootNamespace>
- <AssemblyName>momoney.presentation</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="ActiveReports.Document, Version=6.0.1797.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\active.reports\ActiveReports.Document.dll</HintPath>
- </Reference>
- <Reference Include="ActiveReports.Viewer6, Version=6.0.1797.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\active.reports\ActiveReports.Viewer6.dll</HintPath>
- </Reference>
- <Reference Include="ActiveReports6, Version=6.0.1797.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\active.reports\ActiveReports6.dll</HintPath>
- </Reference>
- <Reference Include="bdddoc, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\test\bdd.doc\bdddoc.dll</HintPath>
- </Reference>
- <Reference Include="ComponentFactory.Krypton.Toolkit, Version=3.0.8.0, Culture=neutral, PublicKeyToken=a87e673e9ecb6e8e, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\component.factory\ComponentFactory.Krypton.Toolkit.dll</HintPath>
- </Reference>
- <Reference Include="developwithpassion.bdd, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\test\developwithpassion\developwithpassion.bdd.dll</HintPath>
- </Reference>
- <Reference Include="gorilla.commons.infrastructure, Version=2009.5.5.1633, Culture=neutral, PublicKeyToken=687787ccb6c36c9f, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\gorilla\gorilla.commons.infrastructure.dll</HintPath>
- </Reference>
- <Reference Include="gorilla.commons.utility, Version=2009.5.5.1633, Culture=neutral, PublicKeyToken=687787ccb6c36c9f, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\gorilla\gorilla.commons.utility.dll</HintPath>
- </Reference>
- <Reference Include="gorilla.testing, Version=2009.5.5.194, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\test\gorilla\gorilla.testing.dll</HintPath>
- </Reference>
- <Reference Include="MbUnit.Framework, Version=2.4.2.175, Culture=neutral, PublicKeyToken=5e72ecd30bc408d5">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\test\mbunit\MbUnit.Framework.dll</HintPath>
- </Reference>
- <Reference Include="PresentationCore">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="PresentationFramework">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="Rhino.Mocks, Version=3.5.0.1337, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\test\rhino.mocks\Rhino.Mocks.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.ComponentModel.Composition, Version=2009.1.23.0, Culture=neutral, PublicKeyToken=687787ccb6c36c9f, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\managed.extensibility.framework\System.ComponentModel.Composition.dll</HintPath>
- </Reference>
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Drawing" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml.Linq">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data.DataSetExtensions">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- <Reference Include="UIAutomationProvider">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="WeifenLuo.WinFormsUI.Docking, Version=2.3.3392.19652, Culture=neutral, PublicKeyToken=b602bcfb76b4e90d, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\dock.panel.suite\WeifenLuo.WinFormsUI.Docking.dll</HintPath>
- </Reference>
- <Reference Include="WindowsBase">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="XPExplorerBar, Version=3.3.0.0, Culture=neutral, PublicKeyToken=26272737b5f33015">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\xp.explorer.bar\XPExplorerBar.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="core\CachedPresenterFactory.cs" />
- <Compile Include="core\CachingViewFactory.cs" />
- <Compile Include="core\DialogPresenter.cs" />
- <Compile Include="model\eventing\FinishedRunningCommand.cs" />
- <Compile Include="model\eventing\StartedRunningCommand.cs" />
- <Compile Include="model\menu\file\ISaveChangesCallback.cs" />
- <Compile Include="model\menu\file\ISaveChangesCommand.cs" />
- <Compile Include="model\navigation\INavigationTreeVisitor.cs" />
- <Compile Include="model\navigation\ITreeBranch.cs" />
- <Compile Include="model\navigation\ITreeViewToRootNodeMapper.cs" />
- <Compile Include="model\reporting\IBindReportTo.cs" />
- <Compile Include="presenters\CommandFactory.cs" />
- <Compile Include="presenters\SynchronizedCommandFactory.cs" />
- <Compile Include="presenters\CommandPump.cs" />
- <Compile Include="core\ApplicationController.cs" />
- <Compile Include="core\ApplicationControllerSpecs.cs" />
- <Compile Include="core\ApplicationEnvironment.cs" />
- <Compile Include="core\TabPresenter.cs" />
- <Compile Include="core\IContentPresenter.cs" />
- <Compile Include="core\Presenter.cs" />
- <Compile Include="core\PresenterRegistry.cs" />
- <Compile Include="IModule.cs" />
- <Compile Include="model\filesystem\folder.cs" />
- <Compile Include="model\menu\create.cs" />
- <Compile Include="model\menu\file\CloseProjectCommand.cs" />
- <Compile Include="model\menu\file\CloseWindowCommand.cs" />
- <Compile Include="model\menu\file\ExitCommand.cs" />
- <Compile Include="model\menu\file\ExitCommandSpecs.cs" />
- <Compile Include="model\menu\file\FileMenu.cs" />
- <Compile Include="model\menu\file\NewCommand.cs" />
- <Compile Include="model\menu\file\NewCommandSpecs.cs" />
- <Compile Include="model\menu\file\OpenCommand.cs" />
- <Compile Include="model\menu\file\OpenCommandSpecs.cs" />
- <Compile Include="model\menu\file\SaveAsCommand.cs" />
- <Compile Include="model\menu\file\SaveAsCommandSpecs.cs" />
- <Compile Include="model\menu\file\SaveChangesPresenter.cs" />
- <Compile Include="model\menu\file\SaveCommand.cs" />
- <Compile Include="model\menu\file\SaveCommandSpecs.cs" />
- <Compile Include="model\menu\help\DisplayInformationAboutTheApplication.cs" />
- <Compile Include="model\menu\help\HelpMenu.cs" />
- <Compile Include="model\menu\ISubMenu.cs" />
- <Compile Include="model\menu\IToolbarButton.cs" />
- <Compile Include="model\menu\IToolbarItemBuilder.cs" />
- <Compile Include="model\menu\MenuItem.cs" />
- <Compile Include="model\menu\MenuItemBuilder.cs" />
- <Compile Include="model\menu\MenuItemSeparator.cs" />
- <Compile Include="model\menu\SubMenu.cs" />
- <Compile Include="model\menu\SubMenuRegistry.cs" />
- <Compile Include="model\menu\ToolBarItemBuilder.cs" />
- <Compile Include="model\menu\window\WindowMenu.cs" />
- <Compile Include="model\eventing\ClosingProjectEvent.cs" />
- <Compile Include="model\eventing\ClosingTheApplication.cs" />
- <Compile Include="model\eventing\NewProjectOpened.cs" />
- <Compile Include="model\eventing\SavedChangesEvent.cs" />
- <Compile Include="model\eventing\UnhandledErrorOccurred.cs" />
- <Compile Include="model\eventing\UnsavedChangesEvent.cs" />
- <Compile Include="model\navigation\AddNewIncomeBranch.cs" />
- <Compile Include="model\navigation\AddBillPaymentBranch.cs" />
- <Compile Include="model\navigation\AddNewBillBranch.cs" />
- <Compile Include="model\navigation\IBranchVisitor.cs" />
- <Compile Include="model\navigation\NavigationTreeVisitor.cs" />
- <Compile Include="model\navigation\NavigationTreeVisitorSpecs.cs" />
- <Compile Include="model\navigation\TreeBranch.cs" />
- <Compile Include="model\navigation\TreeViewToRootNodeMapper.cs" />
- <Compile Include="model\navigation\TreeBranchSpecs.cs" />
- <Compile Include="model\navigation\ViewAllBillsBranch.cs" />
- <Compile Include="model\projects\EmptyProject.cs" />
- <Compile Include="model\projects\FileNotSpecifiedException.cs" />
- <Compile Include="model\projects\IProject.cs" />
- <Compile Include="model\projects\IProjectController.cs" />
- <Compile Include="model\projects\Project.cs" />
- <Compile Include="model\projects\ProjectController.cs" />
- <Compile Include="model\projects\ProjectControllerSpecs.cs" />
- <Compile Include="model\reporting\IReport.cs" />
- <Compile Include="model\reporting\ReportBindingExtensions.cs" />
- <Compile Include="model\reporting\ReportBindingExtensionsSpecs.cs" />
- <Compile Include="presenters\AddCompanyPresenter.cs" />
- <Compile Include="presenters\AddCompanyPresenterSpecs.cs" />
- <Compile Include="presenters\AddBillPaymentPresenter.cs" />
- <Compile Include="presenters\IRunPresenterCommand.cs" />
- <Compile Include="presenters\ViewAllBillsPresenter.cs" />
- <Compile Include="presenters\RestartCommand.cs" />
- <Compile Include="presenters\RunPresenterCommand.cs" />
- <Compile Include="presenters\RunThe.cs" />
- <Compile Include="presenters\RunTheSpecs.cs" />
- <Compile Include="model\excel\Cell.cs" />
- <Compile Include="model\excel\ChangeFontSize.cs" />
- <Compile Include="model\excel\CompositeCellVisitor.cs" />
- <Compile Include="model\excel\ConstrainedCellVisitor.cs" />
- <Compile Include="model\excel\ExcelUsage.cs" />
- <Compile Include="model\excel\FormatBackColor.cs" />
- <Compile Include="model\excel\ICell.cs" />
- <Compile Include="model\excel\ICellInterior.cs" />
- <Compile Include="model\excel\ICellVisitor.cs" />
- <Compile Include="presenters\AddNewIncomePresenter.cs" />
- <Compile Include="presenters\AddNewIncomePresenterSpecs.cs" />
- <Compile Include="presenters\ViewIncomeHistoryPresenter.cs" />
- <Compile Include="presenters\AboutTheApplicationPresenter.cs" />
- <Compile Include="presenters\ApplicationMenuPresenter.cs" />
- <Compile Include="presenters\AddBillingTaskPane.cs" />
- <Compile Include="presenters\AddCompanyTaskPane.cs" />
- <Compile Include="presenters\AddIncomeTaskPane.cs" />
- <Compile Include="presenters\AddReportingTaskPane.cs" />
- <Compile Include="presenters\Build.cs" />
- <Compile Include="presenters\ExpandoBuilder.cs" />
- <Compile Include="presenters\ExpandoItemBuilder.cs" />
- <Compile Include="presenters\IActionTaskPaneFactory.cs" />
- <Compile Include="presenters\MainMenuPresenter.cs" />
- <Compile Include="presenters\NavigationPresenter.cs" />
- <Compile Include="presenters\NavigationPresenterSpecs.cs" />
- <Compile Include="presenters\ReportPresenter.cs" />
- <Compile Include="presenters\ApplicationShellPresenter.cs" />
- <Compile Include="presenters\GettingStartedPresenter.cs" />
- <Compile Include="presenters\GettingStartedPresenterSpecs.cs" />
- <Compile Include="presenters\LogFilePresenter.cs" />
- <Compile Include="presenters\LogFileViewPresenterSpecs.cs" />
- <Compile Include="presenters\NotificationIconModule.cs" />
- <Compile Include="presenters\NotificationIconPresenterSpecs.cs" />
- <Compile Include="presenters\NotificationPresenter.cs" />
- <Compile Include="presenters\StatusBarModule.cs" />
- <Compile Include="presenters\StatusBarPresenterSpecs.cs" />
- <Compile Include="presenters\TaskTrayPresenter.cs" />
- <Compile Include="presenters\TitleBarPresenter.cs" />
- <Compile Include="presenters\TitleBarPresenterSpecs.cs" />
- <Compile Include="presenters\ToolBarPresenter.cs" />
- <Compile Include="presenters\UnhandledErrorPresenter.cs" />
- <Compile Include="presenters\UnhandledErrorPresenterSpecs.cs" />
- <Compile Include="presenters\DisplayTheSplashScreen.cs" />
- <Compile Include="presenters\hide_the_splash_screen.cs" />
- <Compile Include="presenters\ISplashScreenState.cs" />
- <Compile Include="presenters\SplashScreenPresenter.cs" />
- <Compile Include="presenters\SplashScreenPresenterSpecs.cs" />
- <Compile Include="presenters\CheckForUpdatesPresenter.cs" />
- <Compile Include="presenters\CheckForUpdatesPresenterSpecs.cs" />
- <Compile Include="presenters\ProcessQueryCommand.cs" />
- <Compile Include="views\IDialog.cs" />
- <Compile Include="views\ISelectFileToOpenDialog.cs" />
- <Compile Include="views\ISelectFileToSaveToDialog.cs" />
- <Compile Include="views\ITaskTrayMessageView.cs" />
- <Compile Include="views\ITitleBar.cs" />
- <Compile Include="views\IViewAllBillsReport.cs" />
- <Compile Include="views\IApplicationDockedWindow.cs" />
- <Compile Include="views\IApplicationWindow.cs" />
- <Compile Include="views\IViewAllIncomeReport.cs" />
- <Compile Include="winforms\helpers\GridListControl.cs" />
- <Compile Include="winforms\helpers\ListViewControl.cs" />
- <Compile Include="winforms\resources\ApplicationIcons.cs" />
- <Compile Include="winforms\resources\ApplicationImages.cs" />
- <Compile Include="presenters\RunQueryCommand.cs" />
- <Compile Include="winforms\views\AddCompanyView.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\AddCompanyView.Designer.cs">
- <DependentUpon>AddCompanyView.cs</DependentUpon>
- </Compile>
- <Compile Include="winforms\views\AddBillPaymentView.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\AddBillPaymentView.Designer.cs">
- <DependentUpon>AddBillPaymentView.cs</DependentUpon>
- </Compile>
- <Compile Include="views\IAddBillPaymentView.cs" />
- <Compile Include="views\IViewAllBills.cs" />
- <Compile Include="winforms\views\ViewAllIncomesReport.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="winforms\views\ViewAllIncomesReport.Designer.cs">
- <DependentUpon>ViewAllIncomesReport.cs</DependentUpon>
- </Compile>
- <Compile Include="winforms\views\ViewAllBills.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\ViewAllBills.Designer.cs">
- <DependentUpon>ViewAllBills.cs</DependentUpon>
- </Compile>
- <Compile Include="winforms\views\ViewAllBillsReport.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="winforms\views\ViewAllBillsReport.Designer.cs">
- <DependentUpon>ViewAllBillsReport.cs</DependentUpon>
- </Compile>
- <Compile Include="winforms\views\ApplicationDockedWindow.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\ApplicationDockedWindow.Designer.cs">
- <DependentUpon>ApplicationDockedWindow.cs</DependentUpon>
- </Compile>
- <Compile Include="winforms\views\ApplicationWindow.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\ApplicationWindow.Designer.cs">
- <DependentUpon>ApplicationWindow.cs</DependentUpon>
- </Compile>
- <Compile Include="views\ControlAction.cs" />
- <Compile Include="views\ICommandDialog.cs" />
- <Compile Include="views\IDialogLauncher.cs" />
- <Compile Include="views\IDockedContentView.cs" />
- <Compile Include="views\IView.cs" />
- <Compile Include="views\ISaveChangesView.cs" />
- <Compile Include="winforms\views\SaveChangesView.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\SaveChangesView.Designer.cs">
- <DependentUpon>SaveChangesView.cs</DependentUpon>
- </Compile>
- <Compile Include="winforms\views\SaveChangesViewSpecs.cs" />
- <Compile Include="winforms\views\SelectFileToOpenDialog.cs" />
- <Compile Include="winforms\views\SelectFileToSaveToDialog.cs" />
- <Compile Include="views\IAddCompanyView.cs" />
- <Compile Include="winforms\views\AddNewIncomeView.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\AddNewIncomeView.Designer.cs">
- <DependentUpon>AddNewIncomeView.cs</DependentUpon>
- </Compile>
- <Compile Include="views\IAddNewIncomeView.cs" />
- <Compile Include="views\IViewIncomeHistory.cs" />
- <Compile Include="winforms\views\ViewAllIncome.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\ViewAllIncome.Designer.cs">
- <DependentUpon>ViewAllIncome.cs</DependentUpon>
- </Compile>
- <Compile Include="winforms\views\AboutTheApplicationView.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\AboutTheApplicationView.Designer.cs">
- <DependentUpon>AboutTheApplicationView.cs</DependentUpon>
- </Compile>
- <Compile Include="views\IAboutApplicationView.cs" />
- <Compile Include="views\IMainMenuView.cs" />
- <Compile Include="views\INavigationView.cs" />
- <Compile Include="winforms\views\MainMenuView.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\MainMenuView.Designer.cs">
- <DependentUpon>MainMenuView.cs</DependentUpon>
- </Compile>
- <Compile Include="winforms\views\NavigationView.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\NavigationView.Designer.cs">
- <DependentUpon>NavigationView.cs</DependentUpon>
- </Compile>
- <Compile Include="views\IReportViewer.cs" />
- <Compile Include="winforms\views\ReportViewer.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\ReportViewer.Designer.cs">
- <DependentUpon>ReportViewer.cs</DependentUpon>
- </Compile>
- <Compile Include="winforms\views\ApplicationShell.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\ApplicationShell.Designer.cs">
- <DependentUpon>ApplicationShell.cs</DependentUpon>
- </Compile>
- <Compile Include="winforms\views\ApplicationShellSpecs.cs" />
- <Compile Include="views\IGettingStartedView.cs" />
- <Compile Include="views\ILogFileView.cs" />
- <Compile Include="views\INotificationIconView.cs" />
- <Compile Include="views\IRegionManager.cs" />
- <Compile Include="views\Shell.cs" />
- <Compile Include="views\IStatusBarView.cs" />
- <Compile Include="views\IUnhandledErrorView.cs" />
- <Compile Include="winforms\views\LogFileView.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\LogFileView.Designer.cs">
- <DependentUpon>LogFileView.cs</DependentUpon>
- </Compile>
- <Compile Include="winforms\views\NotificationIconView.cs" />
- <Compile Include="winforms\views\StatusBarView.cs" />
- <Compile Include="winforms\views\TaskTrayMessage.cs" />
- <Compile Include="winforms\views\TitleBar.cs" />
- <Compile Include="winforms\views\UnhandledErrorView.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\UnhandledErrorView.Designer.cs">
- <DependentUpon>UnhandledErrorView.cs</DependentUpon>
- </Compile>
- <Compile Include="winforms\views\WelcomeScreen.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\WelcomeScreen.Designer.cs">
- <DependentUpon>WelcomeScreen.cs</DependentUpon>
- </Compile>
- <Compile Include="views\ISplashScreenView.cs" />
- <Compile Include="winforms\views\SplashScreenView.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\SplashScreenView.Designer.cs">
- <DependentUpon>SplashScreenView.cs</DependentUpon>
- </Compile>
- <Compile Include="winforms\views\CheckForUpdatesView.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\CheckForUpdatesView.Designer.cs">
- <DependentUpon>CheckForUpdatesView.cs</DependentUpon>
- </Compile>
- <Compile Include="views\ICheckForUpdatesView.cs" />
- <Compile Include="winforms\databinding\BindingSelector.cs" />
- <Compile Include="winforms\databinding\BindingSelectorSpecs.cs" />
- <Compile Include="winforms\databinding\ComboBoxDataBindingSpecs.cs" />
- <Compile Include="winforms\databinding\ComboBoxPropertyBinding.cs" />
- <Compile Include="winforms\databinding\ControlBindingExtensions.cs" />
- <Compile Include="winforms\databinding\Create.cs" />
- <Compile Include="winforms\databinding\CreateSpecs.cs" />
- <Compile Include="winforms\databinding\DateTimePickerPropertyBinding.cs" />
- <Compile Include="winforms\databinding\DateTimePropertyBindingSpecs.cs" />
- <Compile Include="winforms\databinding\IPropertyBinding.cs" />
- <Compile Include="winforms\databinding\ListboxExtensions.cs" />
- <Compile Include="winforms\databinding\PropertyBinder.cs" />
- <Compile Include="winforms\databinding\PropertyBinderSpecs.cs" />
- <Compile Include="winforms\databinding\PropertyInspector.cs" />
- <Compile Include="winforms\databinding\PropertyInspectorFactory.cs" />
- <Compile Include="winforms\databinding\PropertyInspectorSpecs.cs" />
- <Compile Include="winforms\databinding\TextBoxDataBindingSpecs.cs" />
- <Compile Include="winforms\databinding\TextBoxExtensions.cs" />
- <Compile Include="winforms\databinding\TextPropertyBinding.cs" />
- <Compile Include="winforms\helpers\BindableListBox.cs" />
- <Compile Include="winforms\helpers\BindableListBoxSpecs.cs" />
- <Compile Include="winforms\helpers\BindableListExtensions.cs" />
- <Compile Include="winforms\helpers\BindableListFactory.cs" />
- <Compile Include="winforms\helpers\BindableTextBox.cs" />
- <Compile Include="winforms\helpers\BindableTextBoxExtensions.cs" />
- <Compile Include="winforms\helpers\BindableTextBoxExtensionsSpecs.cs" />
- <Compile Include="winforms\helpers\BindableTextBoxSpecs.cs" />
- <Compile Include="winforms\helpers\BitmapRegion.cs" />
- <Compile Include="winforms\helpers\ButtonExtensions.cs" />
- <Compile Include="winforms\helpers\ComboBoxListControl.cs" />
- <Compile Include="winforms\helpers\ControlAdapter.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="winforms\helpers\ControlExtensions.cs" />
- <Compile Include="winforms\helpers\Events.cs" />
- <Compile Include="winforms\helpers\EventTrigger.cs" />
- <Compile Include="winforms\helpers\EventTriggerExtensions.cs" />
- <Compile Include="winforms\helpers\EventTriggerSpecs.cs" />
- <Compile Include="winforms\helpers\IBindableList.cs" />
- <Compile Include="winforms\helpers\IEventTarget.cs" />
- <Compile Include="winforms\helpers\IListControl.cs" />
- <Compile Include="winforms\helpers\ITextBoxCommand.cs" />
- <Compile Include="winforms\helpers\ITextControl.cs" />
- <Compile Include="winforms\helpers\ListBoxListControl.cs" />
- <Compile Include="winforms\helpers\RebindTextBoxCommand.cs" />
- <Compile Include="winforms\helpers\RebindTextBoxCommandSpecs.cs" />
- <Compile Include="winforms\helpers\SuspendLayout.cs" />
- <Compile Include="winforms\helpers\TextControl.cs" />
- <Compile Include="winforms\helpers\TextControlSpecs.cs" />
- <Compile Include="winforms\keyboard\ShortcutKey.cs" />
- <Compile Include="winforms\keyboard\ShortcutKeys.cs" />
- <Compile Include="winforms\krypton\BindableListExtensions.cs" />
- <Compile Include="winforms\krypton\KryptonComboBoxListControl.cs" />
- <Compile Include="winforms\krypton\KryptonListBoxListControl.cs" />
- <Compile Include="winforms\krypton\KryptonTextControl.cs" />
- <Compile Include="winforms\krypton\ListboxExtensions.cs" />
- <Compile Include="winforms\krypton\TextBoxExtensions.cs" />
- <Compile Include="winforms\resources\ApplicationIcon.cs" />
- <Compile Include="winforms\resources\ApplicationImage.cs" />
- <Compile Include="winforms\resources\HybridIcon.cs" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Properties\licenses.licx" />
- <EmbeddedResource Include="winforms\views\AddCompanyView.resx">
- <DependentUpon>AddCompanyView.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="winforms\views\AddBillPaymentView.resx">
- <DependentUpon>AddBillPaymentView.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="winforms\views\ViewAllIncomesReport.resx">
- <DependentUpon>ViewAllIncomesReport.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="winforms\views\ViewAllBills.resx">
- <DependentUpon>ViewAllBills.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="winforms\views\ViewAllBillsReport.resx">
- <DependentUpon>ViewAllBillsReport.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="winforms\views\ApplicationWindow.resx">
- <DependentUpon>ApplicationWindow.cs</DependentUpon>
- </EmbeddedResource>
- <EmbeddedResource Include="winforms\views\SaveChangesView.resx">
- <DependentUpon>SaveChangesView.cs</DependentUpon>
- </EmbeddedResource>
- <EmbeddedResource Include="winforms\views\AddNewIncomeView.resx">
- <DependentUpon>AddNewIncomeView.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="winforms\views\ViewAllIncome.resx">
- <DependentUpon>ViewAllIncome.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="winforms\views\AboutTheApplicationView.resx">
- <DependentUpon>AboutTheApplicationView.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="winforms\views\MainMenuView.resx">
- <DependentUpon>MainMenuView.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="winforms\views\NavigationView.resx">
- <DependentUpon>NavigationView.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="winforms\views\ReportViewer.resx">
- <DependentUpon>ReportViewer.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="winforms\views\ApplicationShell.resx">
- <DependentUpon>ApplicationShell.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="winforms\views\LogFileView.resx">
- <DependentUpon>LogFileView.cs</DependentUpon>
- </EmbeddedResource>
- <EmbeddedResource Include="winforms\views\UnhandledErrorView.resx">
- <DependentUpon>UnhandledErrorView.cs</DependentUpon>
- </EmbeddedResource>
- <EmbeddedResource Include="winforms\views\WelcomeScreen.resx">
- <DependentUpon>WelcomeScreen.cs</DependentUpon>
- </EmbeddedResource>
- <EmbeddedResource Include="winforms\views\SplashScreenView.resx">
- <DependentUpon>SplashScreenView.cs</DependentUpon>
- </EmbeddedResource>
- <EmbeddedResource Include="winforms\views\CheckForUpdatesView.resx">
- <DependentUpon>CheckForUpdatesView.cs</DependentUpon>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\commons\infrastructure\infrastructure.csproj">
- <Project>{AA5EEED9-4531-45F7-AFCD-AD9717D2E405}</Project>
- <Name>infrastructure</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\commons\utility\utility.csproj">
- <Project>{DD8FD29E-7424-415C-9BA3-7D9F6ECBA161}</Project>
- <Name>utility %28commons\utility%29</Name>
- </ProjectReference>
- <ProjectReference Include="..\DTO\dto.csproj">
- <Project>{ACF52FAB-435B-48C9-A383-C787CB2D8000}</Project>
- <Name>dto</Name>
- </ProjectReference>
- <ProjectReference Include="..\Service.Contracts\service.contracts.csproj">
- <Project>{41D2B68B-031B-44FF-BAC5-7752D9E29F94}</Project>
- <Name>service.contracts</Name>
- </ProjectReference>
- <ProjectReference Include="..\service.infrastructure\service.infrastructure.csproj">
- <Project>{81412692-F3EE-4FBF-A7C7-69454DD1BD46}</Project>
- <Name>service.infrastructure</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
+๏ปฟ<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{D7C83DB3-492D-4514-8C53-C57AD8E7ACE7}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>momoney.presentation</RootNamespace>
+ <AssemblyName>momoney.presentation</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="ActiveReports.Document, Version=6.0.1797.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\active.reports\ActiveReports.Document.dll</HintPath>
+ </Reference>
+ <Reference Include="ActiveReports.Viewer6, Version=6.0.1797.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\active.reports\ActiveReports.Viewer6.dll</HintPath>
+ </Reference>
+ <Reference Include="ActiveReports6, Version=6.0.1797.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\active.reports\ActiveReports6.dll</HintPath>
+ </Reference>
+ <Reference Include="bdddoc, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\test\bdd.doc\bdddoc.dll</HintPath>
+ </Reference>
+ <Reference Include="ComponentFactory.Krypton.Toolkit, Version=3.0.8.0, Culture=neutral, PublicKeyToken=a87e673e9ecb6e8e, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\component.factory\ComponentFactory.Krypton.Toolkit.dll</HintPath>
+ </Reference>
+ <Reference Include="developwithpassion.bdd, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\test\developwithpassion\developwithpassion.bdd.dll</HintPath>
+ </Reference>
+ <Reference Include="gorilla.commons.infrastructure, Version=2009.5.5.1633, Culture=neutral, PublicKeyToken=687787ccb6c36c9f, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\gorilla\gorilla.commons.infrastructure.dll</HintPath>
+ </Reference>
+ <Reference Include="gorilla.commons.utility, Version=2009.5.5.1633, Culture=neutral, PublicKeyToken=687787ccb6c36c9f, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\gorilla\gorilla.commons.utility.dll</HintPath>
+ </Reference>
+ <Reference Include="gorilla.testing, Version=2009.5.5.194, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\test\gorilla\gorilla.testing.dll</HintPath>
+ </Reference>
+ <Reference Include="MbUnit.Framework, Version=2.4.2.175, Culture=neutral, PublicKeyToken=5e72ecd30bc408d5">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\test\mbunit\MbUnit.Framework.dll</HintPath>
+ </Reference>
+ <Reference Include="PresentationCore">
+ <RequiredTargetFramework>3.0</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="PresentationFramework">
+ <RequiredTargetFramework>3.0</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="Rhino.Mocks, Version=3.5.0.1337, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\test\rhino.mocks\Rhino.Mocks.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition, Version=2009.1.23.0, Culture=neutral, PublicKeyToken=687787ccb6c36c9f, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\managed.extensibility.framework\System.ComponentModel.Composition.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ <Reference Include="UIAutomationProvider">
+ <RequiredTargetFramework>3.0</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="WeifenLuo.WinFormsUI.Docking, Version=2.3.3392.19652, Culture=neutral, PublicKeyToken=b602bcfb76b4e90d, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\dock.panel.suite\WeifenLuo.WinFormsUI.Docking.dll</HintPath>
+ </Reference>
+ <Reference Include="WindowsBase">
+ <RequiredTargetFramework>3.0</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="XPExplorerBar, Version=3.3.0.0, Culture=neutral, PublicKeyToken=26272737b5f33015">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\xp.explorer.bar\XPExplorerBar.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="core\CachedPresenterFactory.cs" />
+ <Compile Include="core\ViewRegistry.cs" />
+ <Compile Include="core\DialogPresenter.cs" />
+ <Compile Include="core\PresenterFactory.cs" />
+ <Compile Include="core\ViewFactory.cs" />
+ <Compile Include="model\eventing\FinishedRunningCommand.cs" />
+ <Compile Include="model\eventing\StartedRunningCommand.cs" />
+ <Compile Include="model\menu\file\ISaveChangesCallback.cs" />
+ <Compile Include="model\menu\file\ISaveChangesCommand.cs" />
+ <Compile Include="model\navigation\INavigationTreeVisitor.cs" />
+ <Compile Include="model\navigation\ITreeBranch.cs" />
+ <Compile Include="model\navigation\ITreeViewToRootNodeMapper.cs" />
+ <Compile Include="model\reporting\IBindReportTo.cs" />
+ <Compile Include="presenters\CommandFactory.cs" />
+ <Compile Include="presenters\SynchronizedCommandFactory.cs" />
+ <Compile Include="presenters\CommandPump.cs" />
+ <Compile Include="core\ApplicationController.cs" />
+ <Compile Include="core\ApplicationControllerSpecs.cs" />
+ <Compile Include="core\ApplicationEnvironment.cs" />
+ <Compile Include="core\TabPresenter.cs" />
+ <Compile Include="core\IContentPresenter.cs" />
+ <Compile Include="core\Presenter.cs" />
+ <Compile Include="core\PresenterRegistry.cs" />
+ <Compile Include="IModule.cs" />
+ <Compile Include="model\filesystem\folder.cs" />
+ <Compile Include="model\menu\create.cs" />
+ <Compile Include="model\menu\file\CloseProjectCommand.cs" />
+ <Compile Include="model\menu\file\CloseWindowCommand.cs" />
+ <Compile Include="model\menu\file\ExitCommand.cs" />
+ <Compile Include="model\menu\file\ExitCommandSpecs.cs" />
+ <Compile Include="model\menu\file\FileMenu.cs" />
+ <Compile Include="model\menu\file\NewCommand.cs" />
+ <Compile Include="model\menu\file\NewCommandSpecs.cs" />
+ <Compile Include="model\menu\file\OpenCommand.cs" />
+ <Compile Include="model\menu\file\OpenCommandSpecs.cs" />
+ <Compile Include="model\menu\file\SaveAsCommand.cs" />
+ <Compile Include="model\menu\file\SaveAsCommandSpecs.cs" />
+ <Compile Include="model\menu\file\SaveChangesPresenter.cs" />
+ <Compile Include="model\menu\file\SaveCommand.cs" />
+ <Compile Include="model\menu\file\SaveCommandSpecs.cs" />
+ <Compile Include="model\menu\help\DisplayInformationAboutTheApplication.cs" />
+ <Compile Include="model\menu\help\HelpMenu.cs" />
+ <Compile Include="model\menu\ISubMenu.cs" />
+ <Compile Include="model\menu\IToolbarButton.cs" />
+ <Compile Include="model\menu\IToolbarItemBuilder.cs" />
+ <Compile Include="model\menu\MenuItem.cs" />
+ <Compile Include="model\menu\MenuItemBuilder.cs" />
+ <Compile Include="model\menu\MenuItemSeparator.cs" />
+ <Compile Include="model\menu\SubMenu.cs" />
+ <Compile Include="model\menu\SubMenuRegistry.cs" />
+ <Compile Include="model\menu\ToolBarItemBuilder.cs" />
+ <Compile Include="model\menu\window\WindowMenu.cs" />
+ <Compile Include="model\eventing\ClosingProjectEvent.cs" />
+ <Compile Include="model\eventing\ClosingTheApplication.cs" />
+ <Compile Include="model\eventing\NewProjectOpened.cs" />
+ <Compile Include="model\eventing\SavedChangesEvent.cs" />
+ <Compile Include="model\eventing\UnhandledErrorOccurred.cs" />
+ <Compile Include="model\eventing\UnsavedChangesEvent.cs" />
+ <Compile Include="model\navigation\AddNewIncomeBranch.cs" />
+ <Compile Include="model\navigation\AddBillPaymentBranch.cs" />
+ <Compile Include="model\navigation\AddNewBillBranch.cs" />
+ <Compile Include="model\navigation\IBranchVisitor.cs" />
+ <Compile Include="model\navigation\NavigationTreeVisitor.cs" />
+ <Compile Include="model\navigation\NavigationTreeVisitorSpecs.cs" />
+ <Compile Include="model\navigation\TreeBranch.cs" />
+ <Compile Include="model\navigation\TreeViewToRootNodeMapper.cs" />
+ <Compile Include="model\navigation\TreeBranchSpecs.cs" />
+ <Compile Include="model\navigation\ViewAllBillsBranch.cs" />
+ <Compile Include="model\projects\EmptyProject.cs" />
+ <Compile Include="model\projects\FileNotSpecifiedException.cs" />
+ <Compile Include="model\projects\IProject.cs" />
+ <Compile Include="model\projects\IProjectController.cs" />
+ <Compile Include="model\projects\Project.cs" />
+ <Compile Include="model\projects\ProjectController.cs" />
+ <Compile Include="model\projects\ProjectControllerSpecs.cs" />
+ <Compile Include="model\reporting\IReport.cs" />
+ <Compile Include="model\reporting\ReportBindingExtensions.cs" />
+ <Compile Include="model\reporting\ReportBindingExtensionsSpecs.cs" />
+ <Compile Include="presenters\AddCompanyPresenter.cs" />
+ <Compile Include="presenters\AddCompanyPresenterSpecs.cs" />
+ <Compile Include="presenters\AddBillPaymentPresenter.cs" />
+ <Compile Include="presenters\IRunPresenterCommand.cs" />
+ <Compile Include="presenters\UnhandledErrorPresenter.cs" />
+ <Compile Include="presenters\ViewAllBillsPresenter.cs" />
+ <Compile Include="presenters\RestartCommand.cs" />
+ <Compile Include="presenters\RunPresenterCommand.cs" />
+ <Compile Include="presenters\RunThe.cs" />
+ <Compile Include="presenters\RunTheSpecs.cs" />
+ <Compile Include="model\excel\Cell.cs" />
+ <Compile Include="model\excel\ChangeFontSize.cs" />
+ <Compile Include="model\excel\CompositeCellVisitor.cs" />
+ <Compile Include="model\excel\ConstrainedCellVisitor.cs" />
+ <Compile Include="model\excel\ExcelUsage.cs" />
+ <Compile Include="model\excel\FormatBackColor.cs" />
+ <Compile Include="model\excel\ICell.cs" />
+ <Compile Include="model\excel\ICellInterior.cs" />
+ <Compile Include="model\excel\ICellVisitor.cs" />
+ <Compile Include="presenters\AddNewIncomePresenter.cs" />
+ <Compile Include="presenters\AddNewIncomePresenterSpecs.cs" />
+ <Compile Include="presenters\ViewIncomeHistoryPresenter.cs" />
+ <Compile Include="presenters\AboutTheApplicationPresenter.cs" />
+ <Compile Include="presenters\ApplicationMenuPresenter.cs" />
+ <Compile Include="presenters\AddBillingTaskPane.cs" />
+ <Compile Include="presenters\AddCompanyTaskPane.cs" />
+ <Compile Include="presenters\AddIncomeTaskPane.cs" />
+ <Compile Include="presenters\AddReportingTaskPane.cs" />
+ <Compile Include="presenters\Build.cs" />
+ <Compile Include="presenters\ExpandoBuilder.cs" />
+ <Compile Include="presenters\ExpandoItemBuilder.cs" />
+ <Compile Include="presenters\IActionTaskPaneFactory.cs" />
+ <Compile Include="presenters\MainMenuPresenter.cs" />
+ <Compile Include="presenters\NavigationPresenter.cs" />
+ <Compile Include="presenters\NavigationPresenterSpecs.cs" />
+ <Compile Include="presenters\ReportPresenter.cs" />
+ <Compile Include="presenters\ApplicationShellPresenter.cs" />
+ <Compile Include="presenters\GettingStartedPresenter.cs" />
+ <Compile Include="presenters\GettingStartedPresenterSpecs.cs" />
+ <Compile Include="presenters\LogFilePresenter.cs" />
+ <Compile Include="presenters\LogFileViewPresenterSpecs.cs" />
+ <Compile Include="presenters\NotificationPresenter.cs" />
+ <Compile Include="presenters\ToolBarPresenter.cs" />
+ <Compile Include="presenters\UnhandledErrorPresenterSpecs.cs" />
+ <Compile Include="presenters\DisplayTheSplashScreen.cs" />
+ <Compile Include="presenters\HideTheSplashScreen.cs" />
+ <Compile Include="presenters\ISplashScreenState.cs" />
+ <Compile Include="presenters\SplashScreenPresenter.cs" />
+ <Compile Include="presenters\SplashScreenPresenterSpecs.cs" />
+ <Compile Include="presenters\CheckForUpdatesPresenter.cs" />
+ <Compile Include="presenters\CheckForUpdatesPresenterSpecs.cs" />
+ <Compile Include="presenters\ProcessQueryCommand.cs" />
+ <Compile Include="views\Dialog.cs" />
+ <Compile Include="views\ISelectFileToOpenDialog.cs" />
+ <Compile Include="views\ISelectFileToSaveToDialog.cs" />
+ <Compile Include="views\ITaskTrayMessageView.cs" />
+ <Compile Include="views\ITitleBar.cs" />
+ <Compile Include="views\IViewAllBillsReport.cs" />
+ <Compile Include="views\IApplicationDockedWindow.cs" />
+ <Compile Include="views\IApplicationWindow.cs" />
+ <Compile Include="views\IViewAllIncomeReport.cs" />
+ <Compile Include="winforms\helpers\GridListControl.cs" />
+ <Compile Include="winforms\helpers\ListViewControl.cs" />
+ <Compile Include="winforms\resources\ApplicationIcons.cs" />
+ <Compile Include="winforms\resources\ApplicationImages.cs" />
+ <Compile Include="presenters\RunQueryCommand.cs" />
+ <Compile Include="winforms\views\AddCompanyView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="winforms\views\AddCompanyView.Designer.cs">
+ <DependentUpon>AddCompanyView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="winforms\views\AddBillPaymentView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="winforms\views\AddBillPaymentView.Designer.cs">
+ <DependentUpon>AddBillPaymentView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\IAddBillPaymentView.cs" />
+ <Compile Include="views\IViewAllBills.cs" />
+ <Compile Include="winforms\views\ViewAllIncomesReport.cs">
+ <SubType>Component</SubType>
+ </Compile>
+ <Compile Include="winforms\views\ViewAllIncomesReport.Designer.cs">
+ <DependentUpon>ViewAllIncomesReport.cs</DependentUpon>
+ </Compile>
+ <Compile Include="winforms\views\ViewAllBills.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="winforms\views\ViewAllBills.Designer.cs">
+ <DependentUpon>ViewAllBills.cs</DependentUpon>
+ </Compile>
+ <Compile Include="winforms\views\ViewAllBillsReport.cs">
+ <SubType>Component</SubType>
+ </Compile>
+ <Compile Include="winforms\views\ViewAllBillsReport.Designer.cs">
+ <DependentUpon>ViewAllBillsReport.cs</DependentUpon>
+ </Compile>
+ <Compile Include="winforms\views\ApplicationDockedWindow.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="winforms\views\ApplicationDockedWindow.Designer.cs">
+ <DependentUpon>ApplicationDockedWindow.cs</DependentUpon>
+ </Compile>
+ <Compile Include="winforms\views\ApplicationWindow.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="winforms\views\ApplicationWindow.Designer.cs">
+ <DependentUpon>ApplicationWindow.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\ControlAction.cs" />
+ <Compile Include="views\IDialogLauncher.cs" />
+ <Compile Include="views\IDockedContentView.cs" />
+ <Compile Include="views\View.cs" />
+ <Compile Include="views\ISaveChangesView.cs" />
+ <Compile Include="winforms\views\SaveChangesView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="winforms\views\SaveChangesView.Designer.cs">
+ <DependentUpon>SaveChangesView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="winforms\views\SaveChangesViewSpecs.cs" />
+ <Compile Include="winforms\views\SelectFileToOpenDialog.cs" />
+ <Compile Include="winforms\views\SelectFileToSaveToDialog.cs" />
+ <Compile Include="views\IAddCompanyView.cs" />
+ <Compile Include="winforms\views\AddNewIncomeView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="winforms\views\AddNewIncomeView.Designer.cs">
+ <DependentUpon>AddNewIncomeView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\IAddNewIncomeView.cs" />
+ <Compile Include="views\IViewIncomeHistory.cs" />
+ <Compile Include="winforms\views\ViewAllIncome.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="winforms\views\ViewAllIncome.Designer.cs">
+ <DependentUpon>ViewAllIncome.cs</DependentUpon>
+ </Compile>
+ <Compile Include="winforms\views\AboutTheApplicationView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="winforms\views\AboutTheApplicationView.Designer.cs">
+ <DependentUpon>AboutTheApplicationView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\IAboutApplicationView.cs" />
+ <Compile Include="views\IMainMenuView.cs" />
+ <Compile Include="views\INavigationView.cs" />
+ <Compile Include="winforms\views\MainMenuView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="winforms\views\MainMenuView.Designer.cs">
+ <DependentUpon>MainMenuView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="winforms\views\NavigationView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="winforms\views\NavigationView.Designer.cs">
+ <DependentUpon>NavigationView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\IReportViewer.cs" />
+ <Compile Include="winforms\views\ReportViewer.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="winforms\views\ReportViewer.Designer.cs">
+ <DependentUpon>ReportViewer.cs</DependentUpon>
+ </Compile>
+ <Compile Include="winforms\views\ApplicationShell.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="winforms\views\ApplicationShell.Designer.cs">
+ <DependentUpon>ApplicationShell.cs</DependentUpon>
+ </Compile>
+ <Compile Include="winforms\views\ApplicationShellSpecs.cs" />
+ <Compile Include="views\IGettingStartedView.cs" />
+ <Compile Include="views\ILogFileView.cs" />
+ <Compile Include="views\INotificationIconView.cs" />
+ <Compile Include="views\IRegionManager.cs" />
+ <Compile Include="views\Shell.cs" />
+ <Compile Include="views\IStatusBarView.cs" />
+ <Compile Include="views\IUnhandledErrorView.cs" />
+ <Compile Include="winforms\views\LogFileView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="winforms\views\LogFileView.Designer.cs">
+ <DependentUpon>LogFileView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="winforms\views\NotificationIconView.cs" />
+ <Compile Include="winforms\views\StatusBarView.cs" />
+ <Compile Include="winforms\views\TaskTrayMessage.cs" />
+ <Compile Include="winforms\views\TitleBar.cs" />
+ <Compile Include="winforms\views\UnhandledErrorView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="winforms\views\UnhandledErrorView.Designer.cs">
+ <DependentUpon>UnhandledErrorView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="winforms\views\WelcomeScreen.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="winforms\views\WelcomeScreen.Designer.cs">
+ <DependentUpon>WelcomeScreen.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\ISplashScreenView.cs" />
+ <Compile Include="winforms\views\SplashScreenView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="winforms\views\SplashScreenView.Designer.cs">
+ <DependentUpon>SplashScreenView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="winforms\views\CheckForUpdatesView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="winforms\views\CheckForUpdatesView.Designer.cs">
+ <DependentUpon>CheckForUpdatesView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\ICheckForUpdatesView.cs" />
+ <Compile Include="winforms\databinding\BindingSelector.cs" />
+ <Compile Include="winforms\databinding\BindingSelectorSpecs.cs" />
+ <Compile Include="winforms\databinding\ComboBoxDataBindingSpecs.cs" />
+ <Compile Include="winforms\databinding\ComboBoxPropertyBinding.cs" />
+ <Compile Include="winforms\databinding\ControlBindingExtensions.cs" />
+ <Compile Include="winforms\databinding\Create.cs" />
+ <Compile Include="winforms\databinding\CreateSpecs.cs" />
+ <Compile Include="winforms\databinding\DateTimePickerPropertyBinding.cs" />
+ <Compile Include="winforms\databinding\DateTimePropertyBindingSpecs.cs" />
+ <Compile Include="winforms\databinding\IPropertyBinding.cs" />
+ <Compile Include="winforms\databinding\ListboxExtensions.cs" />
+ <Compile Include="winforms\databinding\PropertyBinder.cs" />
+ <Compile Include="winforms\databinding\PropertyBinderSpecs.cs" />
+ <Compile Include="winforms\databinding\PropertyInspector.cs" />
+ <Compile Include="winforms\databinding\PropertyInspectorFactory.cs" />
+ <Compile Include="winforms\databinding\PropertyInspectorSpecs.cs" />
+ <Compile Include="winforms\databinding\TextBoxDataBindingSpecs.cs" />
+ <Compile Include="winforms\databinding\TextBoxExtensions.cs" />
+ <Compile Include="winforms\databinding\TextPropertyBinding.cs" />
+ <Compile Include="winforms\helpers\BindableListBox.cs" />
+ <Compile Include="winforms\helpers\BindableListBoxSpecs.cs" />
+ <Compile Include="winforms\helpers\BindableListExtensions.cs" />
+ <Compile Include="winforms\helpers\BindableListFactory.cs" />
+ <Compile Include="winforms\helpers\BindableTextBox.cs" />
+ <Compile Include="winforms\helpers\BindableTextBoxExtensions.cs" />
+ <Compile Include="winforms\helpers\BindableTextBoxExtensionsSpecs.cs" />
+ <Compile Include="winforms\helpers\BindableTextBoxSpecs.cs" />
+ <Compile Include="winforms\helpers\BitmapRegion.cs" />
+ <Compile Include="winforms\helpers\ButtonExtensions.cs" />
+ <Compile Include="winforms\helpers\ComboBoxListControl.cs" />
+ <Compile Include="winforms\helpers\ControlAdapter.cs">
+ <SubType>Component</SubType>
+ </Compile>
+ <Compile Include="winforms\helpers\ControlExtensions.cs" />
+ <Compile Include="winforms\helpers\Events.cs" />
+ <Compile Include="winforms\helpers\EventTrigger.cs" />
+ <Compile Include="winforms\helpers\EventTriggerExtensions.cs" />
+ <Compile Include="winforms\helpers\EventTriggerSpecs.cs" />
+ <Compile Include="winforms\helpers\IBindableList.cs" />
+ <Compile Include="winforms\helpers\IEventTarget.cs" />
+ <Compile Include="winforms\helpers\IListControl.cs" />
+ <Compile Include="winforms\helpers\ITextBoxCommand.cs" />
+ <Compile Include="winforms\helpers\ITextControl.cs" />
+ <Compile Include="winforms\helpers\ListBoxListControl.cs" />
+ <Compile Include="winforms\helpers\RebindTextBoxCommand.cs" />
+ <Compile Include="winforms\helpers\RebindTextBoxCommandSpecs.cs" />
+ <Compile Include="winforms\helpers\SuspendLayout.cs" />
+ <Compile Include="winforms\helpers\TextControl.cs" />
+ <Compile Include="winforms\helpers\TextControlSpecs.cs" />
+ <Compile Include="winforms\keyboard\ShortcutKey.cs" />
+ <Compile Include="winforms\keyboard\ShortcutKeys.cs" />
+ <Compile Include="winforms\krypton\BindableListExtensions.cs" />
+ <Compile Include="winforms\krypton\KryptonComboBoxListControl.cs" />
+ <Compile Include="winforms\krypton\KryptonListBoxListControl.cs" />
+ <Compile Include="winforms\krypton\KryptonTextControl.cs" />
+ <Compile Include="winforms\krypton\ListboxExtensions.cs" />
+ <Compile Include="winforms\krypton\TextBoxExtensions.cs" />
+ <Compile Include="winforms\resources\ApplicationIcon.cs" />
+ <Compile Include="winforms\resources\ApplicationImage.cs" />
+ <Compile Include="winforms\resources\HybridIcon.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Properties\licenses.licx" />
+ <EmbeddedResource Include="winforms\views\AddCompanyView.resx">
+ <DependentUpon>AddCompanyView.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="winforms\views\AddBillPaymentView.resx">
+ <DependentUpon>AddBillPaymentView.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="winforms\views\ViewAllIncomesReport.resx">
+ <DependentUpon>ViewAllIncomesReport.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="winforms\views\ViewAllBills.resx">
+ <DependentUpon>ViewAllBills.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="winforms\views\ViewAllBillsReport.resx">
+ <DependentUpon>ViewAllBillsReport.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="winforms\views\ApplicationWindow.resx">
+ <DependentUpon>ApplicationWindow.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="winforms\views\SaveChangesView.resx">
+ <DependentUpon>SaveChangesView.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="winforms\views\AddNewIncomeView.resx">
+ <DependentUpon>AddNewIncomeView.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="winforms\views\ViewAllIncome.resx">
+ <DependentUpon>ViewAllIncome.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="winforms\views\AboutTheApplicationView.resx">
+ <DependentUpon>AboutTheApplicationView.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="winforms\views\MainMenuView.resx">
+ <DependentUpon>MainMenuView.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="winforms\views\NavigationView.resx">
+ <DependentUpon>NavigationView.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="winforms\views\ReportViewer.resx">
+ <DependentUpon>ReportViewer.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="winforms\views\ApplicationShell.resx">
+ <DependentUpon>ApplicationShell.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="winforms\views\LogFileView.resx">
+ <DependentUpon>LogFileView.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="winforms\views\UnhandledErrorView.resx">
+ <DependentUpon>UnhandledErrorView.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="winforms\views\WelcomeScreen.resx">
+ <DependentUpon>WelcomeScreen.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="winforms\views\SplashScreenView.resx">
+ <DependentUpon>SplashScreenView.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="winforms\views\CheckForUpdatesView.resx">
+ <DependentUpon>CheckForUpdatesView.cs</DependentUpon>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\commons\infrastructure\infrastructure.csproj">
+ <Project>{AA5EEED9-4531-45F7-AFCD-AD9717D2E405}</Project>
+ <Name>infrastructure</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\commons\utility\utility.csproj">
+ <Project>{DD8FD29E-7424-415C-9BA3-7D9F6ECBA161}</Project>
+ <Name>utility %28commons\utility%29</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\DTO\dto.csproj">
+ <Project>{ACF52FAB-435B-48C9-A383-C787CB2D8000}</Project>
+ <Name>dto</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Service.Contracts\service.contracts.csproj">
+ <Project>{41D2B68B-031B-44FF-BAC5-7752D9E29F94}</Project>
+ <Name>service.contracts</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\service.infrastructure\service.infrastructure.csproj">
+ <Project>{81412692-F3EE-4FBF-A7C7-69454DD1BD46}</Project>
+ <Name>service.infrastructure</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
</Project>
\ No newline at end of file
product/client/service.contracts/Application/IGetAllCompanysQuery.cs
@@ -1,10 +1,10 @@
-using System.Collections.Generic;
-using System.ServiceModel;
-using gorilla.commons.utility;
-using MoMoney.DTO;
-
-namespace MoMoney.Service.Contracts.Application
-{
- [ServiceContract]
- public interface IGetAllCompanysQuery : Query<IEnumerable<CompanyDTO>> {}
+using System.Collections.Generic;
+using System.ServiceModel;
+using gorilla.commons.utility;
+using MoMoney.DTO;
+
+namespace MoMoney.Service.Contracts.Application
+{
+ [ServiceContract]
+ public interface IGetAllCompanysQuery : Query<IEnumerable<CompanyDTO>> {}
}
\ No newline at end of file
product/client/service.infrastructure/threading/Synchronizer.cs
@@ -1,189 +0,0 @@
-using System;
-using System.Collections;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Security.Permissions;
-using System.Threading;
-
-namespace momoney.service.infrastructure.threading
-{
- [SecurityPermission(SecurityAction.Demand, ControlThread = true)]
- public class Synchronizer : ISynchronizeInvoke, IDisposable
- {
- readonly WorkerThread worker_thread;
-
- public Synchronizer()
- {
- worker_thread = new WorkerThread(this);
- }
-
- public bool InvokeRequired
- {
- get { return ReferenceEquals(Thread.CurrentThread, worker_thread); }
- }
-
- public IAsyncResult BeginInvoke(Delegate method, object[] args)
- {
- var result = new WorkItem(null, method, args);
- worker_thread.queue_work_item(result);
- return result;
- }
-
- public object EndInvoke(IAsyncResult result)
- {
- result.AsyncWaitHandle.WaitOne();
- return ((WorkItem) result).MethodReturnedValue;
- }
-
- public object Invoke(Delegate method, object[] args)
- {
- return EndInvoke(BeginInvoke(method, args));
- }
-
- ~Synchronizer()
- {
- }
-
- public void Dispose()
- {
- worker_thread.kill();
- }
-
- class WorkerThread
- {
- Thread thread;
- bool end_loop;
- readonly Mutex end_loop_mutex;
- readonly AutoResetEvent item_added;
- Synchronizer synchronizer;
- readonly Queue work_item_queue;
-
- internal WorkerThread(Synchronizer synchronizer)
- {
- this.synchronizer = synchronizer;
- end_loop = false;
- thread = null;
- end_loop_mutex = new Mutex();
- item_added = new AutoResetEvent(false);
- work_item_queue = new Queue();
- create_thread(true);
- }
-
- internal void queue_work_item(WorkItem work_item)
- {
- lock (work_item_queue.SyncRoot)
- {
- work_item_queue.Enqueue(work_item);
- item_added.Set();
- }
- }
-
- bool EndLoop
- {
- set
- {
- end_loop_mutex.WaitOne();
- end_loop = value;
- end_loop_mutex.ReleaseMutex();
- }
- get
- {
- var result = false;
- end_loop_mutex.WaitOne();
- result = end_loop;
- end_loop_mutex.ReleaseMutex();
- return result;
- }
- }
-
- Thread create_thread(bool auto_start)
- {
- if (thread != null)
- {
- Debug.Assert(false);
- return thread;
- }
- thread = new Thread(run) {Name = "Synchronizer Worker Thread"};
- if (auto_start)
- {
- thread.Start();
- }
- return thread;
- }
-
- void start()
- {
- Debug.Assert(thread != null);
- Debug.Assert(thread.IsAlive == false);
- thread.Start();
- }
-
- bool queue_empty
- {
- get
- {
- lock (work_item_queue.SyncRoot)
- {
- if (work_item_queue.Count > 0)
- {
- return false;
- }
- return true;
- }
- }
- }
-
- WorkItem GetNext()
- {
- if (queue_empty)
- {
- return null;
- }
- lock (work_item_queue.SyncRoot)
- {
- return (WorkItem) work_item_queue.Dequeue();
- }
- }
-
- void run()
- {
- while (EndLoop == false)
- {
- while (queue_empty == false)
- {
- if (EndLoop)
- {
- return;
- }
- var workItem = GetNext();
- workItem.CallBack();
- }
- item_added.WaitOne();
- }
- }
-
- public void kill()
- {
- //Kill is called on client thread - must use cached thread object
- Debug.Assert(thread != null);
- if (thread.IsAlive == false)
- {
- return;
- }
- EndLoop = true;
- item_added.Set();
-
- //Wait for thread to die
- thread.Join();
- if (end_loop_mutex != null)
- {
- end_loop_mutex.Close();
- }
- if (item_added != null)
- {
- item_added.Close();
- }
- }
- }
- }
-}
\ No newline at end of file
product/client/service.infrastructure/service.infrastructure.csproj
@@ -1,174 +1,173 @@
-๏ปฟ<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{81412692-F3EE-4FBF-A7C7-69454DD1BD46}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>momoney.service.infrastructure</RootNamespace>
- <AssemblyName>momoney.service.infrastructure</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="bdddoc, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\test\bdd.doc\bdddoc.dll</HintPath>
- </Reference>
- <Reference Include="Castle.Core, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\castle\Castle.Core.dll</HintPath>
- </Reference>
- <Reference Include="Castle.DynamicProxy2, Version=2.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\build\lib\app\castle\Castle.DynamicProxy2.dll</HintPath>
- </Reference>
- <Reference Include="developwithpassion.bdd, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\test\developwithpassion\developwithpassion.bdd.dll</HintPath>
- </Reference>
- <Reference Include="gorilla.commons.infrastructure, Version=2009.10.21.739, Culture=neutral, PublicKeyToken=687787ccb6c36c9f, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\build\lib\app\gorilla\gorilla.commons.infrastructure.dll</HintPath>
- </Reference>
- <Reference Include="gorilla.commons.infrastructure.thirdparty, Version=2009.10.21.739, Culture=neutral, PublicKeyToken=687787ccb6c36c9f, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\build\lib\app\gorilla\gorilla.commons.infrastructure.thirdparty.dll</HintPath>
- </Reference>
- <Reference Include="gorilla.commons.utility, Version=2009.10.21.739, Culture=neutral, PublicKeyToken=687787ccb6c36c9f, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\build\lib\app\gorilla\gorilla.commons.utility.dll</HintPath>
- </Reference>
- <Reference Include="gorilla.testing, Version=2009.5.5.194, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\build\lib\test\gorilla\gorilla.testing.dll</HintPath>
- </Reference>
- <Reference Include="Rhino.Mocks, Version=3.5.0.1337, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\test\rhino.mocks\Rhino.Mocks.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Deployment" />
- <Reference Include="System.Xml.Linq">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data.DataSetExtensions">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="debugging\Launch.cs" />
- <Compile Include="eventing\SynchronizedEventAggregator.cs" />
- <Compile Include="eventing\EventAggregatorSpecs.cs" />
- <Compile Include="eventing\IEvent.cs" />
- <Compile Include="eventing\EventAggregator.cs" />
- <Compile Include="eventing\EventSubscriber.cs" />
- <Compile Include="IProjectTasks.cs" />
- <Compile Include="logging\ILogFileTasks.cs" />
- <Compile Include="logging\LogFileTasks.cs" />
- <Compile Include="ProjectTasks.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="security\IsInRole.cs" />
- <Compile Include="security\IsInRoleSpecs.cs" />
- <Compile Include="security\Role.cs" />
- <Compile Include="threading\AsynchronousCommandProcessor.cs" />
- <Compile Include="threading\BackgroundThread.cs" />
- <Compile Include="threading\BackgroundThreadFactory.cs" />
- <Compile Include="threading\BackgroundThreadFactorySpecs.cs" />
- <Compile Include="threading\BackgroundThreadSpecs.cs" />
- <Compile Include="threading\SynchronousCommandProcessor.cs" />
- <Compile Include="threading\CommandProcessorSpecs.cs" />
- <Compile Include="threading\CommandProcessor.cs" />
- <Compile Include="threading\IntervalTimer.cs" />
- <Compile Include="threading\IntervalTimerSpecs.cs" />
- <Compile Include="threading\ITimerClient.cs" />
- <Compile Include="threading\IWorkerThread.cs" />
- <Compile Include="threading\RaiseEventInterceptor.cs" />
- <Compile Include="threading\RunOnBackgroundThreadInterceptor.cs" />
- <Compile Include="threading\RunOnBackgroundThreadInterceptorSpecs.cs" />
- <Compile Include="threading\RunOnUIThread.cs" />
- <Compile Include="threading\SynchronizationContextFactory.cs" />
- <Compile Include="threading\SynchronizedCommand.cs" />
- <Compile Include="threading\SynchronizedContext.cs" />
- <Compile Include="threading\Synchronizer.cs" />
- <Compile Include="threading\ThreadingExtensions.cs" />
- <Compile Include="threading\TimerFactory.cs" />
- <Compile Include="threading\TimerFactorySpecs.cs" />
- <Compile Include="threading\WorkerThread.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="threading\WorkItem.cs" />
- <Compile Include="transactions\EmptyUnitOfWork.cs" />
- <Compile Include="transactions\IUnitOfWork.cs" />
- <Compile Include="transactions\IUnitOfWorkFactory.cs" />
- <Compile Include="transactions\UnitOfWork.cs" />
- <Compile Include="transactions\UnitOfWorkFactory.cs" />
- <Compile Include="transactions\UnitOfWorkFactorySpecs.cs" />
- <Compile Include="transactions\UnitOfWorkSpecs.cs" />
- <Compile Include="updating\CancelUpdate.cs" />
- <Compile Include="updating\CancelUpdateSpecs.cs" />
- <Compile Include="updating\CurrentDeployment.cs" />
- <Compile Include="updating\DownloadTheLatestVersion.cs" />
- <Compile Include="updating\ICancelUpdate.cs" />
- <Compile Include="updating\IDeployment.cs" />
- <Compile Include="updating\IDownloadTheLatestVersion.cs" />
- <Compile Include="updating\IWhatIsTheAvailableVersion.cs" />
- <Compile Include="updating\NullDeployment.cs" />
- <Compile Include="updating\WhatIsTheAvailableVersion.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\commons\infrastructure.thirdparty\infrastructure.thirdparty.csproj">
- <Project>{04DC09B4-5DF9-44A6-8DD1-05941F0D0228}</Project>
- <Name>infrastructure.thirdparty</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\commons\infrastructure\infrastructure.csproj">
- <Project>{AA5EEED9-4531-45F7-AFCD-AD9717D2E405}</Project>
- <Name>infrastructure</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\commons\testing\test.helpers.csproj">
- <Project>{44E65096-9657-4716-90F8-4535BABE8039}</Project>
- <Name>test.helpers</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\commons\utility\utility.csproj">
- <Project>{DD8FD29E-7424-415C-9BA3-7D9F6ECBA161}</Project>
- <Name>utility %28commons\utility%29</Name>
- </ProjectReference>
- <ProjectReference Include="..\database\database.csproj">
- <Project>{580E68A8-EDEE-4350-8BBE-A053645B0F83}</Project>
- <Name>database</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
+๏ปฟ<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{81412692-F3EE-4FBF-A7C7-69454DD1BD46}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>momoney.service.infrastructure</RootNamespace>
+ <AssemblyName>momoney.service.infrastructure</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="bdddoc, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\test\bdd.doc\bdddoc.dll</HintPath>
+ </Reference>
+ <Reference Include="Castle.Core, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\castle\Castle.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="Castle.DynamicProxy2, Version=2.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\build\lib\app\castle\Castle.DynamicProxy2.dll</HintPath>
+ </Reference>
+ <Reference Include="developwithpassion.bdd, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\test\developwithpassion\developwithpassion.bdd.dll</HintPath>
+ </Reference>
+ <Reference Include="gorilla.commons.infrastructure, Version=2009.10.21.739, Culture=neutral, PublicKeyToken=687787ccb6c36c9f, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\build\lib\app\gorilla\gorilla.commons.infrastructure.dll</HintPath>
+ </Reference>
+ <Reference Include="gorilla.commons.infrastructure.thirdparty, Version=2009.10.21.739, Culture=neutral, PublicKeyToken=687787ccb6c36c9f, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\build\lib\app\gorilla\gorilla.commons.infrastructure.thirdparty.dll</HintPath>
+ </Reference>
+ <Reference Include="gorilla.commons.utility, Version=2009.10.21.739, Culture=neutral, PublicKeyToken=687787ccb6c36c9f, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\build\lib\app\gorilla\gorilla.commons.utility.dll</HintPath>
+ </Reference>
+ <Reference Include="gorilla.testing, Version=2009.5.5.194, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\build\lib\test\gorilla\gorilla.testing.dll</HintPath>
+ </Reference>
+ <Reference Include="Rhino.Mocks, Version=3.5.0.1337, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\test\rhino.mocks\Rhino.Mocks.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Deployment" />
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="debugging\Launch.cs" />
+ <Compile Include="eventing\SynchronizedEventAggregator.cs" />
+ <Compile Include="eventing\EventAggregatorSpecs.cs" />
+ <Compile Include="eventing\IEvent.cs" />
+ <Compile Include="eventing\EventAggregator.cs" />
+ <Compile Include="eventing\EventSubscriber.cs" />
+ <Compile Include="IProjectTasks.cs" />
+ <Compile Include="logging\ILogFileTasks.cs" />
+ <Compile Include="logging\LogFileTasks.cs" />
+ <Compile Include="ProjectTasks.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="security\IsInRole.cs" />
+ <Compile Include="security\IsInRoleSpecs.cs" />
+ <Compile Include="security\Role.cs" />
+ <Compile Include="threading\AsynchronousCommandProcessor.cs" />
+ <Compile Include="threading\BackgroundThread.cs" />
+ <Compile Include="threading\BackgroundThreadFactory.cs" />
+ <Compile Include="threading\BackgroundThreadFactorySpecs.cs" />
+ <Compile Include="threading\BackgroundThreadSpecs.cs" />
+ <Compile Include="threading\SynchronousCommandProcessor.cs" />
+ <Compile Include="threading\CommandProcessorSpecs.cs" />
+ <Compile Include="threading\CommandProcessor.cs" />
+ <Compile Include="threading\IntervalTimer.cs" />
+ <Compile Include="threading\IntervalTimerSpecs.cs" />
+ <Compile Include="threading\ITimerClient.cs" />
+ <Compile Include="threading\IWorkerThread.cs" />
+ <Compile Include="threading\RaiseEventInterceptor.cs" />
+ <Compile Include="threading\RunOnBackgroundThreadInterceptor.cs" />
+ <Compile Include="threading\RunOnBackgroundThreadInterceptorSpecs.cs" />
+ <Compile Include="threading\RunOnUIThread.cs" />
+ <Compile Include="threading\SynchronizationContextFactory.cs" />
+ <Compile Include="threading\SynchronizedCommand.cs" />
+ <Compile Include="threading\SynchronizedContext.cs" />
+ <Compile Include="threading\ThreadingExtensions.cs" />
+ <Compile Include="threading\TimerFactory.cs" />
+ <Compile Include="threading\TimerFactorySpecs.cs" />
+ <Compile Include="threading\WorkerThread.cs">
+ <SubType>Component</SubType>
+ </Compile>
+ <Compile Include="threading\WorkItem.cs" />
+ <Compile Include="transactions\EmptyUnitOfWork.cs" />
+ <Compile Include="transactions\IUnitOfWork.cs" />
+ <Compile Include="transactions\IUnitOfWorkFactory.cs" />
+ <Compile Include="transactions\UnitOfWork.cs" />
+ <Compile Include="transactions\UnitOfWorkFactory.cs" />
+ <Compile Include="transactions\UnitOfWorkFactorySpecs.cs" />
+ <Compile Include="transactions\UnitOfWorkSpecs.cs" />
+ <Compile Include="updating\CancelUpdate.cs" />
+ <Compile Include="updating\CancelUpdateSpecs.cs" />
+ <Compile Include="updating\CurrentDeployment.cs" />
+ <Compile Include="updating\DownloadTheLatestVersion.cs" />
+ <Compile Include="updating\ICancelUpdate.cs" />
+ <Compile Include="updating\IDeployment.cs" />
+ <Compile Include="updating\IDownloadTheLatestVersion.cs" />
+ <Compile Include="updating\IWhatIsTheAvailableVersion.cs" />
+ <Compile Include="updating\NullDeployment.cs" />
+ <Compile Include="updating\WhatIsTheAvailableVersion.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\commons\infrastructure.thirdparty\infrastructure.thirdparty.csproj">
+ <Project>{04DC09B4-5DF9-44A6-8DD1-05941F0D0228}</Project>
+ <Name>infrastructure.thirdparty</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\commons\infrastructure\infrastructure.csproj">
+ <Project>{AA5EEED9-4531-45F7-AFCD-AD9717D2E405}</Project>
+ <Name>infrastructure</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\commons\testing\test.helpers.csproj">
+ <Project>{44E65096-9657-4716-90F8-4535BABE8039}</Project>
+ <Name>test.helpers</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\commons\utility\utility.csproj">
+ <Project>{DD8FD29E-7424-415C-9BA3-7D9F6ECBA161}</Project>
+ <Name>utility %28commons\utility%29</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\database\database.csproj">
+ <Project>{580E68A8-EDEE-4350-8BBE-A053645B0F83}</Project>
+ <Name>database</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
</Project>
\ No newline at end of file
product/commons/infrastructure/proxies/RemotingProxyFactory.cs
@@ -1,44 +1,44 @@
-using System.Collections.Generic;
-using System.Runtime.Remoting.Messaging;
-using System.Runtime.Remoting.Proxies;
-using gorilla.commons.utility;
-
-namespace Gorilla.Commons.Infrastructure.Proxies
-{
- public class RemotingProxyFactory<T> : RealProxy
- {
- readonly T target;
- readonly IEnumerable<Interceptor> interceptors;
-
- public RemotingProxyFactory(T target, IEnumerable<Interceptor> interceptors) : base(typeof (T))
- {
- this.target = target;
- this.interceptors = interceptors;
- }
-
- public override IMessage Invoke(IMessage message)
- {
- if (message.is_an_implementation_of<IMethodCallMessage>())
- {
- var call = message.downcast_to<IMethodCallMessage>();
- var invocation = new MethodCallInvocation<T>(interceptors, call, target);
- invocation.proceed();
- return return_value(invocation.return_value, invocation.arguments, call);
- }
- return null;
- }
-
- IMessage return_value(object return_value, object[] out_parameters, IMethodCallMessage call)
- {
- return new ReturnMessage(return_value,
- out_parameters,
- out_parameters == null ? 0 : out_parameters.Length,
- call.LogicalCallContext, call);
- }
-
- public T create_proxy()
- {
- return GetTransparentProxy().downcast_to<T>();
- }
- }
+using System.Collections.Generic;
+using System.Runtime.Remoting.Messaging;
+using System.Runtime.Remoting.Proxies;
+using gorilla.commons.utility;
+
+namespace Gorilla.Commons.Infrastructure.Proxies
+{
+ public class RemotingProxyFactory<T> : RealProxy
+ {
+ readonly T target;
+ readonly IEnumerable<Interceptor> interceptors;
+
+ public RemotingProxyFactory(T target, IEnumerable<Interceptor> interceptors) : base(typeof (T))
+ {
+ this.target = target;
+ this.interceptors = interceptors;
+ }
+
+ public override IMessage Invoke(IMessage message)
+ {
+ if (message.is_an_implementation_of<IMethodCallMessage>())
+ {
+ var call = message.downcast_to<IMethodCallMessage>();
+ var invocation = new MethodCallInvocation<T>(interceptors, call, target);
+ invocation.proceed();
+ return return_value(invocation.return_value, invocation.arguments, call);
+ }
+ return null;
+ }
+
+ IMessage return_value(object return_value, object[] out_parameters, IMethodCallMessage call)
+ {
+ return new ReturnMessage(return_value,
+ out_parameters,
+ out_parameters == null ? 0 : out_parameters.Length,
+ call.LogicalCallContext, call);
+ }
+
+ public T create_proxy()
+ {
+ return GetTransparentProxy().downcast_to<T>();
+ }
+ }
}
\ No newline at end of file
product/commons/infrastructure/reflection/ApplicationAssembly.cs
@@ -1,20 +1,36 @@
-using System;
-using System.Collections.Generic;
-
-namespace Gorilla.Commons.Infrastructure.Reflection
-{
- public class ApplicationAssembly : Assembly
- {
- readonly System.Reflection.Assembly assembly;
-
- public ApplicationAssembly(System.Reflection.Assembly assembly)
- {
- this.assembly = assembly;
- }
-
- public IEnumerable<Type> all_types()
- {
- return assembly.GetTypes();
- }
- }
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using gorilla.commons.utility;
+
+namespace Gorilla.Commons.Infrastructure.Reflection
+{
+ public class ApplicationAssembly : Assembly
+ {
+ IList<Type> types;
+
+ public ApplicationAssembly(System.Reflection.Assembly assembly)
+ {
+ types = assembly.GetTypes().ToList();
+ }
+
+ public IEnumerable<Type> all_types()
+ {
+ return types;
+ }
+
+ public IEnumerable<Type> all_types(Specification<Type> matching)
+ {
+ return all_types().where(x => matching.is_satisfied_by(x));
+ }
+
+ public IEnumerable<Type> all_classes_that_implement<Contract>()
+ {
+ return all_types()
+ .where(x => typeof (Contract).IsAssignableFrom(x))
+ .where(x => !x.IsInterface)
+ .where(x => !x.IsAbstract)
+ .where(x => !x.IsGenericType);
+ }
+ }
}
\ No newline at end of file
product/commons/infrastructure/reflection/Assembly.cs
@@ -1,10 +1,13 @@
-using System;
-using System.Collections.Generic;
-
-namespace Gorilla.Commons.Infrastructure.Reflection
-{
- public interface Assembly
- {
- IEnumerable<Type> all_types();
- }
+using System;
+using System.Collections.Generic;
+using gorilla.commons.utility;
+
+namespace Gorilla.Commons.Infrastructure.Reflection
+{
+ public interface Assembly
+ {
+ IEnumerable<Type> all_types();
+ IEnumerable<Type> all_types(Specification<Type> matching);
+ IEnumerable<Type> all_classes_that_implement<T>();
+ }
}
\ No newline at end of file
product/commons/infrastructure.thirdparty/autofac/AutofacDependencyRegistryBuilder.cs
@@ -1,71 +1,75 @@
-using System;
-using Autofac;
-using Autofac.Builder;
-using Autofac.Modules;
-using Gorilla.Commons.Infrastructure.Container;
-using gorilla.commons.infrastructure.thirdparty.autofac;
-using gorilla.commons.infrastructure.thirdparty.Castle.DynamicProxy;
-using gorilla.commons.utility;
-
-namespace gorilla.commons.infrastructure.thirdparty.Autofac
-{
- public class AutofacDependencyRegistryBuilder : DependencyRegistration
- {
- readonly ContainerBuilder builder;
- readonly Func<IContainer> container;
-
- public AutofacDependencyRegistryBuilder() : this(new ContainerBuilder())
- {
- }
-
- public AutofacDependencyRegistryBuilder(ContainerBuilder builder)
- {
- this.builder = builder;
- builder.RegisterModule(new ImplicitCollectionSupportModule());
- builder.SetDefaultScope(InstanceScope.Factory);
- container = () => builder.Build();
- container = container.memorize();
- }
-
- public void singleton<Contract, Implementation>() where Implementation : Contract
- {
- builder.Register<Implementation>().As<Contract>().SingletonScoped();
- }
-
- public void singleton<Contract>(Func<Contract> instance_of_the_contract)
- {
- builder.Register(x => instance_of_the_contract()).As<Contract>().SingletonScoped();
- }
-
- public void transient<Contract, Implementation>() where Implementation : Contract
- {
- transient(typeof (Contract), typeof (Implementation));
- }
-
- public void transient(Type contract, Type implementation)
- {
- if (contract.is_a_generic_type())
- builder.RegisterGeneric(implementation).As(contract).FactoryScoped();
- else
- builder.Register(implementation).As(contract).FactoryScoped();
- }
-
- public void proxy<T>(Configuration<ProxyBuilder<T>> configuration, Func<T> target)
- {
- var proxy_builder = new CastleDynamicProxyBuilder<T>();
- configuration.configure(proxy_builder);
- builder.Register(x => proxy_builder.create_proxy_for(target)).As<T>().FactoryScoped();
- }
-
- public void proxy<T, Configuration>(Func<T> target)
- where Configuration : Configuration<ProxyBuilder<T>>, new()
- {
- proxy(new Configuration(), target);
- }
-
- public DependencyRegistry build()
- {
- return new AutofacDependencyRegistry(container);
- }
- }
+using System;
+using Autofac;
+using Autofac.Builder;
+using Autofac.Modules;
+using Gorilla.Commons.Infrastructure.Container;
+using gorilla.commons.infrastructure.thirdparty.autofac;
+using gorilla.commons.infrastructure.thirdparty.Castle.DynamicProxy;
+using gorilla.commons.utility;
+
+namespace gorilla.commons.infrastructure.thirdparty.Autofac
+{
+ public class AutofacDependencyRegistryBuilder : DependencyRegistration
+ {
+ readonly ContainerBuilder builder;
+ readonly Func<IContainer> container;
+
+ public AutofacDependencyRegistryBuilder(ContainerBuilder builder)
+ {
+ this.builder = builder;
+ builder.RegisterModule(new ImplicitCollectionSupportModule());
+ builder.SetDefaultScope(InstanceScope.Factory);
+ container = () => builder.Build();
+ container = container.memorize();
+ }
+
+ public void singleton<Contract, Implementation>() where Implementation : Contract
+ {
+ builder.Register<Implementation>().As<Contract>().SingletonScoped();
+ }
+
+ public void singleton(Type contract, Type implementation)
+ {
+ builder.Register(implementation).As(contract).SingletonScoped();
+ }
+
+ public void singleton<Contract>(Func<Contract> instance_of_the_contract)
+ {
+ builder
+ .Register(x => instance_of_the_contract())
+ .As<Contract>()
+ .SingletonScoped();
+ }
+
+ public void transient<Contract, Implementation>() where Implementation : Contract
+ {
+ transient(typeof (Contract), typeof (Implementation));
+ }
+
+ public void transient(Type contract, Type implementation)
+ {
+ if (contract.is_a_generic_type())
+ builder.RegisterGeneric(implementation).As(contract).FactoryScoped();
+ else
+ builder.Register(implementation).As(contract).FactoryScoped();
+ }
+
+ public void proxy<T>(Configuration<ProxyBuilder<T>> configuration, Func<T> target)
+ {
+ var proxy_builder = new CastleDynamicProxyBuilder<T>();
+ configuration.configure(proxy_builder);
+ builder.Register(x => proxy_builder.create_proxy_for(target)).As<T>().FactoryScoped();
+ }
+
+ public void proxy<T, Configuration>(Func<T> target)
+ where Configuration : Configuration<ProxyBuilder<T>>, new()
+ {
+ proxy(new Configuration(), target);
+ }
+
+ public DependencyRegistry build()
+ {
+ return new AutofacDependencyRegistry(container);
+ }
+ }
}
\ No newline at end of file
product/commons/infrastructure.thirdparty/castle/windsor/WindsorDependencyRegistry.cs
@@ -1,79 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Castle.Core;
-using Castle.Windsor;
-using Gorilla.Commons.Infrastructure.Container;
-using gorilla.commons.infrastructure.thirdparty.Castle.DynamicProxy;
-using gorilla.commons.utility;
-
-namespace gorilla.commons.infrastructure.thirdparty.Castle.Windsor
-{
- public class WindsorDependencyRegistry : DependencyRegistration, DependencyRegistry
- {
- readonly IWindsorContainer underlying_container;
-
- public WindsorDependencyRegistry(IWindsorContainer container)
- {
- underlying_container = container;
- }
-
- public Interface get_a<Interface>()
- {
- return underlying_container.Resolve<Interface>();
- //return underlying_container.Kernel.Resolve<Interface>();
- }
-
- public IEnumerable<Interface> get_all<Interface>()
- {
- return underlying_container.ResolveAll<Interface>();
- }
-
- public void singleton<Interface, Implementation>() where Implementation : Interface
- {
- var interface_type = typeof (Interface);
- var implementation_type = typeof (Implementation);
- underlying_container.AddComponent(create_a_key_using(interface_type, implementation_type), interface_type,
- implementation_type);
- }
-
- public void singleton<Contract>(Func<Contract> instance_of_the_contract)
- {
- underlying_container.Kernel.AddComponentInstance<Contract>(instance_of_the_contract());
- }
-
- public void transient<Interface, Implementation>() where Implementation : Interface
- {
- transient(typeof (Interface), typeof (Implementation));
- }
-
- public void transient(Type contract, Type implementation)
- {
- underlying_container.AddComponentLifeStyle(
- create_a_key_using(contract, implementation),
- contract, implementation, LifestyleType.Transient);
- }
-
- string create_a_key_using(Type interface_type, Type implementation_type)
- {
- return "{0}-{1}".formatted_using(interface_type.FullName, implementation_type.FullName);
- }
-
- public void proxy<T>(Configuration<ProxyBuilder<T>> configuration, Func<T> target)
- {
- var builder = new CastleDynamicProxyBuilder<T>();
- configuration.configure(builder);
- singleton(() => builder.create_proxy_for(target));
- }
-
- public void proxy<T, Configuration>(Func<T> target)
- where Configuration : Configuration<ProxyBuilder<T>>, new()
- {
- proxy(new Configuration(), target);
- }
-
- public DependencyRegistry build()
- {
- return this;
- }
- }
-}
\ No newline at end of file
product/commons/infrastructure.thirdparty/castle/windsor/WindsorDependencyRegistrySpecs.cs
@@ -1,44 +0,0 @@
-using Castle.Core;
-using Castle.Windsor;
-using developwithpassion.bdd.contexts;
-using Gorilla.Commons.Infrastructure.Container;
-using Gorilla.Commons.Testing;
-
-namespace gorilla.commons.infrastructure.thirdparty.Castle.Windsor
-{
- [Concern(typeof (WindsorDependencyRegistry))]
- public abstract class behaves_like_windsor_dependency_registry : concerns_for<DependencyRegistry, WindsorDependencyRegistry>
- {
- }
-
- [Concern(typeof (WindsorDependencyRegistry))]
- public class when_registering_a_singleton_component_with_the_windsor_container :
- behaves_like_windsor_dependency_registry
- {
- it should_return_the_same_instance_each_time_its_resolved =
- () => result.should_be_the_same_instance_as(sut.get_a<IBird>());
-
- it should_not_return_null = () => result.should_not_be_null();
-
- context c = () =>
- {
- var container = the_dependency<IWindsorContainer>();
- var bird = new BlueBird();
- container.is_told_to(x => x.Resolve<IBird>()).it_will_return(bird).Repeat.Any();
- };
-
- because b = () => { result = sut.get_a<IBird>(); };
-
-
- static IBird result;
- }
-
- [Singleton]
- public class BlueBird : IBird
- {
- }
-
- public interface IBird
- {
- }
-}
\ No newline at end of file
product/commons/infrastructure.thirdparty/DependencyRegistration.cs
@@ -1,17 +1,20 @@
-using System;
-using Gorilla.Commons.Infrastructure.Container;
-using gorilla.commons.infrastructure.thirdparty.Castle.DynamicProxy;
-using gorilla.commons.utility;
-
-namespace gorilla.commons.infrastructure.thirdparty
-{
- public interface DependencyRegistration : Builder<DependencyRegistry>
- {
- void singleton<Contract, Implementation>() where Implementation : Contract;
- void singleton<Contract>(Func<Contract> instance_of_the_contract);
- void transient<Contract, Implementation>() where Implementation : Contract;
- void transient(Type contract, Type implementation);
- void proxy<T>(Configuration<ProxyBuilder<T>> configuration, Func<T> target);
- void proxy<T, Configuration>(Func<T> target) where Configuration : Configuration<ProxyBuilder<T>>, new();
- }
+using System;
+using Gorilla.Commons.Infrastructure.Container;
+using gorilla.commons.infrastructure.thirdparty.Castle.DynamicProxy;
+using gorilla.commons.utility;
+
+namespace gorilla.commons.infrastructure.thirdparty
+{
+ public interface DependencyRegistration : Builder<DependencyRegistry>
+ {
+ void singleton<Contract, Implementation>() where Implementation : Contract;
+ void singleton(Type contract, Type implementation);
+ void singleton<Contract>(Func<Contract> instance_of_the_contract);
+
+ void transient<Contract, Implementation>() where Implementation : Contract;
+ void transient(Type contract, Type implementation);
+
+ [Obsolete]
+ void proxy<T, Configuration>(Func<T> target) where Configuration : Configuration<ProxyBuilder<T>>, new();
+ }
}
\ No newline at end of file
product/commons/infrastructure.thirdparty/infrastructure.thirdparty.csproj
@@ -1,158 +1,156 @@
-๏ปฟ<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{04DC09B4-5DF9-44A6-8DD1-05941F0D0228}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>gorilla.commons.infrastructure.thirdparty</RootNamespace>
- <AssemblyName>gorilla.commons.infrastructure.thirdparty</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Autofac, Version=1.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\auto.fac\Autofac.dll</HintPath>
- </Reference>
- <Reference Include="AutofacContrib.DynamicProxy2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\auto.fac.contrib\AutofacContrib.DynamicProxy2.dll</HintPath>
- </Reference>
- <Reference Include="bdddoc, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\test\bdd.doc\bdddoc.dll</HintPath>
- </Reference>
- <Reference Include="Castle.Core, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\castle\Castle.Core.dll</HintPath>
- </Reference>
- <Reference Include="Castle.DynamicProxy2, Version=2.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\castle\Castle.DynamicProxy2.dll</HintPath>
- </Reference>
- <Reference Include="Castle.MicroKernel, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\castle\Castle.MicroKernel.dll</HintPath>
- </Reference>
- <Reference Include="Castle.Windsor, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\castle\Castle.Windsor.dll</HintPath>
- </Reference>
- <Reference Include="developwithpassion.bdd, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\test\developwithpassion\developwithpassion.bdd.dll</HintPath>
- </Reference>
- <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\log4net\log4net.dll</HintPath>
- </Reference>
- <Reference Include="MbUnit.Framework, Version=2.4.2.175, Culture=neutral, PublicKeyToken=5e72ecd30bc408d5">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\test\mbunit\MbUnit.Framework.dll</HintPath>
- </Reference>
- <Reference Include="Rhino.Mocks, Version=3.5.0.1337, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\test\rhino.mocks\Rhino.Mocks.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Xml.Linq">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data.DataSetExtensions">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="autofac\AutofacDependencyRegistry.cs" />
- <Compile Include="autofac\AutofacDependencyRegistryBuilder.cs" />
- <Compile Include="autofac\AutofacSpecs.cs" />
- <Compile Include="castle\dynamicproxy\CastleDynamicInterceptorConstraint.cs" />
- <Compile Include="castle\dynamicproxy\CastleDynamicInterceptorConstraintFactory.cs" />
- <Compile Include="castle\dynamicproxy\interceptors\SynchronizeInvokeInterceptor.cs" />
- <Compile Include="castle\dynamicproxy\CastleDynamicMethodCallTrackerFactory.cs" />
- <Compile Include="castle\windsor\configuration\RegistrationConfiguration.cs" />
- <Compile Include="castle\windsor\configuration\LoggingInterceptor.cs" />
- <Compile Include="castle\windsor\WindsorExtensions.cs" />
- <Compile Include="DependencyRegistration.cs" />
- <Compile Include="castle\dynamicproxy\ConstraintSelector.cs" />
- <Compile Include="castle\dynamicproxy\InterceptorConstraint.cs" />
- <Compile Include="castle\dynamicproxy\InterceptorConstraintFactory.cs" />
- <Compile Include="castle\dynamicproxy\MethodCallTrackerFactory.cs" />
- <Compile Include="castle\dynamicproxy\InterceptorConstraintFactorySpecs.cs" />
- <Compile Include="castle\dynamicproxy\InterceptorConstraintSpecs.cs" />
- <Compile Include="castle\dynamicproxy\interceptors\MethodCallTracker.cs" />
- <Compile Include="castle\dynamicproxy\interceptors\CastleDynamicMethodCallTracker.cs" />
- <Compile Include="castle\dynamicproxy\interceptors\MethodCallTrackerSpecs.cs" />
- <Compile Include="castle\dynamicproxy\interceptors\SelectiveInterceptor.cs" />
- <Compile Include="castle\dynamicproxy\ProxyBuilder.cs" />
- <Compile Include="castle\dynamicproxy\ProxyFactory.cs" />
- <Compile Include="castle\dynamicproxy\Lazy.cs" />
- <Compile Include="castle\dynamicproxy\LazyLoadedInterceptor.cs" />
- <Compile Include="castle\dynamicproxy\LazySpecs.cs" />
- <Compile Include="castle\dynamicproxy\CastleDynamicProxyBuilder.cs" />
- <Compile Include="castle\dynamicproxy\ProxyBuilderSpecs.cs" />
- <Compile Include="castle\dynamicproxy\CastleDynamicProxyFactory.cs" />
- <Compile Include="castle\dynamicproxy\ProxyFactorySpecs.cs" />
- <Compile Include="castle\windsor\configuration\ApplyLoggingInterceptor.cs" />
- <Compile Include="castle\windsor\configuration\ComponentRegistrationConfiguration.cs" />
- <Compile Include="castle\windsor\configuration\ConfigureComponentLifestyle.cs" />
- <Compile Include="castle\windsor\configuration\ComponentExclusionSpecification.cs" />
- <Compile Include="castle\windsor\configuration\LogComponent.cs" />
- <Compile Include="castle\windsor\configuration\LogEverythingInterceptor.cs" />
- <Compile Include="castle\windsor\configuration\RegisterComponentContract.cs" />
- <Compile Include="castle\windsor\WindsorContainerFactory.cs" />
- <Compile Include="castle\windsor\WindsorDependencyRegistry.cs" />
- <Compile Include="castle\windsor\WindsorDependencyRegistrySpecs.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\infrastructure\infrastructure.csproj">
- <Project>{AA5EEED9-4531-45F7-AFCD-AD9717D2E405}</Project>
- <Name>infrastructure</Name>
- </ProjectReference>
- <ProjectReference Include="..\testing\test.helpers.csproj">
- <Project>{44E65096-9657-4716-90F8-4535BABE8039}</Project>
- <Name>test.helpers</Name>
- </ProjectReference>
- <ProjectReference Include="..\utility\utility.csproj">
- <Project>{DD8FD29E-7424-415C-9BA3-7D9F6ECBA161}</Project>
- <Name>utility</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
+๏ปฟ<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{04DC09B4-5DF9-44A6-8DD1-05941F0D0228}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>gorilla.commons.infrastructure.thirdparty</RootNamespace>
+ <AssemblyName>gorilla.commons.infrastructure.thirdparty</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Autofac, Version=1.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\auto.fac\Autofac.dll</HintPath>
+ </Reference>
+ <Reference Include="AutofacContrib.DynamicProxy2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\auto.fac.contrib\AutofacContrib.DynamicProxy2.dll</HintPath>
+ </Reference>
+ <Reference Include="bdddoc, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\test\bdd.doc\bdddoc.dll</HintPath>
+ </Reference>
+ <Reference Include="Castle.Core, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\castle\Castle.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="Castle.DynamicProxy2, Version=2.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\castle\Castle.DynamicProxy2.dll</HintPath>
+ </Reference>
+ <Reference Include="Castle.MicroKernel, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\castle\Castle.MicroKernel.dll</HintPath>
+ </Reference>
+ <Reference Include="Castle.Windsor, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\castle\Castle.Windsor.dll</HintPath>
+ </Reference>
+ <Reference Include="developwithpassion.bdd, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\test\developwithpassion\developwithpassion.bdd.dll</HintPath>
+ </Reference>
+ <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\app\log4net\log4net.dll</HintPath>
+ </Reference>
+ <Reference Include="MbUnit.Framework, Version=2.4.2.175, Culture=neutral, PublicKeyToken=5e72ecd30bc408d5">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\test\mbunit\MbUnit.Framework.dll</HintPath>
+ </Reference>
+ <Reference Include="Rhino.Mocks, Version=3.5.0.1337, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\build\lib\test\rhino.mocks\Rhino.Mocks.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="autofac\AutofacDependencyRegistry.cs" />
+ <Compile Include="autofac\AutofacDependencyRegistryBuilder.cs" />
+ <Compile Include="autofac\AutofacSpecs.cs" />
+ <Compile Include="castle\dynamicproxy\CastleDynamicInterceptorConstraint.cs" />
+ <Compile Include="castle\dynamicproxy\CastleDynamicInterceptorConstraintFactory.cs" />
+ <Compile Include="castle\dynamicproxy\interceptors\SynchronizeInvokeInterceptor.cs" />
+ <Compile Include="castle\dynamicproxy\CastleDynamicMethodCallTrackerFactory.cs" />
+ <Compile Include="castle\windsor\configuration\RegistrationConfiguration.cs" />
+ <Compile Include="castle\windsor\configuration\LoggingInterceptor.cs" />
+ <Compile Include="castle\windsor\WindsorExtensions.cs" />
+ <Compile Include="DependencyRegistration.cs" />
+ <Compile Include="castle\dynamicproxy\ConstraintSelector.cs" />
+ <Compile Include="castle\dynamicproxy\InterceptorConstraint.cs" />
+ <Compile Include="castle\dynamicproxy\InterceptorConstraintFactory.cs" />
+ <Compile Include="castle\dynamicproxy\MethodCallTrackerFactory.cs" />
+ <Compile Include="castle\dynamicproxy\InterceptorConstraintFactorySpecs.cs" />
+ <Compile Include="castle\dynamicproxy\InterceptorConstraintSpecs.cs" />
+ <Compile Include="castle\dynamicproxy\interceptors\MethodCallTracker.cs" />
+ <Compile Include="castle\dynamicproxy\interceptors\CastleDynamicMethodCallTracker.cs" />
+ <Compile Include="castle\dynamicproxy\interceptors\MethodCallTrackerSpecs.cs" />
+ <Compile Include="castle\dynamicproxy\interceptors\SelectiveInterceptor.cs" />
+ <Compile Include="castle\dynamicproxy\ProxyBuilder.cs" />
+ <Compile Include="castle\dynamicproxy\ProxyFactory.cs" />
+ <Compile Include="castle\dynamicproxy\Lazy.cs" />
+ <Compile Include="castle\dynamicproxy\LazyLoadedInterceptor.cs" />
+ <Compile Include="castle\dynamicproxy\LazySpecs.cs" />
+ <Compile Include="castle\dynamicproxy\CastleDynamicProxyBuilder.cs" />
+ <Compile Include="castle\dynamicproxy\ProxyBuilderSpecs.cs" />
+ <Compile Include="castle\dynamicproxy\CastleDynamicProxyFactory.cs" />
+ <Compile Include="castle\dynamicproxy\ProxyFactorySpecs.cs" />
+ <Compile Include="castle\windsor\configuration\ApplyLoggingInterceptor.cs" />
+ <Compile Include="castle\windsor\configuration\ComponentRegistrationConfiguration.cs" />
+ <Compile Include="castle\windsor\configuration\ConfigureComponentLifestyle.cs" />
+ <Compile Include="castle\windsor\configuration\ComponentExclusionSpecification.cs" />
+ <Compile Include="castle\windsor\configuration\LogComponent.cs" />
+ <Compile Include="castle\windsor\configuration\LogEverythingInterceptor.cs" />
+ <Compile Include="castle\windsor\configuration\RegisterComponentContract.cs" />
+ <Compile Include="castle\windsor\WindsorContainerFactory.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\infrastructure\infrastructure.csproj">
+ <Project>{AA5EEED9-4531-45F7-AFCD-AD9717D2E405}</Project>
+ <Name>infrastructure</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\testing\test.helpers.csproj">
+ <Project>{44E65096-9657-4716-90F8-4535BABE8039}</Project>
+ <Name>test.helpers</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\utility\utility.csproj">
+ <Project>{DD8FD29E-7424-415C-9BA3-7D9F6ECBA161}</Project>
+ <Name>utility</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
</Project>
\ No newline at end of file
product/commons/utility/ConversionExtensions.cs
@@ -1,37 +1,37 @@
-using System;
-using System.Collections;
-
-namespace gorilla.commons.utility
-{
- public static class ConversionExtensions
- {
- public static T downcast_to<T>(this object object_to_cast)
- {
- return (T) object_to_cast;
- }
-
- public static T converted_to<T>(this object item_to_convert)
- {
- if (item_to_convert.is_an_implementation_of<IConvertible>())
- {
- return (T) Convert.ChangeType(item_to_convert, typeof (T));
- }
- return item_to_convert.downcast_to<T>();
- }
-
- public static bool is_an_implementation_of<T>(this object item)
- {
- return item is T;
- }
-
- public static void call_on<T>(this object target, Action<T> action) where T : class
- {
- if (target as T != null) action(target as T);
- }
-
- public static void call_on_each<T>(this IEnumerable items, Action<T> action) where T : class
- {
- foreach (var item in items) item.call_on(action);
- }
- }
+using System;
+using System.Collections;
+
+namespace gorilla.commons.utility
+{
+ public static class ConversionExtensions
+ {
+ public static T downcast_to<T>(this object object_to_cast)
+ {
+ return (T) object_to_cast;
+ }
+
+ public static T converted_to<T>(this object item_to_convert)
+ {
+ if (item_to_convert.is_an_implementation_of<IConvertible>())
+ {
+ return (T) Convert.ChangeType(item_to_convert, typeof (T));
+ }
+ return item_to_convert.downcast_to<T>();
+ }
+
+ public static bool is_an_implementation_of<T>(this object item)
+ {
+ return item is T;
+ }
+
+ public static void call_on<T>(this object target, Action<T> action) where T : class
+ {
+ if (target as T != null) action(target as T);
+ }
+
+ public static void call_on_each<T>(this IEnumerable items, Action<T> action) where T : class
+ {
+ foreach (var item in items) item.call_on(action);
+ }
+ }
}
\ No newline at end of file
product/commons/utility/Date.cs
@@ -1,89 +1,89 @@
-using System;
-using System.Globalization;
-using gorilla.commons.utility;
-
-namespace Gorilla.Commons.Utility
-{
- [Serializable]
- public class Date : IComparable<Date>, IComparable, IEquatable<Date>
- {
- readonly long ticks;
-
- public Date(int year, int month, int day)
- {
- ticks = new DateTime(year, month, day).Ticks;
- }
-
- public bool is_in(Year the_year)
- {
- return the_year.represents(to_date_time());
- }
-
- public DateTime to_date_time()
- {
- return new DateTime(ticks);
- }
-
- static public implicit operator Date(DateTime date)
- {
- return new Date(date.Year, date.Month, date.Day);
- }
-
- static public implicit operator DateTime(Date date)
- {
- return date.to_date_time();
- }
-
- public int CompareTo(Date other)
- {
- var the_other_date = other.downcast_to<Date>();
- if (ticks.Equals(the_other_date.ticks))
- {
- return 0;
- }
- return ticks > the_other_date.ticks ? 1 : -1;
- }
-
- public bool Equals(Date other)
- {
- if (ReferenceEquals(null, other)) return false;
- if (ReferenceEquals(this, other)) return true;
- return other.ticks == ticks;
- }
-
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- if (ReferenceEquals(this, obj)) return true;
- if (obj.GetType() != typeof (Date)) return false;
- return Equals((Date) obj);
- }
-
- public override int GetHashCode()
- {
- return ticks.GetHashCode();
- }
-
- public static bool operator ==(Date left, Date right)
- {
- return Equals(left, right);
- }
-
- public static bool operator !=(Date left, Date right)
- {
- return !Equals(left, right);
- }
-
- public override string ToString()
- {
- return new DateTime(ticks, DateTimeKind.Local).ToString("MMM dd yyyy", CultureInfo.InvariantCulture);
- }
-
- int IComparable.CompareTo(object obj)
- {
- if (obj.is_an_implementation_of<Date>())
- return CompareTo(obj.downcast_to<Date>());
- throw new InvalidOperationException();
- }
- }
+using System;
+using System.Globalization;
+using gorilla.commons.utility;
+
+namespace Gorilla.Commons.Utility
+{
+ [Serializable]
+ public class Date : IComparable<Date>, IComparable, IEquatable<Date>
+ {
+ readonly long ticks;
+
+ public Date(int year, int month, int day)
+ {
+ ticks = new DateTime(year, month, day).Ticks;
+ }
+
+ public bool is_in(Year the_year)
+ {
+ return the_year.represents(to_date_time());
+ }
+
+ public DateTime to_date_time()
+ {
+ return new DateTime(ticks);
+ }
+
+ static public implicit operator Date(DateTime date)
+ {
+ return new Date(date.Year, date.Month, date.Day);
+ }
+
+ static public implicit operator DateTime(Date date)
+ {
+ return date.to_date_time();
+ }
+
+ public int CompareTo(Date other)
+ {
+ var the_other_date = other.downcast_to<Date>();
+ if (ticks.Equals(the_other_date.ticks))
+ {
+ return 0;
+ }
+ return ticks > the_other_date.ticks ? 1 : -1;
+ }
+
+ public bool Equals(Date other)
+ {
+ if (ReferenceEquals(null, other)) return false;
+ if (ReferenceEquals(this, other)) return true;
+ return other.ticks == ticks;
+ }
+
+ public override bool Equals(object obj)
+ {
+ if (ReferenceEquals(null, obj)) return false;
+ if (ReferenceEquals(this, obj)) return true;
+ if (obj.GetType() != typeof (Date)) return false;
+ return Equals((Date) obj);
+ }
+
+ public override int GetHashCode()
+ {
+ return ticks.GetHashCode();
+ }
+
+ public static bool operator ==(Date left, Date right)
+ {
+ return Equals(left, right);
+ }
+
+ public static bool operator !=(Date left, Date right)
+ {
+ return !Equals(left, right);
+ }
+
+ public override string ToString()
+ {
+ return new DateTime(ticks, DateTimeKind.Local).ToString("MMM dd yyyy", CultureInfo.InvariantCulture);
+ }
+
+ int IComparable.CompareTo(object obj)
+ {
+ if (obj.is_an_implementation_of<Date>())
+ return CompareTo(obj.downcast_to<Date>());
+ throw new InvalidOperationException();
+ }
+ }
}
\ No newline at end of file
product/commons/utility/RegistryExtensions.cs
@@ -1,29 +1,29 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace gorilla.commons.utility
-{
- public static class RegistryExtensions
- {
- public static K find_an_implementation_of<T, K>(this Registry<T> registry) where K : T
- {
- try
- {
- return registry
- .all()
- .Single(p => p.is_an_implementation_of<K>())
- .downcast_to<K>();
- }
- catch (Exception exception)
- {
- throw new Exception("Could Not Find an implementation of".formatted_using(typeof (K)), exception);
- }
- }
-
- public static IEnumerable<T> sort_all_using<T>(this Registry<T> registry, IComparer<T> comparer)
- {
- return registry.all().sorted_using(comparer);
- }
- }
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace gorilla.commons.utility
+{
+ public static class RegistryExtensions
+ {
+ public static K find_an_implementation_of<T, K>(this Registry<T> registry) where K : T
+ {
+ try
+ {
+ return registry
+ .all()
+ .Single(p => p.is_an_implementation_of<K>())
+ .downcast_to<K>();
+ }
+ catch (Exception exception)
+ {
+ throw new Exception("Could Not Find an implementation of".formatted_using(typeof (K)), exception);
+ }
+ }
+
+ public static IEnumerable<T> sort_all_using<T>(this Registry<T> registry, IComparer<T> comparer)
+ {
+ return registry.all().sorted_using(comparer);
+ }
+ }
}
\ No newline at end of file
product/commons/utility/SpecificationExtensions.cs
@@ -1,40 +1,40 @@
-using System;
-using System.Collections.Generic;
-
-namespace gorilla.commons.utility
-{
- static public class SpecificationExtensions
- {
- static public IEnumerable<T> that_satisfy<T>(this IEnumerable<T> items_to_peek_in_to,
- Predicate<T> criteria_to_satisfy)
- {
- foreach (var item in items_to_peek_in_to ?? new List<T>())
- if (item.satisfies(criteria_to_satisfy)) yield return item;
- }
-
- static public bool satisfies<T>(this T item_to_interrogate, Predicate<T> criteria_to_satisfy)
- {
- return criteria_to_satisfy(item_to_interrogate);
- }
-
- static public bool satisfies<T>(this T item_to_validate, Specification<T> criteria_to_satisfy)
- {
- return item_to_validate.satisfies(criteria_to_satisfy.is_satisfied_by);
- }
-
- static public Specification<T> and<T>(this Specification<T> left, Specification<T> right)
- {
- return new PredicateSpecification<T>(x => left.is_satisfied_by(x) && right.is_satisfied_by(x));
- }
-
- static public Specification<T> or<T>(this Specification<T> left, Specification<T> right)
- {
- return new PredicateSpecification<T>(x => left.is_satisfied_by(x) || right.is_satisfied_by(x));
- }
-
- static public Specification<T> not<T>(this Specification<T> original)
- {
- return new PredicateSpecification<T>(x => !original.is_satisfied_by(x));
- }
- }
+using System;
+using System.Collections.Generic;
+
+namespace gorilla.commons.utility
+{
+ static public class SpecificationExtensions
+ {
+ static public IEnumerable<T> that_satisfy<T>(this IEnumerable<T> items_to_peek_in_to,
+ Predicate<T> criteria_to_satisfy)
+ {
+ foreach (var item in items_to_peek_in_to ?? new List<T>())
+ if (item.satisfies(criteria_to_satisfy)) yield return item;
+ }
+
+ static public bool satisfies<T>(this T item_to_interrogate, Predicate<T> criteria_to_satisfy)
+ {
+ return criteria_to_satisfy(item_to_interrogate);
+ }
+
+ static public bool satisfies<T>(this T item_to_validate, Specification<T> criteria_to_satisfy)
+ {
+ return item_to_validate.satisfies(criteria_to_satisfy.is_satisfied_by);
+ }
+
+ static public Specification<T> and<T>(this Specification<T> left, Specification<T> right)
+ {
+ return new PredicateSpecification<T>(x => left.is_satisfied_by(x) && right.is_satisfied_by(x));
+ }
+
+ static public Specification<T> or<T>(this Specification<T> left, Specification<T> right)
+ {
+ return new PredicateSpecification<T>(x => left.is_satisfied_by(x) || right.is_satisfied_by(x));
+ }
+
+ static public Specification<T> not<T>(this Specification<T> original)
+ {
+ return new PredicateSpecification<T>(x => !original.is_satisfied_by(x));
+ }
+ }
}
\ No newline at end of file