Public Class StNumericUpDown
	Implements IField
	Implements IRange
	Implements IChanged

	Dim m_Field As Fields
	Public Property Field() As Fields Implements IField.Field
		Get
			Return (m_Field)
		End Get
		Set(ByVal value As Fields)
			m_Field = value
		End Set
	End Property

	Dim m_Updatting As Boolean = True
	Public Sub SetRange(ByVal min As Decimal, ByVal max As Decimal, ByVal value As Decimal) Implements IRange.SetRange
		m_Updatting = True
		If value < min Then
			min = value
		End If
		If max < value Then
			max = value
		End If
		Me.Minimum = min
		Me.Maximum = max
		Me.Value = value
		m_Updatting = False
	End Sub
	Public Function GetValue() As Decimal Implements IRange.GetValue
		Return (Me.Value)
	End Function

	Public Event Changed(ByVal sender As Object, ByVal e As EventArgs) Implements IChanged.Changed

	Private Sub StNumericUpDown_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.ValueChanged
		If Not m_Updatting Then
			RaiseEvent Changed(sender, e)
		End If
	End Sub
End Class
