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 hide_the_splash_screen : ISplashScreenState
9 {
10 readonly ITimer timer;
11 readonly ISplashScreenView view;
12 readonly ISplashScreenPresenter presenter;
13
14 public hide_the_splash_screen(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() == 0)
25 {
26 timer.stop_notifying(presenter);
27 view.close_the_screen();
28 }
29 else
30 {
31 view.decrement_the_opacity();
32 }
33 }
34 }
35}