Commit 3b63d69

mokhan <mokhan@ce5e1baf-6525-42e4-a1b2-857ea38da20a>
2009-04-17 16:14:45
git-svn-id: https://svn.xp-dev.com/svn/mokhan-mo.money@159 ce5e1baf-6525-42e4-a1b2-857ea38da20a
1 parent 8eb8f69
trunk/product/MyMoney/boot/container/registration/wire_up_the_presentation_modules.cs
@@ -38,7 +38,6 @@ namespace MoMoney.boot.container.registration
             registry.transient<IWindowMenu, WindowMenu>();
             registry.transient<IHelpMenu, HelpMenu>();
             
-
             item
                 .all_types()
                 .where(x => typeof (IPresenter).IsAssignableFrom(x))
trunk/product/MyMoney/Infrastructure/Container/Autofac/AutofacDependencyRegistryBuilder.cs
@@ -45,13 +45,9 @@ namespace MoMoney.Infrastructure.Container.Autofac
         public void transient(Type contract, Type implementation)
         {
             if (contract.is_a_generic_type())
-            {
                 builder.RegisterGeneric(implementation).As(contract).FactoryScoped();
-            }
             else
-            {
                 builder.Register(implementation).As(contract).FactoryScoped();
-            }
         }
 
         public void proxy<T>(IConfiguration<IProxyBuilder<T>> configuration, Func<T> target)
trunk/product/MyMoney/Modules/MainMenuModule.cs
@@ -12,8 +12,8 @@ namespace MoMoney.Modules
 
     public class MainMenuModule : IMainMenuModule
     {
-        readonly IRunPresenterCommand command;
         readonly IEventAggregator broker;
+        readonly IRunPresenterCommand command;
 
         public MainMenuModule(IEventAggregator broker, IRunPresenterCommand command)
         {
trunk/product/MyMoney/Presentation/Core/ApplicationController.cs
@@ -1,6 +1,3 @@
-using System;
-using System.Collections.Generic;
-using MoMoney.Infrastructure.Extensions;
 using MoMoney.Presentation.Views.Shell;
 using MoMoney.Utility.Core;
 using MoMoney.Utility.Extensions;
@@ -16,45 +13,18 @@ namespace MoMoney.Presentation.Core
     {
         readonly IPresenterRegistry registered_presenters;
         readonly IShell shell;
-        //readonly IDictionary<Type, IPresenter> open_presenters;
-        //readonly object mutex = new object();
 
         public ApplicationController(IPresenterRegistry registered_presenters, IShell shell)
         {
             this.registered_presenters = registered_presenters;
             this.shell = shell;
-            //open_presenters = new Dictionary<Type, IPresenter>();
         }
 
         public void run<Presenter>() where Presenter : IPresenter
         {
-            //if (open_presenters.ContainsKey(typeof (Presenter)))
-            //{
-            //    this.log().debug("from cached presenter: {0}", typeof (Presenter));
-            //    run(open_presenters[typeof (Presenter)]);
-            //}
-            //else
-            //{
-            //    if (typeof (IContentPresenter).IsAssignableFrom(typeof (Presenter)))
-            //    {
-            //        this.log().debug("adding presenter to cache: {0}", typeof (Presenter));
-            //        var presenter = registered_presenters.find_an_implementation_of<IPresenter, Presenter>();
-            //        within_lock(() => open_presenters.Add(typeof (Presenter), presenter));
-            //        run(presenter);
-            //    }
-            //    else
-            //    {
-            //        this.log().debug("running uncached presenter: {0}", typeof (Presenter));
             run(registered_presenters.find_an_implementation_of<IPresenter, Presenter>());
-            //}
-            //}
         }
 
-        //void within_lock(Action action)
-        //{
-        //    lock (mutex) action();
-        //}
-
         public void run(IPresenter presenter)
         {
             presenter.run();
@@ -63,19 +33,13 @@ namespace MoMoney.Presentation.Core
                 var content_presenter = presenter.downcast_to<IContentPresenter>();
                 var view = content_presenter.View;
 
-                view.on_activated = x => content_presenter.activate();
-                view.on_deactivate = x => content_presenter.deactivate();
-                view.on_closing = x => x.Cancel = !content_presenter.can_close();
+                //view.on_activated = x => content_presenter.activate();
+                //view.on_deactivate = x => content_presenter.deactivate();
+                //view.on_closing = x => x.Cancel = !content_presenter.can_close();
                 //view.on_closed = x => remove(presenter);
 
                 shell.add(view);
             }
         }
-
-        //void remove<Presenter>(Presenter presenter) where Presenter : IPresenter
-        //{
-        //    this.log().debug("removing {0}", presenter);
-        //    within_lock(() => open_presenters.Remove(typeof (Presenter)));
-        //}
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Presentation/Core/ContentPresenter.cs
@@ -1,4 +1,3 @@
-using MoMoney.Infrastructure.Extensions;
 using MoMoney.Presentation.Views.core;
 
 namespace MoMoney.Presentation.Core
@@ -21,12 +20,10 @@ namespace MoMoney.Presentation.Core
 
         public virtual void activate()
         {
-            this.log().debug("activated: {0}", this);
         }
 
         public virtual void deactivate()
         {
-            this.log().debug("deactivated: {0}", this);
         }
 
         public virtual bool can_close()
trunk/product/MyMoney/Presentation/Model/Navigation/navigation_tree_visitor_specs.cs
@@ -1,9 +1,9 @@
 using System.Windows.Forms;
 using developwithpassion.bdd.contexts;
-using MoMoney.Infrastructure.Container;
 using MoMoney.Testing.MetaData;
 using MoMoney.Testing.spechelpers.contexts;
 using MoMoney.Testing.spechelpers.core;
+using MoMoney.Utility.Core;
 
 namespace MoMoney.Presentation.Model.Navigation
 {
@@ -11,50 +11,50 @@ namespace MoMoney.Presentation.Model.Navigation
     public abstract class behaves_like_a_navigation_tree_visitor :
         concerns_for<INavigationTreeVisitor, NavigationTreeVisitor>
     {
-        public override INavigationTreeVisitor create_sut()
-        {
-            return new NavigationTreeVisitor(factory, registry);
-        }
+        //public override INavigationTreeVisitor create_sut()
+        //{
+        //    return new NavigationTreeVisitor(factory, registry);
+        //}
 
         context c = () =>
                         {
                             factory = the_dependency<ITreeViewToRootNodeMapper>();
-                            registry = the_dependency<IDependencyRegistry>();
+                            registry = the_dependency<IRegistry<IBranchVisitor>>();
                         };
 
-        protected static ITreeViewToRootNodeMapper factory;
-        protected static IDependencyRegistry registry;
+        static protected ITreeViewToRootNodeMapper factory;
+        static protected IRegistry<IBranchVisitor> registry;
     }
 
     public class when_visiting_the_navigation_tree : behaves_like_a_navigation_tree_visitor
     {
         it should_visit_each_of_the_tree_node_visitors = () =>
                                                              {
-                                                                 root_node.was_told_to(x => x.accept(first_node_visitor));
-                                                                 root_node.was_told_to( x => x.accept(second_node_visitor));
+                                                                 root_node.was_told_to(x => x.accept(first_visitor));
+                                                                 root_node.was_told_to(x => x.accept(second_visitor));
                                                              };
 
         context c = () =>
                         {
                             tree_view = dependency<TreeView>();
                             root_node = an<ITreeBranch>();
-                            first_node_visitor = an<IBranchVisitor>();
-                            second_node_visitor = an<IBranchVisitor>();
+                            first_visitor = an<IBranchVisitor>();
+                            second_visitor = an<IBranchVisitor>();
 
                             when_the(factory)
                                 .is_told_to(x => x.map_from(tree_view))
                                 .it_will_return(root_node);
 
                             when_the(registry)
-                                .is_told_to(x => x.all_the<IBranchVisitor>())
-                                .it_will_return(first_node_visitor, second_node_visitor);
+                                .is_told_to(x => x.all())
+                                .it_will_return(first_visitor, second_visitor);
                         };
 
         because b = () => sut.visit(tree_view);
 
         static TreeView tree_view;
         static ITreeBranch root_node;
-        static IBranchVisitor first_node_visitor;
-        static IBranchVisitor second_node_visitor;
+        static IBranchVisitor first_visitor;
+        static IBranchVisitor second_visitor;
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Presentation/Model/Navigation/NavigationTreeVisitor.cs
@@ -1,5 +1,4 @@
 using System.Windows.Forms;
-using MoMoney.Infrastructure.Container;
 using MoMoney.Utility.Core;
 using MoMoney.Utility.Extensions;
 
@@ -12,18 +11,18 @@ namespace MoMoney.Presentation.Model.Navigation
     public class NavigationTreeVisitor : INavigationTreeVisitor
     {
         readonly ITreeViewToRootNodeMapper mapper;
-        readonly IDependencyRegistry registry;
+        readonly IRegistry<IBranchVisitor> visitors;
 
-        public NavigationTreeVisitor(ITreeViewToRootNodeMapper mapper, IDependencyRegistry registry)
+        public NavigationTreeVisitor(ITreeViewToRootNodeMapper mapper, IRegistry<IBranchVisitor> visitors)
         {
             this.mapper = mapper;
-            this.registry = registry;
+            this.visitors = visitors;
         }
 
         public void visit(TreeView item_to_visit)
         {
             var root_node = mapper.map_from(item_to_visit);
-            registry.all_the<IBranchVisitor>().each(root_node.accept);
+            visitors.all().each(root_node.accept);
         }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Presentation/Presenters/billing/AddBillPaymentPresenter.cs
@@ -15,13 +15,11 @@ namespace MoMoney.Presentation.Presenters.billing
 
     public class AddBillPaymentPresenter : ContentPresenter<IAddBillPaymentView>, IAddBillPaymentPresenter
     {
-        readonly IBillingTasks tasks;
         readonly ICommandPump pump;
 
-        public AddBillPaymentPresenter(IAddBillPaymentView view, ICommandPump pump, IBillingTasks tasks) : base(view)
+        public AddBillPaymentPresenter(IAddBillPaymentView view, ICommandPump pump) : base(view)
         {
             this.pump = pump;
-            this.tasks = tasks;
         }
 
         public override void run()
trunk/product/MyMoney/Presentation/Views/billing/AddBillPaymentView.cs
@@ -5,7 +5,6 @@ using MoMoney.Presentation.Databindings;
 using MoMoney.Presentation.Presenters.billing;
 using MoMoney.Presentation.Presenters.billing.dto;
 using MoMoney.Presentation.Views.core;
-using MoMoney.Presentation.Views.updates;
 using MoMoney.Utility.Extensions;
 
 namespace MoMoney.Presentation.Views.billing
@@ -14,14 +13,11 @@ namespace MoMoney.Presentation.Views.billing
     {
         ControlAction<EventArgs> submit_clicked = x => { };
 
-         ControlAction<EventArgs> activated = x => { };
-
         public AddBillPaymentView()
         {
             InitializeComponent();
             titled("Add Bill Payment");
             ux_submit_button.Click += (sender, e) => submit_clicked(e);
-            Activated += (sender, args) => activated(args);
         }
 
         public void attach_to(IAddBillPaymentPresenter presenter)
@@ -36,7 +32,7 @@ namespace MoMoney.Presentation.Views.billing
 
         public void run(IEnumerable<BillInformationDTO> bills)
         {
-            ux_bil_payments_grid.DataSource = bills.databind();
+            ux_bill_payments_grid.DataSource = bills.databind();
         }
 
         AddNewBillDTO create_dto()
trunk/product/MyMoney/Presentation/Views/billing/AddBillPaymentView.Designer.cs
@@ -41,7 +41,7 @@
             this.ux_company_names = new ComponentFactory.Krypton.Toolkit.KryptonComboBox();
             this.kryptonSplitContainer2 = new ComponentFactory.Krypton.Toolkit.KryptonSplitContainer();
             this.kryptonHeader1 = new ComponentFactory.Krypton.Toolkit.KryptonHeader();
-            this.ux_bil_payments_grid = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
+            this.ux_bill_payments_grid = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
             ((System.ComponentModel.ISupportInitialize)(this.kryptonHeaderGroup1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.kryptonHeaderGroup1.Panel)).BeginInit();
             this.kryptonHeaderGroup1.Panel.SuspendLayout();
@@ -59,7 +59,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.kryptonSplitContainer2.Panel2)).BeginInit();
             this.kryptonSplitContainer2.Panel2.SuspendLayout();
             this.kryptonSplitContainer2.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.ux_bil_payments_grid)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.ux_bill_payments_grid)).BeginInit();
             this.SuspendLayout();
             // 
             // kryptonHeaderGroup1
@@ -202,7 +202,7 @@
             // 
             // kryptonSplitContainer2.Panel2
             // 
-            this.kryptonSplitContainer2.Panel2.Controls.Add(this.ux_bil_payments_grid);
+            this.kryptonSplitContainer2.Panel2.Controls.Add(this.ux_bill_payments_grid);
             this.kryptonSplitContainer2.SeparatorStyle = ComponentFactory.Krypton.Toolkit.SeparatorStyle.HighProfile;
             this.kryptonSplitContainer2.Size = new System.Drawing.Size(435, 788);
             this.kryptonSplitContainer2.SplitterDistance = 38;
@@ -221,16 +221,16 @@
             // 
             // ux_bil_payments_grid
             // 
-            this.ux_bil_payments_grid.AllowUserToAddRows = false;
-            this.ux_bil_payments_grid.AllowUserToDeleteRows = false;
-            this.ux_bil_payments_grid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            this.ux_bil_payments_grid.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.ux_bil_payments_grid.Location = new System.Drawing.Point(0, 0);
-            this.ux_bil_payments_grid.Name = "ux_bil_payments_grid";
-            this.ux_bil_payments_grid.ReadOnly = true;
-            this.ux_bil_payments_grid.Size = new System.Drawing.Size(435, 745);
-            this.ux_bil_payments_grid.StateCommon.BackStyle = ComponentFactory.Krypton.Toolkit.PaletteBackStyle.GridBackgroundList;
-            this.ux_bil_payments_grid.TabIndex = 0;
+            this.ux_bill_payments_grid.AllowUserToAddRows = false;
+            this.ux_bill_payments_grid.AllowUserToDeleteRows = false;
+            this.ux_bill_payments_grid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.ux_bill_payments_grid.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.ux_bill_payments_grid.Location = new System.Drawing.Point(0, 0);
+            this.ux_bill_payments_grid.Name = "ux_bill_payments_grid";
+            this.ux_bill_payments_grid.ReadOnly = true;
+            this.ux_bill_payments_grid.Size = new System.Drawing.Size(435, 745);
+            this.ux_bill_payments_grid.StateCommon.BackStyle = ComponentFactory.Krypton.Toolkit.PaletteBackStyle.GridBackgroundList;
+            this.ux_bill_payments_grid.TabIndex = 0;
             // 
             // add_bill_payment
             // 
@@ -260,7 +260,7 @@
             this.kryptonSplitContainer2.Panel2.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.kryptonSplitContainer2)).EndInit();
             this.kryptonSplitContainer2.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.ux_bil_payments_grid)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.ux_bill_payments_grid)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -279,6 +279,6 @@
         private ComponentFactory.Krypton.Toolkit.KryptonComboBox ux_company_names;
         private ComponentFactory.Krypton.Toolkit.KryptonSplitContainer kryptonSplitContainer2;
         private ComponentFactory.Krypton.Toolkit.KryptonHeader kryptonHeader1;
-        private ComponentFactory.Krypton.Toolkit.KryptonDataGridView ux_bil_payments_grid;
+        private ComponentFactory.Krypton.Toolkit.KryptonDataGridView ux_bill_payments_grid;
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Presentation/Views/core/ApplicationDockedWindow.cs
@@ -4,7 +4,6 @@ using System.Linq;
 using System.Windows.Forms;
 using MoMoney.Presentation.Resources;
 using MoMoney.Presentation.Views.helpers;
-using MoMoney.Presentation.Views.updates;
 using MoMoney.Utility.Extensions;
 using WeifenLuo.WinFormsUI.Docking;
 
@@ -69,7 +68,7 @@ namespace MoMoney.Presentation.Views.core
         {
             var tip = new ToolTip {IsBalloon = true, ToolTipTitle = title};
             tip.SetToolTip(control, caption);
-            control.Controls.Add(adapt(tip));
+            control.Controls.Add(new ControlAdapter(tip));
             return this;
         }
 
@@ -105,8 +104,7 @@ namespace MoMoney.Presentation.Views.core
                 if (window_is_already_contained_in(panel)) remove_from(panel);
                 //else
                 {
-                    Show(panel);
-                    DockState = dock_state;
+                    Show(panel, dock_state);
                 }
             }
         }
@@ -116,7 +114,6 @@ namespace MoMoney.Presentation.Views.core
             using (new SuspendLayout(panel))
             {
                 var panel_to_remove = get_window_from(panel);
-                //panel_to_remove.DockHandler.Activate();
                 panel_to_remove.DockHandler.Close();
                 panel_to_remove.DockHandler.Dispose();
             }
@@ -136,26 +133,5 @@ namespace MoMoney.Presentation.Views.core
         {
             return x.DockHandler.TabText.Equals(TabText);
         }
-
-        Control adapt(IDisposable item)
-        {
-            return new ControlAdapter(item);
-        }
-
-        class ControlAdapter : Control
-        {
-            readonly IDisposable item;
-
-            public ControlAdapter(IDisposable item)
-            {
-                this.item = item;
-            }
-
-            protected override void Dispose(bool disposing)
-            {
-                if (disposing) item.Dispose();
-                base.Dispose(disposing);
-            }
-        }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Presentation/Views/core/ApplicationWindow.cs
@@ -3,7 +3,7 @@ using System.ComponentModel;
 using System.Windows.Forms;
 using MoMoney.Infrastructure.Extensions;
 using MoMoney.Presentation.Resources;
-using MoMoney.Presentation.Views.updates;
+using MoMoney.Presentation.Views.helpers;
 
 namespace MoMoney.Presentation.Views.core
 {
@@ -21,7 +21,7 @@ namespace MoMoney.Presentation.Views.core
         {
             InitializeComponent();
             Icon = ApplicationIcons.Application;
-            //this.log().debug("created {0}", GetType());
+            this.log().debug("created {0}", GetType());
 
             on_activated = x => { };
             on_deactivate = x => { };
@@ -38,7 +38,7 @@ namespace MoMoney.Presentation.Views.core
         {
             var tip = new ToolTip {IsBalloon = true, ToolTipTitle = title};
             tip.SetToolTip(control, caption);
-            control.Controls.Add(adapt(tip));
+            control.Controls.Add(new ControlAdapter(tip));
             return this;
         }
 
@@ -66,50 +66,25 @@ namespace MoMoney.Presentation.Views.core
         protected override void OnActivated(EventArgs e)
         {
             base.OnActivated(e);
-            this.log().debug("activated: {0}", this);
             on_activated(e);
         }
 
         protected override void OnDeactivate(EventArgs e)
         {
             base.OnDeactivate(e);
-            this.log().debug("deactivated: {0}", this);
             on_deactivate(e);
         }
 
         protected override void OnClosing(CancelEventArgs e)
         {
             base.OnClosing(e);
-            this.log().debug("closing: {0}", this);
             on_closing(e);
         }
 
         protected override void OnClosed(EventArgs e)
         {
             base.OnClosed(e);
-            this.log().debug("closed: {0}", this);
             on_closed(e);
         }
-
-        Control adapt(IDisposable item)
-        {
-            return new ControlAdapter(item);
-        }
-
-        class ControlAdapter : Control
-        {
-            readonly IDisposable item;
-
-            public ControlAdapter(IDisposable item)
-            {
-                this.item = item;
-            }
-
-            protected override void Dispose(bool disposing)
-            {
-                if (disposing) item.Dispose();
-                base.Dispose(disposing);
-            }
-        }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Presentation/Views/updates/ControlAction.cs → trunk/product/MyMoney/Presentation/Views/core/ControlAction.cs
@@ -1,6 +1,6 @@
 using System;
 
-namespace MoMoney.Presentation.Views.updates
+namespace MoMoney.Presentation.Views.core
 {
     public delegate void ControlAction<T>(T input) where T : EventArgs;
 }
\ No newline at end of file
trunk/product/MyMoney/Presentation/Views/core/IWindowEvents.cs
@@ -1,6 +1,5 @@
 using System;
 using System.ComponentModel;
-using MoMoney.Presentation.Views.updates;
 
 namespace MoMoney.Presentation.Views.core
 {
trunk/product/MyMoney/Presentation/Views/dialogs/SaveChangesView.cs
@@ -4,7 +4,6 @@ using System.Windows.Forms;
 using MoMoney.Presentation.Model.Menu.File.Commands;
 using MoMoney.Presentation.Resources;
 using MoMoney.Presentation.Views.core;
-using MoMoney.Presentation.Views.updates;
 
 namespace MoMoney.Presentation.Views.dialogs
 {
trunk/product/MyMoney/Presentation/Views/helpers/ControlAdapter.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Windows.Forms;
+
+namespace MoMoney.Presentation.Views.helpers
+{
+    class ControlAdapter : Control
+    {
+        readonly IDisposable item;
+
+        public ControlAdapter(IDisposable item)
+        {
+            this.item = item;
+        }
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing) item.Dispose();
+            base.Dispose(disposing);
+        }
+    }
+}
\ No newline at end of file
trunk/product/MyMoney/Presentation/Views/income/AddNewIncomeView.cs
@@ -8,7 +8,6 @@ using MoMoney.Presentation.Model.interaction;
 using MoMoney.Presentation.Presenters.income;
 using MoMoney.Presentation.Presenters.income.dto;
 using MoMoney.Presentation.Views.core;
-using MoMoney.Presentation.Views.updates;
 using MoMoney.Utility.Extensions;
 
 namespace MoMoney.Presentation.Views.income
trunk/product/MyMoney/Presentation/Views/Navigation/NavigationView.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Windows.Forms;
 using MoMoney.Presentation.Model.Navigation;
 using MoMoney.Presentation.Resources;
@@ -17,13 +16,7 @@ namespace MoMoney.Presentation.Views.Navigation
         {
             InitializeComponent();
             this.shell = shell;
-        }
-
-        protected override void OnLoad(EventArgs e)
-        {
-            icon(ApplicationIcons.FileExplorer)
-                .docked_to(DockState.DockRightAutoHide);
-
+            icon(ApplicationIcons.FileExplorer).docked_to(DockState.DockRightAutoHide);
             uxNavigationTreeView.ImageList = new ImageList();
             ApplicationIcons.all().each(x => uxNavigationTreeView.ImageList.Images.Add(x.name_of_the_icon, x));
         }
trunk/product/MyMoney/Presentation/Views/Shell/ApplicationShell.cs
@@ -6,7 +6,6 @@ using System.Windows.Forms;
 using MoMoney.Presentation.Presenters.Shell;
 using MoMoney.Presentation.Views.core;
 using MoMoney.Presentation.Views.helpers;
-using MoMoney.Presentation.Views.updates;
 using MoMoney.Utility.Extensions;
 
 namespace MoMoney.Presentation.Views.Shell
@@ -38,7 +37,7 @@ namespace MoMoney.Presentation.Views.Shell
         protected override void OnLoad(EventArgs e)
         {
             base.OnLoad(e);
-            try_to_reduce_flickering().top_most();
+            try_to_reduce_flickering();
         }
 
         public void attach_to(IApplicationShellPresenter presenter)
@@ -66,7 +65,9 @@ namespace MoMoney.Presentation.Views.Shell
         {
             using (new SuspendLayout(ux_dock_panel))
                 while (ux_dock_panel.Contents.Count > 0)
+                {
                     ux_dock_panel.Contents[0].DockHandler.Close();
+                }
         }
 
         void ensure_that_the_region_exists<T>()
trunk/product/MyMoney/Presentation/Views/Shell/UnhandledErrorView.cs
@@ -3,7 +3,6 @@ using System.Windows.Forms;
 using MoMoney.Presentation.Presenters.Shell;
 using MoMoney.Presentation.Resources;
 using MoMoney.Presentation.Views.core;
-using MoMoney.Presentation.Views.updates;
 
 namespace MoMoney.Presentation.Views.Shell
 {
trunk/product/MyMoney/Presentation/Views/AddCompanyView.cs
@@ -10,7 +10,6 @@ using MoMoney.Presentation.Presenters;
 using MoMoney.Presentation.Presenters.billing.dto;
 using MoMoney.Presentation.Resources;
 using MoMoney.Presentation.Views.core;
-using MoMoney.Presentation.Views.updates;
 using MoMoney.Utility.Extensions;
 
 namespace MoMoney.Presentation.Views
trunk/product/MyMoney/MyMoney.csproj
@@ -504,6 +504,9 @@
     </Compile>
     <Compile Include="Presentation\Views\dialogs\SaveChangesViewSpecs.cs" />
     <Compile Include="Presentation\Views\helpers\BindableListFactory.cs" />
+    <Compile Include="Presentation\Views\helpers\ControlAdapter.cs">
+      <SubType>Component</SubType>
+    </Compile>
     <Compile Include="Presentation\Views\helpers\EventTriggerExtensions.cs" />
     <Compile Include="Presentation\Views\helpers\SuspendLayout.cs" />
     <Compile Include="Presentation\Views\IAddCompanyView.cs" />
@@ -597,7 +600,7 @@
     <Compile Include="Presentation\Views\updates\CheckForUpdatesView.Designer.cs">
       <DependentUpon>CheckForUpdatesView.cs</DependentUpon>
     </Compile>
-    <Compile Include="Presentation\Views\updates\ControlAction.cs" />
+    <Compile Include="Presentation\Views\core\ControlAction.cs" />
     <Compile Include="Presentation\Views\updates\ICheckForUpdatesView.cs" />
     <Compile Include="Tasks\application\BillingTasks.cs" />
     <Compile Include="Tasks\application\CustomerTasks.cs" />
@@ -626,7 +629,8 @@
     <Compile Include="Testing\spechelpers\core\IHideObjectMembers.cs" />
     <Compile Include="Testing\spechelpers\core\MethodCallOccurance.cs" />
     <Compile Include="Testing\MetaData\RunInRealContainer.cs" />
-    <Compile Include="Presentation\Views\helpers\Events.cs" />
+    <Compile Include="Presentation\Views\helpers\Events.cs">
+    </Compile>
     <Compile Include="Presentation\Views\helpers\EventTrigger.cs" />
     <Compile Include="Presentation\Views\helpers\IEventTarget.cs" />
     <Compile Include="Presentation\Views\helpers\EventTriggerSpecs.cs" />
@@ -719,6 +723,7 @@
     </Compile>
     <Compile Include="Presentation\Views\Menu\Help\IAboutApplicationView.cs" />
     <Compile Include="Presentation\Views\Shell\ApplicationShell.cs">
+      <SubType>Form</SubType>
     </Compile>
     <Compile Include="Presentation\Views\Shell\ApplicationShell.Designer.cs">
       <DependentUpon>ApplicationShell.cs</DependentUpon>