Changeset 51
- Timestamp:
- Mar 30, 2005, 11:47:58 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MacFaceFloat/MacFaceApp.cs
r50 r51 270 270 patternWindow.UpdatePattern(suite, pattern, markers); 271 271 272 statusWindow. Refresh();272 statusWindow.Invalidate(); 273 273 } 274 274 … … 325 325 g.DrawLine(pen, 5, y, 305, y); 326 326 } 327 g.DrawLine(Pens.Gray, 5, 55, 305, 55); 328 327 329 g.DrawRectangle(Pens.Black, 4, 4, 301, 101); 328 330 329 331 g.FillRectangle(new SolidBrush(Color.White), 5, 110, 300, 100); 330 for (int y = 110; y < 210; y += 10)332 for (int y = 210; y > 110; y -= 7) 331 333 { 332 334 g.DrawLine(pen, 5, y, 305, y); 333 335 } 336 g.DrawLine(Pens.Gray, 5, 210-5*7, 305, 210-5*7); 334 337 g.DrawRectangle(Pens.Black, 4, 109, 301, 101); 335 338 … … 361 364 } 362 365 363 g.FillPolygon(new SolidBrush(Color.FromArgb( 64, 0, 0, 255)), userGraph);366 g.FillPolygon(new SolidBrush(Color.FromArgb(50, 0, 0, 255)), userGraph); 364 367 g.DrawPolygon(new Pen(Color.FromArgb(0, 0, 255), 1F), userGraph); 365 g.FillPolygon(new SolidBrush(Color.FromArgb(64, 255, 0, 0)), sysGraph); 366 } 367 368 double rate = 70.0 / (MemoryUsageCounter.TotalVisibleMemorySize * 1024); 368 g.FillPolygon(new SolidBrush(Color.FromArgb(50, 255, 0, 0)), sysGraph); 369 } 370 371 int totalMemory = (int)MemoryUsageCounter.TotalVisibleMemorySize * 1024; 372 double rate = 70.0 / totalMemory; 369 373 370 374 g.SmoothingMode = SmoothingMode.None; 371 Brush brush = new SolidBrush(Color.FromArgb(180, 255, 145, 0)); 375 Brush commitedBrush = new SolidBrush(Color.FromArgb(180, 255, 145, 0)); 376 Brush uncommitedBrush = new SolidBrush(Color.FromArgb(180, 180, 200, 255)); 377 Brush availableBrush = new SolidBrush(Color.FromArgb(180, 100, 100, 255)); 378 372 379 int posu = memHistoryHead - 1; 373 380 for (int i = 0; i < memHistoryCount; i++) … … 380 387 x = 305 - i * 5 - 5; 381 388 w = 5; 389 382 390 h = (int)(usage.Committed * rate); 383 391 y = 210 - h; 384 g.FillRectangle(brush, x, y, w, h); 392 g.FillRectangle(commitedBrush, x, y, w, h); 393 394 if (h < 100) 395 { 396 h = 100 - h; 397 y = 110; 398 g.FillRectangle(uncommitedBrush, x, y, w, h); 399 } 400 401 h = (int)(usage.Available * rate); 402 y = 210-70; 403 g.FillRectangle(availableBrush, x, y, w, h); 385 404 386 405 x = 305 - i * 5 - 5; … … 398 417 posu--; 399 418 } 400 g.DrawLine(Pens. Red, 5, 210-70, 305, 210-70);419 g.DrawLine(Pens.Black, 5, 210-70, 305, 210-70); 401 420 } 402 421 }
Note: See TracChangeset
for help on using the changeset viewer.