Commit 9806b17

mokhan <mokhan@ce5e1baf-6525-42e4-a1b2-857ea38da20a>
2009-03-14 22:03:59
adding the object list view.
git-svn-id: https://svn.xp-dev.com/svn/mokhan-mo.money@77 ce5e1baf-6525-42e4-a1b2-857ea38da20a
1 parent 6106d8b
trunk/build/lib/app/component.factory/ComponentFactory.Krypton.Navigator.dll
Binary file
trunk/build/lib/app/component.factory/ComponentFactory.Krypton.Ribbon.dll
Binary file
trunk/build/lib/app/component.factory/ComponentFactory.Krypton.Workspace.dll
Binary file
trunk/build/lib/app/jpboodhoo/jpboodhoo.bdd.dll
Binary file
trunk/build/lib/app/jpboodhoo/jpboodhoo.bdd.pdb
Binary file
trunk/build/lib/app/jpboodhoo/jpboodhoo.commons.core.infrastructure.dll
Binary file
trunk/build/lib/app/object.list.view/ObjectListView.dll
Binary file
trunk/build/lib/app/object.list.view/ObjectListView.pdb
Binary file
trunk/build/lib/app/office.ribbon/System.Windows.Forms.Ribbon.dll
Binary file
trunk/product/MyMoney/DataAccess/db40/ConnectionFactory.cs
@@ -1,20 +1,18 @@
 using Db4objects.Db4o;
-using MoMoney.Infrastructure.Extensions;
 using MoMoney.Presentation.Model.Projects;
 
 namespace MoMoney.DataAccess.db40
 {
     public interface IConnectionFactory
     {
-        IObjectContainer open_connection_to(IFile the_path_to_the_database_file);
+        ISession open_connection_to(IFile the_path_to_the_database_file);
     }
 
     public class ConnectionFactory : IConnectionFactory
     {
-        public IObjectContainer open_connection_to(IFile the_path_to_the_database_file)
+        public ISession open_connection_to(IFile the_path_to_the_database_file)
         {
-            this.log().debug("open connection to {0}", the_path_to_the_database_file.path);
-            return Db4oFactory.OpenFile(the_path_to_the_database_file.path);
+            return new Session(Db4oFactory.OpenFile(the_path_to_the_database_file.path), the_path_to_the_database_file);
         }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/DataAccess/db40/DatabaseConfiguration.cs
@@ -1,3 +1,4 @@
+using System;
 using Castle.Core;
 using MoMoney.Presentation.Model.Projects;
 
@@ -12,18 +13,25 @@ namespace MoMoney.DataAccess.db40
     [Singleton]
     public class DatabaseConfiguration : IDatabaseConfiguration
     {
-        ApplicationFile the_path_to_the_database_file;
+        IFile the_path_to_the_database_file;
 
         public IFile path_to_the_database()
         {
+            ensure_that_a_path_is_specified();
             return the_path_to_the_database_file;
         }
 
         public void change_path_to(IFile file)
         {
-            //the_path_to_the_database_file = Path.GetTempFileName();
-            //file.copy_to(the_path_to_the_database_file);
-            the_path_to_the_database_file = file.path;
+            the_path_to_the_database_file = file;
+        }
+
+        void ensure_that_a_path_is_specified()
+        {
+            if (null == the_path_to_the_database_file)
+            {
+                throw new ArgumentException("A path to the database is not specified.");
+            }
         }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/DataAccess/db40/ObjectDatabaseGateway.cs
@@ -1,6 +1,5 @@
 using System.Collections.Generic;
 using System.Linq;
-using Db4objects.Db4o;
 using MoMoney.DataAccess.core;
 using MoMoney.Domain.Core;
 using MoMoney.Infrastructure.Extensions;
@@ -28,7 +27,6 @@ namespace MoMoney.DataAccess.db40
 
         public void save<T>(T item) where T : IEntity
         {
-            this.log().debug("saving: {0}, {1}", item.ToString(), item.Id);
             using (var container = open_session_with_database())
             {
                 container.Store(item);
@@ -36,7 +34,7 @@ namespace MoMoney.DataAccess.db40
             }
         }
 
-        IObjectContainer open_session_with_database()
+        ISession open_session_with_database()
         {
             return provider.get_session();
         }
trunk/product/MyMoney/DataAccess/db40/ObjectDatabaseGatewaySpecs.cs
@@ -12,9 +12,9 @@ namespace MoMoney.DataAccess.db40
     [Concern(typeof (ObjectDatabaseGateway))]
     public abstract class behaves_like_a_object_repository : concerns_for<IDatabaseGateway, ObjectDatabaseGateway>
     {
-        context c = () => { _provider = the_dependency<ISessionProvider>(); };
+        context c = () => { provider = the_dependency<ISessionProvider>(); };
 
-        protected static ISessionProvider _provider;
+        protected static ISessionProvider provider;
     }
 
     public class when_loading_all_the_items_from_the_database : behaves_like_a_object_repository
@@ -29,11 +29,10 @@ namespace MoMoney.DataAccess.db40
                         {
                             first_item = an<IEntity>();
                             second_item = an<IEntity>();
-                            var session = an<IObjectContainer>();
+                            var session = an<ISession>();
 
-                            _provider.is_told_to(x => x.get_session()).it_will_return(session);
-                            session.is_told_to(x => x.Query<IEntity>()).it_will_return(new List<IEntity>
-                                                                                           {first_item, second_item});
+                            provider.is_told_to(x => x.get_session()).it_will_return(session);
+                            session.is_told_to(x => x.Query<IEntity>()).it_will_return(new List<IEntity> {first_item, second_item});
                         };
 
         because b = () => { result = sut.all<IEntity>(); };
trunk/product/MyMoney/DataAccess/db40/Session.cs
@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+using Db4objects.Db4o;
+using MoMoney.Presentation.Model.Projects;
+
+namespace MoMoney.DataAccess.db40
+{
+    public interface ISession : IDisposable
+    {
+        bool represents(IFile file);
+        IEnumerable<T> Query<T>();
+        void Store<T>(T item);
+        void Commit();
+    }
+
+    public class Session : ISession
+    {
+        readonly IObjectContainer connection;
+        readonly IFile path;
+
+        public Session(IObjectContainer connection, IFile path)
+        {
+            this.connection = connection;
+            this.path = path;
+        }
+
+        public bool represents(IFile file)
+        {
+            return path.Equals(file);
+        }
+
+        public IEnumerable<T> Query<T>()
+        {
+            return connection.Query<T>();
+        }
+
+        public void Store<T>(T item)
+        {
+            connection.Store(item);
+        }
+
+        public void Commit()
+        {
+            connection.Commit();
+        }
+
+        public void Dispose()
+        {
+            //connection.Dispose();
+        }
+    }
+}
\ No newline at end of file
trunk/product/MyMoney/DataAccess/db40/SessionProvider.cs
@@ -1,26 +1,35 @@
-using Db4objects.Db4o;
+using System.Collections.Generic;
+using System.Linq;
 
 namespace MoMoney.DataAccess.db40
 {
     public interface ISessionProvider
     {
-        IObjectContainer get_session();
+        ISession get_session();
     }
 
     public class SessionProvider : ISessionProvider
     {
         readonly IDatabaseConfiguration database_configuration;
         readonly IConnectionFactory connection_factory;
+        readonly IList<ISession> sessions;
 
         public SessionProvider(IDatabaseConfiguration database_configuration, IConnectionFactory connection_factory)
         {
             this.database_configuration = database_configuration;
             this.connection_factory = connection_factory;
+            sessions = new List<ISession>();
         }
 
-        public IObjectContainer get_session()
+        public ISession get_session()
         {
-            return connection_factory.open_connection_to(database_configuration.path_to_the_database());
+            var session = sessions.SingleOrDefault(x => x.represents(database_configuration.path_to_the_database()));
+            if (null == session)
+            {
+                session = connection_factory.open_connection_to(database_configuration.path_to_the_database());
+                sessions.Add(session);
+            }
+            return session;
         }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/DataAccess/db40/SessionProviderSpecs.cs
@@ -28,7 +28,7 @@ namespace MoMoney.DataAccess.db40
             () =>
                 {
                     var the_path_to_the_database_file = an<IFile>();
-                    session = an<IObjectContainer>();
+                    session = an<ISession>();
 
                     database_configuration.is_told_to(x => x.path_to_the_database()).it_will_return(
                         the_path_to_the_database_file);
@@ -38,7 +38,7 @@ namespace MoMoney.DataAccess.db40
 
         because b = () => { result = sut.get_session(); };
 
-        static IObjectContainer result;
-        static IObjectContainer session;
+        static ISession result;
+        static ISession session;
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Presentation/Model/Projects/file.cs
@@ -1,11 +1,9 @@
 using System.IO;
-using MoMoney.Infrastructure.Extensions;
 
 namespace MoMoney.Presentation.Model.Projects
 {
     public interface IFile
     {
-        void copy_to(IFile file_to_overwrite);
         string path { get; }
         bool does_the_file_exist();
     }
@@ -17,19 +15,13 @@ namespace MoMoney.Presentation.Model.Projects
             this.path = path;
         }
 
-        public string path { get; private set; }
+        public virtual string path { get; private set; }
 
-        public bool does_the_file_exist()
+        public virtual bool does_the_file_exist()
         {
             return !string.IsNullOrEmpty(path) && File.Exists(path);
         }
 
-        public void copy_to(IFile file_to_overwrite)
-        {
-            this.log().debug("copying file {0} to {1}", path, file_to_overwrite.path);
-            File.Copy(path, file_to_overwrite.path, true);
-        }
-
         public static implicit operator ApplicationFile(string file_path)
         {
             return new ApplicationFile(file_path);
trunk/product/MyMoney/Presentation/Views/AddCompanyView.cs
@@ -1,4 +1,6 @@
+using System;
 using System.Collections.Generic;
+using System.Linq;
 using System.Text;
 using System.Windows.Forms;
 using MoMoney.Domain.accounting.billing;
@@ -6,6 +8,7 @@ using MoMoney.Presentation.Databindings;
 using MoMoney.Presentation.Model.interaction;
 using MoMoney.Presentation.Presenters;
 using MoMoney.Presentation.Presenters.billing.dto;
+using MoMoney.Presentation.Resources;
 using MoMoney.Presentation.Views.core;
 using MoMoney.Utility.Extensions;
 
@@ -20,6 +23,31 @@ namespace MoMoney.Presentation.Views
             InitializeComponent();
             titled("Add A Company");
             dto = new register_new_company();
+
+            initialize1();
+            initialize2();
+        }
+
+        void initialize1()
+        {
+            listView1.View = View.LargeIcon;
+            listView1.LargeImageList = new ImageList();
+            ApplicationIcons.all().each(x => listView1.LargeImageList.Images.Add(x.name_of_the_icon, x));
+            listView1.Columns.Add("Name");
+        }
+
+        void initialize2()
+        {
+            listView2.View = View.Details;
+            listView2.Columns.Add("Name");
+            ux_company_search_textbox.TextChanged += (sender, args) =>
+            {
+                var foundItem = listView2.FindItemWithText(ux_company_search_textbox.Text, false, 0, true);
+                if (foundItem != null)
+                {
+                    listView2.TopItem = foundItem;
+                }
+            };
         }
 
         public void attach_to(IAddCompanyPresenter presenter)
@@ -32,6 +60,12 @@ namespace MoMoney.Presentation.Views
         public void display(IEnumerable<ICompany> companies)
         {
             ux_companys_listing.DataSource = companies.databind();
+
+            listView1.Items.Clear();
+            listView1.Items.AddRange(companies.Select(x => new ListViewItem(x.name, 0)).ToArray());
+
+            listView2.Items.Clear();
+            listView2.Items.AddRange(companies.Select(x => new ListViewItem(x.name)).ToArray());
         }
 
         public void notify(params notification_message[] messages)
trunk/product/MyMoney/Presentation/Views/AddCompanyView.Designer.cs
@@ -38,6 +38,9 @@ namespace MoMoney.Presentation.Views
             this.kryptonSplitContainer2 = new ComponentFactory.Krypton.Toolkit.KryptonSplitContainer();
             this.kryptonHeader1 = new ComponentFactory.Krypton.Toolkit.KryptonHeader();
             this.ux_companys_listing = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
+            this.listView1 = new System.Windows.Forms.ListView();
+            this.ux_company_search_textbox = new System.Windows.Forms.TextBox();
+            this.listView2 = new System.Windows.Forms.ListView();
             ((System.ComponentModel.ISupportInitialize)(this.kryptonHeaderGroup1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.kryptonHeaderGroup1.Panel)).BeginInit();
             this.kryptonHeaderGroup1.Panel.SuspendLayout();
@@ -61,12 +64,13 @@ namespace MoMoney.Presentation.Views
             // 
             this.kryptonHeaderGroup1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.kryptonHeaderGroup1.Location = new System.Drawing.Point(0, 0);
+            this.kryptonHeaderGroup1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.kryptonHeaderGroup1.Name = "kryptonHeaderGroup1";
             // 
             // kryptonHeaderGroup1.Panel
             // 
             this.kryptonHeaderGroup1.Panel.Controls.Add(this.kryptonSplitContainer1);
-            this.kryptonHeaderGroup1.Size = new System.Drawing.Size(778, 712);
+            this.kryptonHeaderGroup1.Size = new System.Drawing.Size(1037, 876);
             this.kryptonHeaderGroup1.TabIndex = 0;
             this.kryptonHeaderGroup1.Text = "Add Company";
             this.kryptonHeaderGroup1.ValuesPrimary.Description = "";
@@ -81,10 +85,14 @@ namespace MoMoney.Presentation.Views
             this.kryptonSplitContainer1.Cursor = System.Windows.Forms.Cursors.Default;
             this.kryptonSplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.kryptonSplitContainer1.Location = new System.Drawing.Point(0, 0);
+            this.kryptonSplitContainer1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.kryptonSplitContainer1.Name = "kryptonSplitContainer1";
             // 
             // kryptonSplitContainer1.Panel1
             // 
+            this.kryptonSplitContainer1.Panel1.Controls.Add(this.listView2);
+            this.kryptonSplitContainer1.Panel1.Controls.Add(this.ux_company_search_textbox);
+            this.kryptonSplitContainer1.Panel1.Controls.Add(this.listView1);
             this.kryptonSplitContainer1.Panel1.Controls.Add(this.ux_submit_button);
             this.kryptonSplitContainer1.Panel1.Controls.Add(this.kryptonLabel1);
             this.kryptonSplitContainer1.Panel1.Controls.Add(this.ux_company_name);
@@ -94,15 +102,16 @@ namespace MoMoney.Presentation.Views
             // 
             this.kryptonSplitContainer1.Panel2.Controls.Add(this.kryptonSplitContainer2);
             this.kryptonSplitContainer1.SeparatorStyle = ComponentFactory.Krypton.Toolkit.SeparatorStyle.HighProfile;
-            this.kryptonSplitContainer1.Size = new System.Drawing.Size(776, 662);
-            this.kryptonSplitContainer1.SplitterDistance = 573;
+            this.kryptonSplitContainer1.Size = new System.Drawing.Size(1035, 813);
+            this.kryptonSplitContainer1.SplitterDistance = 764;
             this.kryptonSplitContainer1.TabIndex = 25;
             // 
             // ux_submit_button
             // 
-            this.ux_submit_button.Location = new System.Drawing.Point(110, 63);
+            this.ux_submit_button.Location = new System.Drawing.Point(147, 78);
+            this.ux_submit_button.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ux_submit_button.Name = "ux_submit_button";
-            this.ux_submit_button.Size = new System.Drawing.Size(90, 25);
+            this.ux_submit_button.Size = new System.Drawing.Size(120, 31);
             this.ux_submit_button.TabIndex = 2;
             this.ux_submit_button.Text = "&Submit";
             this.ux_submit_button.Values.ExtraText = "";
@@ -114,9 +123,10 @@ namespace MoMoney.Presentation.Views
             // 
             // kryptonLabel1
             // 
-            this.kryptonLabel1.Location = new System.Drawing.Point(11, 22);
+            this.kryptonLabel1.Location = new System.Drawing.Point(15, 27);
+            this.kryptonLabel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.kryptonLabel1.Name = "kryptonLabel1";
-            this.kryptonLabel1.Size = new System.Drawing.Size(93, 19);
+            this.kryptonLabel1.Size = new System.Drawing.Size(125, 24);
             this.kryptonLabel1.TabIndex = 20;
             this.kryptonLabel1.Text = "Company Name:";
             this.kryptonLabel1.Values.ExtraText = "";
@@ -125,18 +135,20 @@ namespace MoMoney.Presentation.Views
             // 
             // ux_company_name
             // 
-            this.ux_company_name.Location = new System.Drawing.Point(110, 22);
+            this.ux_company_name.Location = new System.Drawing.Point(147, 27);
+            this.ux_company_name.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ux_company_name.Name = "ux_company_name";
-            this.ux_company_name.Size = new System.Drawing.Size(410, 22);
+            this.ux_company_name.Size = new System.Drawing.Size(547, 24);
             this.ux_company_name.TabIndex = 1;
             // 
             // ux_cancel_button
             // 
             this.ux_cancel_button.DialogResult = System.Windows.Forms.DialogResult.Cancel;
             this.ux_cancel_button.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.ux_cancel_button.Location = new System.Drawing.Point(206, 63);
+            this.ux_cancel_button.Location = new System.Drawing.Point(275, 78);
+            this.ux_cancel_button.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ux_cancel_button.Name = "ux_cancel_button";
-            this.ux_cancel_button.Size = new System.Drawing.Size(57, 25);
+            this.ux_cancel_button.Size = new System.Drawing.Size(76, 31);
             this.ux_cancel_button.TabIndex = 3;
             this.ux_cancel_button.Text = "Cancel";
             this.ux_cancel_button.UseVisualStyleBackColor = true;
@@ -146,6 +158,7 @@ namespace MoMoney.Presentation.Views
             this.kryptonSplitContainer2.Cursor = System.Windows.Forms.Cursors.Default;
             this.kryptonSplitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
             this.kryptonSplitContainer2.Location = new System.Drawing.Point(0, 0);
+            this.kryptonSplitContainer2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.kryptonSplitContainer2.Name = "kryptonSplitContainer2";
             this.kryptonSplitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
             // 
@@ -157,15 +170,16 @@ namespace MoMoney.Presentation.Views
             // 
             this.kryptonSplitContainer2.Panel2.Controls.Add(this.ux_companys_listing);
             this.kryptonSplitContainer2.SeparatorStyle = ComponentFactory.Krypton.Toolkit.SeparatorStyle.HighProfile;
-            this.kryptonSplitContainer2.Size = new System.Drawing.Size(198, 662);
-            this.kryptonSplitContainer2.SplitterDistance = 38;
+            this.kryptonSplitContainer2.Size = new System.Drawing.Size(266, 813);
+            this.kryptonSplitContainer2.SplitterDistance = 46;
             this.kryptonSplitContainer2.TabIndex = 26;
             // 
             // kryptonHeader1
             // 
-            this.kryptonHeader1.Location = new System.Drawing.Point(3, 3);
+            this.kryptonHeader1.Location = new System.Drawing.Point(4, 4);
+            this.kryptonHeader1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.kryptonHeader1.Name = "kryptonHeader1";
-            this.kryptonHeader1.Size = new System.Drawing.Size(115, 29);
+            this.kryptonHeader1.Size = new System.Drawing.Size(144, 37);
             this.kryptonHeader1.TabIndex = 25;
             this.kryptonHeader1.Text = "Companys";
             this.kryptonHeader1.Values.Description = "";
@@ -179,21 +193,46 @@ namespace MoMoney.Presentation.Views
             this.ux_companys_listing.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.ux_companys_listing.Dock = System.Windows.Forms.DockStyle.Fill;
             this.ux_companys_listing.Location = new System.Drawing.Point(0, 0);
+            this.ux_companys_listing.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ux_companys_listing.Name = "ux_companys_listing";
             this.ux_companys_listing.ReadOnly = true;
-            this.ux_companys_listing.Size = new System.Drawing.Size(198, 619);
+            this.ux_companys_listing.Size = new System.Drawing.Size(266, 762);
             this.ux_companys_listing.StateCommon.BackStyle = ComponentFactory.Krypton.Toolkit.PaletteBackStyle.GridBackgroundList;
             this.ux_companys_listing.TabIndex = 25;
             // 
-            // add_new_company_view
+            // listView1
+            // 
+            this.listView1.Location = new System.Drawing.Point(28, 241);
+            this.listView1.Name = "listView1";
+            this.listView1.Size = new System.Drawing.Size(706, 97);
+            this.listView1.TabIndex = 21;
+            this.listView1.UseCompatibleStateImageBehavior = false;
+            // 
+            // ux_company_search_textbox
+            // 
+            this.ux_company_search_textbox.Location = new System.Drawing.Point(518, 389);
+            this.ux_company_search_textbox.Name = "ux_company_search_textbox";
+            this.ux_company_search_textbox.Size = new System.Drawing.Size(216, 22);
+            this.ux_company_search_textbox.TabIndex = 22;
+            // 
+            // listView2
+            // 
+            this.listView2.Location = new System.Drawing.Point(28, 417);
+            this.listView2.Name = "listView2";
+            this.listView2.Size = new System.Drawing.Size(706, 249);
+            this.listView2.TabIndex = 23;
+            this.listView2.UseCompatibleStateImageBehavior = false;
+            // 
+            // AddCompanyView
             // 
             this.AcceptButton = this.ux_submit_button;
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.CancelButton = this.ux_cancel_button;
-            this.ClientSize = new System.Drawing.Size(778, 712);
+            this.ClientSize = new System.Drawing.Size(1037, 876);
             this.Controls.Add(this.kryptonHeaderGroup1);
-            this.Name = "add_new_company_view";
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Name = "AddCompanyView";
             this.TabText = "AddExpenseView";
             this.Text = "Add A New Bill";
             ((System.ComponentModel.ISupportInitialize)(this.kryptonHeaderGroup1.Panel)).EndInit();
@@ -230,6 +269,9 @@ namespace MoMoney.Presentation.Views
         private ComponentFactory.Krypton.Toolkit.KryptonButton ux_submit_button;
         private ComponentFactory.Krypton.Toolkit.KryptonSplitContainer kryptonSplitContainer2;
         private ComponentFactory.Krypton.Toolkit.KryptonDataGridView ux_companys_listing;
+        private System.Windows.Forms.ListView listView1;
+        private System.Windows.Forms.TextBox ux_company_search_textbox;
+        private System.Windows.Forms.ListView listView2;
 
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Presentation/Views/AddCompanyView.resx
@@ -120,40 +120,40 @@
   <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="kryptonHeader1.Values.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
-        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
+        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
 </value>
   </data>
   <data name="kryptonHeaderGroup1.ValuesPrimary.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
-        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
+        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
 </value>
   </data>
 </root>
\ No newline at end of file
trunk/product/MyMoney/MyMoney.csproj
@@ -156,6 +156,7 @@
     <Compile Include="DataAccess\db40\DatabaseConfiguration.cs" />
     <Compile Include="DataAccess\db40\ObjectDatabaseGateway.cs" />
     <Compile Include="DataAccess\db40\ObjectDatabaseGatewaySpecs.cs" />
+    <Compile Include="DataAccess\db40\Session.cs" />
     <Compile Include="DataAccess\db40\spiking\db40_spike_specs.cs" />
     <Compile Include="DataAccess\repositories\BillRepository.cs" />
     <Compile Include="DataAccess\repositories\bill_repository_specs.cs" />