VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form FrmTisi 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Tisi"
   ClientHeight    =   10170
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5640
   Icon            =   "FrmTisi.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   ScaleHeight     =   10170
   ScaleWidth      =   5640
   Begin MSComctlLib.Toolbar ToucheG 
      Height          =   1410
      Left            =   840
      TabIndex        =   37
      Top             =   3480
      Width           =   720
      _ExtentX        =   1270
      _ExtentY        =   2487
      ButtonWidth     =   1138
      ButtonHeight    =   582
      TextAlignment   =   1
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   4
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "F1"
            Style           =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "F2"
            Style           =   1
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "F3"
            Style           =   1
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "F4"
            Style           =   1
         EndProperty
      EndProperty
      BorderStyle     =   1
   End
   Begin VB.Frame Frame6 
      Caption         =   "Zone étendu (Ecriture par le maître"
      Height          =   2895
      Left            =   120
      TabIndex        =   26
      Top             =   5040
      Width           =   5415
      Begin VB.Label Label5 
         BorderStyle     =   1  'Fixed Single
         Caption         =   "Label5"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   6
         Left            =   120
         TabIndex        =   33
         Top             =   2400
         Width           =   5175
      End
      Begin VB.Label Label5 
         BorderStyle     =   1  'Fixed Single
         Caption         =   "Label5"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   5
         Left            =   120
         TabIndex        =   32
         Top             =   2040
         Width           =   5175
      End
      Begin VB.Label Label5 
         BorderStyle     =   1  'Fixed Single
         Caption         =   "Label5"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   4
         Left            =   120
         TabIndex        =   31
         Top             =   1680
         Width           =   5175
      End
      Begin VB.Label Label5 
         BorderStyle     =   1  'Fixed Single
         Caption         =   "Label5"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   3
         Left            =   120
         TabIndex        =   30
         Top             =   1320
         Width           =   5175
      End
      Begin VB.Label Label5 
         BorderStyle     =   1  'Fixed Single
         Caption         =   "Label5"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   2
         Left            =   120
         TabIndex        =   29
         Top             =   960
         Width           =   5175
      End
      Begin VB.Label Label5 
         BorderStyle     =   1  'Fixed Single
         Caption         =   "Label5"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   1
         Left            =   120
         TabIndex        =   28
         Top             =   600
         Width           =   5175
      End
      Begin VB.Label Label5 
         BorderStyle     =   1  'Fixed Single
         Caption         =   "Label5"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   0
         Left            =   120
         TabIndex        =   27
         Top             =   240
         Width           =   5175
      End
   End
   Begin VB.Frame Frame5 
      Caption         =   "Commande Bits"
      Height          =   735
      Left            =   2880
      TabIndex        =   21
      Top             =   9000
      Width           =   2655
      Begin VB.Label Label4 
         Alignment       =   2  'Center
         BorderStyle     =   1  'Fixed Single
         Caption         =   "B4"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   3
         Left            =   1920
         TabIndex        =   25
         Top             =   240
         Width           =   615
      End
      Begin VB.Label Label4 
         Alignment       =   2  'Center
         BorderStyle     =   1  'Fixed Single
         Caption         =   "B3"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   2
         Left            =   1320
         TabIndex        =   24
         Top             =   240
         Width           =   615
      End
      Begin VB.Label Label4 
         Alignment       =   2  'Center
         BorderStyle     =   1  'Fixed Single
         Caption         =   "B2"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   1
         Left            =   720
         TabIndex        =   23
         Top             =   240
         Width           =   615
      End
      Begin VB.Label Label4 
         Alignment       =   2  'Center
         BorderStyle     =   1  'Fixed Single
         Caption         =   "B1"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   0
         Left            =   120
         TabIndex        =   22
         Top             =   240
         Width           =   615
      End
   End
   Begin VB.Frame Frame4 
      Caption         =   "Sortie TOR"
      Height          =   735
      Left            =   120
      TabIndex        =   16
      Top             =   9000
      Width           =   2655
      Begin VB.Label Label3 
         Alignment       =   2  'Center
         BorderStyle     =   1  'Fixed Single
         Caption         =   "S4"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   3
         Left            =   1920
         TabIndex        =   20
         Top             =   240
         Width           =   615
      End
      Begin VB.Label Label3 
         Alignment       =   2  'Center
         BorderStyle     =   1  'Fixed Single
         Caption         =   "S3"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   2
         Left            =   1320
         TabIndex        =   19
         Top             =   240
         Width           =   615
      End
      Begin VB.Label Label3 
         Alignment       =   2  'Center
         BorderStyle     =   1  'Fixed Single
         Caption         =   "S2"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   1
         Left            =   720
         TabIndex        =   18
         Top             =   240
         Width           =   615
      End
      Begin VB.Label Label3 
         Alignment       =   2  'Center
         BorderStyle     =   1  'Fixed Single
         Caption         =   "S1"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   0
         Left            =   120
         TabIndex        =   17
         Top             =   240
         Width           =   615
      End
   End
   Begin VB.Frame Frame3 
      Caption         =   "Entrées TOR"
      Height          =   855
      Left            =   120
      TabIndex        =   14
      Top             =   8040
      Width           =   5415
      Begin MSComctlLib.Toolbar Toolbar1 
         Height          =   420
         Left            =   120
         TabIndex        =   15
         Top             =   240
         Width           =   5175
         _ExtentX        =   9128
         _ExtentY        =   741
         ButtonWidth     =   1138
         ButtonHeight    =   582
         Appearance      =   1
         TextAlignment   =   1
         _Version        =   393216
         BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
            NumButtons      =   8
            BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "E1"
               Style           =   1
               Object.Width           =   1e-4
            EndProperty
            BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "E2"
               Style           =   1
            EndProperty
            BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "E3"
               Style           =   1
            EndProperty
            BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "E4"
               Style           =   1
            EndProperty
            BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "E5"
               Style           =   1
            EndProperty
            BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "E6"
               Style           =   1
            EndProperty
            BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "E7"
               Style           =   1
            EndProperty
            BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "E8"
               Style           =   1
            EndProperty
         EndProperty
         BorderStyle     =   1
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "Ecriture par le maître"
      Height          =   1575
      Left            =   1680
      TabIndex        =   6
      Top             =   3360
      Width           =   2535
      Begin VB.Shape Shape1 
         Height          =   1215
         Left            =   240
         Top             =   240
         Width           =   2055
      End
      Begin VB.Label Label2 
         BackColor       =   &H0000C0C0&
         Caption         =   "Label2"
         BeginProperty Font 
            Name            =   "Courier"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   4
         Left            =   240
         TabIndex        =   11
         Top             =   1200
         Width           =   2055
      End
      Begin VB.Label Label2 
         BackColor       =   &H0000C0C0&
         Caption         =   "Label2"
         BeginProperty Font 
            Name            =   "Courier"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   3
         Left            =   240
         TabIndex        =   10
         Top             =   960
         Width           =   2055
      End
      Begin VB.Label Label2 
         BackColor       =   &H0000C0C0&
         Caption         =   "Label2"
         BeginProperty Font 
            Name            =   "Courier"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   2
         Left            =   240
         TabIndex        =   9
         Top             =   720
         Width           =   2055
      End
      Begin VB.Label Label2 
         BackColor       =   &H0000C0C0&
         Caption         =   "123456789012345"
         BeginProperty Font 
            Name            =   "Courier"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   1
         Left            =   240
         TabIndex        =   8
         Top             =   480
         Width           =   2055
      End
      Begin VB.Label Label2 
         BackColor       =   &H0000C0C0&
         Caption         =   "Label2"
         BeginProperty Font 
            Name            =   "Courier"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   0
         Left            =   240
         TabIndex        =   7
         Top             =   240
         Width           =   2055
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "Lecture par le maître"
      Height          =   2775
      Left            =   120
      TabIndex        =   1
      Top             =   480
      Width           =   5415
      Begin VB.CheckBox Check1 
         Alignment       =   1  'Right Justify
         Caption         =   "Badge Droite Présent"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   1
         Left            =   1320
         TabIndex        =   36
         Top             =   1800
         Width           =   2895
      End
      Begin VB.TextBox Text1 
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   1
         Left            =   2280
         MaxLength       =   40
         TabIndex        =   35
         Text            =   "Text1"
         Top             =   1320
         Width           =   2655
      End
      Begin VB.CommandButton Command1 
         Caption         =   "&Appliquer"
         Height          =   375
         Left            =   120
         TabIndex        =   5
         Top             =   2280
         Width           =   5055
      End
      Begin VB.CheckBox Check1 
         Caption         =   "Badge Gauche Présent"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   0
         Left            =   1320
         TabIndex        =   4
         Top             =   840
         Width           =   2895
      End
      Begin VB.TextBox Text1 
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   0
         Left            =   2280
         MaxLength       =   40
         TabIndex        =   3
         Text            =   "Text1"
         Top             =   360
         Width           =   2655
      End
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         BorderStyle     =   1  'Fixed Single
         Caption         =   "badge Droite"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   1
         Left            =   120
         TabIndex        =   34
         Top             =   1320
         Width           =   2055
      End
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         BorderStyle     =   1  'Fixed Single
         Caption         =   "badge Gauche"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   0
         Left            =   120
         TabIndex        =   2
         Top             =   360
         Width           =   2055
      End
   End
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   375
      Left            =   0
      TabIndex        =   0
      Top             =   9795
      Width           =   5640
      _ExtentX        =   9948
      _ExtentY        =   661
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   3
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar ToucheD 
      Height          =   1410
      Left            =   4320
      TabIndex        =   38
      Top             =   3480
      Width           =   720
      _ExtentX        =   1270
      _ExtentY        =   2487
      ButtonWidth     =   1138
      ButtonHeight    =   582
      TextAlignment   =   1
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   4
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "F1"
            Style           =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "F2"
            Style           =   1
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "F3"
            Style           =   1
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "F4"
            Style           =   1
         EndProperty
      EndProperty
      BorderStyle     =   1
   End
   Begin VB.Label LabelTX 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Emission"
      Height          =   255
      Left            =   2760
      TabIndex        =   13
      Top             =   120
      Width           =   2535
   End
   Begin VB.Label LabelRX 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Réception"
      Height          =   255
      Left            =   120
      TabIndex        =   12
      Top             =   120
      Width           =   2535
   End
End
Attribute VB_Name = "FrmTisi"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
Dim Bras As Integer
Simulateur.Tisi.TxNumeroBadgeG = Left$(Trim$(Text1(0).Text) & Space$(40), 40)
Simulateur.Tisi.TxNumeroBadgeD = Left$(Trim$(Text1(1).Text) & Space$(40), 40)

' Sur Front Montant Badge on positionne les terres pour les bras
' Ainsi que API et Bras Vapeur
' ==============================================================
' Sur front descdendant badge on retire les terres pour les bras

If (Check1(0).Value = 1) And (Not Simulateur.Tisi.TxBadgePresentG) Then
    ' Front Montant
    For Bras = 1 To MAX_BRAS
        'Simulateur.Bras(Bras).TxBrasVapeur = True
        'Simulateur.Bras(Bras).TxSondeAPi = True
        Simulateur.Bras(Bras).TxTerre = True
        ' Prédé
        Simulateur.Bras(Bras).TxPrede = Simulateur.ValeurParDefaut.Prede
        
        Simulateur.Bras(Bras).UpdateWindows = True
        
    Next Bras

ElseIf (Check1(0).Value = 0) And (Simulateur.Tisi.TxBadgePresentG) Then
    ' Front Descendant
    For Bras = 1 To MAX_BRAS
        Simulateur.Bras(Bras).TxTerre = False
        
        Simulateur.Bras(Bras).UpdateWindows = True
        
    Next Bras
    
End If

Simulateur.Tisi.TxBadgePresentG = IIf(Check1(0).Value = 1, True, False)
Simulateur.Tisi.TxBadgePresentD = IIf(Check1(1).Value = 1, True, False)

End Sub

Private Sub Form_Load()
Text1(0).Text = ""
Text1(1).Text = ""
End Sub

Private Sub Form_Resize()
Dim i As Integer
If Me.WindowState = 1 Then Exit Sub
For i = 1 To StatusBar1.Panels.Count
    StatusBar1.Panels(i).Width = StatusBar1.Width / StatusBar1.Panels.Count
Next i

End Sub
Public Sub Affiche()
Dim i As Integer


If Simulateur.Liaison.RXSlave = Simulateur.Tisi.Numero Then
    LabelRX.BackColor = vbYellow
Else
    LabelRX.BackColor = &H8000000F
End If

If Simulateur.Liaison.TXSlave = Simulateur.Tisi.Numero Then
    LabelTX.BackColor = vbYellow
Else
    LabelTX.BackColor = &H8000000F
End If

If Simulateur.Tisi.Disponible Then
    StatusBar1.Panels(1).Text = "N°" & CStr(Simulateur.Tisi.Numero) & " Disponible"
Else
    StatusBar1.Panels(1).Text = "N°" & CStr(Simulateur.Tisi.Numero) & " Indisponible"
End If

StatusBar1.Panels(2).Text = "RX : " & Simulateur.Tisi.RxFrame
StatusBar1.Panels(3).Text = "TX : " & Simulateur.Tisi.TxFrame

For i = 1 To 5
    Label2(i - 1).Caption = Simulateur.Tisi.RxAffichage(i)
Next i

For i = 1 To 4
    Label3(i - 1).BackColor = IIf(Simulateur.Tisi.RxSortie(i), vbGreen, vbWhite)
    Label3(i - 1).ToolTipText = IIf(Simulateur.Tisi.RxSortie(i), "Sortie = 1", "Sortie = 0")
Next i

For i = 1 To 4
    Label4(i - 1).BackColor = IIf(Simulateur.Tisi.RxBits(i), vbGreen, vbWhite)
    Label4(i - 1).ToolTipText = IIf(Simulateur.Tisi.RxBits(i), "Bit = 1", "Bit = 0")
Next i


Label5(0).Caption = "  Mode de marche :   " & Simulateur.Tisi.RxEtenduModeMarche
Label5(1).Caption = "  Type de données :   " & Simulateur.Tisi.RxEtenduTypeData
Label5(2).Caption = "  Code Langue :   " & Simulateur.Tisi.RxEtenduCodeLangue
Label5(3).Caption = "  Numéro de quai :   " & Simulateur.Tisi.RxEtenduNumeroQuai
Label5(4).Caption = "  Nombre total d'enregistrements :   " & Simulateur.Tisi.RxEtenduTotalRecord
Label5(5).Caption = "  Numéro premier enregistrement :   " & Simulateur.Tisi.RxEtenduFirstRecordBloc
Label5(6).Caption = "  Nombre d'enregistrements :   " & Simulateur.Tisi.RxEtenduRecordQuantityBloc
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Dim i As Integer
Dim ETorValue As Long
Dim Mask As Long

i = Button.Index

ETorValue = Simulateur.Tisi.TxETOR

' Bit OFF
' =======
' On positionne tous les bits à 1 sauf celui du bouton
Mask = 2 ^ (i - 1)
Mask = Not Mask
ETorValue = ETorValue And Mask

Select Case Button.Value
    Case 0 ' OFF
    ' Si off on ne modifie pas
    
    Case 1  ' ON
    ' Si On on positionne le Bit correspondant à 1
    Mask = 2 ^ (i - 1)
    ETorValue = ETorValue Or Mask

   
End Select


Simulateur.Tisi.TxETOR = ETorValue
End Sub

Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)

End Sub

Private Sub ToucheD_ButtonClick(ByVal Button As MSComctlLib.Button)
Dim i As Integer
Dim ETorValue As Long
Dim Mask As Long

i = Button.Index

ETorValue = Simulateur.Tisi.TxClavierD

' Bit OFF
' =======
' On positionne tous les bits à 1 sauf celui du bouton
Mask = 2 ^ (i - 1)
Mask = Not Mask
ETorValue = ETorValue And Mask

Select Case Button.Value
    Case 0 ' OFF
    ' Si off on ne modifie pas
    
    Case 1  ' ON
    ' Si On on positionne le Bit correspondant à 1
    Mask = 2 ^ (i - 1)
    ETorValue = ETorValue Or Mask

   
End Select


Simulateur.Tisi.TxClavierD = ETorValue

End Sub

Private Sub ToucheG_ButtonClick(ByVal Button As MSComctlLib.Button)
Dim i As Integer
Dim ETorValue As Long
Dim Mask As Long

i = Button.Index

ETorValue = Simulateur.Tisi.TxClavierG

' Bit OFF
' =======
' On positionne tous les bits à 1 sauf celui du bouton
Mask = 2 ^ (i - 1)
Mask = Not Mask
ETorValue = ETorValue And Mask

Select Case Button.Value
    Case 0 ' OFF
    ' Si off on ne modifie pas
    
    Case 1  ' ON
    ' Si On on positionne le Bit correspondant à 1
    Mask = 2 ^ (i - 1)
    ETorValue = ETorValue Or Mask

   
End Select


Simulateur.Tisi.TxClavierG = ETorValue

End Sub
