Public Property Get Spaced() As Long
Spaced = m_Spaced
End Property
Public Property Let Spaced(ByVal Value As Long)
m_Spaced = Value
Call AddValue
PropertyChanged "Spaced"
End Property
’值刻度
Public Property Get ValueScale() As Long
ValueScale = m_ValueScale
End Property
Public Property Let ValueScale(ByVal Value As Long)
m_ValueScale = Value
Call AddValue
PropertyChanged "ValueScale"
End Property
’时间刻度
Public Property Get TimeScale() As Long
TimeScale = m_TimeScale
End Property
Public Property Let TimeScale(ByVal Value As Long)
m_TimeScale = Value
PropertyChanged "TimeScale"
End Property
’最大比例
Public Property Get MaxValue() As Single
MaxValue = m_MaxValue
End Property
Public Property Let MaxValue(ByVal Value As Single)
m_MaxValue = Value
Call AddValue
PropertyChanged "MaxValue"
End Property ’曲线个数
Public Property Get GraphCount() As Long
On Error Resume Next
GraphCount = UBound(m_Coll) + 1
End Property
Private Sub UserControl_Resize()
Call AddValue
End Sub
Private Sub UserControl_Show()
Call AddValue
End Sub
Private Sub UserControl_Initialize()
UserControl.ScaleMode = 3
Set m_Time = New Collection
End Sub
Private Sub UserControl_Terminate()
Dim i As Long
For i = 0 To GraphCount - 1
Set m_Coll(i) = Nothing
Next
Set m_Time = Nothing
End Sub
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
m_ShowGraph = PropBag.ReadProperty("ShowGraph", True)
m_ShowGrid = PropBag.ReadProperty("ShowGrid", True)
m_ShowValueScale = PropBag.ReadProperty("ShowValueScale", True)
m_ShowTimeScale = PropBag.ReadProperty("ShowTimeScale", True)
UserControl.BackColor = PropBag.ReadProperty("BackColor", &H0&)
m_ScaleColor = PropBag.ReadProperty("ScaleColor", &HC0C0C0)
m_GridColor = PropBag.ReadProperty("GridColor", vbGreen)
m_CellWidth = PropBag.ReadProperty("CellWidth", 12)
m_CellHeight = PropBag.ReadProperty("CellHeight", 12)
m_Spaced = PropBag.ReadProperty("Spaced", 5)
m_ValueScale = PropBag.ReadProperty("ValueScale", 25)
m_TimeScale = PropBag.ReadProperty("TimeScale", 2)
m_MaxValue = PropBag.ReadProperty("MaxValue", 100)
End Sub
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("ShowGraph", m_ShowGraph, True) Call PropBag.WriteProperty("ShowGrid", m_ShowGrid, True)
Call PropBag.WriteProperty("ShowValueScale", m_ShowValueScale, True)
Call PropBag.WriteProperty("ShowTimeScale", m_ShowTimeScale, True)
Call PropBag.WriteProperty("BackColor", UserControl.BackColor, &H0&)
Call PropBag.WriteProperty("ScaleColor", m_ScaleColor, &HFFFFFF)
Call PropBag.WriteProperty("GridColor", m_GridColor, vbGreen)
Call PropBag.WriteProperty("CellWidth", m_CellWidth, 12)
Call PropBag.WriteProperty("CellHeight", m_CellHeight, 12)
Call PropBag.WriteProperty("Spaced", m_Spaced, 5)
Call PropBag.WriteProperty("ValueScale", m_ValueScale, 25)
Call PropBag.WriteProperty("TimeScale", m_TimeScale, 2)
Call PropBag.WriteProperty("MaxValue", m_MaxValue, 100)
End Sub