Changeset 54
- Timestamp:
- 04/07/05 23:36:37 (4 years ago)
- Files:
-
- trunk/MacFaceFloat/Configuration.cs (modified) (1 diff)
- trunk/MacFaceFloat/MacFaceApp.cs (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/MacFaceFloat/Configuration.cs
r30 r54 48 48 [Category("���H�[��"), Description("�}�E�X���b�Z�[�W�߂����邩�ǂ�����肵�܂��B")] 49 49 public bool TransparentMouseMessage; 50 51 [AutoConfigure("form.status.point")] 52 [Category("�X�e�[�^�X�E�C���h�E"), Description("�\���ʒu")] 53 public Point StatusWindowLocation; 50 54 51 55 public static Configuration GetInstance() trunk/MacFaceFloat/MacFaceApp.cs
r53 r54 32 32 private MemoryUsageCounter memoryCounter; 33 33 34 private FormstatusWindow;34 private StatusWindow statusWindow; 35 35 private Bitmap cpuGraph; 36 36 private Bitmap memoryGraph; … … 106 106 // �p�^�[���E�C���h�E 107 107 this.patternWindow = new PatternWindow(); 108 this.patternWindow.Closing += new System.ComponentModel.CancelEventHandler(patternWindow_Closing); 108 109 109 110 // �X�e�[�^�X�E�C���h�E 110 111 cpuGraph = new Bitmap(5*60, 100); 111 112 memoryGraph = new Bitmap(5*60, 100); 112 113 statusWindow = new Form(); 114 statusWindow.ClientSize = new System.Drawing.Size(310, 215); 115 statusWindow.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 116 statusWindow.ControlBox = false; 117 statusWindow.MaximizeBox = false; 118 statusWindow.MinimizeBox = false; 119 statusWindow.Icon = new Icon(asm.GetManifestResourceStream("MacFace.FloatApp.App.ico")); 120 statusWindow.Text = "�X�e�[�^�X"; 121 statusWindow.Paint +=new PaintEventHandler(statusWindow_Paint); 113 statusWindow = new StatusWindow(); 114 patternWindow.Closing += new System.ComponentModel.CancelEventHandler(patternWindow_Closing); 115 statusWindow.cpuGraphPicBox.Image = cpuGraph; 116 statusWindow.memoryGraphPicBox.Image = memoryGraph; 122 117 } 123 118 … … 142 137 drawCPUGraph(); 143 138 drawMemoryGraph(); 139 statusWindow.Location = config.StatusWindowLocation; 144 140 statusWindow.Show(); 145 141 … … 163 159 // �ۑ� 164 160 config.Location = patternWindow.Location; 161 config.StatusWindowLocation = statusWindow.Location; 165 162 config.Save(); 166 163 } … … 279 276 drawCPUGraph(); 280 277 drawMemoryGraph(); 281 statusWindow.Invalidate(); 278 statusWindow.cpuGraphPicBox.Invalidate(); 279 statusWindow.memoryGraphPicBox.Invalidate(); 282 280 } 283 281 … … 399 397 Brush commitedBrush = new SolidBrush(Color.FromArgb(180, 255, 145, 0)); 400 398 Brush uncommitedBrush = new SolidBrush(Color.FromArgb(180, 180, 200, 255)); 401 Brush availableBrush = new SolidBrush(Color.FromArgb(1 00, 100, 100, 255));399 Brush availableBrush = new SolidBrush(Color.FromArgb(180, 100, 100, 255)); 402 400 Brush spaceBrush = new SolidBrush(Color.FromArgb(180, 240, 230, 255)); 403 401 … … 413 411 w = 5; 414 412 415 h = 100 - border; 413 h = (int)(usage.Available * rate); 414 y = 100 - h; 415 g.FillRectangle(availableBrush, x, y, w, h); 416 417 h = (int)(usage.Committed * rate); 418 y -= h; 419 g.FillRectangle(commitedBrush, x, y, w, h); 420 421 if (y > 100 - border) 422 { 423 h = y - (100 - border); 424 y = 100 - border; 425 g.FillRectangle(uncommitedBrush, x, y, w, h); 426 } 427 428 h = y; 416 429 y = 0; 417 430 g.FillRectangle(spaceBrush, x, y, w, h); 418 419 h = (int)(usage.Committed * rate);420 y = 100 - h;421 g.FillRectangle(commitedBrush, x, y, w, h);422 423 if (h < border)424 {425 h = border - h;426 y = 100 - border;427 g.FillRectangle(uncommitedBrush, x, y, w, h);428 }429 430 h = (int)(usage.Available * rate);431 y = 100 - border;432 g.FillRectangle(availableBrush, x, y, w, h);433 431 434 432 x = 300 - i * 5 - 5; … … 452 450 g.Dispose(); 453 451 } 452 453 private void patternWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) 454 { 455 e.Cancel = true; 456 } 454 457 } 455 458 }
