Public Class frmGaugeTest
  Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

  Public Sub New()
    MyBase.New()

    'This call is required by the Windows Form Designer.
    InitializeComponent()

    'Add any initialization after the InitializeComponent() call

  End Sub

  'Form overrides dispose to clean up the component list.
  Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
    If disposing Then
      If Not (components Is Nothing) Then
        components.Dispose()
      End If
    End If
    MyBase.Dispose(disposing)
  End Sub

  'Required by the Windows Form Designer
  Private components As System.ComponentModel.IContainer

  'NOTE: The following procedure is required by the Windows Form Designer
  'It can be modified using the Windows Form Designer.  
  'Do not modify it using the code editor.
  Friend WithEvents Gauge1 As ctlGauge.Gauge
  Friend WithEvents Label1 As System.Windows.Forms.Label
  Friend WithEvents Label2 As System.Windows.Forms.Label
  Friend WithEvents Label3 As System.Windows.Forms.Label
  Friend WithEvents Label4 As System.Windows.Forms.Label
  Friend WithEvents txtMin As System.Windows.Forms.TextBox
  Friend WithEvents txtMax As System.Windows.Forms.TextBox
  Friend WithEvents txtDanger As System.Windows.Forms.TextBox
  Friend WithEvents txtCaution As System.Windows.Forms.TextBox
  Friend WithEvents btnTest As System.Windows.Forms.Button
  Friend WithEvents btnExit As System.Windows.Forms.Button
  Friend WithEvents txtCurrent As System.Windows.Forms.TextBox
  Friend WithEvents Label5 As System.Windows.Forms.Label
  <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    Me.Gauge1 = New ctlGauge.Gauge()
    Me.Label1 = New System.Windows.Forms.Label()
    Me.Label2 = New System.Windows.Forms.Label()
    Me.Label3 = New System.Windows.Forms.Label()
    Me.Label4 = New System.Windows.Forms.Label()
    Me.txtMin = New System.Windows.Forms.TextBox()
    Me.txtMax = New System.Windows.Forms.TextBox()
    Me.txtDanger = New System.Windows.Forms.TextBox()
    Me.txtCaution = New System.Windows.Forms.TextBox()
    Me.btnTest = New System.Windows.Forms.Button()
    Me.btnExit = New System.Windows.Forms.Button()
    Me.txtCurrent = New System.Windows.Forms.TextBox()
    Me.Label5 = New System.Windows.Forms.Label()
    Me.SuspendLayout()
    '
    'Gauge1
    '
    Me.Gauge1.Caution = 0
    Me.Gauge1.Current = 50
    Me.Gauge1.Danger = 0
    Me.Gauge1.LeftSide = 3
    Me.Gauge1.Location = New System.Drawing.Point(216, 16)
    Me.Gauge1.Maximum = 100
    Me.Gauge1.Minimum = 0
    Me.Gauge1.Name = "Gauge1"
    Me.Gauge1.Size = New System.Drawing.Size(64, 152)
    Me.Gauge1.TabIndex = 0
    Me.Gauge1.Tall = 137
    Me.Gauge1.TopSide = 8
    Me.Gauge1.Wide = 13
    '
    'Label1
    '
    Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
    Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.Label1.Location = New System.Drawing.Point(8, 8)
    Me.Label1.Name = "Label1"
    Me.Label1.Size = New System.Drawing.Size(112, 20)
    Me.Label1.TabIndex = 1
    Me.Label1.Text = "Minimum:"
    Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
    '
    'Label2
    '
    Me.Label2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
    Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.Label2.Location = New System.Drawing.Point(8, 32)
    Me.Label2.Name = "Label2"
    Me.Label2.Size = New System.Drawing.Size(112, 20)
    Me.Label2.TabIndex = 2
    Me.Label2.Text = "Maximum:"
    Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
    '
    'Label3
    '
    Me.Label3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
    Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.Label3.Location = New System.Drawing.Point(8, 56)
    Me.Label3.Name = "Label3"
    Me.Label3.Size = New System.Drawing.Size(112, 20)
    Me.Label3.TabIndex = 3
    Me.Label3.Text = "Danger:"
    Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
    '
    'Label4
    '
    Me.Label4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
    Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.Label4.Location = New System.Drawing.Point(8, 80)
    Me.Label4.Name = "Label4"
    Me.Label4.Size = New System.Drawing.Size(112, 20)
    Me.Label4.TabIndex = 4
    Me.Label4.Text = "Caution:"
    Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
    '
    'txtMin
    '
    Me.txtMin.Location = New System.Drawing.Point(120, 8)
    Me.txtMin.Name = "txtMin"
    Me.txtMin.Size = New System.Drawing.Size(56, 20)
    Me.txtMin.TabIndex = 5
    Me.txtMin.Text = ""
    '
    'txtMax
    '
    Me.txtMax.Location = New System.Drawing.Point(120, 32)
    Me.txtMax.Name = "txtMax"
    Me.txtMax.Size = New System.Drawing.Size(56, 20)
    Me.txtMax.TabIndex = 6
    Me.txtMax.Text = ""
    '
    'txtDanger
    '
    Me.txtDanger.Location = New System.Drawing.Point(120, 56)
    Me.txtDanger.Name = "txtDanger"
    Me.txtDanger.Size = New System.Drawing.Size(56, 20)
    Me.txtDanger.TabIndex = 7
    Me.txtDanger.Text = ""
    '
    'txtCaution
    '
    Me.txtCaution.Location = New System.Drawing.Point(120, 80)
    Me.txtCaution.Name = "txtCaution"
    Me.txtCaution.Size = New System.Drawing.Size(56, 20)
    Me.txtCaution.TabIndex = 8
    Me.txtCaution.Text = ""
    '
    'btnTest
    '
    Me.btnTest.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.btnTest.Location = New System.Drawing.Point(8, 152)
    Me.btnTest.Name = "btnTest"
    Me.btnTest.Size = New System.Drawing.Size(80, 24)
    Me.btnTest.TabIndex = 9
    Me.btnTest.Text = "&Test"
    '
    'btnExit
    '
    Me.btnExit.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.btnExit.Location = New System.Drawing.Point(96, 152)
    Me.btnExit.Name = "btnExit"
    Me.btnExit.Size = New System.Drawing.Size(80, 24)
    Me.btnExit.TabIndex = 10
    Me.btnExit.Text = "E&xit"
    '
    'txtCurrent
    '
    Me.txtCurrent.Location = New System.Drawing.Point(120, 104)
    Me.txtCurrent.Name = "txtCurrent"
    Me.txtCurrent.Size = New System.Drawing.Size(56, 20)
    Me.txtCurrent.TabIndex = 12
    Me.txtCurrent.Text = ""
    '
    'Label5
    '
    Me.Label5.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
    Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.Label5.Location = New System.Drawing.Point(8, 104)
    Me.Label5.Name = "Label5"
    Me.Label5.Size = New System.Drawing.Size(112, 20)
    Me.Label5.TabIndex = 11
    Me.Label5.Text = "Test Value:"
    Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
    '
    'frmGaugeTest
    '
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
    Me.ClientSize = New System.Drawing.Size(352, 197)
    Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.txtCurrent, Me.Label5, Me.btnExit, Me.btnTest, Me.txtCaution, Me.txtDanger, Me.txtMax, Me.txtMin, Me.Label4, Me.Label3, Me.Label2, Me.Label1, Me.Gauge1})
    Me.Name = "frmGaugeTest"
    Me.Text = "Test the Gauge"
    Me.ResumeLayout(False)

  End Sub

#End Region

  Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
    Me.Dispose()
  End Sub

  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    txtMax.Text = "3000"
    txtMin.Text = "0"
    txtDanger.Text = "2700"
    txtCaution.Text = "2400"
    txtCurrent.Text = "2600"

  End Sub

  Private Sub btnTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTest.Click

    Gauge1.Maximum = CDbl(txtMax.Text)
    Gauge1.Minimum = CDbl(txtMin.Text)
    Gauge1.Danger = CDbl(txtDanger.Text)
    Gauge1.Caution = CDbl(txtCaution.Text)
    Gauge1.Current = CDbl(txtCurrent.Text)
    Gauge1.Invalidate()


  End Sub
End Class
