summaryrefslogtreecommitdiff
path: root/product/Presentation/Presenters/TaskTrayPresenter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'product/Presentation/Presenters/TaskTrayPresenter.cs')
-rw-r--r--product/Presentation/Presenters/TaskTrayPresenter.cs22
1 files changed, 16 insertions, 6 deletions
diff --git a/product/Presentation/Presenters/TaskTrayPresenter.cs b/product/Presentation/Presenters/TaskTrayPresenter.cs
index 474b5f6..8953ac2 100644
--- a/product/Presentation/Presenters/TaskTrayPresenter.cs
+++ b/product/Presentation/Presenters/TaskTrayPresenter.cs
@@ -1,17 +1,18 @@
+using System.ComponentModel;
+using Gorilla.Commons.Infrastructure.Logging;
using Gorilla.Commons.Utility.Extensions;
using MoMoney.Presentation.Model.messages;
-using MoMoney.Presentation.Views.Shell;
+using MoMoney.Presentation.Views;
using MoMoney.Service.Infrastructure.Eventing;
+using momoney.utility;
-namespace MoMoney.Presentation.Presenters.Shell
+namespace MoMoney.Presentation.Presenters
{
public interface ITaskTrayPresenter : IModule,
IEventSubscriber<SavedChangesEvent>,
IEventSubscriber<StartedRunningCommand>,
IEventSubscriber<FinishedRunningCommand>,
- IEventSubscriber<NewProjectOpened>
- {
- }
+ IEventSubscriber<NewProjectOpened> {}
public class TaskTrayPresenter : ITaskTrayPresenter
{
@@ -44,7 +45,16 @@ namespace MoMoney.Presentation.Presenters.Shell
public void notify(StartedRunningCommand message)
{
- view.display("Running... {0}".formatted_using(message.running_action));
+ this.log().debug("running {0}", message.running_action);
+ if (message.running_action.is_decorated_with<DisplayNameAttribute>())
+ {
+ var attribute = message.running_action.attribute<DisplayNameAttribute>();
+ view.display("Running... {0}".formatted_using(attribute.DisplayName));
+ }
+ else
+ {
+ view.display("Running... {0}".formatted_using(message.running_action));
+ }
}
public void notify(FinishedRunningCommand message)