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