127 lines
3.2 KiB
VB.net
127 lines
3.2 KiB
VB.net
Module M_aspect
|
|
|
|
Const BUTTON_TOP As Integer = 380
|
|
Const BUTTON_WIDTH As Integer = 75
|
|
Const BUTTON_HEIGHT As Integer = 40
|
|
|
|
Sub init()
|
|
With FrmMain
|
|
|
|
' -------------- positions ----------------
|
|
|
|
Call Button_init()
|
|
|
|
' -------------- clear labels ----------------
|
|
|
|
.LblProgramName.Text = "---------"
|
|
|
|
' ------------ messages -------------------------
|
|
|
|
|
|
.LblCurrentProgram.Text = Message.msg(36) ' Currently machining :
|
|
.LblMachineStatus.Text = Message.msg(37) ' Machine Status :
|
|
' .LblNextProgram.Text = Message.msg(38) ' Next program :
|
|
|
|
|
|
Call button_text()
|
|
|
|
' -------------- visibilities ------------------
|
|
|
|
Call button_visibility()
|
|
|
|
.LblConnected.Visible = True
|
|
.LblProgramName.Visible = True
|
|
|
|
.LblMachineStatus.Visible = True
|
|
.LblMachState.Visible = True
|
|
|
|
|
|
.LblCurrentProgram.Visible = True
|
|
.LblNcStatus.Visible = True
|
|
|
|
If (IniRead.b_BarCodeInput_enabled Or IniRead.b_FileInputMode_enabled) And pRegistered Then
|
|
|
|
' Call M_serial_barcode.set_textbox(.TxtBarCode)
|
|
End If
|
|
|
|
|
|
|
|
|
|
' -------------- size -------------------------
|
|
|
|
' -------------- simulation ------------------
|
|
|
|
If IniRead.b_debug Then ' simulation stuff
|
|
|
|
.BtnSim0.Visible = True
|
|
.BtnSim1.Visible = True
|
|
.BtnSim2.Visible = True
|
|
.BtnSim3.Visible = True
|
|
.BtnSim4.Visible = True
|
|
.BtnSim5.Visible = True
|
|
.LblSimPrgSent1.Visible = True
|
|
.LblSimPrgSent2.Visible = True
|
|
|
|
End If
|
|
|
|
' ---------------- old osai
|
|
|
|
If (IniRead.b_force_S10WLK32 And IniRead.b_verbose) Or (IniRead.b_test_nc) Then
|
|
.BtnReadOldOsai.Visible = True
|
|
.BtnWrite1OldOsai.Visible = True
|
|
.BtnWrite2OldOsai.Visible = True
|
|
.BtnWrite3OldOsai.Visible = True
|
|
.BtnWrite4OldOsai.Visible = True
|
|
.BtnWrite5OldOsai.Visible = True
|
|
.LblReadOldOsai.Visible = True
|
|
|
|
.BtnReadOldOsai.Text = "R var " & IniRead.nVar_NC_state.ToString
|
|
.BtnWrite1OldOsai.Text = "W1"
|
|
.BtnWrite2OldOsai.Text = "W2"
|
|
.BtnWrite3OldOsai.Text = "W3"
|
|
.BtnWrite4OldOsai.Text = "W4"
|
|
.BtnWrite5OldOsai.Text = "W5"
|
|
End If
|
|
|
|
|
|
If (IniRead.b_win7 And IniRead.b_test_nc) Or (IniRead.b_send_file) Then
|
|
.Btn_test_file.Visible = True
|
|
End If
|
|
|
|
End With
|
|
|
|
End Sub
|
|
|
|
Private Sub Button_init()
|
|
|
|
With FrmMain
|
|
|
|
|
|
.BtnExit.Top = BUTTON_TOP
|
|
.BtnExit.Width = BUTTON_WIDTH
|
|
.BtnExit.Height = BUTTON_HEIGHT
|
|
.BtnExit.Left = 220
|
|
|
|
|
|
End With
|
|
End Sub
|
|
|
|
Private Sub button_visibility()
|
|
With FrmMain
|
|
.BtnExit.Visible = True
|
|
|
|
End With
|
|
|
|
End Sub
|
|
|
|
Private Sub button_text()
|
|
With FrmMain
|
|
|
|
.BtnExit.Text = Message.msg(21) ' Exit
|
|
End With
|
|
|
|
End Sub
|
|
|
|
|
|
End Module
|