Commit e35c515
Changed files (36)
product
Boot
Presentation
Model
Menu
Help
Navigation
Presenters
Views
product/Boot/Modules/GettingStartedModule.cs
@@ -26,17 +26,17 @@ namespace MoMoney.Modules
public void run()
{
broker.subscribe(this);
- command.run<IGettingStartedPresenter>();
+ command.run<GettingStartedPresenter>();
}
public void notify(NewProjectOpened message)
{
- command.run<IGettingStartedPresenter>();
+ command.run<GettingStartedPresenter>();
}
public void notify(ClosingProjectEvent message)
{
- command.run<IGettingStartedPresenter>();
+ command.run<GettingStartedPresenter>();
}
}
}
\ No newline at end of file
product/Boot/Modules/MainMenuModule.cs
@@ -22,7 +22,7 @@ namespace MoMoney.Modules
public void notify(NewProjectOpened message)
{
- command.run<IMainMenuPresenter>();
+ command.run<MainMenuPresenter>();
}
}
}
\ No newline at end of file
product/Presentation/Core/ApplicationController.cs
@@ -10,7 +10,7 @@ namespace MoMoney.Presentation.Core
public class ApplicationController : IApplicationController, ParameterizedCommand<IPresenter>
{
- readonly IShell shell;
+ IShell shell;
PresenterFactory factory;
public ApplicationController(IShell shell, PresenterFactory factory)
@@ -27,11 +27,9 @@ namespace MoMoney.Presentation.Core
public void run(IPresenter presenter)
{
presenter.present();
- if (presenter.is_an_implementation_of<IContentPresenter>())
- {
- var content_presenter = presenter.downcast_to<IContentPresenter>();
- shell.add(content_presenter.View);
- }
+ if (!presenter.is_an_implementation_of<IContentPresenter>()) return;
+
+ shell.add(presenter.downcast_to<IContentPresenter>().View);
}
}
}
\ No newline at end of file
product/Presentation/Core/IContentPresenter.cs
@@ -5,8 +5,5 @@ namespace MoMoney.Presentation.Core
public interface IContentPresenter : IPresenter
{
IDockedContentView View { get; }
- void activate();
- void deactivate();
- bool can_close();
}
}
\ No newline at end of file
product/Presentation/Model/Menu/Help/HelpMenu.cs
@@ -46,7 +46,7 @@ namespace MoMoney.Presentation.Model.Menu.Help
.a_menu_item()
.named("View Log File")
.represented_by(ApplicationIcons.ViewLog)
- .that_executes(() => command.run<ILogFilePresenter>())
+ .that_executes(() => command.run<LogFilePresenter>())
.build();
}
}
product/Presentation/Presenters/AddBillingTaskPane.cs
@@ -28,7 +28,7 @@ namespace MoMoney.Presentation.Presenters
Build.task_pane_item()
.named("View All Bills Payments")
.represented_by_icon(ApplicationIcons.ViewAllBillPayments)
- .when_clicked_execute(() => command.run<IViewAllBillsPresenter>())
+ .when_clicked_execute(() => command.run<ViewAllBillsPresenter>())
)
.build();
}
product/Presentation/Presenters/AddCompanyPresenter.cs
@@ -6,12 +6,7 @@ using MoMoney.Service.Contracts.Application;
namespace MoMoney.Presentation.Presenters
{
- public interface IAddCompanyPresenter : IContentPresenter
- {
- void submit(RegisterNewCompany dto);
- }
-
- public class AddCompanyPresenter : ContentPresenter<IAddCompanyView>, IAddCompanyPresenter
+ public class AddCompanyPresenter : ContentPresenter<IAddCompanyView>
{
readonly ICommandPump pump;
product/Presentation/Presenters/AddCompanyPresenterSpecs.cs
@@ -7,8 +7,7 @@ using MoMoney.Service.Contracts.Application;
namespace MoMoney.Presentation.Presenters
{
[Concern(typeof (AddCompanyPresenter))]
- public abstract class behaves_like_the_add_company_presenter :
- concerns_for<IAddCompanyPresenter, AddCompanyPresenter>
+ public abstract class behaves_like_the_add_company_presenter : concerns_for<AddCompanyPresenter>
{
context c = () =>
{
product/Presentation/Presenters/AddCompanyTaskPane.cs
@@ -21,7 +21,7 @@ namespace MoMoney.Presentation.Presenters
Build.task_pane_item()
.named("Add Company")
.represented_by_icon(ApplicationIcons.AddCompany)
- .when_clicked_execute(() => command.run<IAddCompanyPresenter>()))
+ .when_clicked_execute(() => command.run<AddCompanyPresenter>()))
.build();
}
}
product/Presentation/Presenters/AddIncomeTaskPane.cs
@@ -21,13 +21,13 @@ namespace MoMoney.Presentation.Presenters
Build.task_pane_item()
.named("Add Income")
.represented_by_icon(ApplicationIcons.AddNewIncome)
- .when_clicked_execute(() => command.run<IAddNewIncomePresenter>())
+ .when_clicked_execute(() => command.run<AddNewIncomePresenter>())
)
.with_item(
Build.task_pane_item()
.named("View All Income")
.represented_by_icon(ApplicationIcons.ViewAllIncome)
- .when_clicked_execute(() => command.run<IViewIncomeHistoryPresenter>())
+ .when_clicked_execute(() => command.run<ViewIncomeHistoryPresenter>())
)
.build();
}
product/Presentation/Presenters/AddNewIncomePresenter.cs
@@ -6,12 +6,7 @@ using MoMoney.Service.Contracts.Application;
namespace MoMoney.Presentation.Presenters
{
- public interface IAddNewIncomePresenter : IContentPresenter
- {
- void submit_new(IncomeSubmissionDTO income);
- }
-
- public class AddNewIncomePresenter : ContentPresenter<IAddNewIncomeView>, IAddNewIncomePresenter
+ public class AddNewIncomePresenter : ContentPresenter<IAddNewIncomeView>
{
readonly ICommandPump pump;
product/Presentation/Presenters/AddNewIncomePresenterSpecs.cs
@@ -9,8 +9,7 @@ using MoMoney.Service.Contracts.Application;
namespace momoney.presentation.presenters
{
[Concern(typeof (AddNewIncomePresenter))]
- public abstract class behaves_like_add_new_income_presenter :
- concerns_for<IAddNewIncomePresenter, AddNewIncomePresenter>
+ public abstract class behaves_like_add_new_income_presenter : concerns_for< AddNewIncomePresenter>
{
context c = () =>
{
product/Presentation/Presenters/AddReportingTaskPane.cs
@@ -25,13 +25,13 @@ namespace MoMoney.Presentation.Presenters
Build.task_pane_item()
.named("View All Bills")
.represented_by_icon(ApplicationIcons.ViewAllBillPayments)
- .when_clicked_execute(() => command.run<IReportPresenter<IViewAllBillsReport, IEnumerable<BillInformationDTO>, IGetAllBillsQuery>>())
+ .when_clicked_execute(() => command.run<ReportPresenter<IViewAllBillsReport, IEnumerable<BillInformationDTO>, IGetAllBillsQuery>>())
)
.with_item(
Build.task_pane_item()
.named("View All Income")
.represented_by_icon(ApplicationIcons.ViewAllIncome)
- .when_clicked_execute(() => command.run<IReportPresenter<IViewAllIncomeReport, IEnumerable<IncomeInformationDTO>, IGetAllIncomeQuery>>())
+ .when_clicked_execute(() => command.run<ReportPresenter<IViewAllIncomeReport, IEnumerable<IncomeInformationDTO>, IGetAllIncomeQuery>>())
)
.build();
}
product/Presentation/Presenters/GettingStartedPresenter.cs
@@ -3,11 +3,7 @@ using momoney.presentation.views;
namespace momoney.presentation.presenters
{
- public interface IGettingStartedPresenter : IContentPresenter
- {
- }
-
- public class GettingStartedPresenter : ContentPresenter<IGettingStartedView>, IGettingStartedPresenter
+ public class GettingStartedPresenter : ContentPresenter<IGettingStartedView>
{
public GettingStartedPresenter(IGettingStartedView view) : base(view)
{
product/Presentation/Presenters/GettingStartedPresenterSpecs.cs
@@ -8,7 +8,7 @@ namespace momoney.presentation.presenters
public class GettingStartedPresenterSpecs
{
public class behaves_like_the_getting_started_presenter :
- concerns_for<IGettingStartedPresenter, GettingStartedPresenter>
+ concerns_for< GettingStartedPresenter>
{
context c = () =>
{
product/Presentation/Presenters/LogFilePresenter.cs
@@ -4,11 +4,7 @@ using momoney.service.infrastructure.logging;
namespace momoney.presentation.presenters
{
- public interface ILogFilePresenter : IContentPresenter
- {
- }
-
- public class LogFilePresenter : ContentPresenter<ILogFileView>, ILogFilePresenter
+ public class LogFilePresenter : ContentPresenter<ILogFileView>
{
readonly ILogFileTasks tasks;
@@ -21,7 +17,6 @@ namespace momoney.presentation.presenters
{
view.display(tasks.get_the_path_to_the_log_file());
view.run(tasks.get_the_contents_of_the_log_file());
- //tasks.notify(view);
}
}
}
\ No newline at end of file
product/Presentation/Presenters/LogFileViewPresenterSpecs.cs
@@ -5,7 +5,7 @@ using momoney.service.infrastructure.logging;
namespace momoney.presentation.presenters
{
- public class behaves_like_log_file_presenter : concerns_for<ILogFilePresenter, LogFilePresenter>
+ public class behaves_like_log_file_presenter : concerns_for< LogFilePresenter>
{
context c = () =>
{
product/Presentation/Presenters/MainMenuPresenter.cs
@@ -6,9 +6,7 @@ using MoMoney.Presentation.Views;
namespace MoMoney.Presentation.Presenters
{
- public interface IMainMenuPresenter : IContentPresenter {}
-
- public class MainMenuPresenter : ContentPresenter<IMainMenuView>, IMainMenuPresenter
+ public class MainMenuPresenter : ContentPresenter<IMainMenuView>
{
IRunPresenterCommand command;
product/Presentation/Presenters/ReportPresenter.cs
@@ -6,11 +6,7 @@ using MoMoney.Presentation.Views;
namespace MoMoney.Presentation.Presenters
{
- public interface IReportPresenter<Report, T, Query> : IContentPresenter
- where Report : IBindReportTo<T, Query>
- where Query : Query<T> {}
-
- public class ReportPresenter<Report, T, Query> : ContentPresenter<IReportViewer>, IReportPresenter<Report, T, Query>
+ public class ReportPresenter<Report, T, Query> : ContentPresenter<IReportViewer>
where Report : IBindReportTo<T, Query>
where Query : Query<T>
{
product/Presentation/Presenters/ViewAllBillsPresenter.cs
@@ -7,11 +7,7 @@ using MoMoney.Service.Contracts.Application;
namespace momoney.presentation.presenters
{
- public interface IViewAllBillsPresenter : IContentPresenter
- {
- }
-
- public class ViewAllBillsPresenter : ContentPresenter<IViewAllBills>, IViewAllBillsPresenter
+ public class ViewAllBillsPresenter : ContentPresenter<IViewAllBills>
{
readonly ICommandPump pump;
product/Presentation/Presenters/ViewIncomeHistoryPresenter.cs
@@ -6,11 +6,7 @@ using MoMoney.Service.Contracts.Application;
namespace MoMoney.Presentation.Presenters
{
- public interface IViewIncomeHistoryPresenter : IContentPresenter
- {
- }
-
- public class ViewIncomeHistoryPresenter : ContentPresenter<IViewIncomeHistory>, IViewIncomeHistoryPresenter
+ public class ViewIncomeHistoryPresenter : ContentPresenter<IViewIncomeHistory>
{
readonly ICommandPump pump;
product/Presentation/Views/IAddCompanyView.cs
@@ -7,6 +7,6 @@ using momoney.presentation.views;
namespace MoMoney.Presentation.Views
{
public interface IAddCompanyView : IDockedContentView,
- IView<IAddCompanyPresenter>,
+ IView<AddCompanyPresenter>,
Callback<IEnumerable<CompanyDTO>> {}
}
\ No newline at end of file
product/Presentation/Views/IAddNewIncomeView.cs
@@ -7,7 +7,7 @@ using momoney.presentation.views;
namespace MoMoney.Presentation.Views
{
public interface IAddNewIncomeView : IDockedContentView,
- IView<IAddNewIncomePresenter>,
+ IView<AddNewIncomePresenter>,
Callback<IEnumerable<CompanyDTO>>,
Callback<IEnumerable<IncomeInformationDTO>> {}
}
\ No newline at end of file
product/Presentation/Views/IGettingStartedView.cs
@@ -3,7 +3,7 @@ using momoney.presentation.presenters;
namespace momoney.presentation.views
{
public interface IGettingStartedView : IDockedContentView,
- IView<IGettingStartedPresenter>
+ IView<GettingStartedPresenter>
{
}
}
\ No newline at end of file
product/Presentation/Views/IViewAllBills.cs
@@ -7,7 +7,7 @@ using momoney.presentation.views;
namespace MoMoney.Presentation.Views
{
public interface IViewAllBills : IDockedContentView,
- IView<IViewAllBillsPresenter>,
+ IView<ViewAllBillsPresenter>,
Callback<IEnumerable<BillInformationDTO>>
{
}
product/Presentation/Views/IViewIncomeHistory.cs
@@ -7,7 +7,7 @@ using momoney.presentation.views;
namespace MoMoney.Presentation.Views
{
public interface IViewIncomeHistory : IDockedContentView,
- IView<IViewIncomeHistoryPresenter>,
+ IView<ViewIncomeHistoryPresenter>,
Callback<IEnumerable<IncomeInformationDTO>>
{
product/Presentation/Winforms/Views/AddCompanyView.cs
@@ -33,7 +33,7 @@ namespace MoMoney.Presentation.Winforms.Views
ux_cancel_button.Click += (x, y) => Close();
}
- public void attach_to(IAddCompanyPresenter presenter)
+ public void attach_to(AddCompanyPresenter presenter)
{
ux_company_name.bind_to(dto, x => x.company_name);
submit_button = x => presenter.submit(dto);
product/Presentation/Winforms/Views/AddNewIncomeView.cs
@@ -26,7 +26,7 @@ namespace MoMoney.Presentation.Winforms.Views
companies_list = ux_companys.create_for<CompanyDTO>();
}
- public void attach_to(IAddNewIncomePresenter presenter)
+ public void attach_to(AddNewIncomePresenter presenter)
{
submit_button = x => presenter.submit_new(create_income());
}
product/Presentation/Winforms/Views/ViewAllBills.cs
@@ -15,7 +15,7 @@ namespace MoMoney.Presentation.Winforms.Views
titled("View Bill Payments").icon(ApplicationIcons.ViewAllBillPayments);
}
- public void attach_to(IViewAllBillsPresenter presenter)
+ public void attach_to(ViewAllBillsPresenter presenter)
{
}
product/Presentation/Winforms/Views/ViewAllIncome.cs
@@ -15,7 +15,7 @@ namespace MoMoney.Presentation.Winforms.Views
titled("View All Income").icon(ApplicationIcons.ViewAllIncome);
}
- public void attach_to(IViewIncomeHistoryPresenter presenter) {}
+ public void attach_to(ViewIncomeHistoryPresenter presenter) {}
public void run(IEnumerable<IncomeInformationDTO> summary)
{
product/Presentation/Winforms/Views/WelcomeScreen.cs
@@ -24,7 +24,7 @@ namespace MoMoney.Presentation.Winforms.Views
.with_tool_tip("Create New File", "Create a new project.");
}
- public void attach_to(IGettingStartedPresenter presenter)
+ public void attach_to(GettingStartedPresenter presenter)
{
}
}