Totem_v6 unit TotemV6; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Tela01, Tela02, ExtCtrls, CPort, Tela03, Tela04, Tela05, Tela06, Tela07, Tela07b, Tela08b, Tela08, Tela09, Tela09b, Tela010, DBCtrls, MPlayer, MMSystem; type TForm1 = class(TForm) ComPort1: TComPort; Timer1: TTimer; Tela1: TTela1; Tela2: TTela2; Tela3: TTela3; Tela4: TTela4; Tela5: TTela5; Tela6: TTela6; Tela7: TTela7; Tela7b: TTela7b; Tela8: TTela8; Tela8b: TTela8b; Tela9: TTela9; Tela9b: TTela9b; Tela10: TTela10; Timer2: TTimer; ComPort2: TComPort; Timer3: TTimer; MediaPlayer1: TMediaPlayer; Timer4: TTimer; procedure Timer1Timer(Sender: TObject); procedure FormCreate(Sender: TObject); procedure Tela1TEMPMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela1TEMPMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela2TEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela2TEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela2TEMP2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela2TEMP2MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela3TEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela3TEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela3TEMP2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela3TEMP2MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela3TEMP3MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela3TEMP3MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela3TEMP4MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela3TEMP4MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela5TEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela5TEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela5TEMP2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela5TEMP2MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela7TEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela7TEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela7TEMP2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela7TEMP2MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela7bTEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela7bTEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela7bTEMP2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela7bTEMP2MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela8TEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela8TEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela8TEMP2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela8TEMP2MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela8bTEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela8bTEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela8bTEMP2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela8bTEMP2MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela9TEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela9TEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela9TEMP2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela9TEMP2MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela9TEMP3MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela9TEMP3MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela9TEMP4MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela9TEMP4MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela9bTEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela9bTEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela9bTEMP2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela9bTEMP2MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela9bTEMP3MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela9bTEMP3MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela9bTEMP4MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela9bTEMP4MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela10TEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tela10TEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Timer2Timer(Sender: TObject); procedure Timer3Timer(Sender: TObject); procedure Timer4Timer(Sender: TObject); procedure Tela10P1_a_mapClick(Sender: TObject); procedure Tela10P1_b_mapClick(Sender: TObject); procedure Tela10P1_c_mapClick(Sender: TObject); procedure Tela10P1_d_mapClick(Sender: TObject); procedure Tela10P10_a_mapClick(Sender: TObject); procedure Tela10P10_b_mapClick(Sender: TObject); procedure Tela10P10_c_mapClick(Sender: TObject); procedure Tela10P10_d_mapClick(Sender: TObject); procedure Tela10P10_e_mapClick(Sender: TObject); procedure Tela10P2_a_mapClick(Sender: TObject); procedure Tela10P2_b_mapClick(Sender: TObject); procedure Tela10P3_a_mapClick(Sender: TObject); procedure Tela10P3_b_mapClick(Sender: TObject); procedure Tela10P3_c_mapClick(Sender: TObject); procedure Tela10P3_d_mapClick(Sender: TObject); procedure Tela10P4_a_mapClick(Sender: TObject); procedure Tela10P4_b_mapClick(Sender: TObject); procedure Tela10P4_c_mapClick(Sender: TObject); procedure Tela10P4_d_mapClick(Sender: TObject); procedure Tela10P4_e_mapClick(Sender: TObject); procedure Tela10P4_f_mapClick(Sender: TObject); procedure Tela10P5_a_mapClick(Sender: TObject); procedure Tela10P5_b_mapClick(Sender: TObject); procedure Tela10P5_c_mapClick(Sender: TObject); procedure Tela10P5_d_mapClick(Sender: TObject); procedure Tela10P6_a_mapClick(Sender: TObject); procedure Tela10P6_b_mapClick(Sender: TObject); procedure Tela10P6_c_mapClick(Sender: TObject); procedure Tela10P6_d_mapClick(Sender: TObject); procedure Tela10P7_a_mapClick(Sender: TObject); procedure Tela10P7_b_mapClick(Sender: TObject); procedure Tela10P7_c_mapClick(Sender: TObject); procedure Tela10P7_d_mapClick(Sender: TObject); procedure Tela10P8_a_mapClick(Sender: TObject); procedure Tela10P8_b_mapClick(Sender: TObject); procedure Tela10P8_c_mapClick(Sender: TObject); procedure Tela10P8_d_mapClick(Sender: TObject); procedure Tela10P8_e_mapClick(Sender: TObject); procedure Tela10P9_a_mapClick(Sender: TObject); procedure Tela10P9_b_mapClick(Sender: TObject); procedure Tela10P9_c_mapClick(Sender: TObject); procedure Tela10P9_d_mapClick(Sender: TObject); procedure Tela10P9_e_mapClick(Sender: TObject); private { Private declarations } procedure AppIdle(Sender: TObject; var Done: Boolean); procedure AppMessage(var Msg: TMsg; var Handled: Boolean); public { Public declarations } procedure SaberMais(); procedure SaberMais2(); procedure SaberMais2b(); procedure SalvarDb(); procedure SairDb(); end; var Form1: TForm1; Nsom: integer; Nsoms: string; T_Inicial: string; Txstr0: string; Txstr1: string; Rxstr0: string; Rxstr1: string; TransUV: string; TransVis: string; Categoria: string; Laudo: string; lista: TStringList; Contador: integer; Contador2: integer; Contador3: integer; Contador3b: integer; P1: string; P2: string; P3: string; P4str: string; P4: integer; P4a: integer; P4b: integer; P4c: integer; P4d: integer; P4e: integer; P4f: integer; P5: string; P6: string; P7: string; P8: string; P9: string; P10: string; implementation uses DM_Banco_de_dados_UV; {$R *.dfm} procedure Delay(MSec: Cardinal); var Start: Cardinal; begin Start := GetTickCount; repeat Application.ProcessMessages; until (GetTickCount - Start) >= MSec; end; procedure TForm1.AppIdle(Sender: TObject; var Done: Boolean); begin Timer1.Enabled := True; end; procedure TForm1.AppMessage(var Msg: TMsg; var Handled: Boolean); begin Case Msg.message of WM_LBUTTONDOWN,WM_RBUTTONDOWN,WM_KEYDOWN, WM_MOUSEMOVE :Timer1.Enabled := False; end; end; procedure TForm1.Timer1Timer(Sender: TObject); begin Timer1.Enabled:=False; Timer3.Enabled:=False; //Desligar - 30 minutos sem uso Txstr0:='D'; ComPort1.Open; ComPort1.WriteStr(Txstr0); ComPort1.Close; Tela10.Hide; Tela9b.Hide; Tela9.Hide; Tela8b.Hide; Tela8.Hide; Tela7b.Hide; Tela7.Hide; Tela6.Hide; Tela5.Hide; Tela4.Hide; Tela3.Hide; Tela2.Hide; Tela1.Show; Nsom:=0; Contador:=0; Contador2:=0; Contador3:=0; Contador3b:=0; P4a:=0; P4b:=0; P4c:=0; P4d:=0; P4e:=0; P4f:=0; Application.OnMessage := nil; Application.OnIdle := nil; //Ligar Sensor Presença Timer3.Interval:=300; Timer3.Enabled:=True; end; procedure TForm1.Timer2Timer(Sender: TObject); begin //Reiniciar Timer2.Enabled:=False; showmessage('Falha na Calibração - Retire seus óculos e clique em OK'); Timer2.Enabled:=True; end; procedure TForm1.Timer3Timer(Sender: TObject); var Count1: integer; begin Timer3.Enabled:=False; //Recebe Sinal Txstr1:='L'; try ComPort2.Open; except Timer3.Interval:=20000; Timer3.Enabled:=True; exit; end; ComPort2.WriteStr(Txstr1); delay(150); ComPort2.ReadStr(Rxstr1,Count1); ComPort2.Close; if Rxstr1 = 'S' then Begin Nsoms:=IntToStr(Nsom); MediaPlayer1.FileName:='C:\TotemUV\Som\Totem_0'+Nsoms+'.wav'; MediaPlayer1.Open; MediaPlayer1.Play; INC(Nsom); if Nsom = 13 Then Begin Nsom:=0; end; Timer3.Interval:=20000; end; if Rxstr1 = 'N' then Begin Timer3.Interval:=1000; end; Timer3.Enabled:=True; end; procedure TForm1.Timer4Timer(Sender: TObject); begin Timer4.Enabled:=False; If Contador2 <= 0 then begin Tela5.Fim1.Hide; Tela5.Move1.Show; Delay(1000); end; If Contador2 = 1 then begin Tela5.Move1.Hide; Tela5.Move2.Show; end; If Contador2 = 2 then begin Tela5.Move2.Hide; Tela5.Move3.Show; end; If Contador2 = 3 then begin Tela5.Move3.Hide; Tela5.Move4.Show; end; If Contador2 = 4 then begin Tela5.Move4.Hide; Tela5.Put1.Show; end; If Contador2 = 5 then begin Tela5.Put1.Hide; Tela5.Put2.Show; end; If Contador2 = 6 then begin Tela5.Put2.Hide; Tela5.Put3.Show; end; If Contador2 = 7 then begin Tela5.Put3.Hide; Tela5.Put4.Show; end; If Contador2 = 8 then begin Tela5.Put4.Hide; Tela5.Down1.Show; end; If Contador2 = 9 then begin Tela5.Down1.Hide; Tela5.Down2.Show; end; If Contador2 = 10 then begin Tela5.Down2.Hide; Tela5.Down3.Show; end; If Contador2 = 11 then begin Tela5.Down3.Hide; Tela5.Down4.Show; end; If Contador2 >= 12 then begin Tela5.Down4.Hide; Tela5.Fim1.Show; Tela5.TEMP2.Visible:=True; Tela5.Fundo5.Picture:=Tela5.BEstaticoEn.Picture; Contador2 := -1; Delay(2000); end; INC(contador2); Timer4.Enabled:=True; end; procedure TForm1.FormCreate(Sender: TObject); begin Application.OnMessage := AppMessage; Application.OnIdle := AppIdle; Nsom:=0; Contador:=0; Contador2:=0; Contador3:=0; Contador3b:=0; P4a:=0; P4b:=0; P4c:=0; P4d:=0; P4e:=0; P4f:=0; end; //Tela1 procedure TForm1.Tela1TEMPMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela1.Fundo1.Picture:=Tela1.BAperteAqui.Picture; end; procedure TForm1.Tela1TEMPMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin //Desligar Sensor Presença MediaPlayer1.Close; Timer1.Enabled:=False; Timer3.Enabled:=False; Application.OnMessage := AppMessage; Application.OnIdle := AppIdle; Delay(350); T_Inicial:=FormatDateTime('hh:mm:ss', Now); Tela1.Fundo1.Picture:=Tela1.BEstatico.Picture; //Iniciar Txstr0:='I'; try ComPort1.Open; except Tela2.Hide; Tela1.Show; Timer3.Interval:=20000; Timer3.Enabled:=True; exit; end; ComPort1.WriteStr(Txstr0); ComPort1.Close; Tela1.Hide; Tela2.Show; end; //Tela2 procedure TForm1.Tela2TEMP2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela2.Fundo2.Picture:=Tela2.BAvancar.Picture; end; procedure TForm1.Tela2TEMP2MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Delay(350); Tela2.Fundo2.Picture:=Tela2.BEstatico.Picture; Tela2.Hide; Tela3.Show; end; procedure TForm1.Tela2TEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela2.Fundo2.Picture:=Tela2.BSair.Picture; end; procedure TForm1.Tela2TEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Delay(350); Tela2.Fundo2.Picture:=Tela2.BEstatico.Picture; Tela2.Hide; Tela1.Show; Timer3.Interval:=20000; Timer3.Enabled:=True; end; //Tela3 procedure TForm1.Tela3TEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela3.Fundo3.Picture:=Tela3.BSair.Picture; end; procedure TForm1.Tela3TEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Delay(350); Tela3.Fundo3.Picture:=Tela3.BEstatico.Picture; Contador:=0; Tela3.Texto1.Show; Tela3.Texto2.Hide; Tela3.Texto3.Hide; Tela3.Texto4.Hide; Tela3.Texto5.Hide; Tela3.Hide; Tela1.Show; Timer3.Interval:=20000; Timer3.Enabled:=True; end; procedure TForm1.Tela3TEMP2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela3.Fundo3.Picture:=Tela3.BTestarOculos.Picture; end; procedure TForm1.Tela3TEMP2MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var CountC: integer; begin Delay(350); Tela3.Fundo3.Picture:=Tela3.BEstatico.Picture; Tela3.Hide; Contador:=0; Tela3.Texto1.Show; Tela3.Texto2.Hide; Tela3.Texto3.Hide; Tela3.Texto4.Hide; Tela3.Texto5.Hide; Tela4.Show; //Calibrar Timer2.Enabled:=True; Delay(2000); Txstr0:='C'; ComPort1.Open; ComPort1.WriteStr(Txstr0); delay(100); while Rxstr0 <> 'F' do Begin delay(100); ComPort1.ReadStr(Rxstr0,CountC); end; ComPort1.Close; Timer2.Enabled:=False; Delay(1000); Tela4.Hide; Tela5.TEMP2.Visible:=False; Tela5.Fundo5.Picture:=Tela5.BEstaticoNot.Picture; Tela5.Show; Timer4.Enabled:=True; end; procedure TForm1.Tela3TEMP3MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela3.Fundo3.Picture:=Tela3.BAnterior.Picture; end; procedure TForm1.Tela3TEMP3MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin DEC(contador); SaberMais(); Delay(350); Tela3.Fundo3.Picture:=Tela3.BEstatico.Picture; end; procedure TForm1.Tela3TEMP4MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela3.Fundo3.Picture:=Tela3.BProximo.Picture; end; procedure TForm1.Tela3TEMP4MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin INC(contador); SaberMais(); Delay(350); Tela3.Fundo3.Picture:=Tela3.BEstatico.Picture; end; procedure TForm1.SaberMais; begin If Contador = 0 then begin Tela3.Texto2.Hide; Tela3.Texto5.Hide; Tela3.Texto1.Show; end; If Contador = 1 then begin Tela3.Texto1.Hide; Tela3.Texto3.Hide; Tela3.Texto2.Show; end; If Contador = 2 then begin Tela3.Texto2.Hide; Tela3.Texto4.Hide; Tela3.Texto3.Show; end; If Contador = 3 then begin Tela3.Texto3.Hide; Tela3.Texto5.Hide; Tela3.Texto4.Show; end; If Contador = 4 then begin Tela3.Texto4.Hide; Tela3.Texto1.Hide; Tela3.Texto5.Show; end; If Contador >= 5 then begin Contador:=0; Tela3.Texto5.Hide; Tela3.Texto1.Show; end; If Contador < 0 then begin Contador:=4; Tela3.Texto1.Hide; Tela3.Texto5.Show; end; end; //Tela5 procedure TForm1.Tela5TEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela5.Fundo5.Picture:=Tela5.BSair.Picture; end; procedure TForm1.Tela5TEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Delay(350); Tela5.Fundo5.Picture:=Tela5.BEstaticoEn.Picture; Contador2:=0; Timer4.Enabled:=False; Tela5.Move1.Hide; Tela5.Move2.Hide; Tela5.Move3.Hide; Tela5.Move4.Hide; Tela5.Put1.Hide; Tela5.Put2.Hide; Tela5.Put3.Hide; Tela5.Put4.Hide; Tela5.Down1.Hide; Tela5.Down2.Hide; Tela5.Down3.Hide; Tela5.Down4.Hide; Tela5.Fim1.Hide; Tela5.Hide; Tela5.Fundo5.Picture:=Tela5.BEstaticoNot.Picture; Tela1.Show; Timer3.Interval:=20000; Timer3.Enabled:=True; end; procedure TForm1.Tela5TEMP2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela5.Fundo5.Picture:=Tela5.BTestarOculos.Picture; end; procedure TForm1.Tela5TEMP2MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var Count: integer; begin Delay(350); Tela5.Fundo5.Picture:=Tela5.BEstaticoEn.Picture; Contador2:=0; Timer4.Enabled:=False; Tela5.Move1.Show; Tela5.Move2.Hide; Tela5.Move3.Hide; Tela5.Move4.Hide; Tela5.Put1.Hide; Tela5.Put2.Hide; Tela5.Put3.Hide; Tela5.Put4.Hide; Tela5.Down1.Hide; Tela5.Down2.Hide; Tela5.Down3.Hide; Tela5.Down4.Hide; Tela5.Fim1.Hide; Tela5.Hide; Tela5.Fundo5.Picture:=Tela5.BEstaticoNot.Picture; Tela6.Show; //Medir Delay(3000); Txstr0:='M'; lista := TStringList.Create; ComPort1.Open; ComPort1.WriteStr(Txstr0); Delay(100); ComPort1.ReadStr(Rxstr0,Count); ExtractStrings(['|'],[' '],pchar(RXstr0),lista); TransUV:=lista.Strings[0]; TransVis:=lista.Strings[1]; Categoria:=lista.Strings[2]; Laudo:=lista.Strings[3]; FreeAndNil(lista); ComPort1.Close; Tela6.Hide; //Laudo:='A'; If Laudo = 'A' then begin Tela7.Show; Tela7.TUV.Caption:=TransUV+'%'; Tela7.TUV.Show; Tela7.CAT.Caption:='CATEGORIA '+Categoria; Tela7.CAT.Show; Delay(250); MediaPlayer1.FileName:='C:\TotemUV\Som\Aprovado_00.wav'; MediaPlayer1.Open; MediaPlayer1.Play; end; If Laudo = 'R' then begin Tela7b.Show; Tela7b.TUV.Caption:=TransUV+'%'; Tela7b.TUV.Show; Tela7b.CAT.Caption:='CATEGORIA '+Categoria; Tela7b.CAT.Show; Delay(250); MediaPlayer1.FileName:='C:\TotemUV\Som\Reprovado_00.wav'; MediaPlayer1.Open; MediaPlayer1.Play; end; end; //Tela7 procedure TForm1.Tela7TEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela7.Fundo7.Picture:=Tela7.BSair.Picture; end; procedure TForm1.Tela7TEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Delay(350); SairDb(); Tela7.Fundo7.Picture:=Tela7.BEstatico.Picture; Tela7.Hide; MediaPlayer1.Close; Tela1.Show; Timer3.Interval:=20000; Timer3.Enabled:=True; end; procedure TForm1.Tela7TEMP2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela7.Fundo7.Picture:=Tela7.BAvancar.Picture; end; procedure TForm1.Tela7TEMP2MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Delay(350); Tela7.Fundo7.Picture:=Tela7.BEstatico.Picture; Tela7.Hide; MediaPlayer1.Close; Tela8.Show; Tela8.TUV.Caption:=TransUV+'%'; Tela8.TUV.Show; Tela8.CAT.Caption:='CATEGORIA '+Categoria; Tela8.CAT.Show; Tela8.TUVb.Caption:=TransUV+'%'; Tela8.TUVb.Show; Tela8.CATb.Caption:=Categoria; Tela8.CATb.Show; If Categoria = '0' then begin Tela8.Resultado0.Show; end; If Categoria = '1' then begin Tela8.Resultado1.Show; end; If Categoria = '2' then begin Tela8.Resultado2.Show; end; If Categoria = '3' then begin Tela8.Resultado3.Show; end; If Categoria = '4' then begin Tela8.Resultado4.Show; end; end; //Tela7b procedure TForm1.Tela7bTEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela7b.Fundo7b.Picture:=Tela7b.BSair.Picture; end; procedure TForm1.Tela7bTEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Delay(350); SairDb(); Tela7b.Fundo7b.Picture:=Tela7b.BEstatico.Picture; Tela7b.Hide; MediaPlayer1.Close; Tela1.Show; Timer3.Interval:=20000; Timer3.Enabled:=True; end; procedure TForm1.Tela7bTEMP2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela7b.Fundo7b.Picture:=Tela7b.BAvancar.Picture; end; procedure TForm1.Tela7bTEMP2MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Delay(350); Tela7b.Fundo7b.Picture:=Tela7b.BEstatico.Picture; Tela7b.Hide; MediaPlayer1.Close; Tela8b.Show; Tela8b.TUV.Caption:=TransUV+'%'; Tela8b.TUV.Show; Tela8b.CAT.Caption:='CATEGORIA '+Categoria; Tela8b.CAT.Show; Tela8b.TUVb.Caption:=TransUV+'%'; Tela8b.TUVb.Show; Tela8b.CATb.Caption:=Categoria; Tela8b.CATb.Show; If Categoria = '0' then begin Tela8b.Resultado0.Show; end; If Categoria = '1' then begin Tela8b.Resultado1.Show; end; If Categoria = '2' then begin Tela8b.Resultado2.Show; end; If Categoria = '3' then begin Tela8b.Resultado3.Show; end; If Categoria = '4' then begin Tela8b.Resultado4.Show; end; end; //Tela8 procedure TForm1.Tela8TEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela8.Fundo8.Picture:=Tela8.BSair.Picture; end; procedure TForm1.Tela8TEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Delay(350); SairDb(); Tela8.Fundo8.Picture:=Tela8.BEstatico.Picture; Tela8.Hide; Tela8.Resultado0.Hide; Tela8.Resultado1.Hide; Tela8.Resultado2.Hide; Tela8.Resultado3.Hide; Tela8.Resultado4.Hide; Tela1.Show; Timer3.Interval:=20000; Timer3.Enabled:=True; end; procedure TForm1.Tela8TEMP2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela8.Fundo8.Picture:=Tela8.BSaberMais.Picture; end; procedure TForm1.Tela8TEMP2MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Delay(350); Tela8.Fundo8.Picture:=Tela8.BEstatico.Picture; Tela8.Hide; Tela8.Resultado0.Hide; Tela8.Resultado1.Hide; Tela8.Resultado2.Hide; Tela8.Resultado3.Hide; Tela8.Resultado4.Hide; Tela9.Show; Tela9.TUV.Caption:=TransUV+'%'; Tela9.TUV.Show; Tela9.CAT.Caption:='CATEGORIA '+Categoria; Tela9.CAT.Show; end; //Tela8b procedure TForm1.Tela8bTEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela8b.Fundo8b.Picture:=Tela8b.BSair.Picture; end; procedure TForm1.Tela8bTEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Delay(350); SairDb(); Tela8b.Fundo8b.Picture:=Tela8b.BEstatico.Picture; Tela8b.Hide; Contador3b:=0; Tela8b.Resultado0.Hide; Tela8b.Resultado1.Hide; Tela8b.Resultado2.Hide; Tela8b.Resultado3.Hide; Tela8b.Resultado4.Hide; Tela1.Show; Timer3.Interval:=20000; Timer3.Enabled:=True; end; procedure TForm1.Tela8bTEMP2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela8b.Fundo8b.Picture:=Tela8b.BSaberMais.Picture; end; procedure TForm1.Tela8bTEMP2MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Delay(350); Tela8b.Fundo8b.Picture:=Tela8b.BEstatico.Picture; Tela8b.Hide; Contador3b:=0; Tela8b.Resultado0.Hide; Tela8b.Resultado1.Hide; Tela8b.Resultado2.Hide; Tela8b.Resultado3.Hide; Tela8b.Resultado4.Hide; Tela9b.Show; Tela9b.TUV.Caption:=TransUV+'%'; Tela9b.TUV.Show; Tela9b.CAT.Caption:='CATEGORIA '+Categoria; Tela9b.CAT.Show; end; //Tela9 procedure TForm1.Tela9TEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela9.Fundo9.Picture:=Tela9.BSair.Picture; end; procedure TForm1.Tela9TEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Delay(350); SairDb(); Tela9.Fundo9.Picture:=Tela9.BEstatico.Picture; Contador3:=0; Tela9.Categoria0.Hide; Tela9.Categoria1.Hide; Tela9.Categoria2.Hide; Tela9.Categoria3.Hide; Tela9.Categoria4.Hide; Tela9.Categorias_All.Hide; Tela9.Categoria_Ex.Show; Tela9.Hide; Tela1.Show; Timer3.Interval:=20000; Timer3.Enabled:=True; end; procedure TForm1.Tela9TEMP2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela9.Fundo9.Picture:=Tela9.BSaberMais.Picture; end; procedure TForm1.Tela9TEMP2MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Delay(350); Tela9.Fundo9.Picture:=Tela9.BEstatico.Picture; Tela9.Hide; Contador3:=0; Tela9.Categoria0.Hide; Tela9.Categoria1.Hide; Tela9.Categoria2.Hide; Tela9.Categoria3.Hide; Tela9.Categoria4.Hide; Tela9.Categorias_All.Hide; Tela9.Categoria_Ex.Show; Tela10.Show; end; procedure TForm1.Tela9TEMP3MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela9.Fundo9.Picture:=Tela9.BAnterior.Picture; end; procedure TForm1.Tela9TEMP3MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin DEC(contador3); SaberMais2(); Delay(350); Tela9.Fundo9.Picture:=Tela9.BEstatico.Picture; end; procedure TForm1.Tela9TEMP4MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela9.Fundo9.Picture:=Tela9.BProximo.Picture; end; procedure TForm1.Tela9TEMP4MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin INC(contador3); SaberMais2(); Delay(350); Tela9.Fundo9.Picture:=Tela9.BEstatico.Picture; end; procedure TForm1.SaberMais2; begin If Contador3 = 0 then begin Tela9.Categoria4.Hide; Tela9.Categorias_All.Hide; Tela9.Categoria_Ex.Show; end; If Contador3 = 1 then begin Tela9.Categoria_Ex.Hide; Tela9.Categoria0.Hide; Tela9.Categorias_All.Show; end; If Contador3 = 2 then begin Tela9.Categorias_All.Hide; Tela9.Categoria1.Hide; Tela9.Categoria0.Show; end; If Contador3 = 3 then begin Tela9.Categoria0.Hide; Tela9.Categoria2.Hide; Tela9.Categoria1.Show; end; If Contador3 = 4 then begin Tela9.Categoria1.Hide; Tela9.Categoria3.Hide; Tela9.Categoria2.Show; end; If Contador3 = 5 then begin Tela9.Categoria2.Hide; Tela9.Categoria4.Hide; Tela9.Categoria3.Show; end; If Contador3 = 6 then begin Tela9.Categoria3.Hide; Tela9.Categoria_Ex.Hide; Tela9.Categoria4.Show; end; If Contador3 >= 7 then begin Contador3:=0; Tela9.Categoria4.Hide; Tela9.Categoria_Ex.Show; end; If Contador3 < 0 then begin Contador3:=5; Tela9.Categoria_Ex.Hide; Tela9.Categoria4.Show; end; end; //Tela9b procedure TForm1.Tela9bTEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela9b.Fundo9b.Picture:=Tela9b.BSair.Picture; end; procedure TForm1.Tela9bTEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Delay(350); SairDb(); Tela9b.Fundo9b.Picture:=Tela9b.BEstatico.Picture; Contador3b:=0; Tela9b.Categoria0.Hide; Tela9b.Categoria1.Hide; Tela9b.Categoria2.Hide; Tela9b.Categoria3.Hide; Tela9b.Categorias_All.Hide; Tela9b.Categoria_Ex.Show; Tela9b.Hide; Tela1.Show; Timer3.Interval:=20000; Timer3.Enabled:=True; end; procedure TForm1.Tela9bTEMP2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela9b.Fundo9b.Picture:=Tela9b.BSaberMais.Picture; end; procedure TForm1.Tela9bTEMP2MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Delay(350); Tela9b.Fundo9b.Picture:=Tela9b.BEstatico.Picture; Tela9b.Hide; Contador3b:=0; Tela9b.Categoria0.Hide; Tela9b.Categoria1.Hide; Tela9b.Categoria2.Hide; Tela9b.Categoria3.Hide; Tela9b.Categoria4.Hide; Tela9b.Categorias_All.Hide; Tela9b.Categoria_Ex.Show; Tela10.Show; end; procedure TForm1.Tela9bTEMP3MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela9b.Fundo9b.Picture:=Tela9b.BAnterior.Picture; end; procedure TForm1.Tela9bTEMP3MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin DEC(contador3b); SaberMais2b(); Delay(350); Tela9b.Fundo9b.Picture:=Tela9b.BEstatico.Picture; end; procedure TForm1.Tela9bTEMP4MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela9b.Fundo9b.Picture:=Tela9b.BProximo.Picture; end; procedure TForm1.Tela9bTEMP4MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin INC(contador3b); SaberMais2b(); Delay(350); Tela9b.Fundo9b.Picture:=Tela9b.BEstatico.Picture; end; procedure TForm1.SaberMais2b; begin If Contador3b = 0 then begin Tela9b.Categoria4.Hide; Tela9b.Categorias_All.Hide; Tela9b.Categoria_Ex.Show; end; If Contador3b = 1 then begin Tela9b.Categoria_Ex.Hide; Tela9b.Categoria0.Hide; Tela9b.Categorias_All.Show; end; If Contador3b = 2 then begin Tela9b.Categorias_All.Hide; Tela9b.Categoria1.Hide; Tela9b.Categoria0.Show; end; If Contador3b = 3 then begin Tela9b.Categoria0.Hide; Tela9b.Categoria2.Hide; Tela9b.Categoria1.Show; end; If Contador3b = 4 then begin Tela9b.Categoria1.Hide; Tela9b.Categoria3.Hide; Tela9b.Categoria2.Show; end; If Contador3b = 5 then begin Tela9b.Categoria2.Hide; Tela9b.Categoria4.Hide; Tela9b.Categoria3.Show; end; If Contador3b = 6 then begin Tela9b.Categoria3.Hide; Tela9b.Categoria_Ex.Hide; Tela9b.Categoria4.Show; end; If Contador3b >= 7 then begin Contador3b:=0; Tela9b.Categoria4.Hide; Tela9b.Categoria_Ex.Show; end; If Contador3b < 0 then begin Contador3b:=5; Tela9b.Categoria_Ex.Hide; Tela9b.Categoria4.Show; end; end; //Tela10 procedure TForm1.Tela10TEMP1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Tela10.Fundo10.Picture:=Tela10.BConcluir.Picture; end; procedure TForm1.Tela10TEMP1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin SalvarDb(); Delay(350); Tela10.Fundo10.Picture:=Tela10.BEstatico.Picture; Tela10.Hide; Tela10.P1_a.Picture:=Tela10.Uncheck.Picture; Tela10.P1_b.Picture:=Tela10.Uncheck.Picture; Tela10.P1_c.Picture:=Tela10.Uncheck.Picture; Tela10.P1_d.Picture:=Tela10.Uncheck.Picture; Tela10.P2_a.Picture:=Tela10.Uncheck.Picture; Tela10.P2_b.Picture:=Tela10.Uncheck.Picture; Tela10.P3_a.Picture:=Tela10.Uncheck.Picture; Tela10.P3_b.Picture:=Tela10.Uncheck.Picture; Tela10.P3_c.Picture:=Tela10.Uncheck.Picture; Tela10.P3_d.Picture:=Tela10.Uncheck.Picture; Tela10.P4_a.Picture:=Tela10.Uncheck.Picture; Tela10.P4_b.Picture:=Tela10.Uncheck.Picture; Tela10.P4_c.Picture:=Tela10.Uncheck.Picture; Tela10.P4_d.Picture:=Tela10.Uncheck.Picture; Tela10.P4_e.Picture:=Tela10.Uncheck.Picture; Tela10.P4_f.Picture:=Tela10.Uncheck.Picture; Tela10.P5_a.Picture:=Tela10.Uncheck.Picture; Tela10.P5_b.Picture:=Tela10.Uncheck.Picture; Tela10.P5_c.Picture:=Tela10.Uncheck.Picture; Tela10.P5_d.Picture:=Tela10.Uncheck.Picture; Tela10.P6_a.Picture:=Tela10.Uncheck.Picture; Tela10.P6_b.Picture:=Tela10.Uncheck.Picture; Tela10.P6_c.Picture:=Tela10.Uncheck.Picture; Tela10.P6_d.Picture:=Tela10.Uncheck.Picture; Tela10.P7_a.Picture:=Tela10.Uncheck.Picture; Tela10.P7_b.Picture:=Tela10.Uncheck.Picture; Tela10.P7_c.Picture:=Tela10.Uncheck.Picture; Tela10.P7_d.Picture:=Tela10.Uncheck.Picture; Tela10.P8_a.Picture:=Tela10.Uncheck.Picture; Tela10.P8_b.Picture:=Tela10.Uncheck.Picture; Tela10.P8_c.Picture:=Tela10.Uncheck.Picture; Tela10.P8_d.Picture:=Tela10.Uncheck.Picture; Tela10.P8_e.Picture:=Tela10.Uncheck.Picture; Tela10.P9_a.Picture:=Tela10.Uncheck.Picture; Tela10.P9_b.Picture:=Tela10.Uncheck.Picture; Tela10.P9_c.Picture:=Tela10.Uncheck.Picture; Tela10.P9_d.Picture:=Tela10.Uncheck.Picture; Tela10.P9_e.Picture:=Tela10.Uncheck.Picture; Tela10.P10_a.Picture:=Tela10.Uncheck.Picture; Tela10.P10_b.Picture:=Tela10.Uncheck.Picture; Tela10.P10_c.Picture:=Tela10.Uncheck.Picture; Tela10.P10_d.Picture:=Tela10.Uncheck.Picture; Tela10.P10_e.Picture:=Tela10.Uncheck.Picture; Tela1.Show; Timer3.Interval:=20000; Timer3.Enabled:=True; end; //Enquete //P1-a procedure TForm1.Tela10P1_a_mapClick(Sender: TObject); begin Tela10.P1_a.Picture:=Tela10.Check.Picture; Tela10.P1_b.Picture:=Tela10.Uncheck.Picture; Tela10.P1_c.Picture:=Tela10.Uncheck.Picture; Tela10.P1_d.Picture:=Tela10.Uncheck.Picture; P1:='a'; end; //P1-b procedure TForm1.Tela10P1_b_mapClick(Sender: TObject); begin Tela10.P1_b.Picture:=Tela10.Check.Picture; Tela10.P1_a.Picture:=Tela10.Uncheck.Picture; Tela10.P1_c.Picture:=Tela10.Uncheck.Picture; Tela10.P1_d.Picture:=Tela10.Uncheck.Picture; P1:='b'; end; //P1-c procedure TForm1.Tela10P1_c_mapClick(Sender: TObject); begin Tela10.P1_c.Picture:=Tela10.Check.Picture; Tela10.P1_a.Picture:=Tela10.Uncheck.Picture; Tela10.P1_b.Picture:=Tela10.Uncheck.Picture; Tela10.P1_d.Picture:=Tela10.Uncheck.Picture; P1:='c'; end; //P1-d procedure TForm1.Tela10P1_d_mapClick(Sender: TObject); begin Tela10.P1_d.Picture:=Tela10.Check.Picture; Tela10.P1_a.Picture:=Tela10.Uncheck.Picture; Tela10.P1_b.Picture:=Tela10.Uncheck.Picture; Tela10.P1_c.Picture:=Tela10.Uncheck.Picture; P1:='d'; end; //P2-a procedure TForm1.Tela10P2_a_mapClick(Sender: TObject); begin Tela10.P2_a.Picture:=Tela10.Check.Picture; Tela10.P2_b.Picture:=Tela10.Uncheck.Picture; P2:='a'; end; //P2-b procedure TForm1.Tela10P2_b_mapClick(Sender: TObject); begin Tela10.P2_b.Picture:=Tela10.Check.Picture; Tela10.P2_a.Picture:=Tela10.Uncheck.Picture; P2:='b'; end; //P3-a procedure TForm1.Tela10P3_a_mapClick(Sender: TObject); begin Tela10.P3_a.Picture:=Tela10.Check.Picture; Tela10.P3_b.Picture:=Tela10.Uncheck.Picture; Tela10.P3_c.Picture:=Tela10.Uncheck.Picture; Tela10.P3_d.Picture:=Tela10.Uncheck.Picture; P3:='a'; end; //P3-b procedure TForm1.Tela10P3_b_mapClick(Sender: TObject); begin Tela10.P3_b.Picture:=Tela10.Check.Picture; Tela10.P3_a.Picture:=Tela10.Uncheck.Picture; Tela10.P3_c.Picture:=Tela10.Uncheck.Picture; Tela10.P3_d.Picture:=Tela10.Uncheck.Picture; P3:='b'; end; //P3-c procedure TForm1.Tela10P3_c_mapClick(Sender: TObject); begin Tela10.P3_c.Picture:=Tela10.Check.Picture; Tela10.P3_a.Picture:=Tela10.Uncheck.Picture; Tela10.P3_b.Picture:=Tela10.Uncheck.Picture; Tela10.P3_d.Picture:=Tela10.Uncheck.Picture; P3:='c'; end; //P3-d procedure TForm1.Tela10P3_d_mapClick(Sender: TObject); begin Tela10.P3_d.Picture:=Tela10.Check.Picture; Tela10.P3_a.Picture:=Tela10.Uncheck.Picture; Tela10.P3_b.Picture:=Tela10.Uncheck.Picture; Tela10.P3_c.Picture:=Tela10.Uncheck.Picture; P3:='d'; end; //P4-a procedure TForm1.Tela10P4_a_mapClick(Sender: TObject); begin If P4a = 0 then begin Tela10.P4_a.Picture:=Tela10.Check.Picture; P4:=P4+2; end; If P4a = 1 then begin P4a:=-1; Tela10.P4_a.Picture:=Tela10.Uncheck.Picture; P4:=P4-2; end; INC(P4a); end; //P4-b procedure TForm1.Tela10P4_b_mapClick(Sender: TObject); begin If P4b = 0 then begin Tela10.P4_b.Picture:=Tela10.Check.Picture; P4:=P4+4; end; If P4b = 1 then begin P4b:=-1; P4:=P4-4; Tela10.P4_b.Picture:=Tela10.Uncheck.Picture; end; INC(P4b); end; //P4-c procedure TForm1.Tela10P4_c_mapClick(Sender: TObject); begin If P4c = 0 then begin Tela10.P4_c.Picture:=Tela10.Check.Picture; P4:=P4+8; end; If P4c = 1 then begin P4c:=-1; P4:=P4-8; Tela10.P4_c.Picture:=Tela10.Uncheck.Picture; end; INC(P4c); end; //P4-d procedure TForm1.Tela10P4_d_mapClick(Sender: TObject); begin If P4d = 0 then begin Tela10.P4_d.Picture:=Tela10.Check.Picture; P4:=P4+16; end; If P4d = 1 then begin P4d:=-1; Tela10.P4_d.Picture:=Tela10.Uncheck.Picture; P4:=P4-16; end; INC(P4d); end; //P4-e procedure TForm1.Tela10P4_e_mapClick(Sender: TObject); begin If P4e = 0 then begin Tela10.P4_e.Picture:=Tela10.Check.Picture; P4:=P4+32; end; If P4e = 1 then begin P4e:=-1; Tela10.P4_e.Picture:=Tela10.Uncheck.Picture; P4:=P4-32; end; INC(P4e); end; //P4-f procedure TForm1.Tela10P4_f_mapClick(Sender: TObject); begin If P4f = 0 then begin Tela10.P4_f.Picture:=Tela10.Check.Picture; P4:=P4+64; end; If P4f = 1 then begin P4f:=-1; Tela10.P4_f.Picture:=Tela10.Uncheck.Picture; P4:=P4-64; end; INC(P4f); end; //P5-a procedure TForm1.Tela10P5_a_mapClick(Sender: TObject); begin Tela10.P5_a.Picture:=Tela10.Check.Picture; Tela10.P5_b.Picture:=Tela10.Uncheck.Picture; Tela10.P5_c.Picture:=Tela10.Uncheck.Picture; Tela10.P5_d.Picture:=Tela10.Uncheck.Picture; P5:='a'; end; //P5-b procedure TForm1.Tela10P5_b_mapClick(Sender: TObject); begin Tela10.P5_b.Picture:=Tela10.Check.Picture; Tela10.P5_a.Picture:=Tela10.Uncheck.Picture; Tela10.P5_c.Picture:=Tela10.Uncheck.Picture; Tela10.P5_d.Picture:=Tela10.Uncheck.Picture; P5:='b'; end; //P5-c procedure TForm1.Tela10P5_c_mapClick(Sender: TObject); begin Tela10.P5_c.Picture:=Tela10.Check.Picture; Tela10.P5_a.Picture:=Tela10.Uncheck.Picture; Tela10.P5_b.Picture:=Tela10.Uncheck.Picture; Tela10.P5_d.Picture:=Tela10.Uncheck.Picture; P5:='c'; end; //P5-d procedure TForm1.Tela10P5_d_mapClick(Sender: TObject); begin Tela10.P5_d.Picture:=Tela10.Check.Picture; Tela10.P5_a.Picture:=Tela10.Uncheck.Picture; Tela10.P5_b.Picture:=Tela10.Uncheck.Picture; Tela10.P5_c.Picture:=Tela10.Uncheck.Picture; P5:='d'; end; //P6-a procedure TForm1.Tela10P6_a_mapClick(Sender: TObject); begin Tela10.P6_a.Picture:=Tela10.Check.Picture; Tela10.P6_b.Picture:=Tela10.Uncheck.Picture; Tela10.P6_c.Picture:=Tela10.Uncheck.Picture; Tela10.P6_d.Picture:=Tela10.Uncheck.Picture; P6:='a'; end; //P6-b procedure TForm1.Tela10P6_b_mapClick(Sender: TObject); begin Tela10.P6_b.Picture:=Tela10.Check.Picture; Tela10.P6_a.Picture:=Tela10.Uncheck.Picture; Tela10.P6_c.Picture:=Tela10.Uncheck.Picture; Tela10.P6_d.Picture:=Tela10.Uncheck.Picture; P6:='b'; end; //P6-c procedure TForm1.Tela10P6_c_mapClick(Sender: TObject); begin Tela10.P6_c.Picture:=Tela10.Check.Picture; Tela10.P6_a.Picture:=Tela10.Uncheck.Picture; Tela10.P6_b.Picture:=Tela10.Uncheck.Picture; Tela10.P6_d.Picture:=Tela10.Uncheck.Picture; P6:='c'; end; //P6-d procedure TForm1.Tela10P6_d_mapClick(Sender: TObject); begin Tela10.P6_d.Picture:=Tela10.Check.Picture; Tela10.P6_a.Picture:=Tela10.Uncheck.Picture; Tela10.P6_b.Picture:=Tela10.Uncheck.Picture; Tela10.P6_c.Picture:=Tela10.Uncheck.Picture; P6:='d'; end; //P7-a procedure TForm1.Tela10P7_a_mapClick(Sender: TObject); begin Tela10.P7_a.Picture:=Tela10.Check.Picture; Tela10.P7_b.Picture:=Tela10.Uncheck.Picture; Tela10.P7_c.Picture:=Tela10.Uncheck.Picture; Tela10.P7_d.Picture:=Tela10.Uncheck.Picture; P7:='a'; end; //P7-b procedure TForm1.Tela10P7_b_mapClick(Sender: TObject); begin Tela10.P7_b.Picture:=Tela10.Check.Picture; Tela10.P7_a.Picture:=Tela10.Uncheck.Picture; Tela10.P7_c.Picture:=Tela10.Uncheck.Picture; Tela10.P7_d.Picture:=Tela10.Uncheck.Picture; P7:='b'; end; //P7-c procedure TForm1.Tela10P7_c_mapClick(Sender: TObject); begin Tela10.P7_c.Picture:=Tela10.Check.Picture; Tela10.P7_a.Picture:=Tela10.Uncheck.Picture; Tela10.P7_b.Picture:=Tela10.Uncheck.Picture; Tela10.P7_d.Picture:=Tela10.Uncheck.Picture; P7:='c'; end; //P7-d procedure TForm1.Tela10P7_d_mapClick(Sender: TObject); begin Tela10.P7_d.Picture:=Tela10.Check.Picture; Tela10.P7_a.Picture:=Tela10.Uncheck.Picture; Tela10.P7_b.Picture:=Tela10.Uncheck.Picture; Tela10.P7_c.Picture:=Tela10.Uncheck.Picture; P7:='d'; end; //P8-a procedure TForm1.Tela10P8_a_mapClick(Sender: TObject); begin Tela10.P8_a.Picture:=Tela10.Check.Picture; Tela10.P8_b.Picture:=Tela10.Uncheck.Picture; Tela10.P8_c.Picture:=Tela10.Uncheck.Picture; Tela10.P8_d.Picture:=Tela10.Uncheck.Picture; Tela10.P8_e.Picture:=Tela10.Uncheck.Picture; P8:='a'; end; //P8-b procedure TForm1.Tela10P8_b_mapClick(Sender: TObject); begin Tela10.P8_b.Picture:=Tela10.Check.Picture; Tela10.P8_a.Picture:=Tela10.Uncheck.Picture; Tela10.P8_c.Picture:=Tela10.Uncheck.Picture; Tela10.P8_d.Picture:=Tela10.Uncheck.Picture; Tela10.P8_e.Picture:=Tela10.Uncheck.Picture; P8:='b'; end; //P8-c procedure TForm1.Tela10P8_c_mapClick(Sender: TObject); begin Tela10.P8_c.Picture:=Tela10.Check.Picture; Tela10.P8_a.Picture:=Tela10.Uncheck.Picture; Tela10.P8_b.Picture:=Tela10.Uncheck.Picture; Tela10.P8_d.Picture:=Tela10.Uncheck.Picture; Tela10.P8_e.Picture:=Tela10.Uncheck.Picture; P8:='c'; end; //P8-d procedure TForm1.Tela10P8_d_mapClick(Sender: TObject); begin Tela10.P8_d.Picture:=Tela10.Check.Picture; Tela10.P8_a.Picture:=Tela10.Uncheck.Picture; Tela10.P8_b.Picture:=Tela10.Uncheck.Picture; Tela10.P8_c.Picture:=Tela10.Uncheck.Picture; Tela10.P8_e.Picture:=Tela10.Uncheck.Picture; P8:='d'; end; //P8-e procedure TForm1.Tela10P8_e_mapClick(Sender: TObject); begin Tela10.P8_e.Picture:=Tela10.Check.Picture; Tela10.P8_a.Picture:=Tela10.Uncheck.Picture; Tela10.P8_b.Picture:=Tela10.Uncheck.Picture; Tela10.P8_c.Picture:=Tela10.Uncheck.Picture; Tela10.P8_d.Picture:=Tela10.Uncheck.Picture; P8:='e'; end; //P9-a procedure TForm1.Tela10P9_a_mapClick(Sender: TObject); begin Tela10.P9_a.Picture:=Tela10.Check.Picture; Tela10.P9_b.Picture:=Tela10.Uncheck.Picture; Tela10.P9_c.Picture:=Tela10.Uncheck.Picture; Tela10.P9_d.Picture:=Tela10.Uncheck.Picture; Tela10.P9_e.Picture:=Tela10.Uncheck.Picture; P9:='a'; end; //P9-b procedure TForm1.Tela10P9_b_mapClick(Sender: TObject); begin Tela10.P9_b.Picture:=Tela10.Check.Picture; Tela10.P9_a.Picture:=Tela10.Uncheck.Picture; Tela10.P9_c.Picture:=Tela10.Uncheck.Picture; Tela10.P9_d.Picture:=Tela10.Uncheck.Picture; Tela10.P9_e.Picture:=Tela10.Uncheck.Picture; P9:='b'; end; //P9-c procedure TForm1.Tela10P9_c_mapClick(Sender: TObject); begin Tela10.P9_c.Picture:=Tela10.Check.Picture; Tela10.P9_a.Picture:=Tela10.Uncheck.Picture; Tela10.P9_b.Picture:=Tela10.Uncheck.Picture; Tela10.P9_d.Picture:=Tela10.Uncheck.Picture; Tela10.P9_e.Picture:=Tela10.Uncheck.Picture; P9:='c'; end; //P9-d procedure TForm1.Tela10P9_d_mapClick(Sender: TObject); begin Tela10.P9_d.Picture:=Tela10.Check.Picture; Tela10.P9_a.Picture:=Tela10.Uncheck.Picture; Tela10.P9_b.Picture:=Tela10.Uncheck.Picture; Tela10.P9_c.Picture:=Tela10.Uncheck.Picture; Tela10.P9_e.Picture:=Tela10.Uncheck.Picture; P9:='d'; end; //P9-e procedure TForm1.Tela10P9_e_mapClick(Sender: TObject); begin Tela10.P9_e.Picture:=Tela10.Check.Picture; Tela10.P9_a.Picture:=Tela10.Uncheck.Picture; Tela10.P9_b.Picture:=Tela10.Uncheck.Picture; Tela10.P9_c.Picture:=Tela10.Uncheck.Picture; Tela10.P9_d.Picture:=Tela10.Uncheck.Picture; P9:='e'; end; //P10-a procedure TForm1.Tela10P10_a_mapClick(Sender: TObject); begin Tela10.P10_a.Picture:=Tela10.Check.Picture; Tela10.P10_b.Picture:=Tela10.Uncheck.Picture; Tela10.P10_c.Picture:=Tela10.Uncheck.Picture; Tela10.P10_d.Picture:=Tela10.Uncheck.Picture; Tela10.P10_e.Picture:=Tela10.Uncheck.Picture; P10:='a'; end; //P10-b procedure TForm1.Tela10P10_b_mapClick(Sender: TObject); begin Tela10.P10_b.Picture:=Tela10.Check.Picture; Tela10.P10_a.Picture:=Tela10.Uncheck.Picture; Tela10.P10_c.Picture:=Tela10.Uncheck.Picture; Tela10.P10_d.Picture:=Tela10.Uncheck.Picture; Tela10.P10_e.Picture:=Tela10.Uncheck.Picture; P10:='b'; end; //P10-c procedure TForm1.Tela10P10_c_mapClick(Sender: TObject); begin Tela10.P10_c.Picture:=Tela10.Check.Picture; Tela10.P10_a.Picture:=Tela10.Uncheck.Picture; Tela10.P10_b.Picture:=Tela10.Uncheck.Picture; Tela10.P10_d.Picture:=Tela10.Uncheck.Picture; Tela10.P10_e.Picture:=Tela10.Uncheck.Picture; P10:='c'; end; //P10-d procedure TForm1.Tela10P10_d_mapClick(Sender: TObject); begin Tela10.P10_d.Picture:=Tela10.Check.Picture; Tela10.P10_a.Picture:=Tela10.Uncheck.Picture; Tela10.P10_b.Picture:=Tela10.Uncheck.Picture; Tela10.P10_c.Picture:=Tela10.Uncheck.Picture; Tela10.P10_e.Picture:=Tela10.Uncheck.Picture; P10:='d'; end; //P10-e procedure TForm1.Tela10P10_e_mapClick(Sender: TObject); begin Tela10.P10_e.Picture:=Tela10.Check.Picture; Tela10.P10_a.Picture:=Tela10.Uncheck.Picture; Tela10.P10_b.Picture:=Tela10.Uncheck.Picture; Tela10.P10_c.Picture:=Tela10.Uncheck.Picture; Tela10.P10_d.Picture:=Tela10.Uncheck.Picture; P10:='e'; end; procedure Tform1.SalvarDb; begin Banco_de_Dados_UV.IB_Tabela_UV.Insert; Tela10.DBEdit2.Text:=TransUV; Tela10.DBEdit3.Text:=TransVis; Tela10.DBEdit4.Text:=Categoria; Tela10.DBEdit5.Text:=Laudo; Tela10.DBEdit6.Text:=P1; Tela10.DBEdit7.Text:=P2; Tela10.DBEdit8.Text:=P3; P4str:=IntToStr(P4); Tela10.DBEdit9.Text:=P4str; Tela10.DBEdit10.Text:=P5; Tela10.DBEdit11.Text:=P6; Tela10.DBEdit12.Text:=P7; Tela10.DBEdit13.Text:=P8; Tela10.DBEdit14.Text:=P9; Tela10.DBEdit15.Text:=P10; Tela10.DBEdit16.Text:=T_Inicial; Tela10.DBEdit17.Text:=FormatDateTime('hh:mm:ss', Now); Tela10.DBEdit18.Text:=FormatDateTime('dd/mm/yyyy', Now); Banco_de_Dados_UV.IB_Tabela_UV.Post; TransUV:=''; TransVis:=''; Categoria:=''; Laudo:=''; P1:=''; P2:=''; P3:=''; P4:=0; P4str:=''; P5:=''; P6:=''; P7:=''; P8:=''; P9:=''; P10:=''; end; procedure Tform1.SairDb; begin Banco_de_Dados_UV.IB_Tabela_UV.Insert; Tela10.DBEdit2.Text:=TransUV; Tela10.DBEdit3.Text:=TransVis; Tela10.DBEdit4.Text:=Categoria; Tela10.DBEdit5.Text:=Laudo; Tela10.DBEdit16.Text:=T_Inicial; Tela10.DBEdit17.Text:=FormatDateTime('hh:mm:ss', Now); Tela10.DBEdit18.Text:=FormatDateTime('dd/mm/yyyy', Now); Banco_de_Dados_UV.IB_Tabela_UV.Post; TransUV:=''; TransVis:=''; Categoria:=''; Laudo:=''; end; end.