可以测试驱动器(包含优盘自动识别插入、卸载)的读(Read)写(Write)速度,并以图形化的方式直观显示
读写按照二进制形式进行测试
程序运行效果图如下:
主要源码如下:
1、柱状图控件源码
Public Class SpeedViewClass SpeedView
Private
xStep, yStep As Single
Private
mMaxSpeed As Integer = 10
Private
Infos As New ArrayList
Public Class
InfoClass Info
Public Write As Integer
Public Read As Integer
Public y As Single
Public DrawWrite As Boolean
Public DrawRead As Boolean
End
Class
Public
Property MaxSpeed()Property MaxSpeed() As Integer
Get
Return mMaxSpeed
End Get
Set(ByVal value As Integer)
If mMaxSpeed <> value Then
mMaxSpeed = value
PictureBox1.Invalidate()
Me.Invalidate()
End If
End Set
End
Property
Private Sub
PictureBox1_Paint()Sub PictureBox1_Paint(ByVal sender As Object,
ByVal e As System.Windows.Forms.PaintEventArgs) Handles
PictureBox1.Paint
Dim point1, point2 As PointF
'绘制网格
For i As Integer = 1 To 9
point1 = New PointF(xStep * i, 0)
point2 = New PointF(xStep * i, PictureBox1.Height)
e.Graphics.DrawLine(Pens.Blue, point1, point2)
Next
'绘制图形
For i As Integer = 0 To Infos.Count - 1
读写按照二进制形式进行测试
程序运行效果图如下:
主要源码如下:
1、柱状图控件源码
Public Class SpeedViewClass SpeedView