main
 1using System.Threading;
 2using presentation.windows.eventing;
 3using presentation.windows.events;
 4
 5namespace presentation.windows.presenters
 6{
 7    public class StatusBarPresenter : Observable<StatusBarPresenter>, Presenter, EventSubscriber<UpdateOnLongRunningProcess>
 8    {
 9        public string progress_message { get; set; }
10        public bool is_progress_bar_on { get; set; }
11        public string username { get; set; }
12        public string title { get; set; }
13
14        public void present()
15        {
16            username = Thread.CurrentPrincipal.Identity.Name;
17            title = "Software Developer";
18        }
19
20        public void notify(UpdateOnLongRunningProcess message)
21        {
22            progress_message = message.message;
23            is_progress_bar_on = message.percent_complete < 100;
24            update(x => x.progress_message, x => x.is_progress_bar_on);
25        }
26    }
27}