main
1using Gorilla.Commons.Infrastructure.Logging;
2using gorilla.commons.utility;
3using MoMoney.Presentation.Model.Menu.File;
4using MoMoney.Presentation.Model.Projects;
5
6namespace momoney.presentation.model.menu.file
7{
8 public interface ICloseCommand : Command, ISaveChangesCallback, Loggable
9 {
10 }
11
12 public class CloseProjectCommand : ICloseCommand
13 {
14 readonly IProjectController project;
15 readonly ISaveChangesCommand command;
16
17 public CloseProjectCommand(IProjectController project, ISaveChangesCommand command)
18 {
19 this.command = command;
20 this.project = project;
21 }
22
23 public void run()
24 {
25 command.run(this);
26 }
27
28 public void saved()
29 {
30 project.close_project();
31 }
32
33 public void not_saved()
34 {
35 project.close_project();
36 }
37
38 public void cancelled()
39 {
40 }
41 }
42}