Commit 16a0c0e

mokhan <mokhan@ce5e1baf-6525-42e4-a1b2-857ea38da20a>
2009-04-04 20:44:24
git-svn-id: https://svn.xp-dev.com/svn/mokhan-mo.money@138 ce5e1baf-6525-42e4-a1b2-857ea38da20a
1 parent 79eaf24
trunk/build/config/log4net.config.xml.template
@@ -7,12 +7,12 @@
 		<maximumFileSize value='100000KB' />
 		<staticLogFileName value='true' />
 		<layout type='log4net.Layout.PatternLayout'>
-			<conversionPattern value='%d [%t] %-5p %c - %m%n' />
+			<conversionPattern value="%d %-5p %c - [thread %t] %m%n" />
 		</layout>
 	</appender>
 	<appender name="Console" type="log4net.Appender.ConsoleAppender">
 		<layout type="log4net.Layout.PatternLayout">
-			<conversionPattern value="%d [%t] %-5p %c - %m%n" />
+			<conversionPattern value="%d %-5p %c - [thread %t] %m%n" />
 		</layout>
 	</appender>
 	<root>
trunk/product/MyMoney/Infrastructure/Logging/Log4NetLogging/Log4NetLogger.cs
@@ -1,7 +1,5 @@
 using System;
-using System.Threading;
 using log4net;
-using MoMoney.Utility.Extensions;
 
 namespace MoMoney.Infrastructure.Logging.Log4NetLogging
 {
@@ -14,14 +12,14 @@ namespace MoMoney.Infrastructure.Logging.Log4NetLogging
             this.log = log;
         }
 
-        public void informational(string formattedString, params object[] arguments)
+        public void informational(string formatted_string, params object[] arguments)
         {
-            log.InfoFormat(formattedString, arguments);
+            log.InfoFormat(formatted_string, arguments);
         }
 
         public void debug(string formatted_string, params object[] arguments)
         {
-            log.DebugFormat("Thread: {0}, {1}", Thread.CurrentThread.ManagedThreadId, formatted_string.formatted_using(arguments));
+            log.DebugFormat(formatted_string, arguments);
         }
 
         public void error(Exception e)
trunk/product/MyMoney/Infrastructure/Logging/ILogger.cs
@@ -4,8 +4,8 @@ namespace MoMoney.Infrastructure.Logging
 {
     public interface ILogger
     {
-        void informational(string formattedString, params object[] arguments);
-        void debug(string formattedString, params object[] arguments);
+        void informational(string formatted_string, params object[] arguments);
+        void debug(string formatted_string, params object[] arguments);
         void error(Exception e);
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Presentation/Views/core/ApplicationDockedWindow.cs
@@ -97,14 +97,10 @@ namespace MoMoney.Presentation.Views.core
 
         protected void on_ui_thread(Action action)
         {
-            if (InvokeRequired)
-            {
-                BeginInvoke(action);
-            }
-            else
-            {
-                action();
-            }
+            //if (InvokeRequired) BeginInvoke(action);
+            //else action();
+            
+            action();
         }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Presentation/Views/core/ApplicationWindow.cs
@@ -51,8 +51,9 @@ namespace MoMoney.Presentation.Views.core
 
         protected void on_ui_thread(Action action)
         {
-            if (InvokeRequired) BeginInvoke(action);
-            else action();
+            //if (InvokeRequired) BeginInvoke(action);
+            //else action();
+             action();
         }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Presentation/Views/Shell/ApplicationShell.cs
@@ -28,8 +28,9 @@ namespace MoMoney.Presentation.Views.Shell
                               {ux_tool_bar_strip.GetType().FullName, ux_tool_bar_strip},
                               {ux_status_bar.GetType().FullName, ux_status_bar},
                               {notification_icon.GetType().FullName, notification_icon},
+                              {status_bar_label.GetType().FullName, status_bar_label},
+                              {status_bar_progress_bar.GetType().FullName, status_bar_progress_bar}
                           };
-            base.BackColor = Color.FromArgb(229, 238, 226);
         }
 
         protected override void OnLoad(EventArgs e)
trunk/product/MyMoney/Presentation/Views/Shell/ApplicationShell.Designer.cs
@@ -30,9 +30,12 @@ namespace MoMoney.Presentation.Views.Shell {
             this.components = new System.ComponentModel.Container();
             this.ux_main_menu_strip = new System.Windows.Forms.MenuStrip();
             this.ux_status_bar = new System.Windows.Forms.StatusStrip();
+            this.status_bar_label = new System.Windows.Forms.ToolStripStatusLabel();
+            this.status_bar_progress_bar = new System.Windows.Forms.ToolStripProgressBar();
             this.ux_dock_panel = new WeifenLuo.WinFormsUI.Docking.DockPanel();
             this.ux_tool_bar_strip = new System.Windows.Forms.ToolStrip();
             this.notification_icon = new System.Windows.Forms.NotifyIcon(this.components);
+            this.ux_status_bar.SuspendLayout();
             this.SuspendLayout();
             // 
             // ux_main_menu_strip
@@ -47,18 +50,32 @@ namespace MoMoney.Presentation.Views.Shell {
             // 
             // ux_status_bar
             // 
-            this.ux_status_bar.Location = new System.Drawing.Point(0, 602);
+            this.ux_status_bar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.status_bar_label,
+            this.status_bar_progress_bar});
+            this.ux_status_bar.Location = new System.Drawing.Point(0, 599);
             this.ux_status_bar.Name = "ux_status_bar";
             this.ux_status_bar.Padding = new System.Windows.Forms.Padding(1, 0, 19, 0);
             this.ux_status_bar.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
-            this.ux_status_bar.Size = new System.Drawing.Size(1008, 22);
+            this.ux_status_bar.Size = new System.Drawing.Size(1008, 25);
             this.ux_status_bar.TabIndex = 2;
             this.ux_status_bar.Text = "statusStrip1";
             // 
+            // status_bar_label
+            // 
+            this.status_bar_label.Name = "status_bar_label";
+            this.status_bar_label.Size = new System.Drawing.Size(18, 20);
+            this.status_bar_label.Text = "...";
+            // 
+            // status_bar_progress_bar
+            // 
+            this.status_bar_progress_bar.Name = "status_bar_progress_bar";
+            this.status_bar_progress_bar.Size = new System.Drawing.Size(100, 19);
+            // 
             // ux_dock_panel
             // 
             this.ux_dock_panel.ActiveAutoHideContent = null;
-            this.ux_dock_panel.BackColor = System.Drawing.Color.Transparent;
+            this.ux_dock_panel.BackColor = System.Drawing.Color.White;
             this.ux_dock_panel.CausesValidation = false;
             this.ux_dock_panel.Dock = System.Windows.Forms.DockStyle.Fill;
             this.ux_dock_panel.DockBackColor = System.Drawing.Color.Transparent;
@@ -71,7 +88,7 @@ namespace MoMoney.Presentation.Views.Shell {
             this.ux_dock_panel.Margin = new System.Windows.Forms.Padding(4);
             this.ux_dock_panel.Name = "ux_dock_panel";
             this.ux_dock_panel.RightToLeftLayout = true;
-            this.ux_dock_panel.Size = new System.Drawing.Size(1008, 578);
+            this.ux_dock_panel.Size = new System.Drawing.Size(1008, 575);
             this.ux_dock_panel.TabIndex = 3;
             // 
             // ux_tool_bar_strip
@@ -107,6 +124,8 @@ namespace MoMoney.Presentation.Views.Shell {
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Text = "MoMoney";
             this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
+            this.ux_status_bar.ResumeLayout(false);
+            this.ux_status_bar.PerformLayout();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -119,5 +138,7 @@ namespace MoMoney.Presentation.Views.Shell {
         private WeifenLuo.WinFormsUI.Docking.DockPanel ux_dock_panel;
         private System.Windows.Forms.ToolStrip ux_tool_bar_strip;
         private System.Windows.Forms.NotifyIcon notification_icon;
+        private System.Windows.Forms.ToolStripStatusLabel status_bar_label;
+        private System.Windows.Forms.ToolStripProgressBar status_bar_progress_bar;
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Presentation/Views/Shell/button_extensions.cs
@@ -6,7 +6,7 @@ using MoMoney.Utility.Core;
 
 namespace MoMoney.Presentation.Views.Shell
 {
-    public static class button_extensions
+    public static class ButtonExtensions
     {
         public static Button will_be_shown_as(this Button button, Bitmap image)
         {
trunk/product/MyMoney/Presentation/Views/Shell/StatusBarView.cs
@@ -14,12 +14,18 @@ namespace MoMoney.Presentation.Views.Shell
 
         public void display(HybridIcon icon_to_display, string text_to_display)
         {
-            shell.region<StatusStrip>(x =>
-                                          {
-                                              x.Items.Clear();
-                                              x.Items.Add(icon_to_display);
-                                              x.Items.Add(text_to_display);
-                                          });
+            //shell.region<StatusStrip>(x =>
+            //                              {
+            //                                  //x.Items.Clear();
+            //                                  ToolStripItem item = x.Items.Add(icon_to_display);
+            //                                  this.log().debug("icon_is:{0}", item);
+            //                                  x.Items.Add(text_to_display);
+            //                              });
+            shell.region<ToolStripStatusLabel>(x =>
+                                                   {
+                                                       x.Text = text_to_display;
+                                                       x.Image = icon_to_display;
+                                                   });
         }
     }
 }
\ No newline at end of file