Module FormSetting Public Enum ModeList DUALSONIC MAXIMUM ALTO EFFECT MAX_Mode End Enum Public SelectModel As Int16 Public Sub StartTop() With MainForm '' 상단 컴포넌트 With .pnTop .Location = New Point(0, 0) .Size = New Size(1210, 90) End With With .gbProdSelect .Location = New Point(10, 5) .Size = New Size(400, 80) End With With .gbComport .Location = New Point(415, 5) .Size = New Size(350, 80) End With With .lbComport .Location = New Point(20, 35) End With With .cboComport .Location = New Point(105, 32) .Size = New Size(140, 32) End With With .btnComport .Location = New Point(250, 30) .Size = New Size(75, 37) End With With .gbEtcOp .Location = New Point(770, 5) .Size = New Size(125, 80) End With With .ckbDBUse .Location = New Point(20, 35) End With With .gbOpOut .Location = New Point(900, 5) .Size = New Size(310, 80) End With With .rdbUseTime .Location = New Point(40, 35) .Size = New Size(106, 28) End With With .rdbDev .Location = New Point(165, 35) .Size = New Size(106, 28) End With With .pnBottom .Location = New Point(0, 90) .Enabled = False End With End With End Sub Public Sub DUALForm_Setting() AuthSetting("인증코드설정", "카트리지") DefaultSetting() ModeSetting(SelectModel) DUALSetting() End Sub Private Sub DUALSetting() MainForm.gbTD.Enabled = False MainForm.rdbDev.Enabled = True MainForm.rdbDev.Checked = True MainForm.rdbUseTime.Checked = False End Sub Public Sub MAXForm_Setting() AuthSetting("플래쉬 설정값 초기화", "초기화") DefaultSetting() ModeSetting(SelectModel) MAXSetting() End Sub Public Sub ALTOForm_Setting() AuthSetting("플래쉬 설정값 초기화", "초기화") DefaultSetting() ModeSetting(SelectModel) MAXSetting() End Sub Public Sub EFFECTForm_Setting() AuthSetting("플래쉬 설정값 초기화", "초기화") DefaultSetting() ModeSetting(SelectModel) MAXSetting() End Sub Private Sub MAXSetting() With MainForm With .rdbDev .Enabled = False .Checked = False End With With .rdbUseTime .Checked = True End With With .txbTDSerial .Text = "DITI" End With With .txbShot .Text = "0" End With With .txbMaxShot .Text = "0" End With With .gbTD .Enabled = True End With End With End Sub Private Sub ModeSetting(ModelNum As Int16) InfoModeSetting(ModelNum) ShotCountSetting(ModelNum) MotorOpSetting(ModelNum) FreqOpSetting(ModelNum) End Sub Private Sub DefaultSetting() InfoSetting() AreaSetting() TDSetting() FreqPowerSetting() ShotSetting() MotorSetting() DeviceOpSetting() End Sub Private Sub AuthSetting(btnStr As String, btnStr2 As String) '' 인증 항목 With MainForm With .gbAuth .Location = New Point(10, 35) .Size = New Size(380, 70) .Text = btnStr End With With .txbAuthBox .Location = New Point(20, 30) .Size = New Size(130, 29) .Text = String.Empty .BackColor = Color.FromArgb(0, 192, 0) .Visible = False End With With .btnAuth .Location = New Point(160, 27) .Size = New Size(210, 35) .Text = btnStr2 End With End With End Sub Private Sub InfoSetting() With MainForm With .gbInfo .Text = "제품 정보 설정" .Location = New Point(10, 125) .Size = New Size(380, 330) End With ''---------------------------------------------------- With .pnIfNumber .Location = New Point(10, 30) .Size = New Size(360, 40) End With With .lbIfBarcode .Location = New Point(5, 7) End With With .txbIfNumber .Location = New Point(145, 5) .Size = New Size(205, 32) .TextAlign = HorizontalAlignment.Center .Text = "10" & Format(Now, "yy") & Format(Now, "MM") & "000000" .ReadOnly = True End With ''---------------------------------------------------- With .pnIfCode .Location = New Point(10, 70) .Size = New Size(360, 40) End With With .lbIfCode .Location = New Point(5, 7) End With With .txbIfCode .Location = New Point(145, 5) .Size = New Size(205, 32) .TextAlign = HorizontalAlignment.Center .Text = "JOMT" .MaxLength = 4 End With ''---------------------------------------------------- With .pnIfDate .Location = New Point(10, 110) .Size = New Size(360, 40) End With With .lbIfDate .Location = New Point(23, 7) End With With .lbIfYear .Location = New Point(140, 8) End With With .nudIfYear .Location = New Point(175, 5) .Size = New Size(65, 32) .TextAlign = HorizontalAlignment.Center .Minimum = 10 .Maximum = 99 .Text = Format(Now, "yy") End With ''---------------------------------------------------- With .lbIfMonth .Location = New Point(250, 8) End With With .nudIfMonth .Location = New Point(285, 5) .Size = New Size(65, 32) .TextAlign = HorizontalAlignment.Center .Minimum = 1 .Maximum = 12 .Text = Format(Now, "MM") End With ''-------------------------------------------------------- With .pnIfSerial .Location = New Point(10, 230) .Size = New Size(360, 40) End With With .lbIfSerial .Location = New Point(5, 7) End With With .nudIfSerial .Location = New Point(145, 5) .Size = New Size(205, 32) .TextAlign = HorizontalAlignment.Center .Maximum = 999999 .Minimum = 0 End With With .pnIfResult .Location = New Point(10, 270) .Size = New Size(360, 50) End With With .btnIfWrite .Location = New Point(250, 5) .Size = New Size(105, 40) .Text = "쓰기" End With With .btnIfRead .Location = New Point(145, 5) .Size = New Size(105, 40) End With With .txbInfoBox .Location = New Point(10, 12) .Size = New Size(130, 29) .TextAlign = HorizontalAlignment.Center .Text = String.Empty .BackColor = Color.FromArgb(0, 192, 0) .Visible = False End With End With End Sub Private Sub InfoModeSetting(ModeNum As Int16) Select Case ModeNum Case ModeList.DUALSONIC With MainForm With .gbInfo .Size = New Size(380, 330) End With With .pnIfMoTy .Location = New Point(10, 150) .Size = New Size(360, 80) End With With .pnIfModel .Location = New Point(0, 0) .Size = New Size(360, 40) End With With .lbIfModel .Location = New Point(23, 7) .Text = "모델종류" End With With .rdbIfPRO_V1 .Location = New Point(110, 7) .Text = "PRO" .Checked = True .Visible = True .Enabled = True End With With .rdbIfLUX_V2 .Location = New Point(190, 7) .Text = "LUX" .Checked = False .Visible = True .Enabled = True End With With .rdbIfALPHA .Location = New Point(260, 7) .Text = "ALPHA" .Checked = False .Visible = True .Enabled = True End With With .pnIfType .Location = New Point(0, 40) .Size = New Size(360, 40) .Visible = True .Enabled = True End With With .lbIfType .Location = New Point(23, 7) End With With .rdbIfFace .Location = New Point(110, 7) .Checked = True End With With .rdbIfEye .Location = New Point(190, 7) End With With .rdbIfBody .Location = New Point(260, 7) End With With .pnIfSerial .Location = New Point(10, 230) End With With .pnIfResult .Location = New Point(10, 270) End With End With Case ModeList.MAXIMUM With MainForm With .gbInfo .Size = New Size(380, 290) End With With .pnIfMoTy .Location = New Point(10, 150) .Size = New Size(360, 40) End With With .pnIfModel .Location = New Point(0, 0) .Size = New Size(360, 40) End With With .lbIfModel .Location = New Point(23, 7) .Text = "타입종류" End With With .rdbIfPRO_V1 .Location = New Point(110, 7) .Text = "V1" .Checked = False .Visible = True .Enabled = True End With With .rdbIfLUX_V2 .Location = New Point(190, 7) .Text = "V2" .Checked = True .Visible = True .Enabled = True End With With .rdbIfALPHA .Location = New Point(260, 7) .Text = "ALPHA" .Checked = False .Visible = False .Enabled = False End With With .pnIfType .Location = New Point(0, 40) .Size = New Size(360, 40) .Visible = False .Enabled = False End With With .lbIfType .Location = New Point(23, 7) End With With .rdbIfFace .Location = New Point(110, 7) .Checked = True End With With .rdbIfEye .Location = New Point(190, 7) .Checked = False End With With .rdbIfBody .Location = New Point(260, 7) .Checked = False End With With .pnIfSerial .Location = New Point(10, 190) End With With .pnIfResult .Location = New Point(10, 230) End With End With Case ModeList.ALTO With MainForm With .gbInfo .Size = New Size(380, 290) End With With .pnIfMoTy .Location = New Point(10, 150) .Size = New Size(360, 40) End With With .pnIfModel .Location = New Point(0, 0) .Size = New Size(360, 40) End With With .lbIfModel .Location = New Point(23, 7) .Text = "타입종류" End With With .rdbIfPRO_V1 .Location = New Point(110, 7) .Text = "SET" .Checked = True .Visible = True .Enabled = True End With With .rdbIfLUX_V2 .Location = New Point(190, 7) .Text = "V2" .Checked = False .Visible = False .Enabled = False End With With .rdbIfALPHA .Location = New Point(260, 7) .Text = "ALPHA" .Checked = False .Visible = False .Enabled = False End With With .pnIfType .Location = New Point(0, 40) .Size = New Size(360, 40) .Visible = False .Enabled = False End With With .lbIfType .Location = New Point(23, 7) End With With .rdbIfFace .Location = New Point(110, 7) .Checked = True End With With .rdbIfEye .Location = New Point(190, 7) .Checked = False End With With .rdbIfBody .Location = New Point(260, 7) .Checked = False End With With .pnIfSerial .Location = New Point(10, 190) End With With .pnIfResult .Location = New Point(10, 230) End With End With Case ModeList.EFFECT With MainForm With .gbInfo .Size = New Size(380, 290) End With With .pnIfMoTy .Location = New Point(10, 150) .Size = New Size(360, 40) End With With .pnIfModel .Location = New Point(0, 0) .Size = New Size(360, 40) End With With .lbIfModel .Location = New Point(23, 7) .Text = "타입종류" End With With .rdbIfPRO_V1 .Location = New Point(110, 7) .Text = "SET" .Checked = True .Visible = True .Enabled = True End With With .rdbIfLUX_V2 .Location = New Point(190, 7) .Text = "V2" .Checked = False .Visible = False .Enabled = False End With With .rdbIfALPHA .Location = New Point(260, 7) .Text = "ALPHA" .Checked = False .Visible = False .Enabled = False End With With .pnIfType .Location = New Point(0, 40) .Size = New Size(360, 40) .Visible = False .Enabled = False End With With .lbIfType .Location = New Point(23, 7) End With With .rdbIfFace .Location = New Point(110, 7) .Checked = True End With With .rdbIfEye .Location = New Point(190, 7) .Checked = False End With With .rdbIfBody .Location = New Point(260, 7) .Checked = False End With With .pnIfSerial .Location = New Point(10, 190) End With With .pnIfResult .Location = New Point(10, 230) End With End With Case Else MsgBox("잘못된 경로입니다.", vbCritical) End Select End Sub Private Sub AreaSetting() With MainForm With .gbArea .Location = New Point(10, 475) .Size = New Size(380, 170) End With With .pnAbroad .Location = New Point(10, 30) .Size = New Size(360, 40) End With With .lbAbroad .Location = New Point(23, 7) .Size = New Size(82, 24) End With With .txbAbroad .Location = New Point(145, 5) .Size = New Size(205, 32) .TextAlign = HorizontalAlignment.Center .Text = "0" End With With .pnAgency .Location = New Point(10, 70) .Size = New Size(360, 40) End With With .lbAgency .Location = New Point(5, 7) .Size = New Size(100, 24) End With With .txbAgency .Location = New Point(145, 5) .Size = New Size(205, 32) .TextAlign = HorizontalAlignment.Center .Text = "0" End With With .pnArResult .Location = New Point(10, 110) .Size = New Size(360, 50) End With With .txbAreaBox .Location = New Point(10, 12) .Size = New Size(130, 29) .BackColor = Color.FromArgb(0, 192, 0) .TextAlign = HorizontalAlignment.Center .Text = String.Empty .Visible = False End With With .btnArRead .Location = New Point(145, 5) .Size = New Size(105, 40) End With With .btnArWrite .Location = New Point(250, 5) .Size = New Size(105, 40) End With End With End Sub Private Sub TDSetting() With MainForm With .gbTD .Location = New Point(400, 35) .Size = New Size(380, 130) End With With .pnTDSerial .Location = New Point(10, 30) .Size = New Size(360, 40) End With With .lbTDSerial .Location = New Point(5, 7) .Size = New Size(100, 24) End With With .txbTDSerial .Location = New Point(145, 5) .Size = New Size(205, 32) .Text = "DITI" .TextAlign = HorizontalAlignment.Center .CharacterCasing = CharacterCasing.Upper .MaxLength = 10 .ImeMode = ImeMode.Disable End With With .pnTdResult .Location = New Point(10, 70) .Size = New Size(360, 50) End With With .txbTDBox .Location = New Point(10, 12) .Size = New Size(130, 29) .BackColor = Color.FromArgb(0, 192, 0) .Text = String.Empty .Visible = False End With With .btnTdRead .Location = New Point(145, 5) .Size = New Size(105, 40) End With With .btnTdWrite .Location = New Point(250, 5) .Size = New Size(105, 40) End With End With End Sub Private Sub FreqPowerSetting() With MainForm With .gbFreqPwr .Location = New Point(400, 170) .Size = New Size(380, 170) End With With .pnFreq .Location = New Point(10, 30) .Size = New Size(360, 40) End With With .lbFreq .Location = New Point(41, 7) .Size = New Size(64, 24) End With With .txbFreq .Location = New Point(145, 5) .Size = New Size(205, 32) .Text = "7000" .TextAlign = HorizontalAlignment.Center End With With .pnPower .Location = New Point(10, 70) .Size = New Size(360, 40) End With With .lbPower .Location = New Point(59, 7) .Size = New Size(46, 24) End With With .txbPower .Location = New Point(145, 5) .Size = New Size(205, 32) .Text = "0" .TextAlign = HorizontalAlignment.Center End With End With End Sub Private Sub ShotSetting() With MainForm With .gbShot .Location = New Point(400, 475) .Size = New Size(380, 170) End With With .pnShot .Location = New Point(10, 30) .Size = New Size(360, 40) End With With .lbShot .Location = New Point(23, 7) .Size = New Size(82, 24) End With With .txbShot .Location = New Point(145, 5) .Size = New Size(205, 32) .Text = "0" .TextAlign = HorizontalAlignment.Center End With With .pnMaxShot .Location = New Point(10, 70) .Size = New Size(360, 40) End With With .lbMaxShot .Location = New Point(23, 7) .Size = New Size(82, 24) End With With .txbMaxShot .Location = New Point(145, 5) .Size = New Size(205, 32) .Text = "0" .TextAlign = HorizontalAlignment.Center End With With .pnShResult .Location = New Point(10, 70) .Size = New Size(360, 50) End With With .txbShotBox .Location = New Point(10, 12) .Size = New Size(130, 29) .BackColor = Color.FromArgb(0, 192, 0) .Text = String.Empty .Visible = False End With With .btnShRead .Location = New Point(145, 5) .Size = New Size(105, 40) End With With .btnShWrite .Location = New Point(250, 5) .Size = New Size(105, 40) End With End With End Sub Private Sub ShotCountSetting(ModelNum As Int16) Select Case ModelNum Case ModeList.DUALSONIC With MainForm With .pnMaxShot .Visible = True End With With .pnShResult .Location = New Point(10, 110) End With With .gbShot .Enabled = True End With End With Case ModeList.MAXIMUM With MainForm With .pnMaxShot .Visible = False End With With .pnShResult .Location = New Point(10, 70) End With With .gbShot .Enabled = True End With End With Case ModeList.ALTO With MainForm With .gbShot .Enabled = False End With End With Case ModeList.EFFECT With MainForm With .pnMaxShot .Visible = False End With With .pnShResult .Location = New Point(10, 70) End With With .gbShot .Enabled = True End With End With Case Else MsgBox("잘못된 경로입니다.", vbCritical) End Select End Sub Private Sub MotorSetting() With MainForm With .gbMotor .Location = New Point(400, 340) .Size = New Size(380, 130) End With With .pnMotor .Location = New Point(10, 30) .Size = New Size(360, 40) End With With .lbMotor .Location = New Point(5, 7) .Size = New Size(100, 24) End With With .txbMotor .Location = New Point(145, 5) .Size = New Size(205, 32) .Text = "0" .TextAlign = HorizontalAlignment.Center End With End With End Sub Private Sub MotorOpSetting(ModelNum As Int16) Select Case ModelNum Case ModeList.DUALSONIC With MainForm With .lbMotor .Location = New Point(41, 7) .Text = "백러쉬" End With With .gbMotor .Enabled = True End With End With Case ModeList.MAXIMUM With MainForm With .lbMotor .Location = New Point(23, 7) .Text = "모터이동" End With With .gbMotor .Enabled = True End With End With Case ModeList.ALTO With MainForm With .gbMotor .Enabled = False End With With .lbMotor .Location = New Point(23, 7) .Text = "모터이동" End With End With Case ModeList.EFFECT With MainForm With .lbMotor .Location = New Point(23, 7) .Text = "모터이동" End With With .gbMotor .Enabled = True End With End With Case Else MsgBox("잘못된 경로입니다.", vbCritical) End Select End Sub Private Sub FreqOpSetting(ModelNum As Int16) Select Case ModelNum Case ModeList.DUALSONIC With MainForm With .gbFreqPwr .Enabled = True End With End With Case ModeList.MAXIMUM With MainForm With .gbFreqPwr .Enabled = True End With End With Case ModeList.ALTO With MainForm With .gbFreqPwr .Enabled = False End With End With Case ModeList.EFFECT With MainForm With .gbFreqPwr .Enabled = True End With End With Case Else MsgBox("잘못된 경로입니다.", vbCritical) End Select End Sub Private Sub DeviceOpSetting() With MainForm With .gbDevice .Location = New Point(810, 5) .Size = New Size(400, 505) End With With .gbDvAuth .Location = New Point(10, 35) .Size = New Size(380, 70) End With With .txbDvAuthBox .Location = New Point(20, 30) .Size = New Size(130, 29) .Text = String.Empty .TextAlign = HorizontalAlignment.Center .BackColor = Color.FromArgb(0, 192, 0) End With With .btnDvAuth .Location = New Point(160, 27) .Size = New Size(210, 35) .Text = "본체" End With With .gbDvInfo .Location = New Point(10, 125) .Size = New Size(380, 365) End With With .pnDvNumber .Location = New Point(10, 30) .Size = New Size(360, 40) End With With .lbDvNumber .Location = New Point(5, 7) .Size = New Size(100, 24) .Text = "바코드넘버" End With With .txbDvNumber .Location = New Point(145, 5) .Size = New Size(205, 32) .Text = String.Empty .TextAlign = HorizontalAlignment.Center .ReadOnly = True End With With .pnDvCode .Location = New Point(10, 70) .Size = New Size(360, 40) End With With .lbDvCode .Location = New Point(5, 7) .Size = New Size(100, 24) End With With .txbDvCode .Location = New Point(145, 5) .Size = New Size(205, 32) .Text = "JOMT" .TextAlign = HorizontalAlignment.Center End With With .pnDvDate .Location = New Point(10, 110) .Size = New Size(360, 40) End With With .lbDvDate .Location = New Point(23, 7) .Size = New Size(82, 24) End With With .lbDvYear .Location = New Point(140, 8) .Size = New Size(28, 24) End With With .nudDvYear .Location = New Point(175, 5) .Size = New Size(65, 32) .TextAlign = HorizontalAlignment.Center .Text = Format(Now, "yy") .Maximum = 99 .Minimum = 10 End With With .lbDvMonth .Location = New Point(250, 8) .Size = New Size(28, 24) End With With .nudDvMonth .Location = New Point(285, 5) .Size = New Size(65, 32) .TextAlign = HorizontalAlignment.Center .Text = Format(Now, "MM") .Maximum = 12 .Minimum = 1 End With With .pnDvMoTy .Location = New Point(10, 150) .Size = New Size(360, 40) End With With .pnDvModel .Location = New Point(0, 0) .Size = New Size(360, 40) End With With .lbDvModel .Location = New Point(23, 7) .Size = New Size(82, 24) End With With .rdbDvPRO .Location = New Point(110, 7) .Size = New Size(66, 28) End With With .rdbDvLUX .Location = New Point(182, 7) .Size = New Size(67, 28) End With With .rdbDvALPHA .Location = New Point(260, 7) .Size = New Size(91, 28) End With With .pnDvSerial .Location = New Point(10, 190) .Size = New Size(360, 40) End With With .lbDvSerial .Location = New Point(5, 7) .Size = New Size(100, 24) End With With .nudDvSerial .Location = New Point(145, 5) .Size = New Size(205, 32) .TextAlign = HorizontalAlignment.Center .Text = 0 .Maximum = 999999 .Minimum = 0 End With With .pnDvAbroad .Location = New Point(10, 230) .Size = New Size(360, 40) End With With .lbDvAbroad .Location = New Point(23, 7) .Size = New Size(82, 24) End With With .txbDvAbroad .Location = New Point(145, 5) .Size = New Size(205, 32) .Text = "0" .TextAlign = HorizontalAlignment.Center End With With .pnDvAgency .Location = New Point(10, 270) .Size = New Size(360, 40) End With With .lbDvAgency .Location = New Point(5, 7) .Size = New Size(5, 7) End With With .txbDvAgency .Location = New Point(145, 5) .Size = New Size(205, 32) .Text = "0" .TextAlign = HorizontalAlignment.Center End With With .pnDvResult .Location = New Point(10, 310) .Size = New Size(360, 50) End With With .txbDvInfoBox .Location = New Point(10, 12) .Size = New Size(130, 29) .BackColor = Color.FromArgb(0, 192, 0) .Text = String.Empty .TextAlign = HorizontalAlignment.Center End With With .btnDvRead .Location = New Point(145, 5) .Size = New Size(105, 40) End With With .btnDvWrite .Location = New Point(250, 5) .Size = New Size(105, 40) End With End With End Sub Public Sub ResetClear() With MainForm .txbIfNumber.Text = String.Empty .txbIfCode.Text = String.Empty .nudIfYear.Text = Format(Now, "yy") .nudIfMonth.Text = Format(Now, "MM") .rdbIfPRO_V1.Checked = True .rdbIfLUX_V2.Checked = False .rdbIfALPHA.Checked = False .rdbIfFace.Checked = True .rdbIfEye.Checked = False .rdbIfBody.Checked = False .nudIfSerial.Text = String.Empty .txbAbroad.Text = String.Empty .txbAgency.Text = String.Empty .txbTDSerial.Text = String.Empty .txbFreq.Text = String.Empty .txbPower.Text = String.Empty .txbMotor.Text = String.Empty .txbShot.Text = String.Empty .txbMaxShot.Text = String.Empty .txbALFtDay.Text = "0000" .txbALFtHour.Text = "00" .txbALFtMin.Text = "00" .txbALFtSec.Text = "00" .txbALEtDay.Text = "0000" .txbALEtHour.Text = "00" .txbALEtMin.Text = "00" .txbALEtSec.Text = "00" .txbALCsDay.Text = "0000" .txbALCsHour.Text = "00" .txbALCsMin.Text = "00" .txbALCsSec.Text = "00" .txbALLtDay.Text = "0000" .txbALLtHour.Text = "00" .txbALLtMin.Text = "00" .txbALLtSec.Text = "00" .txbALBtDay.Text = "0000" .txbALBtHour.Text = "00" .txbALBtMin.Text = "00" .txbALBtSec.Text = "00" .txbALAllDay.Text = "0000" .txbALAllHour.Text = "00" .txbALAllMin.Text = "00" .txbALAllSec.Text = "00" .txbALAllErr.Text = String.Empty End With End Sub End Module