Option Strict Off
Option Explicit On
Friend Class frmWelHTCom
	Inherits System.Windows.Forms.Form
#Region "Windows フォーム デザイナによって生成されたコード"
	Public Sub New()
		MyBase.New()
		If m_vb6FormDefInstance Is Nothing Then
			If m_InitializingDefInstance Then
				m_vb6FormDefInstance = Me
			Else
				Try 
					'スタートアップ フォームについては、最初に作成されたインスタンスが既定インスタンスになります。
					If System.Reflection.Assembly.GetExecutingAssembly.EntryPoint.DeclaringType Is Me.GetType Then
						m_vb6FormDefInstance = Me
					End If
				Catch
				End Try
			End If
		End If
		'この呼び出しは、Windows フォーム デザイナで必要です。
		InitializeComponent()
	End Sub
	'Form は、コンポーネント一覧に後処理を実行するために dispose をオーバーライドします。
	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
	'Windows フォーム デザイナで必要です。
	Private components As System.ComponentModel.IContainer
	Public ToolTip1 As System.Windows.Forms.ToolTip
	Public WithEvents Command3 As System.Windows.Forms.Button
	Public WithEvents cmdEnd As System.Windows.Forms.Button
	Public WithEvents Command2 As System.Windows.Forms.Button
	Public WithEvents Command1 As System.Windows.Forms.Button
	'メモ : 以下のプロシージャは Windows フォーム デザイナで必要です。
	'Windows フォーム デザイナを使って変更できます。
	'コードエディタを使って修正しないでください。


	<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
		Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmWelHTCom))
		Me.components = New System.ComponentModel.Container()
		Me.ToolTip1 = New System.Windows.Forms.ToolTip(components)
		Me.ToolTip1.Active = True
		Me.Command3 = New System.Windows.Forms.Button
		Me.cmdEnd = New System.Windows.Forms.Button
		Me.Command2 = New System.Windows.Forms.Button
		Me.Command1 = New System.Windows.Forms.Button
		Me.Text = "WelHTComFunc サンプル"
		Me.ClientSize = New System.Drawing.Size(609, 171)
		Me.Location = New System.Drawing.Point(4, 30)
		Me.StartPosition = System.Windows.Forms.FormStartPosition.WindowsDefaultLocation
		Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
		Me.BackColor = System.Drawing.SystemColors.Control
		Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable
		Me.ControlBox = True
		Me.Enabled = True
		Me.KeyPreview = False
		Me.MaximizeBox = True
		Me.MinimizeBox = True
		Me.Cursor = System.Windows.Forms.Cursors.Default
		Me.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.ShowInTaskbar = True
		Me.HelpButton = False
		Me.WindowState = System.Windows.Forms.FormWindowState.Normal
		Me.Name = "frmWelHTCom"
		Me.Command3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command3.Text = "CSV　DOWNLOAD（項目設定不可）"
		Me.Command3.Size = New System.Drawing.Size(233, 41)
		Me.Command3.Location = New System.Drawing.Point(232, 88)
		Me.Command3.TabIndex = 2
		Me.Command3.BackColor = System.Drawing.SystemColors.Control
		Me.Command3.CausesValidation = True
		Me.Command3.Enabled = True
		Me.Command3.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command3.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command3.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command3.TabStop = True
		Me.Command3.Name = "Command3"
		Me.cmdEnd.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.CancelButton = Me.cmdEnd
		Me.cmdEnd.Text = "終了"
		Me.cmdEnd.Size = New System.Drawing.Size(81, 41)
		Me.cmdEnd.Location = New System.Drawing.Point(504, 24)
		Me.cmdEnd.TabIndex = 3
		Me.cmdEnd.BackColor = System.Drawing.SystemColors.Control
		Me.cmdEnd.CausesValidation = True
		Me.cmdEnd.Enabled = True
		Me.cmdEnd.ForeColor = System.Drawing.SystemColors.ControlText
		Me.cmdEnd.Cursor = System.Windows.Forms.Cursors.Default
		Me.cmdEnd.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.cmdEnd.TabStop = True
		Me.cmdEnd.Name = "cmdEnd"
		Me.Command2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command2.Text = "ＣＳＶ　UPLOAD（項目設定可）"
		Me.Command2.Size = New System.Drawing.Size(233, 41)
		Me.Command2.Location = New System.Drawing.Point(232, 24)
		Me.Command2.TabIndex = 1
		Me.Command2.BackColor = System.Drawing.SystemColors.Control
		Me.Command2.CausesValidation = True
		Me.Command2.Enabled = True
		Me.Command2.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command2.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command2.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command2.TabStop = True
		Me.Command2.Name = "Command2"
		Me.Command1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command1.Text = "全機能テスト"
		Me.Command1.Size = New System.Drawing.Size(169, 41)
		Me.Command1.Location = New System.Drawing.Point(32, 24)
		Me.Command1.TabIndex = 0
		Me.Command1.BackColor = System.Drawing.SystemColors.Control
		Me.Command1.CausesValidation = True
		Me.Command1.Enabled = True
		Me.Command1.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command1.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command1.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command1.TabStop = True
		Me.Command1.Name = "Command1"
		Me.Controls.Add(Command3)
		Me.Controls.Add(cmdEnd)
		Me.Controls.Add(Command2)
		Me.Controls.Add(Command1)
	End Sub
#End Region 
#Region "アップグレード ウィザードのサポート コード"
	Private Shared m_vb6FormDefInstance As frmWelHTCom
	Private Shared m_InitializingDefInstance As Boolean
	Public Shared Property DefInstance() As frmWelHTCom
		Get
			If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
				m_InitializingDefInstance = True
				m_vb6FormDefInstance = New frmWelHTCom()
				m_InitializingDefInstance = False
			End If
			DefInstance = m_vb6FormDefInstance
		End Get
		Set
			m_vb6FormDefInstance = Value
		End Set
	End Property
#End Region 
	Private Sub cmdEnd_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdEnd.Click
		Me.Close()
	End Sub
	
	Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click
		Dim ret As Integer
        Dim tmplt As WelHTComTMPL

        vbWelHTComSetEnable(tmplt)

		ret = vbWelHTComFunc(tmplt)
	End Sub
	
	Private Sub Command2_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command2.Click
		Dim ret As Integer
        Dim tmplt As WelHTComTMPL

        vbWelHTComSetEnable(tmplt)

        tmplt.selcnt = 8
		
        vbWelHTStrMemberSet(tmplt.edittbl.itname0, "メニュー番号")
        vbWelHTStrMemberSet(tmplt.edittbl.itname1, "オペレータＩＤ")
        vbWelHTStrMemberSet(tmplt.edittbl.itname2, "日付")
        vbWelHTStrMemberSet(tmplt.edittbl.itname3, "時刻")
        vbWelHTStrMemberSet(tmplt.edittbl.itname4, "担当者")
        vbWelHTStrMemberSet(tmplt.edittbl.itname5, "棚番")
        vbWelHTStrMemberSet(tmplt.edittbl.itname6, "品番")
        vbWelHTStrMemberSet(tmplt.edittbl.itname7, "数量")
		
		tmplt.edittbl.out_itno(0) = 5
		tmplt.edittbl.out_itno(1) = 6
		tmplt.edittbl.out_itno(2) = 7
		tmplt.edittbl.out_itno(3) = 8
		tmplt.edittbl.out_itno(4) = 3
		tmplt.edittbl.out_itno(5) = 4
		
		ret = vbWelHTComFunc(tmplt)
	End Sub
	
	
	Private Sub Command3_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command3.Click
		Dim ret As Integer
		Dim tmplt As WelHTComTMPL

        vbWelHTComSetDisable(tmplt)

		tmplt.httype_perm = HT_PERMALL
		tmplt.comset_perm.port = HT_PERMALL
		tmplt.comset_perm.mode = HT_PERMALL
		tmplt.comset_perm.sendcod = HT_PERMALL
		
		tmplt.filename_edit = WelHTCom.EditPermEnum.HT_EDIT_ENABLE
		tmplt.fileext_perm = WelHTCom.FileExtENum.HT_EXT_CSV Or WelHTCom.FileExtENum.HT_EXT_TXT
		
        vbWelHTStrMemberSet(tmplt.filename, "TestData.csv", HT_FILENAME_LEN)
		
		ret = vbWelHTComFunc(tmplt)
	End Sub
End Class