Commit 50452eb

mokhan <mokhan@ce5e1baf-6525-42e4-a1b2-857ea38da20a>
2009-03-25 03:04:03
updated the file menu to enable and disable menu items based on the state of the application.
git-svn-id: https://svn.xp-dev.com/svn/mokhan-mo.money@105 ce5e1baf-6525-42e4-a1b2-857ea38da20a
1 parent 251d981
Changed files (1)
trunk
product
MyMoney
Presentation
Model
Menu
trunk/product/MyMoney/Presentation/Model/Menu/File/FileMenu.cs
@@ -48,7 +48,7 @@ namespace MoMoney.Presentation.Model.Menu.File
                 .named("&Save")
                 .that_executes<ISaveCommand>()
                 .represented_by(ApplicationIcons.SaveProject)
-                //.can_be_clicked_when(() => project.has_unsaved_changes())
+                .can_be_clicked_when(() => project.has_unsaved_changes())
                 .can_be_accessed_with(ShortcutKeys.control.and(ShortcutKeys.S))
                 .build();
 
@@ -56,14 +56,14 @@ namespace MoMoney.Presentation.Model.Menu.File
                 .a_menu_item()
                 .named("Save &As...")
                 .that_executes<ISaveAsCommand>()
-                //.can_be_clicked_when(() => project.has_unsaved_changes())
+                .can_be_clicked_when(() => project.has_unsaved_changes())
                 .represented_by(ApplicationIcons.SaveProjectAs)
                 .build();
 
             yield return Create
                 .a_menu_item()
                 .named("&Close")
-                //.can_be_clicked_when(() => project.is_open())
+                .can_be_clicked_when(() => project.is_open())
                 .that_executes<ICloseCommand>()
                 .build();