Imports System.IO

Public Class Form_Tuning   
    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 ToolBarButton118 As System.Windows.Forms.ToolBarButton
   Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
   Friend WithEvents ContextMenu1 As System.Windows.Forms.ContextMenu
   Friend WithEvents mi_Temp As System.Windows.Forms.MenuItem
   Friend WithEvents tbb_Tnng_Help As System.Windows.Forms.ToolBarButton
   Friend WithEvents tbb_Tnng_Exit As System.Windows.Forms.ToolBarButton
   Friend WithEvents tlb_Tnng As System.Windows.Forms.ToolBar
   Friend WithEvents ToolBarButton1 As System.Windows.Forms.ToolBarButton
   Friend WithEvents ToolBarButton2 As System.Windows.Forms.ToolBarButton
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
      Me.components = New System.ComponentModel.Container
      Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form_Tuning))
      Me.tlb_Tnng = New System.Windows.Forms.ToolBar
      Me.tbb_Tnng_Help = New System.Windows.Forms.ToolBarButton
      Me.ToolBarButton118 = New System.Windows.Forms.ToolBarButton
      Me.tbb_Tnng_Exit = New System.Windows.Forms.ToolBarButton
      Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
      Me.ContextMenu1 = New System.Windows.Forms.ContextMenu
      Me.mi_Temp = New System.Windows.Forms.MenuItem
      Me.ToolBarButton1 = New System.Windows.Forms.ToolBarButton
      Me.ToolBarButton2 = New System.Windows.Forms.ToolBarButton
      Me.SuspendLayout()
      '
      'tlb_Tnng
      '
      Me.tlb_Tnng.AutoSize = False
      Me.tlb_Tnng.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.ToolBarButton2, Me.ToolBarButton1, Me.tbb_Tnng_Help, Me.ToolBarButton118, Me.tbb_Tnng_Exit})
      Me.tlb_Tnng.ButtonSize = New System.Drawing.Size(86, 30)
      Me.tlb_Tnng.Dock = System.Windows.Forms.DockStyle.Left
      Me.tlb_Tnng.DropDownArrows = True
      Me.tlb_Tnng.ImageList = Me.ImageList1
      Me.tlb_Tnng.Location = New System.Drawing.Point(0, 0)
      Me.tlb_Tnng.Name = "tlb_Tnng"
      Me.tlb_Tnng.ShowToolTips = True
      Me.tlb_Tnng.Size = New System.Drawing.Size(100, 693)
      Me.tlb_Tnng.TabIndex = 17
      Me.tlb_Tnng.TextAlign = System.Windows.Forms.ToolBarTextAlign.Right
      '
      'tbb_Tnng_Help
      '
      Me.tbb_Tnng_Help.ImageIndex = 0
      Me.tbb_Tnng_Help.Text = "Help"
      Me.tbb_Tnng_Help.ToolTipText = "Help"
      '
      'ToolBarButton118
      '
      Me.ToolBarButton118.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
      '
      'tbb_Tnng_Exit
      '
      Me.tbb_Tnng_Exit.ImageIndex = 1
      Me.tbb_Tnng_Exit.Text = "Exit"
      Me.tbb_Tnng_Exit.ToolTipText = "Exit"
      '
      'ImageList1
      '
      Me.ImageList1.ImageSize = New System.Drawing.Size(24, 24)
      Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
      Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent
      '
      'ContextMenu1
      '
      Me.ContextMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mi_Temp})
      '
      'mi_Temp
      '
      Me.mi_Temp.Index = 0
      Me.mi_Temp.Text = "Template"
      '
      'ToolBarButton1
      '
      Me.ToolBarButton1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
      '
      'ToolBarButton2
      '
      Me.ToolBarButton2.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
      '
      'Form_Tuning
      '
      Me.AutoScale = False
      Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
      Me.ClientSize = New System.Drawing.Size(104, 693)
      Me.Controls.Add(Me.tlb_Tnng)
      Me.Name = "Form_Tuning"
      Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual
      Me.Text = "Form Tuning"
      Me.ResumeLayout(False)

   End Sub

#End Region

   Private tbxPuan_Num(), tbxPuan_N(), tbxPuan_Xo() As TextBox


   Private Sub Form_Tuning_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated
      'ReDim tbxPuan_Num(NComp), tbxPuan_N(NComp), tbxPuan_Xo(NComp)

      'Pan_Poin.Controls.Clear
      'Pan_Poin.Controls.Add(TextBox1)
      'Pan_Poin.Controls.Add(TextBox2)
      'Pan_Poin.Controls.Add(TextBox3)
      'Pan_Poin.Controls.Add(TextBox4)

      'For I As Integer = 1 To NComp
      '   tbxComp_(I, tbxPuan_Num, "Num",  10,  50)
      '   tbxComp_(I, tbxPuan_N,     "N",  61, 100)
      '   tbxComp_(I, tbxPuan_Xo,   "Xo", 162, 100)
      'Next I

      'If Not File.Exists(WorkDirRe & "\NormC.pnc") Then _
      'Dim SW As New StreamWriter(WorkDirRe & "\NormC.pnc"):    SW.Close

      'If Not File.Exists(WorkDirRe & "\PointC.pnc") Then _
      'Dim SW1 As New StreamWriter(WorkDirRe & "\PointC.pnc"):    SW1.Close

      'Puan_Read()
   End Sub


'=======================================================================================================
   'Public Sub tbxComp_(ByVal Ir%, ByVal tbxCom() As TextBox, ByVal Str$, ByVal Left%, ByVal Width%)
   '      tbxCom(Ir) = New TextBox
   '      With tbxCom(Ir)
   '         .BorderStyle = BorderStyle.None:    
   '         .TextAlign = HorizontalAlignment.Center:    .Font = txtFont_CN
   '         If Str = "Num" Then
   '            .BackColor = Color.Silver:    .Text = Ir:    .ReadOnly = True
   '         Else
   '            .BackColor = Color.FromArgb(255, 255, 235):    .Text = ""
   '         End If
   '         .Location = New Drawing.Point(Left, 46 + (Ir - 1) * 18)
   '         .Size     = New Drawing.Size(Width, 17):    .AutoSize = False
   '      End With
   '      Pan_Poin.Controls.Add(tbxCom(Ir))
   'End Sub
'=======================================================================================================



'------------- tlb_Tnng ----------------------------------------------------------------------------------------------- tlb_Tnngt
'------------- tlb_Tnng ----------------------------------------------------------------------------------------------- tlb_Tnngt
'------------- tlb_Tnng ----------------------------------------------------------------------------------------------- tlb_Tnngt
   Private Sub tlb_Tnng_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) _
       Handles tlb_Tnng.ButtonClick    'Handles tlb_Tnng.ButtonClick
      'If e.Button Is tbb_Tnng_Read Then Tnng_Read()
      'If e.Button Is tbb_Tnng_Save Then Tnng_Save()
      If e.Button Is tbb_Tnng_Help Then MsgBox("Tnng_Help")
      If e.Button Is tbb_Tnng_Exit Then Me.Hide
   End Sub


   'Private Sub mi_Temp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mi_Temp.Click
   '   For I As Integer = 1 To NComp
   '      tbxPuan_N(I).Text  = 0
   '      tbxPuan_Xo(I).Text = 0
   '   Next I

   '   tbxPuan_N(1).Text = 1
   '   tbxPuan_N(2).Text = -1
   'End Sub


   Private Sub Tnng_Read()
      MsgBox("Tnng_Read")
   '   Dim SR As StreamReader  = New StreamReader(WorkDirRe & "\NormC.pnc")
   '   Dim SR1 As StreamReader = New StreamReader(WorkDirRe & "\PointC.pnc")
   '   For I As Integer = 1 To NComp
   '      tbxPuan_N(I).Text  = SR.ReadLine()
   '      tbxPuan_Xo(I).Text = SR1.ReadLine()
   '   Next I
   '   SR.Close
   '   SR1.Close
   End Sub


   Private Sub Tnng_Save()
      MsgBox("Tnng_Save")
   '   Dim SW As StreamWriter  = New StreamWriter(WorkDirRe & "\NormC.pnc")
   '   Dim SW1 As StreamWriter = New StreamWriter(WorkDirRe & "\PointC.pnc")
   '   For I As Integer = 1 To NComp
   '      SW.WriteLine(tbxPuan_N(I).Text)
   '      SW1.WriteLine(tbxPuan_Xo(I).Text)
   '   Next I
   '   SW1.Close
   '   SW.Close
   End Sub



   'Private Sub RadioButton_Yes_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton_Yes.CheckedChanged

   'End Sub

   'Private Sub RadioButton_No_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton_No.CheckedChanged

   'End Sub

   'Private Sub Pan_Poin_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs)

   'End Sub

   'Private Sub TextBox6_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

   'End Sub

   Private Sub Panel_Tuning_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs)

   End Sub
End Class
