Index: /trunk/MacFaceFloat/MacFaceApp.cs
===================================================================
--- /trunk/MacFaceFloat/MacFaceApp.cs	(revision 61)
+++ /trunk/MacFaceFloat/MacFaceApp.cs	(revision 62)
@@ -10,5 +10,4 @@
 using System.Windows.Forms;
 using System.Drawing;
-using System.Drawing.Drawing2D;
 using System.Data;
 using System.IO;
@@ -25,16 +24,13 @@
 		private Configuration config;
 
+		private CPUStatistics cpuStats;
+		private MemoryStatistics memStats;
+
+		private System.Windows.Forms.Timer updateTimer;
+
 		private NotifyIcon notifyIcon;
 		private PatternWindow patternWindow;
+		private StatusWindow statusWindow;
 		
-		private System.Windows.Forms.Timer updateTimer;
-
-		private StatusWindow statusWindow;
-		private Bitmap cpuGraph;
-		private Bitmap memoryGraph;
-
-		private CPUStatistics cpuStats;
-		private MemoryStatistics memStats;
-
 		[STAThread]
 		public static void Main(string[] args)
@@ -58,7 +54,4 @@
 
 			patternWindow = null;
-
-			cpuGraph = null;
-			memoryGraph = null;
 			statusWindow = null;
 
@@ -219,8 +212,5 @@
 			if (statusWindow != null) 
 			{
-				drawCPUGraph();
-				drawMemoryGraph();
-				statusWindow.cpuGraphPicBox.Invalidate();
-				statusWindow.memoryGraphPicBox.Invalidate();
+				statusWindow.UpdateGraph();
 			}
 		}
@@ -245,21 +235,12 @@
 		public void openStatusWindow()
 		{
-			statusWindow = new StatusWindow();
+			statusWindow = new StatusWindow(cpuStats, memStats);
 			statusWindow.Closed += new EventHandler(statusWindow_Closed);
 			statusWindow.Move +=new EventHandler(statusWindow_Move);
 
-			FormBorderStyle orgStyle = statusWindow.FormBorderStyle;
-			statusWindow.FormBorderStyle = FormBorderStyle.Sizable;
 			statusWindow.StartPosition = FormStartPosition.Manual;
 			statusWindow.Location = config.StatusWindowLocation;
-			statusWindow.FormBorderStyle = orgStyle;
-
-			cpuGraph = new Bitmap(5*60, 100);
-			memoryGraph = new Bitmap(5*60, 100);
-			statusWindow.cpuGraphPicBox.Image = cpuGraph;
-			statusWindow.memoryGraphPicBox.Image = memoryGraph;
-			drawCPUGraph();
-			drawMemoryGraph();
-
+
+			statusWindow.UpdateGraph();
 			statusWindow.Show();
 		}
@@ -315,137 +296,4 @@
 		}
 
-		private void statusWindow_Paint(object sender, PaintEventArgs e)
-		{
-			Graphics g = e.Graphics;
-
-			g.DrawImage(cpuGraph, 5,5);
-			g.DrawRectangle(Pens.Black, 4, 4, 301, 101);
-
-			g.DrawImage(memoryGraph, 5,110);
-			g.DrawRectangle(Pens.Black, 4, 109, 301, 101);
-		}
-
-		private void drawCPUGraph()
-		{
-			Graphics g = Graphics.FromImage(cpuGraph);
-
-			g.SmoothingMode = SmoothingMode.AntiAlias;
-
-			g.FillRectangle(new SolidBrush(Color.White), 0, 0, 300, 100);
-			Pen pen = new Pen(Color.FromArgb(220, 220, 220), 1F);
-			for (int y = 0; y < 100; y += 10) 
-			{
-				g.DrawLine(pen, 0, y, 300, y);
-			}
-			g.DrawLine(Pens.Gray, 0, 50, 300, 50);
-
-			int count = cpuStats.Count;
-
-			if (count >= 2) 
-			{
-				Point[] userGraph = new Point[count+2];
-				Point[] sysGraph = new Point[count+2];
-
-				userGraph[count+0].X = 300 - (count-1) * 5;
-				userGraph[count+0].Y = 100 - 0;
-				userGraph[count+1].X = 300 - 0 * 5;
-				userGraph[count+1].Y = 100 - 0;
-
-				sysGraph[count+0].X = 300 - (count-1) * 5;
-				sysGraph[count+0].Y = 100 - 0;
-				sysGraph[count+1].X = 300 - 0 * 5;
-				sysGraph[count+1].Y = 100 - 0;
-
-				for (int i = 0; i < count; i++) 
-				{
-					CPUUsage usage = cpuStats[i];
-					userGraph[i].X = sysGraph[i].X = 300 - i * 5;
-					userGraph[i].Y = 100 - usage.Active;
-					sysGraph[i].Y = 100 - usage.System;
-				}
-
-				g.FillPolygon(new SolidBrush(Color.FromArgb(50, 0, 0, 255)), userGraph);
-				g.DrawPolygon(new Pen(Color.FromArgb(0, 0, 255), 1F), userGraph);
-				g.FillPolygon(new SolidBrush(Color.FromArgb(50, 255, 0, 0)), sysGraph);
-			}
-
-			g.Dispose();
-		}
-
-		private void drawMemoryGraph()
-		{
-			Graphics g = Graphics.FromImage(memoryGraph);
-
-			int totalMemory = (int)memStats.TotalVisibleMemorySize * 1024;
-			double rate = 100.0 / memStats.CommitLimit;
-			int border = (int)(totalMemory * rate);
-
-			g.FillRectangle(new SolidBrush(Color.White), 0, 0, 300, 100);
-			Pen pen = new Pen(Color.FromArgb(220, 220, 220), 1F);
-			for (int y = 100; y > 0; y -= (int)(128*1024*1024 * rate)) 
-			{
-				g.DrawLine(pen, 0, y, 300, y);
-			}
-
-			g.SmoothingMode = SmoothingMode.None;
-			Brush availableBrush = new SolidBrush(Color.FromArgb(180, 100, 100, 255));
-			Brush kernelBrush = new SolidBrush(Color.FromArgb(180, 255, 0, 0));
-			Brush commitedBrush = new SolidBrush(Color.FromArgb(180, 255, 145, 0));
-			Brush systemCacheBrush = new SolidBrush(Color.FromArgb(50, 255, 0, 0));
-//			Brush spaceBrush = new SolidBrush(Color.FromArgb(180, 240, 230, 255));
-			Brush spaceBrush = new SolidBrush(Color.FromArgb(100, 100, 100, 255));
-
-			int count = memStats.Count;
-
-			for (int i = 0; i < count; i++) 
-			{
-				MemoryUsage usage = memStats[i];
-
-				int x = 300 - i * 5 - 5;
-				int y = 100;
-				int w = 5;
-				int h = 0;
-
-				int kernelTotal = usage.KernelNonPaged + usage.KernelPaged + usage.DriverTotal + usage.SystemCodeTotal;
-				h = (int)((kernelTotal) * rate);
-				y -= h;
-				g.FillRectangle(kernelBrush, x, y, w, h);
-
-				h = (int)(usage.SystemCache * rate);
-				y -= h;
-				g.FillRectangle(systemCacheBrush, x, y, w, h);
-
-				h = (int)(usage.Committed * rate);
-				y -= h;
-				g.FillRectangle(commitedBrush, x, y, w, h);
-
-				h = (int)(usage.Available * rate);
-				y -= h;
-				g.FillRectangle(availableBrush, x, y, w, h);
-
-				h = y;
-				y = 0;
-				g.FillRectangle(spaceBrush, x, y, w, h);
-
-
-				x = 300 - i * 5 - 5;
-				w = 2;
-				h = (int)(usage.Pagein);
-				y = 100 - h;
-				g.FillRectangle(Brushes.LightGray, x, y, w, h);
-
-				x = 303 - i * 5 - 5;
-				w = 2;
-				h = (int)(usage.Pageout);
-				y = 100 - h;
-				g.FillRectangle(Brushes.Black, x, y, w, h);
-			}
-			Pen borderPen = new Pen(Color.Blue);
-			borderPen.DashStyle = DashStyle.Dash;
-			g.DrawLine(borderPen, 0, 100-border, 300, 100-border);
-
-			g.Dispose();
-		}
-
 		private void patternWindow_Closed(object sender, EventArgs e)
 		{
@@ -456,8 +304,4 @@
 		private void statusWindow_Closed(object sender, EventArgs e)
 		{
-			cpuGraph.Dispose();
-			cpuGraph = null;
-			memoryGraph.Dispose();
-			memoryGraph = null;
 			statusWindow.Dispose();
 			statusWindow = null;
Index: /trunk/MacFaceFloat/StatusWindow.cs
===================================================================
--- /trunk/MacFaceFloat/StatusWindow.cs	(revision 61)
+++ /trunk/MacFaceFloat/StatusWindow.cs	(revision 62)
@@ -1,4 +1,5 @@
 using System;
 using System.Drawing;
+using System.Drawing.Drawing2D;
 using System.Collections;
 using System.ComponentModel;
@@ -19,5 +20,11 @@
 		private System.ComponentModel.Container components = null;
 
-		public StatusWindow()
+		private CPUStatistics cpuStats;
+		private MemoryStatistics memStats;
+
+		private Bitmap cpuGraph;
+		private Bitmap memoryGraph;
+
+		public StatusWindow(CPUStatistics cpuStats, MemoryStatistics memStats)
 		{
 			//
@@ -26,7 +33,11 @@
 			InitializeComponent();
 
-			//
-			// TODO: InitializeComponent ÄÑoµÌãÉARXgN^ R[hðÇÁµÄ­¾³¢B
-			//
+			this.cpuStats = cpuStats;
+			this.memStats = memStats;
+
+			cpuGraph = new Bitmap(5*60, 100);
+			memoryGraph = new Bitmap(5*60, 100);
+			cpuGraphPicBox.Image = cpuGraph;
+			memoryGraphPicBox.Image = memoryGraph;
 		}
 
@@ -40,8 +51,140 @@
 				if(components != null)
 				{
+					cpuGraph.Dispose();
+					memoryGraph.Dispose();
 					components.Dispose();
 				}
 			}
 			base.Dispose( disposing );
+		}
+
+		public void UpdateGraph()
+		{
+			drawCPUGraph();
+			drawMemoryGraph();
+			cpuGraphPicBox.Invalidate();
+			memoryGraphPicBox.Invalidate();
+		}
+
+		private void drawCPUGraph()
+		{
+			Graphics g = Graphics.FromImage(cpuGraph);
+
+			g.SmoothingMode = SmoothingMode.AntiAlias;
+
+			g.FillRectangle(new SolidBrush(Color.White), 0, 0, 300, 100);
+			Pen pen = new Pen(Color.FromArgb(220, 220, 220), 1F);
+			for (int y = 0; y < 100; y += 10) 
+			{
+				g.DrawLine(pen, 0, y, 300, y);
+			}
+			g.DrawLine(Pens.Gray, 0, 50, 300, 50);
+
+			int count = cpuStats.Count;
+
+			if (count >= 2) 
+			{
+				Point[] userGraph = new Point[count+2];
+				Point[] sysGraph = new Point[count+2];
+
+				userGraph[count+0].X = 300 - (count-1) * 5;
+				userGraph[count+0].Y = 100 - 0;
+				userGraph[count+1].X = 300 - 0 * 5;
+				userGraph[count+1].Y = 100 - 0;
+
+				sysGraph[count+0].X = 300 - (count-1) * 5;
+				sysGraph[count+0].Y = 100 - 0;
+				sysGraph[count+1].X = 300 - 0 * 5;
+				sysGraph[count+1].Y = 100 - 0;
+
+				for (int i = 0; i < count; i++) 
+				{
+					CPUUsage usage = cpuStats[i];
+					userGraph[i].X = sysGraph[i].X = 300 - i * 5;
+					userGraph[i].Y = 100 - usage.Active;
+					sysGraph[i].Y = 100 - usage.System;
+				}
+
+				g.FillPolygon(new SolidBrush(Color.FromArgb(50, 0, 0, 255)), userGraph);
+				g.DrawPolygon(new Pen(Color.FromArgb(0, 0, 255), 1F), userGraph);
+				g.FillPolygon(new SolidBrush(Color.FromArgb(50, 255, 0, 0)), sysGraph);
+			}
+
+			g.Dispose();
+		}
+
+		private void drawMemoryGraph()
+		{
+			Graphics g = Graphics.FromImage(memoryGraph);
+
+			int totalMemory = (int)memStats.TotalVisibleMemorySize * 1024;
+			double rate = 100.0 / memStats.CommitLimit;
+			int border = (int)(totalMemory * rate);
+
+			g.FillRectangle(new SolidBrush(Color.White), 0, 0, 300, 100);
+			Pen pen = new Pen(Color.FromArgb(220, 220, 220), 1F);
+			for (int y = 100; y > 0; y -= (int)(128*1024*1024 * rate)) 
+			{
+				g.DrawLine(pen, 0, y, 300, y);
+			}
+
+			g.SmoothingMode = SmoothingMode.None;
+			Brush availableBrush = new SolidBrush(Color.FromArgb(180, 100, 100, 255));
+			Brush kernelBrush = new SolidBrush(Color.FromArgb(180, 255, 0, 0));
+			Brush commitedBrush = new SolidBrush(Color.FromArgb(180, 255, 145, 0));
+			Brush systemCacheBrush = new SolidBrush(Color.FromArgb(50, 255, 0, 0));
+			//			Brush spaceBrush = new SolidBrush(Color.FromArgb(180, 240, 230, 255));
+			Brush spaceBrush = new SolidBrush(Color.FromArgb(100, 100, 100, 255));
+
+			int count = memStats.Count;
+
+			for (int i = 0; i < count; i++) 
+			{
+				MemoryUsage usage = memStats[i];
+
+				int x = 300 - i * 5 - 5;
+				int y = 100;
+				int w = 5;
+				int h = 0;
+
+				int kernelTotal = usage.KernelNonPaged + usage.KernelPaged + usage.DriverTotal + usage.SystemCodeTotal;
+				h = (int)((kernelTotal) * rate);
+				y -= h;
+				g.FillRectangle(kernelBrush, x, y, w, h);
+
+				h = (int)(usage.SystemCache * rate);
+				y -= h;
+				g.FillRectangle(systemCacheBrush, x, y, w, h);
+
+				h = (int)(usage.Committed * rate);
+				y -= h;
+				g.FillRectangle(commitedBrush, x, y, w, h);
+
+				h = (int)(usage.Available * rate);
+				y -= h;
+				g.FillRectangle(availableBrush, x, y, w, h);
+
+				h = y;
+				y = 0;
+				g.FillRectangle(spaceBrush, x, y, w, h);
+
+
+				x = 300 - i * 5 - 5;
+				w = 2;
+				h = (int)(usage.Pagein);
+				y = 100 - h;
+				g.FillRectangle(Brushes.LightGray, x, y, w, h);
+
+				x = 303 - i * 5 - 5;
+				w = 2;
+				h = (int)(usage.Pageout);
+				y = 100 - h;
+				g.FillRectangle(Brushes.Black, x, y, w, h);
+			}
+			Pen borderPen = new Pen(Color.Blue);
+			borderPen.DashStyle = DashStyle.Dash;
+			g.DrawLine(borderPen, 0, 100-border, 300, 100-border);
+
+			g.Dispose();
 		}
 
@@ -82,5 +225,5 @@
 			this.Controls.Add(this.cpuGraphPicBox);
 			this.Controls.Add(this.memoryGraphPicBox);
-			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
 			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
 			this.MaximizeBox = false;
Index: /trunk/MacFaceFloat/StatusWindow.resx
===================================================================
--- /trunk/MacFaceFloat/StatusWindow.resx	(revision 61)
+++ /trunk/MacFaceFloat/StatusWindow.resx	(revision 62)
@@ -122,4 +122,7 @@
     <value>(Default)</value>
   </data>
+  <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
   <data name="$this.Name">
     <value>StatusWindow</value>
@@ -142,7 +145,4 @@
   <data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>Private</value>
-  </data>
-  <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
   </data>
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
