Commit f208a53

mokhan <mokhan@ce5e1baf-6525-42e4-a1b2-857ea38da20a>
2009-03-13 21:31:16
closing the current project before opening a new one.
git-svn-id: https://svn.xp-dev.com/svn/mokhan-mo.money@72 ce5e1baf-6525-42e4-a1b2-857ea38da20a
1 parent 83b6130
Changed files (3)
trunk
product
MyMoney
trunk/product/MyMoney/Presentation/Model/Projects/CurrentProject.cs
@@ -52,6 +52,10 @@ namespace MoMoney.Presentation.Model.Projects
 
         public void start_a_new_project()
         {
+            if (is_open())
+            {
+                close();
+            }
             is_project_open = true;
             current_file = null;
             configuration.change_path_to((ApplicationFile) Path.GetTempFileName());
trunk/product/MyMoney/Presentation/Views/Shell/ApplicationShell.cs
@@ -2,12 +2,14 @@
 using System.Collections.Generic;
 using System.ComponentModel.Composition;
 using System.Windows.Forms;
+using Castle.Core;
 using MoMoney.Presentation.Views.core;
 using MoMoney.Utility.Extensions;
 
 namespace MoMoney.Presentation.Views.Shell
 {
     [Export(typeof (IShell))]
+    [Singleton]
     public partial class ApplicationShell : ApplicationWindow, IShell
     {
         readonly IDictionary<string, Control> regions;
trunk/product/MyMoney/Presentation/Views/Shell/NotificationIconView.cs
@@ -17,7 +17,7 @@ namespace MoMoney.Presentation.Views.Shell
         readonly IFileMenu file_menu;
         readonly IWindowMenu window_menu;
         readonly IHelpMenu help_menu;
-        bool hooked_up;
+        //bool hooked_up;
 
         public NotificationIconView(IFileMenu file_menu, IWindowMenu window_menu, IHelpMenu help_menu)
         {
@@ -29,10 +29,10 @@ namespace MoMoney.Presentation.Views.Shell
 
         public void display(ApplicationIcon icon_to_display, string text_to_display)
         {
-            if (hooked_up)
-            {
-                return;
-            }
+            //if (hooked_up)
+            //{
+            //    return;
+            //}
             ux_notification_icon =
                 new NotifyIcon
                     {
@@ -51,7 +51,7 @@ namespace MoMoney.Presentation.Views.Shell
                                                   }
                                           }
                     };
-            hooked_up = true;
+            //hooked_up = true;
         }
 
         public void opened_new_project()