Changeset 51
- Timestamp:
- 03/30/05 23:47:58 (4 years ago)
- Files:
-
- trunk/MacFaceFloat/MacFaceApp.cs (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/MacFaceFloat/MacFaceApp.cs
r50 r51 268 268 patternWindow.UpdatePattern(suite, pattern, markers); 269 269 270 statusWindow. Refresh();270 statusWindow.Invalidate(); 271 271 } 272 272 … … 322 322 g.DrawLine(pen, 5, y, 305, y); 323 323 } 324 g.DrawLine(Pens.Gray, 5, 55, 305, 55); 325 324 326 g.DrawRectangle(Pens.Black, 4, 4, 301, 101); 325 327 326 328 g.FillRectangle(new SolidBrush(Color.White), 5, 110, 300, 100); 327 for (int y = 110; y < 210; y += 10)329 for (int y = 210; y > 110; y -= 7) 328 330 { 329 331 g.DrawLine(pen, 5, y, 305, y); 330 332 } 333 g.DrawLine(Pens.Gray, 5, 210-5*7, 305, 210-5*7); 331 334 g.DrawRectangle(Pens.Black, 4, 109, 301, 101); 332 335 … … 358 361 } 359 362 360 g.FillPolygon(new SolidBrush(Color.FromArgb( 64, 0, 0, 255)), userGraph);363 g.FillPolygon(new SolidBrush(Color.FromArgb(50, 0, 0, 255)), userGraph); 361 364 g.DrawPolygon(new Pen(Color.FromArgb(0, 0, 255), 1F), userGraph); 362 g.FillPolygon(new SolidBrush(Color.FromArgb(64, 255, 0, 0)), sysGraph); 363 } 364 365 double rate = 70.0 / (MemoryUsageCounter.TotalVisibleMemorySize * 1024); 365 g.FillPolygon(new SolidBrush(Color.FromArgb(50, 255, 0, 0)), sysGraph); 366 } 367 368 int totalMemory = (int)MemoryUsageCounter.TotalVisibleMemorySize * 1024; 369 double rate = 70.0 / totalMemory; 366 370 367 371 g.SmoothingMode = SmoothingMode.None; 368 Brush brush = new SolidBrush(Color.FromArgb(180, 255, 145, 0)); 372 Brush commitedBrush = new SolidBrush(Color.FromArgb(180, 255, 145, 0)); 373 Brush uncommitedBrush = new SolidBrush(Color.FromArgb(180, 180, 200, 255)); 374 Brush availableBrush = new SolidBrush(Color.FromArgb(180, 100, 100, 255)); 375 369 376 int posu = memHistoryHead - 1; 370 377 for (int i = 0; i < memHistoryCount; i++) … … 377 384 x = 305 - i * 5 - 5; 378 385 w = 5; 386 379 387 h = (int)(usage.Committed * rate); 380 388 y = 210 - h; 381 g.FillRectangle(brush, x, y, w, h); 389 g.FillRectangle(commitedBrush, x, y, w, h); 390 391 if (h < 100) 392 { 393 h = 100 - h; 394 y = 110; 395 g.FillRectangle(uncommitedBrush, x, y, w, h); 396 } 397 398 h = (int)(usage.Available * rate); 399 y = 210-70; 400 g.FillRectangle(availableBrush, x, y, w, h); 382 401 383 402 x = 305 - i * 5 - 5; … … 395 414 posu--; 396 415 } 397 g.DrawLine(Pens. Red, 5, 210-70, 305, 210-70);416 g.DrawLine(Pens.Black, 5, 210-70, 305, 210-70); 398 417 } 399 418 }
