main
 1using System;
 2using MoMoney.Presentation.Presenters;
 3using momoney.presentation.views;
 4using MoMoney.Service.Infrastructure.Threading;
 5
 6namespace momoney.presentation.presenters
 7{
 8    public class DisplayTheSplashScreen : ISplashScreenState
 9    {
10        readonly ITimer timer;
11        readonly ISplashScreenView view;
12        readonly ISplashScreenPresenter presenter;
13
14        public DisplayTheSplashScreen(ITimer timer, ISplashScreenView view, ISplashScreenPresenter presenter)
15        {
16            this.timer = timer;
17            this.view = view;
18            this.presenter = presenter;
19            timer.start_notifying(presenter, new TimeSpan(50));
20        }
21
22        public void update()
23        {
24            if (view.current_opacity() < 1)
25            {
26                view.increment_the_opacity();
27            }
28            else
29            {
30                timer.stop_notifying(presenter);
31            }
32        }
33    }
34}