Commit 5a2bfe2
Changed files (168)
product
client
boot
boot
Modules
presentation
Model
Menu
Presenters
resources
Views
presentation.winforms
databinding
helpers
krypton
views
tests
unit
client
presentation
model
presenters
winforms
databinding
service.infrastructure
threading
product/client/boot/boot/container/registration/WireUpTheViewsInToThe.cs
@@ -25,25 +25,29 @@ namespace MoMoney.boot.container.registration
register.singleton<ISynchronizeInvoke>(() => shell);
register.singleton<IRegionManager>(() => shell);
register.singleton(() => shell);
- register_tab<IAboutApplicationView, AboutTheApplicationView>();
- register_tab<ISplashScreenView, SplashScreenView>();
- register_tab<IAddCompanyView, AddCompanyView>();
- register_tab<IViewAllBills, ViewAllBills>();
- register_tab<IAddBillPaymentView, AddBillPaymentView>();
- register_tab<IMainMenuView, MainMenuView>();
- register_tab<IAddNewIncomeView, AddNewIncomeView>();
- register_tab<IViewIncomeHistory, ViewAllIncome>();
- register_tab<INotificationIconView, NotificationIconView>();
- register_tab<IStatusBarView, StatusBarView>();
- register_tab<IGettingStartedView, WelcomeScreen>();
- register_tab<ILogFileView, LogFileView>();
+ register_singleton<IAboutApplicationView, AboutTheApplicationView>();
+ register_singleton<ISplashScreenView, SplashScreenView>();
+ 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.singleton<ITitleBar, TitleBar>();
+ register.singleton<ITaskTrayMessageView, TaskTrayMessage>();
- register.transient<ISaveChangesView, SaveChangesView>();
- register.transient<ICheckForUpdatesView, CheckForUpdatesView>();
- register.transient<IUnhandledErrorView, UnhandledErrorView>();
+ register_singleton<ISelectFileToOpenDialog, SelectFileToOpenDialog>();
+ register_singleton<ISelectFileToSaveToDialog, SelectFileToSaveToDialog>();
+ register_singleton<ISaveChangesView, SaveChangesView>();
+ register_singleton<ICheckForUpdatesView, CheckForUpdatesView>();
+ register_singleton<IUnhandledErrorView, UnhandledErrorView>();
}
- void register_tab<Interface, View>() where View : Interface, new() where Interface : momoney.presentation.views.View
+ void register_singleton<Interface, View>() where View : Interface, new() where Interface : momoney.presentation.views.View
{
var view = new View();
register.singleton<Interface>(() => view);
product/client/boot/boot/StartTheApplication.cs
@@ -26,7 +26,7 @@ namespace MoMoney.boot
public void run()
{
command.run();
- processor.add(() => thread.Dispose());
+ thread.Dispose();
processor.run();
}
}
product/client/boot/boot/WindowsFormsApplication.cs
@@ -11,8 +11,10 @@ using momoney.boot;
using MoMoney.boot.container;
using momoney.presentation.model.eventing;
using MoMoney.Presentation.Presenters;
+using MoMoney.Presentation.Winforms.Views;
using MoMoney.Service.Infrastructure.Eventing;
using momoney.service.infrastructure.threading;
+using MoMoney.Service.Infrastructure.Threading;
namespace MoMoney.boot
{
@@ -29,7 +31,7 @@ namespace MoMoney.boot
{
using (new LogTime())
{
- Func<ISplashScreenPresenter> presenter = () => new SplashScreenPresenter();
+ Func<ISplashScreenPresenter> presenter = () => new SplashScreenPresenter(new IntervalTimer(), new SplashScreenView());
presenter = presenter.memorize();
var startup_screen = new DisplayTheSplashScreen(presenter).on_a_background_thread();
product/client/boot/Modules/ApplicationShellModule.cs
@@ -21,6 +21,7 @@ namespace MoMoney.Modules
command.run<TaskTrayPresenter>();
command.run<MainMenuPresenter>();
command.run<UnhandledErrorPresenter>();
+ command.run<TitleBarPresenter>();
}
}
}
\ No newline at end of file
product/client/boot/boot.csproj
@@ -152,7 +152,6 @@
<Compile Include="modules\DatabaseModule.cs" />
<Compile Include="modules\ApplicationMenuModule.cs" />
<Compile Include="modules\GettingStartedModule.cs" />
- <Compile Include="modules\TitleBarPresenter.cs" />
<Compile Include="modules\ToolbarModule.cs" />
<Compile Include="boot\hookup.cs" />
<Compile Include="modules\core\LoadPresentationModulesCommand.cs" />
@@ -215,6 +214,10 @@
<Project>{ACF52FAB-435B-48C9-A383-C787CB2D8000}</Project>
<Name>dto</Name>
</ProjectReference>
+ <ProjectReference Include="..\presentation.winforms\presentation.winforms.csproj">
+ <Project>{F3E06696-0CD2-46EE-B117-A05C1E7E8CD8}</Project>
+ <Name>presentation.winforms</Name>
+ </ProjectReference>
<ProjectReference Include="..\Presentation\presentation.csproj">
<Project>{D7C83DB3-492D-4514-8C53-C57AD8E7ACE7}</Project>
<Name>presentation</Name>
product/client/presentation/Core/ApplicationController.cs
@@ -1,5 +1,4 @@
using momoney.presentation.views;
-using MoMoney.Presentation.Views;
using MoMoney.Service.Infrastructure.Eventing;
namespace MoMoney.Presentation.Core
product/client/presentation/Model/Menu/File/FileMenu.cs
@@ -1,80 +1,80 @@
-using System.Collections.Generic;
-using momoney.presentation.model.menu.file;
-using MoMoney.Presentation.Model.Projects;
-using MoMoney.Presentation.Winforms.Keyboard;
-using MoMoney.Presentation.Winforms.Resources;
-
-namespace MoMoney.Presentation.Model.Menu.File
-{
- public interface IFileMenu : ISubMenu
- {
- }
-
- public class FileMenu : SubMenu, IFileMenu
- {
- readonly IProjectController project;
-
- public FileMenu(IProjectController project)
- {
- this.project = project;
- }
-
- public override string name
- {
- get { return "&File"; }
- }
-
- public override IEnumerable<IMenuItem> all_menu_items()
- {
- yield return Create
- .a_menu_item()
- .named("&New")
- .that_executes<INewCommand>()
- .represented_by(ApplicationIcons.NewProject)
- .can_be_accessed_with(ShortcutKeys.control.and(ShortcutKeys.N))
- .build();
-
- yield return Create
- .a_menu_item()
- .named("&Open")
- .that_executes<IOpenCommand>()
- .represented_by(ApplicationIcons.OpenProject)
- .can_be_accessed_with(ShortcutKeys.control.and(ShortcutKeys.O))
- .build();
-
- yield return Create
- .a_menu_item()
- .named("&Save")
- .that_executes<ISaveCommand>()
- .represented_by(ApplicationIcons.SaveProject)
- .can_be_clicked_when(() => project.has_unsaved_changes())
- .can_be_accessed_with(ShortcutKeys.control.and(ShortcutKeys.S))
- .build();
-
- yield return Create
- .a_menu_item()
- .named("Save &As...")
- .that_executes<ISaveAsCommand>()
- .can_be_clicked_when(() => project.has_unsaved_changes())
- .represented_by(ApplicationIcons.SaveProjectAs)
- .build();
-
- yield return Create
- .a_menu_item()
- .named("&Close")
- .can_be_clicked_when(() => project.is_open())
- .represented_by(ApplicationIcons.CloseProject)
- .that_executes<ICloseCommand>()
- .build();
-
- yield return Create.a_menu_item_separator();
-
- yield return Create
- .a_menu_item()
- .named("E&xit")
- .that_executes<IExitCommand>()
- .represented_by(ApplicationIcons.ExitApplication)
- .build();
- }
- }
+using System.Collections.Generic;
+using momoney.presentation.model.menu.file;
+using MoMoney.Presentation.Model.Projects;
+using momoney.presentation.resources;
+using MoMoney.Presentation.Winforms.Keyboard;
+
+namespace MoMoney.Presentation.Model.Menu.File
+{
+ public interface IFileMenu : ISubMenu
+ {
+ }
+
+ public class FileMenu : SubMenu, IFileMenu
+ {
+ readonly IProjectController project;
+
+ public FileMenu(IProjectController project)
+ {
+ this.project = project;
+ }
+
+ public override string name
+ {
+ get { return "&File"; }
+ }
+
+ public override IEnumerable<IMenuItem> all_menu_items()
+ {
+ yield return Create
+ .a_menu_item()
+ .named("&New")
+ .that_executes<INewCommand>()
+ .represented_by(ApplicationIcons.NewProject)
+ .can_be_accessed_with(ShortcutKeys.control.and(ShortcutKeys.N))
+ .build();
+
+ yield return Create
+ .a_menu_item()
+ .named("&Open")
+ .that_executes<IOpenCommand>()
+ .represented_by(ApplicationIcons.OpenProject)
+ .can_be_accessed_with(ShortcutKeys.control.and(ShortcutKeys.O))
+ .build();
+
+ yield return Create
+ .a_menu_item()
+ .named("&Save")
+ .that_executes<ISaveCommand>()
+ .represented_by(ApplicationIcons.SaveProject)
+ .can_be_clicked_when(() => project.has_unsaved_changes())
+ .can_be_accessed_with(ShortcutKeys.control.and(ShortcutKeys.S))
+ .build();
+
+ yield return Create
+ .a_menu_item()
+ .named("Save &As...")
+ .that_executes<ISaveAsCommand>()
+ .can_be_clicked_when(() => project.has_unsaved_changes())
+ .represented_by(ApplicationIcons.SaveProjectAs)
+ .build();
+
+ yield return Create
+ .a_menu_item()
+ .named("&Close")
+ .can_be_clicked_when(() => project.is_open())
+ .represented_by(ApplicationIcons.CloseProject)
+ .that_executes<ICloseCommand>()
+ .build();
+
+ yield return Create.a_menu_item_separator();
+
+ yield return Create
+ .a_menu_item()
+ .named("E&xit")
+ .that_executes<IExitCommand>()
+ .represented_by(ApplicationIcons.ExitApplication)
+ .build();
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Model/Menu/Help/HelpMenu.cs
@@ -2,7 +2,7 @@ using System.Collections.Generic;
using MoMoney.Presentation.Core;
using MoMoney.Presentation.model.menu.help;
using momoney.presentation.presenters;
-using MoMoney.Presentation.Winforms.Resources;
+using momoney.presentation.resources;
namespace MoMoney.Presentation.Model.Menu.Help
{
product/client/presentation/Model/Menu/Window/WindowMenu.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
-using momoney.presentation.model.menu.file;
-using MoMoney.Presentation.Winforms.Resources;
-
+using momoney.presentation.model.menu.file;
+using momoney.presentation.resources;
+
namespace MoMoney.Presentation.Model.Menu.window
{
public interface IWindowMenu : ISubMenu
product/client/presentation/Model/Menu/IToolbarItemBuilder.cs
@@ -1,7 +1,7 @@
using System;
-using gorilla.commons.utility;
-using MoMoney.Presentation.Winforms.Resources;
-
+using gorilla.commons.utility;
+using momoney.presentation.resources;
+
namespace MoMoney.Presentation.Model.Menu
{
public interface IToolbarItemBuilder
product/client/presentation/Model/Menu/MenuItem.cs
@@ -1,8 +1,8 @@
using System;
-using System.Windows.Forms;
-using MoMoney.Presentation.Winforms.Keyboard;
-using MoMoney.Presentation.Winforms.Resources;
-
+using System.Windows.Forms;
+using momoney.presentation.resources;
+using MoMoney.Presentation.Winforms.Keyboard;
+
namespace MoMoney.Presentation.Model.Menu
{
public interface IMenuItem
product/client/presentation/Model/Menu/MenuItemBuilder.cs
@@ -1,87 +1,84 @@
-using System;
-using Gorilla.Commons.Infrastructure.Container;
-using gorilla.commons.utility;
-using MoMoney.Presentation.Winforms.Keyboard;
-using MoMoney.Presentation.Winforms.Resources;
-using MoMoney.Service.Infrastructure.Eventing;
-using MoMoney.Service.Infrastructure.Threading;
-
-namespace MoMoney.Presentation.Model.Menu
-{
- public interface IMenuItemBuilder : Builder<IMenuItem>
- {
- IMenuItemBuilder named(string name);
- IMenuItemBuilder that_executes<TheCommand>() where TheCommand : Command;
- IMenuItemBuilder that_executes(Action action);
- IMenuItemBuilder represented_by(HybridIcon project);
- IMenuItemBuilder can_be_accessed_with(ShortcutKey hot_key);
- IMenuItemBuilder can_be_clicked_when(Func<bool> predicate);
- }
-
- public class MenuItemBuilder : IMenuItemBuilder
- {
- readonly DependencyRegistry registry;
- readonly EventAggregator aggregator;
- readonly CommandProcessor processor;
-
- string name_of_the_menu { get; set; }
- Action command_to_execute { get; set; }
- HybridIcon icon { get; set; }
- ShortcutKey key { get; set; }
- Func<bool> can_be_clicked = () => true;
-
- public MenuItemBuilder(DependencyRegistry registry, EventAggregator aggregator, CommandProcessor processor)
- {
- name_of_the_menu = "Unknown";
- command_to_execute = () => {};
- this.registry = registry;
- this.processor = processor;
- this.aggregator = aggregator;
- icon = ApplicationIcons.Empty;
- key = ShortcutKeys.none;
- }
-
- public IMenuItemBuilder named(string name)
- {
- name_of_the_menu = name;
- return this;
- }
-
- public IMenuItemBuilder that_executes<TheCommand>() where TheCommand : Command
- {
- command_to_execute = () => processor.add(registry.get_a<TheCommand>());
- return this;
- }
-
- public IMenuItemBuilder that_executes(Action action)
- {
- command_to_execute = action;
- return this;
- }
-
- public IMenuItemBuilder represented_by(HybridIcon project)
- {
- icon = project;
- return this;
- }
-
- public IMenuItemBuilder can_be_accessed_with(ShortcutKey hot_key)
- {
- key = hot_key;
- return this;
- }
-
- public IMenuItemBuilder can_be_clicked_when(Func<bool> predicate)
- {
- can_be_clicked = predicate;
- return this;
- }
-
- public IMenuItem build()
- {
- var item = new MenuItem(name_of_the_menu, command_to_execute, icon, key, can_be_clicked);
- aggregator.subscribe(item);
- return item;
- }
- }
+using System;
+using Gorilla.Commons.Infrastructure.Container;
+using gorilla.commons.utility;
+using momoney.presentation.resources;
+using MoMoney.Presentation.Winforms.Keyboard;
+using MoMoney.Service.Infrastructure.Eventing;
+
+namespace MoMoney.Presentation.Model.Menu
+{
+ public interface IMenuItemBuilder : Builder<IMenuItem>
+ {
+ IMenuItemBuilder named(string name);
+ IMenuItemBuilder that_executes<TheCommand>() where TheCommand : Command;
+ IMenuItemBuilder that_executes(Action action);
+ IMenuItemBuilder represented_by(HybridIcon project);
+ IMenuItemBuilder can_be_accessed_with(ShortcutKey hot_key);
+ IMenuItemBuilder can_be_clicked_when(Func<bool> predicate);
+ }
+
+ public class MenuItemBuilder : IMenuItemBuilder
+ {
+ readonly DependencyRegistry registry;
+ readonly EventAggregator aggregator;
+
+ string name_of_the_menu { get; set; }
+ Action command_to_execute { get; set; }
+ HybridIcon icon { get; set; }
+ ShortcutKey key { get; set; }
+ Func<bool> can_be_clicked = () => true;
+
+ public MenuItemBuilder(DependencyRegistry registry, EventAggregator aggregator)
+ {
+ name_of_the_menu = "Unknown";
+ command_to_execute = () => {};
+ this.registry = registry;
+ this.aggregator = aggregator;
+ icon = ApplicationIcons.Empty;
+ key = ShortcutKeys.none;
+ }
+
+ public IMenuItemBuilder named(string name)
+ {
+ name_of_the_menu = name;
+ return this;
+ }
+
+ public IMenuItemBuilder that_executes<TheCommand>() where TheCommand : Command
+ {
+ command_to_execute = () => registry.get_a<TheCommand>().run();
+ return this;
+ }
+
+ public IMenuItemBuilder that_executes(Action action)
+ {
+ command_to_execute = action;
+ return this;
+ }
+
+ public IMenuItemBuilder represented_by(HybridIcon project)
+ {
+ icon = project;
+ return this;
+ }
+
+ public IMenuItemBuilder can_be_accessed_with(ShortcutKey hot_key)
+ {
+ key = hot_key;
+ return this;
+ }
+
+ public IMenuItemBuilder can_be_clicked_when(Func<bool> predicate)
+ {
+ can_be_clicked = predicate;
+ return this;
+ }
+
+ public IMenuItem build()
+ {
+ var item = new MenuItem(name_of_the_menu, command_to_execute, icon, key, can_be_clicked);
+ aggregator.subscribe(item);
+ return item;
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Model/Menu/SubMenu.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Windows.Forms;
using gorilla.commons.utility;
-using MoMoney.Presentation.Winforms.Helpers;
+//using MoMoney.Presentation.Winforms.Helpers;
namespace MoMoney.Presentation.Model.Menu
{
@@ -13,7 +13,7 @@ namespace MoMoney.Presentation.Model.Menu
public void add_to(MenuStrip strip)
{
- using (new SuspendLayout(strip))
+ //using (new SuspendLayout(strip))
{
var menu_item = new ToolStripMenuItem(name);
strip.Items.Add(menu_item);
product/client/presentation/Model/Menu/ToolBarItemBuilder.cs
@@ -1,66 +1,63 @@
-using System;
-using System.Windows.Forms;
-using Gorilla.Commons.Infrastructure.Container;
-using MoMoney.Presentation.Winforms.Resources;
-using MoMoney.Service.Infrastructure.Eventing;
-using MoMoney.Service.Infrastructure.Threading;
-
-namespace MoMoney.Presentation.Model.Menu
-{
- public class ToolBarItemBuilder : IToolbarItemBuilder, IToolbarButton
- {
- readonly DependencyRegistry registry;
- readonly ToolStripButton item;
- readonly CommandProcessor processor;
- Func<bool> the_condition;
-
- public ToolBarItemBuilder(DependencyRegistry registry, EventAggregator aggregator, CommandProcessor processor)
- {
- this.registry = registry;
- this.processor = processor;
- aggregator.subscribe(this);
- the_condition = () => true;
- item = new ToolStripButton {};
- }
-
- public IToolbarItemBuilder with_tool_tip_text_as(string text)
- {
- item.Text = text;
- return this;
- }
-
- public IToolbarItemBuilder when_clicked_executes<Command>() where Command : gorilla.commons.utility.Command
- {
- item.Click += (sender, args) => processor.add(registry.get_a<Command>());
- return this;
- }
-
- public IToolbarItemBuilder displays_icon(HybridIcon icon)
- {
- item.Image = icon;
- return this;
- }
-
- public IToolbarItemBuilder can_be_clicked_when(Func<bool> condition)
- {
- the_condition = condition;
- item.Enabled = condition();
- return this;
- }
-
- public IToolbarButton button()
- {
- return this;
- }
-
- public void add_to(ToolStrip tool_strip)
- {
- tool_strip.Items.Add(item);
- }
-
- public void refresh()
- {
- item.Enabled = the_condition();
- }
- }
+using System;
+using System.Windows.Forms;
+using Gorilla.Commons.Infrastructure.Container;
+using momoney.presentation.resources;
+using MoMoney.Service.Infrastructure.Eventing;
+
+namespace MoMoney.Presentation.Model.Menu
+{
+ public class ToolBarItemBuilder : IToolbarItemBuilder, IToolbarButton
+ {
+ readonly DependencyRegistry registry;
+ readonly ToolStripButton item;
+ Func<bool> the_condition;
+
+ public ToolBarItemBuilder(DependencyRegistry registry, EventAggregator aggregator)
+ {
+ this.registry = registry;
+ aggregator.subscribe(this);
+ the_condition = () => true;
+ item = new ToolStripButton {};
+ }
+
+ public IToolbarItemBuilder with_tool_tip_text_as(string text)
+ {
+ item.Text = text;
+ return this;
+ }
+
+ public IToolbarItemBuilder when_clicked_executes<Command>() where Command : gorilla.commons.utility.Command
+ {
+ item.Click += (sender, args) => registry.get_a<Command>().run();
+ return this;
+ }
+
+ public IToolbarItemBuilder displays_icon(HybridIcon icon)
+ {
+ item.Image = icon;
+ return this;
+ }
+
+ public IToolbarItemBuilder can_be_clicked_when(Func<bool> condition)
+ {
+ the_condition = condition;
+ item.Enabled = condition();
+ return this;
+ }
+
+ public IToolbarButton button()
+ {
+ return this;
+ }
+
+ public void add_to(ToolStrip tool_strip)
+ {
+ tool_strip.Items.Add(item);
+ }
+
+ public void refresh()
+ {
+ item.Enabled = the_condition();
+ }
+ }
}
\ No newline at end of file
product/client/presentation/Model/Messages/ClosingProjectEvent.cs
@@ -1,8 +0,0 @@
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace MoMoney.Presentation.Model.messages
-{
- public class ClosingProjectEvent : IEvent
- {
- }
-}
\ No newline at end of file
product/client/presentation/Model/Messages/ClosingTheApplication.cs
@@ -1,8 +0,0 @@
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace MoMoney.Presentation.Model.messages
-{
- public class ClosingTheApplication : IEvent
- {
- }
-}
\ No newline at end of file
product/client/presentation/Model/Messages/FinishedRunningCommand.cs
@@ -1,14 +0,0 @@
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace MoMoney.Presentation.Model.messages
-{
- public class FinishedRunningCommand : IEvent
- {
- public FinishedRunningCommand(object running_command)
- {
- completed_action = running_command;
- }
-
- public object completed_action { get; private set; }
- }
-}
\ No newline at end of file
product/client/presentation/Model/Messages/NewProjectOpened.cs
@@ -1,14 +0,0 @@
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace MoMoney.Presentation.Model.messages
-{
- public class NewProjectOpened : IEvent
- {
- public NewProjectOpened(string path)
- {
- this.path = path;
- }
-
- public string path { private set; get; }
- }
-}
\ No newline at end of file
product/client/presentation/Model/Messages/SavedChangesEvent.cs
@@ -1,8 +0,0 @@
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace MoMoney.Presentation.Model.messages
-{
- public class SavedChangesEvent : IEvent
- {
- }
-}
\ No newline at end of file
product/client/presentation/Model/Messages/StartedRunningCommand.cs
@@ -1,14 +0,0 @@
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace MoMoney.Presentation.Model.messages
-{
- public class StartedRunningCommand : IEvent
- {
- public StartedRunningCommand(object running_command)
- {
- running_action = running_command;
- }
-
- public object running_action { get; private set; }
- }
-}
\ No newline at end of file
product/client/presentation/Model/Messages/UnhandledErrorOccurred.cs
@@ -1,15 +0,0 @@
-using System;
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace MoMoney.Presentation.Model.messages
-{
- public class UnhandledErrorOccurred : IEvent
- {
- public UnhandledErrorOccurred(Exception error)
- {
- this.error = error;
- }
-
- public Exception error { get; private set; }
- }
-}
\ No newline at end of file
product/client/presentation/Model/Messages/UnsavedChangesEvent.cs
@@ -1,8 +0,0 @@
-using MoMoney.Service.Infrastructure.Eventing;
-
-namespace MoMoney.Presentation.Model.messages
-{
- public class UnsavedChangesEvent : IEvent
- {
- }
-}
\ No newline at end of file
product/client/presentation/Presenters/AddBillingTaskPane.cs
@@ -1,5 +1,5 @@
-using momoney.presentation.presenters;
-using MoMoney.Presentation.Winforms.Resources;
+using momoney.presentation.presenters;
+using momoney.presentation.resources;
using XPExplorerBar;
namespace MoMoney.Presentation.Presenters
product/client/presentation/Presenters/AddCompanyTaskPane.cs
@@ -1,5 +1,5 @@
-using momoney.presentation.presenters;
-using MoMoney.Presentation.Winforms.Resources;
+using momoney.presentation.presenters;
+using momoney.presentation.resources;
using XPExplorerBar;
namespace MoMoney.Presentation.Presenters
product/client/presentation/Presenters/AddIncomeTaskPane.cs
@@ -1,5 +1,5 @@
-using momoney.presentation.presenters;
-using MoMoney.Presentation.Winforms.Resources;
+using momoney.presentation.presenters;
+using momoney.presentation.resources;
using XPExplorerBar;
namespace MoMoney.Presentation.Presenters
product/client/presentation/Presenters/AddReportingTaskPane.cs
@@ -1,8 +1,8 @@
using System.Collections.Generic;
using MoMoney.DTO;
-using momoney.presentation.presenters;
-using MoMoney.Presentation.Views;
-using MoMoney.Presentation.Winforms.Resources;
+using momoney.presentation.presenters;
+using momoney.presentation.resources;
+using MoMoney.Presentation.Views;
using MoMoney.Service.Contracts.Application;
using XPExplorerBar;
product/client/presentation/Presenters/CheckForUpdatesPresenter.cs
@@ -5,7 +5,6 @@ using Gorilla.Commons.Utility;
using MoMoney.Presentation.Core;
using MoMoney.Presentation.Presenters;
using momoney.presentation.views;
-using MoMoney.Presentation.Views;
using momoney.service.infrastructure.updating;
namespace momoney.presentation.presenters
product/client/presentation/Presenters/ExpandoItemBuilder.cs
@@ -1,8 +1,8 @@
using System;
using System.Drawing;
using System.Windows.Forms;
-using gorilla.commons.utility;
-using MoMoney.Presentation.Winforms.Resources;
+using gorilla.commons.utility;
+using momoney.presentation.resources;
using XPExplorerBar;
namespace MoMoney.Presentation.Presenters
product/client/presentation/Presenters/NotificationIconPresenter.cs
@@ -4,8 +4,8 @@ using momoney.presentation.model.eventing;
using MoMoney.Presentation.Model.Menu.File;
using MoMoney.Presentation.Model.Menu.Help;
using MoMoney.Presentation.Model.Menu.window;
+using momoney.presentation.resources;
using momoney.presentation.views;
-using MoMoney.Presentation.Winforms.Resources;
using MoMoney.Service.Infrastructure.Eventing;
namespace momoney.presentation.presenters
product/client/presentation/Presenters/RunThe.cs
@@ -1,6 +1,5 @@
using gorilla.commons.utility;
using MoMoney.Presentation.Core;
-using MoMoney.Service.Infrastructure.Threading;
namespace momoney.presentation.presenters
{
@@ -9,17 +8,15 @@ namespace momoney.presentation.presenters
public class RunThe<TPresenter> : IRunThe<TPresenter> where TPresenter : Presenter
{
readonly IApplicationController controller;
- readonly CommandProcessor processor;
- public RunThe(IApplicationController controller, CommandProcessor processor)
+ public RunThe(IApplicationController controller)
{
this.controller = controller;
- this.processor = processor;
}
public void run()
{
- processor.add(() => controller.run<TPresenter>());
+ controller.run<TPresenter>();
}
}
}
\ No newline at end of file
product/client/presentation/Presenters/SplashScreenPresenter.cs
@@ -1,7 +1,6 @@
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;
@@ -15,8 +14,6 @@ namespace MoMoney.Presentation.Presenters
readonly ISplashScreenView view;
ISplashScreenState current_state;
- public SplashScreenPresenter() : this(new IntervalTimer(), new SplashScreenView()) {}
-
public SplashScreenPresenter(ITimer timer, ISplashScreenView view)
{
this.timer = timer;
product/client/presentation/Presenters/StatusBarPresenter.cs
@@ -3,9 +3,9 @@ using gorilla.commons.utility;
using Gorilla.Commons.Utility;
using MoMoney.Presentation.Core;
using momoney.presentation.model.eventing;
+using momoney.presentation.resources;
using momoney.presentation.views;
using MoMoney.Presentation.Views;
-using MoMoney.Presentation.Winforms.Resources;
using MoMoney.Service.Infrastructure.Eventing;
using MoMoney.Service.Infrastructure.Threading;
product/client/presentation/Presenters/TaskTrayPresenter.cs
@@ -2,7 +2,6 @@ using gorilla.commons.utility;
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
product/client/boot/Modules/TitleBarPresenter.cs โ product/client/presentation/Presenters/TitleBarPresenter.cs
@@ -1,13 +1,14 @@
-using MoMoney.Presentation;
+using MoMoney.Presentation.Core;
using momoney.presentation.model.eventing;
using MoMoney.Presentation.Model.Projects;
+using momoney.presentation.views;
using MoMoney.Presentation.Views;
using MoMoney.Service.Infrastructure.Eventing;
-namespace momoney.modules
+namespace momoney.presentation.presenters
{
public class TitleBarPresenter :
- IModule,
+ Presenter,
EventSubscriber<UnsavedChangesEvent>,
EventSubscriber<SavedChangesEvent>,
EventSubscriber<NewProjectOpened>,
@@ -15,6 +16,7 @@ namespace momoney.modules
{
readonly ITitleBar view;
readonly IProjectController project;
+ public Shell shell { get; private set; }
public TitleBarPresenter(ITitleBar view, IProjectController project)
{
@@ -22,8 +24,9 @@ namespace momoney.modules
this.project = project;
}
- public void run()
+ public void present(Shell shell)
{
+ this.shell = shell;
view.display(project.name());
}
product/client/presentation/Presenters/ToolBarPresenter.cs
@@ -4,11 +4,11 @@ using gorilla.commons.utility;
using MoMoney.Presentation.Core;
using MoMoney.Presentation.Model.Menu;
using momoney.presentation.model.menu.file;
-using MoMoney.Presentation.Model.Projects;
+using MoMoney.Presentation.Model.Projects;
+using momoney.presentation.resources;
using momoney.presentation.views;
-using MoMoney.Presentation.Views;
-using MoMoney.Presentation.Winforms.Resources;
-
+using MoMoney.Presentation.Views;
+
namespace momoney.presentation.presenters
{
public class ToolBarPresenter : Presenter
product/client/presentation/Winforms/Resources/ApplicationIcon.cs โ product/client/presentation/resources/ApplicationIcon.cs
@@ -1,9 +1,9 @@
-using System;
-using System.Drawing;
-using System.IO;
-using Gorilla.Commons.Infrastructure.Reflection;
-
-namespace MoMoney.Presentation.Winforms.Resources
+using System;
+using System.Drawing;
+using System.IO;
+using Gorilla.Commons.Infrastructure.Reflection;
+
+namespace momoney.presentation.resources
{
public class ApplicationIcon : IDisposable
{
product/client/presentation/Winforms/Resources/ApplicationIcons.cs โ product/client/presentation/resources/ApplicationIcons.cs
@@ -1,7 +1,7 @@
-using System.Collections.Generic;
-using gorilla.commons.utility;
-
-namespace MoMoney.Presentation.Winforms.Resources
+using System.Collections.Generic;
+using gorilla.commons.utility;
+
+namespace momoney.presentation.resources
{
static public class ApplicationIcons
{
product/client/presentation/Winforms/Resources/ApplicationImage.cs โ product/client/presentation/resources/ApplicationImage.cs
@@ -1,9 +1,9 @@
-using System;
-using System.Drawing;
-using System.IO;
-using Gorilla.Commons.Infrastructure.Reflection;
-
-namespace MoMoney.Presentation.Winforms.Resources
+using System;
+using System.Drawing;
+using System.IO;
+using Gorilla.Commons.Infrastructure.Reflection;
+
+namespace momoney.presentation.resources
{
public class ApplicationImage : IDisposable
{
product/client/presentation/Winforms/Resources/ApplicationImages.cs โ product/client/presentation/resources/ApplicationImages.cs
@@ -1,4 +1,4 @@
-namespace MoMoney.Presentation.Winforms.Resources
+namespace momoney.presentation.resources
{
public static class ApplicationImages
{
product/client/presentation/Winforms/Resources/HybridIcon.cs โ product/client/presentation/resources/HybridIcon.cs
@@ -1,7 +1,7 @@
-using System;
-using System.Drawing;
-
-namespace MoMoney.Presentation.Winforms.Resources
+using System;
+using System.Drawing;
+
+namespace momoney.presentation.resources
{
public class HybridIcon : ApplicationIcon
{
product/client/presentation/Views/Dialog.cs
@@ -1,5 +1,4 @@
using MoMoney.Presentation.Core;
-using MoMoney.Presentation.Views;
namespace momoney.presentation.views
{
product/client/presentation/Views/IApplicationDockedWindow.cs
@@ -1,5 +1,5 @@
+using momoney.presentation.resources;
using momoney.presentation.views;
-using MoMoney.Presentation.Winforms.Resources;
using WeifenLuo.WinFormsUI.Docking;
namespace MoMoney.Presentation.Views
product/client/presentation/Views/INotificationIconView.cs
@@ -1,9 +1,10 @@
+using System;
using momoney.presentation.presenters;
-using MoMoney.Presentation.Winforms.Resources;
+using momoney.presentation.resources;
namespace momoney.presentation.views
{
- public interface INotificationIconView : View<NotificationIconPresenter>
+ public interface INotificationIconView : View<NotificationIconPresenter>, IDisposable
{
void display(ApplicationIcon icon_to_display, string text_to_display);
void opened_new_project();
product/client/presentation/Views/ISelectFileToOpenDialog.cs
@@ -2,7 +2,7 @@ using Gorilla.Commons.Infrastructure.FileSystem;
namespace momoney.presentation.views
{
- public interface ISelectFileToOpenDialog
+ public interface ISelectFileToOpenDialog : View
{
File tell_me_the_path_to_the_file();
}
product/client/presentation/Views/ISelectFileToSaveToDialog.cs
@@ -2,7 +2,7 @@ using Gorilla.Commons.Infrastructure.FileSystem;
namespace momoney.presentation.views
{
- public interface ISelectFileToSaveToDialog
+ public interface ISelectFileToSaveToDialog : View
{
File tell_me_the_path_to_the_file();
}
product/client/presentation/Views/IStatusBarView.cs
@@ -1,6 +1,6 @@
using momoney.presentation.presenters;
+using momoney.presentation.resources;
using momoney.presentation.views;
-using MoMoney.Presentation.Winforms.Resources;
using momoney.service.infrastructure.threading;
namespace MoMoney.Presentation.Views
product/client/presentation/Views/ITaskTrayMessageView.cs
@@ -1,7 +1,9 @@
-namespace momoney.presentation.views
-{
- public interface ITaskTrayMessageView
- {
- void display(string message, params object[] arguments);
- }
+using momoney.presentation.presenters;
+
+namespace momoney.presentation.views
+{
+ public interface ITaskTrayMessageView : View<TaskTrayPresenter>
+ {
+ void display(string message, params object[] arguments);
+ }
}
\ No newline at end of file
product/client/presentation/Views/ITitleBar.cs
@@ -1,9 +1,12 @@
-namespace MoMoney.Presentation.Views
-{
- public interface ITitleBar
- {
- void display(string title);
- void append_asterik();
- void remove_asterik();
- }
+using momoney.presentation.presenters;
+using momoney.presentation.views;
+
+namespace MoMoney.Presentation.Views
+{
+ public interface ITitleBar : View<TitleBarPresenter>
+ {
+ void display(string title);
+ void append_asterik();
+ void remove_asterik();
+ }
}
\ No newline at end of file
product/client/presentation/Views/View.cs
@@ -1,11 +1,9 @@
using System;
-using System.ComponentModel;
namespace momoney.presentation.views
{
- public interface View : ISynchronizeInvoke, IDisposable
- {
- }
+ public interface View //: IDisposable
+ {}
public interface View<Presenter> : View where Presenter : MoMoney.Presentation.Core.Presenter
{
product/client/presentation/Winforms/Views/SelectFileToOpenDialog.cs
@@ -1,27 +0,0 @@
-using System.Windows.Forms;
-using Gorilla.Commons.Infrastructure.FileSystem;
-using momoney.presentation.views;
-
-namespace MoMoney.Presentation.Winforms.Views
-{
- public class SelectFileToOpenDialog : ISelectFileToOpenDialog
- {
- readonly IWin32Window window;
- readonly FileDialog dialog;
-
- public SelectFileToOpenDialog(IWin32Window window)
- {
- this.window = window;
- dialog = new OpenFileDialog {Filter = "My Money Files (*.mo)|*.mo"};
- }
-
- public File tell_me_the_path_to_the_file()
- {
- var result = dialog.ShowDialog(window);
- var path_to_the_file =
- (ApplicationFile) (result.Equals(DialogResult.Cancel) ? string.Empty : dialog.FileName);
- dialog.Dispose();
- return path_to_the_file;
- }
- }
-}
\ No newline at end of file
product/client/presentation/Winforms/Views/SelectFileToSaveToDialog.cs
@@ -1,26 +0,0 @@
-using System.Windows.Forms;
-using Gorilla.Commons.Infrastructure.FileSystem;
-using momoney.presentation.views;
-
-namespace MoMoney.Presentation.Winforms.Views
-{
- public class SelectFileToSaveToDialog : ISelectFileToSaveToDialog
- {
- readonly FileDialog dialog;
- readonly IWin32Window window;
-
- public SelectFileToSaveToDialog(IWin32Window window)
- {
- dialog = new SaveFileDialog {Filter = "My Money Files (*.mo)|*.mo"};
- this.window = window;
- }
-
- public File tell_me_the_path_to_the_file()
- {
- var result = dialog.ShowDialog(window);
- var the_path = (ApplicationFile) (result == DialogResult.Cancel ? string.Empty : dialog.FileName);
- dialog.Dispose();
- return the_path;
- }
- }
-}
\ No newline at end of file
product/client/presentation/Winforms/Views/TaskTrayMessage.cs
@@ -1,20 +0,0 @@
-using gorilla.commons.utility;
-using momoney.presentation.views;
-
-namespace MoMoney.Presentation.Winforms.Views
-{
- public class TaskTrayMessage : ITaskTrayMessageView
- {
- readonly INotificationIconView view;
-
- public TaskTrayMessage(INotificationIconView view)
- {
- this.view = view;
- }
-
- public void display(string message, params object[] arguments)
- {
- view.show_popup_message(message.formatted_using(arguments));
- }
- }
-}
\ No newline at end of file
product/client/presentation/Winforms/Views/TitleBar.cs
@@ -1,39 +0,0 @@
-using System.Windows.Forms;
-using momoney.presentation.views;
-using MoMoney.Presentation.Views;
-
-namespace MoMoney.Presentation.Winforms.Views
-{
- public class TitleBar : ITitleBar
- {
- readonly IRegionManager shell;
-
- public TitleBar(IRegionManager shell)
- {
- this.shell = shell;
- }
-
- public void display(string title)
- {
- shell.region<Form>(x =>
- {
- if (x.Text.Contains("-")) x.Text = x.Text.Remove(x.Text.IndexOf("-") - 1);
- x.Text = x.Text + " - " + title;
- });
- }
-
- public void append_asterik()
- {
- shell.region<Form>(x =>
- {
- if (x.Text.Contains("*")) return;
- x.Text = x.Text + "*";
- });
- }
-
- public void remove_asterik()
- {
- shell.region<Form>(x => { x.Text = x.Text.Replace("*", ""); });
- }
- }
-}
\ No newline at end of file
product/client/presentation/Presentation.csproj
@@ -162,6 +162,7 @@
<Compile Include="presenters\AddBillPaymentPresenter.cs" />
<Compile Include="presenters\IRunPresenterCommand.cs" />
<Compile Include="presenters\TaskTrayPresenter.cs" />
+ <Compile Include="presenters\TitleBarPresenter.cs" />
<Compile Include="presenters\UnhandledErrorPresenter.cs" />
<Compile Include="presenters\ViewAllBillsPresenter.cs" />
<Compile Include="presenters\RestartCommand.cs" />
@@ -201,6 +202,11 @@
<Compile Include="presenters\SplashScreenPresenter.cs" />
<Compile Include="presenters\CheckForUpdatesPresenter.cs" />
<Compile Include="presenters\ProcessQueryCommand.cs" />
+ <Compile Include="resources\ApplicationIcon.cs" />
+ <Compile Include="resources\ApplicationIcons.cs" />
+ <Compile Include="resources\ApplicationImage.cs" />
+ <Compile Include="resources\ApplicationImages.cs" />
+ <Compile Include="resources\HybridIcon.cs" />
<Compile Include="views\Dialog.cs" />
<Compile Include="views\ISelectFileToOpenDialog.cs" />
<Compile Include="views\ISelectFileToSaveToDialog.cs" />
@@ -210,110 +216,20 @@
<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\ITab.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\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="winforms\views\MainMenuView.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="winforms\views\MainMenuView.Designer.cs">
- <DependentUpon>MainMenuView.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="views\IGettingStartedView.cs" />
<Compile Include="views\ILogFileView.cs" />
<Compile Include="views\INotificationIconView.cs" />
@@ -321,157 +237,13 @@
<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\ComboBoxPropertyBinding.cs" />
- <Compile Include="winforms\databinding\ControlBindingExtensions.cs" />
- <Compile Include="winforms\databinding\Create.cs" />
- <Compile Include="winforms\databinding\DateTimePickerPropertyBinding.cs" />
- <Compile Include="winforms\databinding\IPropertyBinding.cs" />
- <Compile Include="winforms\databinding\ListboxExtensions.cs" />
- <Compile Include="winforms\databinding\PropertyBinder.cs" />
- <Compile Include="winforms\databinding\PropertyInspector.cs" />
- <Compile Include="winforms\databinding\PropertyInspectorFactory.cs" />
- <Compile Include="winforms\databinding\TextBoxExtensions.cs" />
- <Compile Include="winforms\databinding\TextPropertyBinding.cs" />
- <Compile Include="winforms\helpers\BindableListBox.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\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\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\SuspendLayout.cs" />
- <Compile Include="winforms\helpers\TextControl.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\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">
product/client/presentation/Winforms/Databinding/BindingSelector.cs โ product/client/presentation.winforms/databinding/BindingSelector.cs
File renamed without changes
product/client/presentation/Winforms/Databinding/ComboBoxPropertyBinding.cs โ product/client/presentation.winforms/databinding/ComboBoxPropertyBinding.cs
File renamed without changes
product/client/presentation/Winforms/Databinding/ControlBindingExtensions.cs โ product/client/presentation.winforms/databinding/ControlBindingExtensions.cs
File renamed without changes
product/client/presentation/Winforms/Databinding/Create.cs โ product/client/presentation.winforms/databinding/Create.cs
File renamed without changes
product/client/presentation/Winforms/Databinding/DateTimePickerPropertyBinding.cs โ product/client/presentation.winforms/databinding/DateTimePickerPropertyBinding.cs
File renamed without changes
product/client/presentation/Winforms/Databinding/IPropertyBinding.cs โ product/client/presentation.winforms/databinding/IPropertyBinding.cs
File renamed without changes
product/client/presentation/Winforms/Databinding/ListboxExtensions.cs โ product/client/presentation.winforms/databinding/ListboxExtensions.cs
File renamed without changes
product/client/presentation/Winforms/Databinding/PropertyBinder.cs โ product/client/presentation.winforms/databinding/PropertyBinder.cs
File renamed without changes
product/client/presentation/Winforms/Databinding/PropertyInspector.cs โ product/client/presentation.winforms/databinding/PropertyInspector.cs
File renamed without changes
product/client/presentation/Winforms/Databinding/PropertyInspectorFactory.cs โ product/client/presentation.winforms/databinding/PropertyInspectorFactory.cs
File renamed without changes
product/client/presentation/Winforms/Databinding/TextBoxExtensions.cs โ product/client/presentation.winforms/databinding/TextBoxExtensions.cs
File renamed without changes
product/client/presentation/Winforms/Databinding/TextPropertyBinding.cs โ product/client/presentation.winforms/databinding/TextPropertyBinding.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/BindableListBox.cs โ product/client/presentation.winforms/helpers/BindableListBox.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/BindableListExtensions.cs โ product/client/presentation.winforms/helpers/BindableListExtensions.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/BindableListFactory.cs โ product/client/presentation.winforms/helpers/BindableListFactory.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/BindableTextBox.cs โ product/client/presentation.winforms/helpers/BindableTextBox.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/BindableTextBoxExtensions.cs โ product/client/presentation.winforms/helpers/BindableTextBoxExtensions.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/BitmapRegion.cs โ product/client/presentation.winforms/helpers/BitmapRegion.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/ButtonExtensions.cs โ product/client/presentation.winforms/helpers/ButtonExtensions.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/ComboBoxListControl.cs โ product/client/presentation.winforms/helpers/ComboBoxListControl.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/ControlAdapter.cs โ product/client/presentation.winforms/helpers/ControlAdapter.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/ControlExtensions.cs โ product/client/presentation.winforms/helpers/ControlExtensions.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/Events.cs โ product/client/presentation.winforms/helpers/Events.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/EventTrigger.cs โ product/client/presentation.winforms/helpers/EventTrigger.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/EventTriggerExtensions.cs โ product/client/presentation.winforms/helpers/EventTriggerExtensions.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/GridListControl.cs โ product/client/presentation.winforms/helpers/GridListControl.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/IBindableList.cs โ product/client/presentation.winforms/helpers/IBindableList.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/IEventTarget.cs โ product/client/presentation.winforms/helpers/IEventTarget.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/IListControl.cs โ product/client/presentation.winforms/helpers/IListControl.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/ITextBoxCommand.cs โ product/client/presentation.winforms/helpers/ITextBoxCommand.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/ITextControl.cs โ product/client/presentation.winforms/helpers/ITextControl.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/ListBoxListControl.cs โ product/client/presentation.winforms/helpers/ListBoxListControl.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/ListViewControl.cs โ product/client/presentation.winforms/helpers/ListViewControl.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/RebindTextBoxCommand.cs โ product/client/presentation.winforms/helpers/RebindTextBoxCommand.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/SuspendLayout.cs โ product/client/presentation.winforms/helpers/SuspendLayout.cs
File renamed without changes
product/client/presentation/Winforms/Helpers/TextControl.cs โ product/client/presentation.winforms/helpers/TextControl.cs
File renamed without changes
product/client/presentation/Winforms/Krypton/BindableListExtensions.cs โ product/client/presentation.winforms/krypton/BindableListExtensions.cs
File renamed without changes
product/client/presentation/Winforms/Krypton/KryptonComboBoxListControl.cs โ product/client/presentation.winforms/krypton/KryptonComboBoxListControl.cs
File renamed without changes
product/client/presentation/Winforms/Krypton/KryptonListBoxListControl.cs โ product/client/presentation.winforms/krypton/KryptonListBoxListControl.cs
File renamed without changes
product/client/presentation/Winforms/Krypton/KryptonTextControl.cs โ product/client/presentation.winforms/krypton/KryptonTextControl.cs
File renamed without changes
product/client/presentation/Winforms/Krypton/ListboxExtensions.cs โ product/client/presentation.winforms/krypton/ListboxExtensions.cs
File renamed without changes
product/client/presentation/Winforms/Krypton/TextBoxExtensions.cs โ product/client/presentation.winforms/krypton/TextBoxExtensions.cs
File renamed without changes
product/client/presentation/Winforms/Views/AboutTheApplicationView.cs โ product/client/presentation.winforms/views/AboutTheApplicationView.cs
@@ -2,8 +2,8 @@ using System;
using System.Reflection;
using gorilla.commons.utility;
using momoney.presentation.presenters;
+using momoney.presentation.resources;
using momoney.presentation.views;
-using MoMoney.Presentation.Winforms.Resources;
namespace MoMoney.Presentation.Winforms.Views
{
product/client/presentation/Winforms/Views/AboutTheApplicationView.Designer.cs โ product/client/presentation.winforms/views/AboutTheApplicationView.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/AboutTheApplicationView.resx โ product/client/presentation.winforms/views/AboutTheApplicationView.resx
File renamed without changes
product/client/presentation/Winforms/Views/AddBillPaymentView.cs โ product/client/presentation.winforms/views/AddBillPaymentView.cs
@@ -2,12 +2,12 @@ using System;
using System.Collections.Generic;
using gorilla.commons.utility;
using MoMoney.DTO;
-using momoney.presentation.presenters;
+using momoney.presentation.presenters;
+using momoney.presentation.resources;
using momoney.presentation.views;
using MoMoney.Presentation.Winforms.Helpers;
-using MoMoney.Presentation.Winforms.Krypton;
-using MoMoney.Presentation.Winforms.Resources;
-
+using MoMoney.Presentation.Winforms.Krypton;
+
namespace MoMoney.Presentation.Winforms.Views
{
public partial class AddBillPaymentView : ApplicationDockedWindow, IAddBillPaymentView
product/client/presentation/Winforms/Views/AddBillPaymentView.Designer.cs โ product/client/presentation.winforms/views/AddBillPaymentView.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/AddBillPaymentView.resx โ product/client/presentation.winforms/views/AddBillPaymentView.resx
File renamed without changes
product/client/presentation/Winforms/Views/AddCompanyView.cs โ product/client/presentation.winforms/views/AddCompanyView.cs
@@ -5,10 +5,10 @@ using System.Windows.Forms;
using gorilla.commons.utility;
using MoMoney.DTO;
using MoMoney.Presentation.Presenters;
+using momoney.presentation.resources;
using momoney.presentation.views;
using MoMoney.Presentation.Views;
using MoMoney.Presentation.Winforms.Databinding;
-using MoMoney.Presentation.Winforms.Resources;
using View = System.Windows.Forms.View;
namespace MoMoney.Presentation.Winforms.Views
product/client/presentation/Winforms/Views/AddCompanyView.Designer.cs โ product/client/presentation.winforms/views/AddCompanyView.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/AddCompanyView.resx โ product/client/presentation.winforms/views/AddCompanyView.resx
File renamed without changes
product/client/presentation/Winforms/Views/AddNewIncomeView.cs โ product/client/presentation.winforms/views/AddNewIncomeView.cs
@@ -2,13 +2,13 @@ using System;
using System.Collections.Generic;
using gorilla.commons.utility;
using MoMoney.DTO;
-using MoMoney.Presentation.Presenters;
+using MoMoney.Presentation.Presenters;
+using momoney.presentation.resources;
using momoney.presentation.views;
using MoMoney.Presentation.Views;
using MoMoney.Presentation.Winforms.Helpers;
-using MoMoney.Presentation.Winforms.Krypton;
-using MoMoney.Presentation.Winforms.Resources;
-
+using MoMoney.Presentation.Winforms.Krypton;
+
namespace MoMoney.Presentation.Winforms.Views
{
public partial class AddNewIncomeView : ApplicationDockedWindow, IAddNewIncomeView
product/client/presentation/Winforms/Views/AddNewIncomeView.Designer.cs โ product/client/presentation.winforms/views/AddNewIncomeView.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/AddNewIncomeView.resx โ product/client/presentation.winforms/views/AddNewIncomeView.resx
File renamed without changes
product/client/presentation/Winforms/Views/ApplicationDockedWindow.cs โ product/client/presentation.winforms/views/ApplicationDockedWindow.cs
@@ -1,8 +1,8 @@
using System.Windows.Forms;
using gorilla.commons.utility;
+using momoney.presentation.resources;
using MoMoney.Presentation.Views;
using MoMoney.Presentation.Winforms.Helpers;
-using MoMoney.Presentation.Winforms.Resources;
using WeifenLuo.WinFormsUI.Docking;
namespace MoMoney.Presentation.Winforms.Views
product/client/presentation/Winforms/Views/ApplicationDockedWindow.Designer.cs โ product/client/presentation.winforms/views/ApplicationDockedWindow.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/ApplicationShell.cs โ product/client/presentation.winforms/views/ApplicationShell.cs
File renamed without changes
product/client/presentation/Winforms/Views/ApplicationShell.Designer.cs โ product/client/presentation.winforms/views/ApplicationShell.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/ApplicationShell.resx โ product/client/presentation.winforms/views/ApplicationShell.resx
File renamed without changes
product/client/presentation/Winforms/Views/ApplicationWindow.cs โ product/client/presentation.winforms/views/ApplicationWindow.cs
@@ -1,8 +1,8 @@
-using System.Windows.Forms;
+using System.Windows.Forms;
+using momoney.presentation.resources;
using momoney.presentation.views;
-using MoMoney.Presentation.Winforms.Helpers;
-using MoMoney.Presentation.Winforms.Resources;
-
+using MoMoney.Presentation.Winforms.Helpers;
+
namespace MoMoney.Presentation.Winforms.Views
{
public partial class ApplicationWindow : Form, IApplicationWindow
product/client/presentation/Winforms/Views/ApplicationWindow.Designer.cs โ product/client/presentation.winforms/views/ApplicationWindow.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/ApplicationWindow.resx โ product/client/presentation.winforms/views/ApplicationWindow.resx
File renamed without changes
product/client/presentation/Winforms/Views/CheckForUpdatesView.cs โ product/client/presentation.winforms/views/CheckForUpdatesView.cs
@@ -1,26 +1,25 @@
using System;
using System.Reflection;
using System.Windows.Forms;
+using Gorilla.Commons.Infrastructure.Container;
using Gorilla.Commons.Utility;
using momoney.presentation.presenters;
+using momoney.presentation.resources;
using momoney.presentation.views;
-using MoMoney.Presentation.Winforms.Resources;
using momoney.service.infrastructure.updating;
namespace MoMoney.Presentation.Winforms.Views
{
public partial class CheckForUpdatesView : ApplicationWindow, ICheckForUpdatesView
{
- readonly Shell shell;
ControlAction<EventArgs> update_button;
ControlAction<EventArgs> dont_update_button;
ControlAction<EventArgs> cancel_button;
- public CheckForUpdatesView(Shell shell)
+ public CheckForUpdatesView()
{
InitializeComponent();
- this.shell = shell;
ux_image.Image = ApplicationImages.Splash;
ux_image.SizeMode = PictureBoxSizeMode.StretchImage;
@@ -49,7 +48,7 @@ namespace MoMoney.Presentation.Winforms.Views
public void downloaded(Percent percentage_complete)
{
- shell.region<ToolStripProgressBar>(
+ Resolve.the<Shell>().region<ToolStripProgressBar>(
x =>
{
while (percentage_complete.is_less_than(x.Value))
product/client/presentation/Winforms/Views/CheckForUpdatesView.Designer.cs โ product/client/presentation.winforms/views/CheckForUpdatesView.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/CheckForUpdatesView.resx โ product/client/presentation.winforms/views/CheckForUpdatesView.resx
File renamed without changes
product/client/presentation/Winforms/Views/LogFileView.cs โ product/client/presentation.winforms/views/LogFileView.cs
@@ -1,6 +1,6 @@
using momoney.presentation.presenters;
+using momoney.presentation.resources;
using momoney.presentation.views;
-using MoMoney.Presentation.Winforms.Resources;
namespace MoMoney.Presentation.Winforms.Views
{
product/client/presentation/Winforms/Views/LogFileView.Designer.cs โ product/client/presentation.winforms/views/LogFileView.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/LogFileView.resx โ product/client/presentation.winforms/views/LogFileView.resx
File renamed without changes
product/client/presentation/Winforms/Views/MainMenuView.cs โ product/client/presentation.winforms/views/MainMenuView.cs
@@ -1,8 +1,8 @@
using momoney.presentation.presenters;
using MoMoney.Presentation.Presenters;
+using momoney.presentation.resources;
using MoMoney.Presentation.Views;
using MoMoney.Presentation.Winforms.Helpers;
-using MoMoney.Presentation.Winforms.Resources;
using WeifenLuo.WinFormsUI.Docking;
namespace MoMoney.Presentation.Winforms.Views
product/client/presentation/Winforms/Views/MainMenuView.Designer.cs โ product/client/presentation.winforms/views/MainMenuView.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/MainMenuView.resx โ product/client/presentation.winforms/views/MainMenuView.resx
File renamed without changes
product/client/presentation/Winforms/Views/NotificationIconView.cs โ product/client/presentation.winforms/views/NotificationIconView.cs
@@ -6,8 +6,8 @@ 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.resources;
using momoney.presentation.views;
-using MoMoney.Presentation.Winforms.Resources;
using MenuItem = System.Windows.Forms.MenuItem;
namespace MoMoney.Presentation.Winforms.Views
product/client/presentation/Winforms/Views/ReportViewer.cs โ product/client/presentation.winforms/views/ReportViewer.cs
File renamed without changes
product/client/presentation/Winforms/Views/ReportViewer.Designer.cs โ product/client/presentation.winforms/views/ReportViewer.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/ReportViewer.resx โ product/client/presentation.winforms/views/ReportViewer.resx
File renamed without changes
product/client/presentation/Winforms/Views/SaveChangesView.cs โ product/client/presentation.winforms/views/SaveChangesView.cs
@@ -1,25 +1,23 @@
using System;
using System.ComponentModel;
using System.Windows.Forms;
+using Gorilla.Commons.Infrastructure.Container;
using MoMoney.Presentation.Model.Menu.File;
+using momoney.presentation.resources;
using momoney.presentation.views;
-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)
+ public SaveChangesView()
{
- this.window = window;
InitializeComponent();
ux_image.Image = ApplicationImages.Splash;
ux_image.SizeMode = PictureBoxSizeMode.StretchImage;
@@ -46,7 +44,7 @@ namespace MoMoney.Presentation.Winforms.Views
public void prompt_user_to_save()
{
- ShowDialog(window);
+ ShowDialog(Resolve.the<IWin32Window>());
}
void execute(Action action)
product/client/presentation/Winforms/Views/SaveChangesView.Designer.cs โ product/client/presentation.winforms/views/SaveChangesView.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/SaveChangesView.resx โ product/client/presentation.winforms/views/SaveChangesView.resx
File renamed without changes
product/client/presentation.winforms/views/SelectFileToOpenDialog.cs
@@ -0,0 +1,19 @@
+using System.Windows.Forms;
+using Gorilla.Commons.Infrastructure.Container;
+using Gorilla.Commons.Infrastructure.FileSystem;
+using momoney.presentation.views;
+
+namespace MoMoney.Presentation.Winforms.Views
+{
+ public class SelectFileToOpenDialog : ISelectFileToOpenDialog
+ {
+ public File tell_me_the_path_to_the_file()
+ {
+ using (var dialog = new OpenFileDialog {Filter = "My Money Files (*.mo)|*.mo"})
+ {
+ var result = dialog.ShowDialog(Resolve.the<IWin32Window>());
+ return (ApplicationFile) (result.Equals(DialogResult.Cancel) ? string.Empty : dialog.FileName);
+ }
+ }
+ }
+}
\ No newline at end of file
product/client/presentation.winforms/views/SelectFileToSaveToDialog.cs
@@ -0,0 +1,18 @@
+using System.Windows.Forms;
+using Gorilla.Commons.Infrastructure.Container;
+using Gorilla.Commons.Infrastructure.FileSystem;
+using momoney.presentation.views;
+
+namespace MoMoney.Presentation.Winforms.Views
+{
+ public class SelectFileToSaveToDialog : ISelectFileToSaveToDialog
+ {
+ public File tell_me_the_path_to_the_file()
+ {
+ using (var dialog = new SaveFileDialog {Filter = "My Money Files (*.mo)|*.mo"})
+ {
+ return (ApplicationFile) (dialog.ShowDialog(Resolve.the<IWin32Window>()) == DialogResult.Cancel ? string.Empty : dialog.FileName);
+ }
+ }
+ }
+}
\ No newline at end of file
product/client/presentation/Winforms/Views/SplashScreenView.cs โ product/client/presentation.winforms/views/SplashScreenView.cs
@@ -1,7 +1,7 @@
using System;
using System.Windows.Forms;
+using momoney.presentation.resources;
using momoney.presentation.views;
-using MoMoney.Presentation.Winforms.Resources;
namespace MoMoney.Presentation.Winforms.Views
{
product/client/presentation/Winforms/Views/SplashScreenView.Designer.cs โ product/client/presentation.winforms/views/SplashScreenView.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/SplashScreenView.resx โ product/client/presentation.winforms/views/SplashScreenView.resx
File renamed without changes
product/client/presentation/Winforms/Views/StatusBarView.cs โ product/client/presentation.winforms/views/StatusBarView.cs
@@ -1,9 +1,9 @@
using System;
using System.Windows.Forms;
using momoney.presentation.presenters;
+using momoney.presentation.resources;
using momoney.presentation.views;
using MoMoney.Presentation.Views;
-using MoMoney.Presentation.Winforms.Resources;
namespace MoMoney.Presentation.Winforms.Views
{
product/client/presentation.winforms/views/TaskTrayMessage.cs
@@ -0,0 +1,50 @@
+using System;
+using gorilla.commons.utility;
+using momoney.presentation.presenters;
+using momoney.presentation.views;
+
+namespace MoMoney.Presentation.Winforms.Views
+{
+ public class TaskTrayMessage : ITaskTrayMessageView
+ {
+ readonly INotificationIconView view;
+
+ public TaskTrayMessage(INotificationIconView view)
+ {
+ this.view = view;
+ }
+
+ public void display(string message, params object[] arguments)
+ {
+ view.show_popup_message(message.formatted_using(arguments));
+ }
+
+ public void attach_to(TaskTrayPresenter presenter)
+ {
+ }
+
+ public IAsyncResult BeginInvoke(Delegate method, object[] args)
+ {
+ throw new NotImplementedException();
+ }
+
+ public object EndInvoke(IAsyncResult result)
+ {
+ throw new NotImplementedException();
+ }
+
+ public object Invoke(Delegate method, object[] args)
+ {
+ throw new NotImplementedException();
+ }
+
+ public bool InvokeRequired
+ {
+ get { throw new NotImplementedException(); }
+ }
+
+ public void Dispose()
+ {
+ }
+ }
+}
\ No newline at end of file
product/client/presentation.winforms/views/TitleBar.cs
@@ -0,0 +1,73 @@
+using System;
+using System.Windows.Forms;
+using momoney.presentation.presenters;
+using momoney.presentation.views;
+using MoMoney.Presentation.Views;
+
+namespace MoMoney.Presentation.Winforms.Views
+{
+ public class TitleBar : ITitleBar
+ {
+ IRegionManager shell;
+
+ public TitleBar(IRegionManager shell)
+ {
+ this.shell = shell;
+ }
+
+ public void attach_to(TitleBarPresenter presenter)
+ {
+ }
+
+ public void display(string title)
+ {
+ shell.region<Form>(x =>
+ {
+ if (x.Text.Contains("-")) x.Text = x.Text.Remove(x.Text.IndexOf("-") - 1);
+ x.Text = x.Text + " - " + title;
+ });
+ }
+
+ public void append_asterik()
+ {
+ shell.region<Form>(x =>
+ {
+ if (x.Text.Contains("*")) return;
+ x.Text = x.Text + "*";
+ });
+ }
+
+ public void remove_asterik()
+ {
+ shell.region<Form>(x =>
+ {
+ x.Text = x.Text.Replace("*", "");
+ });
+ }
+
+ public IAsyncResult BeginInvoke(Delegate method, object[] args)
+ {
+ throw new NotImplementedException();
+ }
+
+ public object EndInvoke(IAsyncResult result)
+ {
+ throw new NotImplementedException();
+ }
+
+ public object Invoke(Delegate method, object[] args)
+ {
+ method.DynamicInvoke(args);
+ return new object();
+ }
+
+ public bool InvokeRequired
+ {
+ get { return false; }
+ }
+
+ public void Dispose()
+ {
+ }
+ }
+}
\ No newline at end of file
product/client/presentation/Winforms/Views/UnhandledErrorView.cs โ product/client/presentation.winforms/views/UnhandledErrorView.cs
@@ -1,9 +1,9 @@
using System;
using System.Windows.Forms;
using momoney.presentation.presenters;
+using momoney.presentation.resources;
using momoney.presentation.views;
using MoMoney.Presentation.Views;
-using MoMoney.Presentation.Winforms.Resources;
namespace MoMoney.Presentation.Winforms.Views
{
product/client/presentation/Winforms/Views/UnhandledErrorView.Designer.cs โ product/client/presentation.winforms/views/UnhandledErrorView.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/UnhandledErrorView.resx โ product/client/presentation.winforms/views/UnhandledErrorView.resx
File renamed without changes
product/client/presentation/Winforms/Views/ViewAllBills.cs โ product/client/presentation.winforms/views/ViewAllBills.cs
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using System.Linq;
using MoMoney.DTO;
-using momoney.presentation.presenters;
-using MoMoney.Presentation.Views;
-using MoMoney.Presentation.Winforms.Resources;
-
+using momoney.presentation.presenters;
+using momoney.presentation.resources;
+using MoMoney.Presentation.Views;
+
namespace MoMoney.Presentation.Winforms.Views
{
public partial class ViewAllBills : ApplicationDockedWindow, IViewAllBills
product/client/presentation/Winforms/Views/ViewAllBills.Designer.cs โ product/client/presentation.winforms/views/ViewAllBills.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/ViewAllBills.resx โ product/client/presentation.winforms/views/ViewAllBills.resx
File renamed without changes
product/client/presentation/Winforms/Views/ViewAllBillsReport.cs โ product/client/presentation.winforms/views/ViewAllBillsReport.cs
File renamed without changes
product/client/presentation/Winforms/Views/ViewAllBillsReport.Designer.cs โ product/client/presentation.winforms/views/ViewAllBillsReport.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/ViewAllBillsReport.resx โ product/client/presentation.winforms/views/ViewAllBillsReport.resx
File renamed without changes
product/client/presentation/Winforms/Views/ViewAllIncome.cs โ product/client/presentation.winforms/views/ViewAllIncome.cs
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using gorilla.commons.utility;
using MoMoney.DTO;
-using MoMoney.Presentation.Presenters;
-using MoMoney.Presentation.Views;
-using MoMoney.Presentation.Winforms.Resources;
-
+using MoMoney.Presentation.Presenters;
+using momoney.presentation.resources;
+using MoMoney.Presentation.Views;
+
namespace MoMoney.Presentation.Winforms.Views
{
public partial class ViewAllIncome : ApplicationDockedWindow, IViewIncomeHistory
product/client/presentation/Winforms/Views/ViewAllIncome.Designer.cs โ product/client/presentation.winforms/views/ViewAllIncome.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/ViewAllIncome.resx โ product/client/presentation.winforms/views/ViewAllIncome.resx
File renamed without changes
product/client/presentation/Winforms/Views/ViewAllIncomesReport.cs โ product/client/presentation.winforms/views/ViewAllIncomesReport.cs
File renamed without changes
product/client/presentation/Winforms/Views/ViewAllIncomesReport.Designer.cs โ product/client/presentation.winforms/views/ViewAllIncomesReport.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/ViewAllIncomesReport.resx โ product/client/presentation.winforms/views/ViewAllIncomesReport.resx
File renamed without changes
product/client/presentation/Winforms/Views/WelcomeScreen.cs โ product/client/presentation.winforms/views/WelcomeScreen.cs
@@ -1,8 +1,8 @@
using momoney.presentation.model.menu.file;
using momoney.presentation.presenters;
+using momoney.presentation.resources;
using momoney.presentation.views;
using MoMoney.Presentation.Winforms.Helpers;
-using MoMoney.Presentation.Winforms.Resources;
namespace MoMoney.Presentation.Winforms.Views
{
product/client/presentation/Winforms/Views/WelcomeScreen.Designer.cs โ product/client/presentation.winforms/views/WelcomeScreen.Designer.cs
File renamed without changes
product/client/presentation/Winforms/Views/WelcomeScreen.resx โ product/client/presentation.winforms/views/WelcomeScreen.resx
File renamed without changes
product/client/presentation.winforms/presentation.winforms.csproj
@@ -0,0 +1,345 @@
+๏ปฟ<?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>{F3E06696-0CD2-46EE-B117-A05C1E7E8CD8}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>momoney.presentation.winforms</RootNamespace>
+ <AssemblyName>momoney.presentation.winforms</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="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="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="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="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="databinding\BindingSelector.cs" />
+ <Compile Include="databinding\ComboBoxPropertyBinding.cs" />
+ <Compile Include="databinding\ControlBindingExtensions.cs" />
+ <Compile Include="databinding\Create.cs" />
+ <Compile Include="databinding\DateTimePickerPropertyBinding.cs" />
+ <Compile Include="databinding\IPropertyBinding.cs" />
+ <Compile Include="databinding\ListboxExtensions.cs" />
+ <Compile Include="databinding\PropertyBinder.cs" />
+ <Compile Include="databinding\PropertyInspector.cs" />
+ <Compile Include="databinding\PropertyInspectorFactory.cs" />
+ <Compile Include="databinding\TextBoxExtensions.cs" />
+ <Compile Include="databinding\TextPropertyBinding.cs" />
+ <Compile Include="helpers\BindableListBox.cs" />
+ <Compile Include="helpers\BindableListExtensions.cs" />
+ <Compile Include="helpers\BindableListFactory.cs" />
+ <Compile Include="helpers\BindableTextBox.cs" />
+ <Compile Include="helpers\BindableTextBoxExtensions.cs" />
+ <Compile Include="helpers\BitmapRegion.cs" />
+ <Compile Include="helpers\ButtonExtensions.cs" />
+ <Compile Include="helpers\ComboBoxListControl.cs" />
+ <Compile Include="helpers\ControlAdapter.cs">
+ <SubType>Component</SubType>
+ </Compile>
+ <Compile Include="helpers\ControlExtensions.cs" />
+ <Compile Include="helpers\Events.cs" />
+ <Compile Include="helpers\EventTrigger.cs" />
+ <Compile Include="helpers\EventTriggerExtensions.cs" />
+ <Compile Include="helpers\GridListControl.cs" />
+ <Compile Include="helpers\IBindableList.cs" />
+ <Compile Include="helpers\IEventTarget.cs" />
+ <Compile Include="helpers\IListControl.cs" />
+ <Compile Include="helpers\ITextBoxCommand.cs" />
+ <Compile Include="helpers\ITextControl.cs" />
+ <Compile Include="helpers\ListBoxListControl.cs" />
+ <Compile Include="helpers\ListViewControl.cs" />
+ <Compile Include="helpers\RebindTextBoxCommand.cs" />
+ <Compile Include="helpers\SuspendLayout.cs" />
+ <Compile Include="helpers\TextControl.cs" />
+ <Compile Include="krypton\BindableListExtensions.cs" />
+ <Compile Include="krypton\KryptonComboBoxListControl.cs" />
+ <Compile Include="krypton\KryptonListBoxListControl.cs" />
+ <Compile Include="krypton\KryptonTextControl.cs" />
+ <Compile Include="krypton\ListboxExtensions.cs" />
+ <Compile Include="krypton\TextBoxExtensions.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="views\AboutTheApplicationView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="views\AboutTheApplicationView.Designer.cs">
+ <DependentUpon>AboutTheApplicationView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\AddBillPaymentView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="views\AddBillPaymentView.Designer.cs">
+ <DependentUpon>AddBillPaymentView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\AddCompanyView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="views\AddCompanyView.Designer.cs">
+ <DependentUpon>AddCompanyView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\AddNewIncomeView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="views\AddNewIncomeView.Designer.cs">
+ <DependentUpon>AddNewIncomeView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\ApplicationDockedWindow.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="views\ApplicationDockedWindow.Designer.cs">
+ <DependentUpon>ApplicationDockedWindow.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\ApplicationShell.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="views\ApplicationShell.Designer.cs">
+ <DependentUpon>ApplicationShell.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\ApplicationWindow.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="views\ApplicationWindow.Designer.cs">
+ <DependentUpon>ApplicationWindow.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\CheckForUpdatesView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="views\CheckForUpdatesView.Designer.cs">
+ <DependentUpon>CheckForUpdatesView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\LogFileView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="views\LogFileView.Designer.cs">
+ <DependentUpon>LogFileView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\MainMenuView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="views\MainMenuView.Designer.cs">
+ <DependentUpon>MainMenuView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\NotificationIconView.cs" />
+ <Compile Include="views\ReportViewer.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="views\ReportViewer.Designer.cs">
+ <DependentUpon>ReportViewer.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\SaveChangesView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="views\SaveChangesView.Designer.cs">
+ <DependentUpon>SaveChangesView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\SelectFileToOpenDialog.cs" />
+ <Compile Include="views\SelectFileToSaveToDialog.cs" />
+ <Compile Include="views\SplashScreenView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="views\SplashScreenView.Designer.cs">
+ <DependentUpon>SplashScreenView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\StatusBarView.cs" />
+ <Compile Include="views\TaskTrayMessage.cs" />
+ <Compile Include="views\TitleBar.cs" />
+ <Compile Include="views\UnhandledErrorView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="views\UnhandledErrorView.Designer.cs">
+ <DependentUpon>UnhandledErrorView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\ViewAllBills.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="views\ViewAllBills.Designer.cs">
+ <DependentUpon>ViewAllBills.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\ViewAllBillsReport.cs">
+ <SubType>Component</SubType>
+ </Compile>
+ <Compile Include="views\ViewAllBillsReport.Designer.cs">
+ <DependentUpon>ViewAllBillsReport.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\ViewAllIncome.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="views\ViewAllIncome.Designer.cs">
+ <DependentUpon>ViewAllIncome.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\ViewAllIncomesReport.cs">
+ <SubType>Component</SubType>
+ </Compile>
+ <Compile Include="views\ViewAllIncomesReport.Designer.cs">
+ <DependentUpon>ViewAllIncomesReport.cs</DependentUpon>
+ </Compile>
+ <Compile Include="views\WelcomeScreen.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="views\WelcomeScreen.Designer.cs">
+ <DependentUpon>WelcomeScreen.cs</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <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.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>
+ <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</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="views\AboutTheApplicationView.resx">
+ <DependentUpon>AboutTheApplicationView.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="views\AddBillPaymentView.resx">
+ <DependentUpon>AddBillPaymentView.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="views\AddCompanyView.resx">
+ <DependentUpon>AddCompanyView.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="views\AddNewIncomeView.resx">
+ <DependentUpon>AddNewIncomeView.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="views\ApplicationShell.resx">
+ <DependentUpon>ApplicationShell.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="views\ApplicationWindow.resx">
+ <DependentUpon>ApplicationWindow.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="views\CheckForUpdatesView.resx">
+ <DependentUpon>CheckForUpdatesView.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="views\LogFileView.resx">
+ <DependentUpon>LogFileView.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="views\MainMenuView.resx">
+ <DependentUpon>MainMenuView.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="views\ReportViewer.resx">
+ <DependentUpon>ReportViewer.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="views\SaveChangesView.resx">
+ <DependentUpon>SaveChangesView.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="views\SplashScreenView.resx">
+ <DependentUpon>SplashScreenView.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="views\UnhandledErrorView.resx">
+ <DependentUpon>UnhandledErrorView.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="views\ViewAllBills.resx">
+ <DependentUpon>ViewAllBills.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="views\ViewAllBillsReport.resx">
+ <DependentUpon>ViewAllBillsReport.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="views\ViewAllIncome.resx">
+ <DependentUpon>ViewAllIncome.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="views\ViewAllIncomesReport.resx">
+ <DependentUpon>ViewAllIncomesReport.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="views\WelcomeScreen.resx">
+ <DependentUpon>WelcomeScreen.cs</DependentUpon>
+ </EmbeddedResource>
+ </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/tests/unit/client/boot/modules/NotificationIconPresenterSpecs.cs
@@ -1,7 +1,7 @@
using developwithpassion.bdd.contexts;
using momoney.presentation.presenters;
+using momoney.presentation.resources;
using momoney.presentation.views;
-using MoMoney.Presentation.Winforms.Resources;
namespace tests.unit.client.boot.modules
{
product/tests/unit/client/boot/modules/TitleBarPresenterSpecs.cs
@@ -1,7 +1,8 @@
using developwithpassion.bdd.contexts;
-using momoney.modules;
using momoney.presentation.model.eventing;
using MoMoney.Presentation.Model.Projects;
+using momoney.presentation.presenters;
+using momoney.presentation.views;
using MoMoney.Presentation.Views;
namespace tests.unit.client.boot.modules
@@ -23,9 +24,15 @@ namespace tests.unit.client.boot.modules
{
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");
+ context c = () =>
+ {
+ shell = an<Shell>();
+ when_the(project).is_told_to(x => x.name()).it_will_return("untitled.mo");
+ };
+
+ because b = () => sut.present(shell);
- because b = () => sut.run();
+ static Shell shell;
}
public class when_there_are_unsaved_changes_in_the_project : behaves_like_a_title_bar_presenter
product/tests/unit/client/presentation/model/SaveAsCommandSpecs.cs
@@ -4,31 +4,31 @@ using momoney.presentation.model.menu.file;
using MoMoney.Presentation.Model.Projects;
using momoney.presentation.views;
-namespace tests.unit.client.presentation.model
-{
- [Concern(typeof (SaveAsCommand))]
- public class when_saving_the_current_project_to_a_new_file_path : concerns_for<ISaveAsCommand, SaveAsCommand>
- {
- it should_save_the_current_project_to_the_new_path = () => current_project.was_told_to(x => x.save_project_to(new_path));
-
- context c = () =>
- {
- current_project = an<IProjectController>();
- view = an<ISelectFileToSaveToDialog>();
- new_path = "blah_blah";
-
- when_the(view).is_told_to(x => x.tell_me_the_path_to_the_file()).it_will_return(new_path);
- };
-
- because b = () => sut.run();
-
- public override ISaveAsCommand create_sut()
- {
- return new SaveAsCommand(view, current_project);
- }
-
- static IProjectController current_project;
- static ApplicationFile new_path;
- static ISelectFileToSaveToDialog view;
- }
+namespace tests.unit.client.presentation.model
+{
+ [Concern(typeof (SaveAsCommand))]
+ public class when_saving_the_current_project_to_a_new_file_path : concerns_for<ISaveAsCommand, SaveAsCommand>
+ {
+ it should_save_the_current_project_to_the_new_path = () => current_project.was_told_to(x => x.save_project_to(new_path));
+
+ context c = () =>
+ {
+ current_project = an<IProjectController>();
+ view = an<ISelectFileToSaveToDialog>();
+ new_path = "blah_blah";
+
+ when_the(view).is_told_to(x => x.tell_me_the_path_to_the_file()).it_will_return(new_path);
+ };
+
+ because b = () => sut.run();
+
+ public override ISaveAsCommand create_sut()
+ {
+ return new SaveAsCommand(view, current_project);
+ }
+
+ static IProjectController current_project;
+ static ApplicationFile new_path;
+ static ISelectFileToSaveToDialog view;
+ }
}
\ No newline at end of file
product/tests/unit/client/presentation/presenters/RunTheSpecs.cs
@@ -1,30 +1,24 @@
using developwithpassion.bdd.contexts;
-using MbUnit.Framework;
using MoMoney.Presentation.Core;
using momoney.presentation.presenters;
-using MoMoney.Service.Infrastructure.Threading;
-namespace tests.unit.client.presentation.presenters
-{
- public class RunTheSpecs
- {
- [Ignore]
- [Concern(typeof (RunThe<>))]
- public class when_initializing_different_regions_of_the_user_interface :
- concerns_for<IRunThe<Presenter>, RunThe<Presenter>>
- {
- it should_initialize_the_presenter_that_controls_that_region = () => processor.was_told_to(x => x.add(() => controller.run<Presenter>()));
-
- context c = () =>
- {
- controller = the_dependency<IApplicationController>();
- processor = the_dependency<CommandProcessor>();
- };
-
- because b = () => sut.run();
-
- static IApplicationController controller;
- static CommandProcessor processor;
- }
- }
+namespace tests.unit.client.presentation.presenters
+{
+ public class RunTheSpecs
+ {
+ [Concern(typeof (RunThe<>))]
+ public class when_initializing_different_regions_of_the_user_interface : concerns_for<IRunThe<Presenter>, RunThe<Presenter>>
+ {
+ it should_initialize_the_presenter_that_controls_that_region = () => controller.was_told_to(x => x.run<Presenter>());
+
+ context c = () =>
+ {
+ controller = the_dependency<IApplicationController>();
+ };
+
+ because b = () => sut.run();
+
+ static IApplicationController controller;
+ }
+ }
}
\ No newline at end of file
product/tests/unit/client/presentation/presenters/StatusBarPresenterSpecs.cs
@@ -1,8 +1,8 @@
using developwithpassion.bdd.contexts;
using momoney.presentation.model.eventing;
using momoney.presentation.presenters;
+using momoney.presentation.resources;
using MoMoney.Presentation.Views;
-using MoMoney.Presentation.Winforms.Resources;
namespace tests.unit.client.presentation.presenters
{
product/tests/unit/client/presentation/winforms/databinding/BindingSelectorSpecs.cs
@@ -3,48 +3,47 @@ using System.Linq.Expressions;
using developwithpassion.bdd.contexts;
using MoMoney.Presentation.Winforms.Databinding;
-namespace tests.unit.client.presentation.winforms.databinding
-{
- public class BindingSelectorSpecs
- {
- }
-
- [Concern(typeof (BindingSelector<>))]
- public class when_selecting_a_property_as_the_target_of_a_binding : concerns_for<IBindingSelector<IAnInterface>>
- {
- it should_return_a_binder_bound_to_the_correct_property =
- () => result.property.Name.should_be_equal_to("FirstName");
-
- it should_inspect_the_expression_for_the_property_information =
- () => inspector.was_told_to(i => i.inspect(expression_to_parse));
-
- context c = () =>
- {
- thing_to_bind_to = an<IAnInterface>();
- factory = an<IPropertyInspectorFactory>();
- inspector = an<IPropertyInspector<IAnInterface, string>>();
-
- factory.is_told_to(f => f.create<IAnInterface, string>()).it_will_return(inspector);
-
- inspector.is_told_to(i => i.inspect(null))
- .IgnoreArguments().it_will_return(typeof (IAnInterface).GetProperty("FirstName"));
- };
-
- because b = () =>
- {
- expression_to_parse = (s => s.FirstName);
- result = sut.bind_to_property(expression_to_parse);
- };
-
- public override IBindingSelector<IAnInterface> create_sut()
- {
- return new BindingSelector<IAnInterface>(thing_to_bind_to, factory);
- }
-
- static IAnInterface thing_to_bind_to;
- static IPropertyBinder<IAnInterface, string> result;
- static IPropertyInspectorFactory factory;
- static IPropertyInspector<IAnInterface, string> inspector;
- static Expression<Func<IAnInterface, string>> expression_to_parse;
- }
+namespace tests.unit.client.presentation.winforms.databinding
+{
+ public class BindingSelectorSpecs
+ {
+ [Concern(typeof (BindingSelector<>))]
+ public class when_selecting_a_property_as_the_target_of_a_binding : concerns_for<IBindingSelector<IAnInterface>>
+ {
+ it should_return_a_binder_bound_to_the_correct_property =
+ () => result.property.Name.should_be_equal_to("FirstName");
+
+ it should_inspect_the_expression_for_the_property_information =
+ () => inspector.was_told_to(i => i.inspect(expression_to_parse));
+
+ context c = () =>
+ {
+ thing_to_bind_to = an<IAnInterface>();
+ factory = an<IPropertyInspectorFactory>();
+ inspector = an<IPropertyInspector<IAnInterface, string>>();
+
+ factory.is_told_to(f => f.create<IAnInterface, string>()).it_will_return(inspector);
+
+ inspector.is_told_to(i => i.inspect(null))
+ .IgnoreArguments().it_will_return(typeof (IAnInterface).GetProperty("FirstName"));
+ };
+
+ because b = () =>
+ {
+ expression_to_parse = (s => s.FirstName);
+ result = sut.bind_to_property(expression_to_parse);
+ };
+
+ public override IBindingSelector<IAnInterface> create_sut()
+ {
+ return new BindingSelector<IAnInterface>(thing_to_bind_to, factory);
+ }
+
+ static IAnInterface thing_to_bind_to;
+ static IPropertyBinder<IAnInterface, string> result;
+ static IPropertyInspectorFactory factory;
+ static IPropertyInspector<IAnInterface, string> inspector;
+ static Expression<Func<IAnInterface, string>> expression_to_parse;
+ }
+ }
}
\ No newline at end of file
product/tests/unit/client/service.infrastructure/threading/CommandProcessorSpecs.cs
@@ -2,53 +2,53 @@ using developwithpassion.bdd.contexts;
using gorilla.commons.utility;
using MoMoney.Service.Infrastructure.Threading;
-namespace tests.unit.client.service.infrastructure.threading
-{
- [Concern(typeof (SynchronousCommandProcessor))]
- public abstract class behaves_like_a_command_processor : concerns_for<CommandProcessor, SynchronousCommandProcessor> {}
-
- [Concern(typeof (SynchronousCommandProcessor))]
- public class when_running_all_the_queued_commands_waiting_for_execution : behaves_like_a_command_processor
- {
- it should_run_the_first_command_in_the_queue = () => first_command.was_told_to(f => f.run());
-
- it should_run_the_second_command_in_the_queue = () => second_command.was_told_to(f => f.run());
-
- context c = () =>
- {
- first_command = an<Command>();
- second_command = an<Command>();
- };
-
- because b = () =>
- {
- sut.add(first_command);
- sut.add(second_command);
- sut.run();
- };
-
- static Command first_command;
- static Command second_command;
- }
-
- [Concern(typeof (SynchronousCommandProcessor))]
- public class when_attempting_to_rerun_the_command_processor : behaves_like_a_command_processor
- {
- it should_not_re_run_the_commands_that_have_already_executed =
- () => first_command.was_told_to(f => f.run()).only_once();
-
- context c = () =>
- {
- first_command = an<Command>();
- };
-
- because b = () =>
- {
- sut.add(first_command);
- sut.run();
- sut.run();
- };
-
- static Command first_command;
- }
+namespace tests.unit.client.service.infrastructure.threading
+{
+ [Concern(typeof (SynchronousCommandProcessor))]
+ public abstract class behaves_like_a_command_processor : concerns_for<CommandProcessor, SynchronousCommandProcessor> {}
+
+ [Concern(typeof (SynchronousCommandProcessor))]
+ public class when_running_all_the_queued_commands_waiting_for_execution : behaves_like_a_command_processor
+ {
+ it should_run_the_first_command_in_the_queue = () => first_command.was_told_to(f => f.run());
+
+ it should_run_the_second_command_in_the_queue = () => second_command.was_told_to(f => f.run());
+
+ context c = () =>
+ {
+ first_command = an<Command>();
+ second_command = an<Command>();
+ };
+
+ because b = () =>
+ {
+ sut.add(first_command);
+ sut.add(second_command);
+ sut.run();
+ };
+
+ static Command first_command;
+ static Command second_command;
+ }
+
+ [Concern(typeof (SynchronousCommandProcessor))]
+ public class when_attempting_to_rerun_the_command_processor : behaves_like_a_command_processor
+ {
+ it should_not_re_run_the_commands_that_have_already_executed =
+ () => first_command.was_told_to(f => f.run()).only_once();
+
+ context c = () =>
+ {
+ first_command = an<Command>();
+ };
+
+ because b = () =>
+ {
+ sut.add(first_command);
+ sut.run();
+ sut.run();
+ };
+
+ static Command first_command;
+ }
}
\ No newline at end of file
product/tests/tests.csproj
@@ -215,6 +215,10 @@
<Project>{ACF52FAB-435B-48C9-A383-C787CB2D8000}</Project>
<Name>dto</Name>
</ProjectReference>
+ <ProjectReference Include="..\client\presentation.winforms\presentation.winforms.csproj">
+ <Project>{F3E06696-0CD2-46EE-B117-A05C1E7E8CD8}</Project>
+ <Name>presentation.winforms</Name>
+ </ProjectReference>
<ProjectReference Include="..\client\presentation\presentation.csproj">
<Project>{D7C83DB3-492D-4514-8C53-C57AD8E7ACE7}</Project>
<Name>presentation</Name>
solution.sln
@@ -37,6 +37,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "support", "support", "{8421
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tests", "product\tests\tests.csproj", "{8DA6C771-9E24-42A0-BDC5-B56D277E99CD}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "presentation.winforms", "product\client\presentation.winforms\presentation.winforms.csproj", "{F3E06696-0CD2-46EE-B117-A05C1E7E8CD8}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -102,6 +104,10 @@ Global
{8DA6C771-9E24-42A0-BDC5-B56D277E99CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8DA6C771-9E24-42A0-BDC5-B56D277E99CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8DA6C771-9E24-42A0-BDC5-B56D277E99CD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F3E06696-0CD2-46EE-B117-A05C1E7E8CD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F3E06696-0CD2-46EE-B117-A05C1E7E8CD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F3E06696-0CD2-46EE-B117-A05C1E7E8CD8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F3E06696-0CD2-46EE-B117-A05C1E7E8CD8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -116,6 +122,7 @@ Global
{7EA4C557-6EF2-4B1F-85C8-5B3F51BAD8DB} = {07187CAA-7272-4E29-A736-5CBD5118D40B}
{41D2B68B-031B-44FF-BAC5-7752D9E29F94} = {07187CAA-7272-4E29-A736-5CBD5118D40B}
{81412692-F3EE-4FBF-A7C7-69454DD1BD46} = {07187CAA-7272-4E29-A736-5CBD5118D40B}
+ {F3E06696-0CD2-46EE-B117-A05C1E7E8CD8} = {07187CAA-7272-4E29-A736-5CBD5118D40B}
{AA5EEED9-4531-45F7-AFCD-AD9717D2E405} = {099D479D-7BFC-428E-A897-9189C294C9C8}
{04DC09B4-5DF9-44A6-8DD1-05941F0D0228} = {099D479D-7BFC-428E-A897-9189C294C9C8}
{6BDCB0C1-51E1-435A-93D8-CA02BF8E409C} = {099D479D-7BFC-428E-A897-9189C294C9C8}