main
1using System.Windows.Forms;
2using MoMoney.Service.Infrastructure.Threading;
3
4namespace MoMoney.Presentation.Core
5{
6 public interface IApplication
7 {
8 void shut_down();
9 void restart();
10 }
11
12 public class ApplicationEnvironment : IApplication
13 {
14 readonly CommandProcessor processor;
15
16 public ApplicationEnvironment(CommandProcessor processor)
17 {
18 this.processor = processor;
19 }
20
21 public void shut_down()
22 {
23 processor.stop();
24 Application.Exit();
25 //Environment.Exit(Environment.ExitCode);
26 }
27
28 public void restart()
29 {
30 processor.stop();
31 Application.Restart();
32 }
33 }
34}