commit 063d414ec4fffc1de9b04030297b523fd013530b Author: jdg Date: Wed Sep 1 17:33:51 2021 +0200 first commit (2000-01-12) diff --git a/0000.bat b/0000.bat new file mode 100644 index 0000000..cff187b --- /dev/null +++ b/0000.bat @@ -0,0 +1 @@ +xcopy CtrlMstr.exe D:\temp \ No newline at end of file diff --git a/CtrlMstr-Old_Imgs.rar b/CtrlMstr-Old_Imgs.rar new file mode 100644 index 0000000..f656b54 Binary files /dev/null and b/CtrlMstr-Old_Imgs.rar differ diff --git a/CtrlSystem.bpg b/CtrlSystem.bpg new file mode 100644 index 0000000..8d31797 --- /dev/null +++ b/CtrlSystem.bpg @@ -0,0 +1,33 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = CtrlMstr CtrlDogs DataViewer Install ReajustarDinero.exe +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +CtrlMstr: src\CtrlMstr.bpr + $(MAKE) + +CtrlDogs: src\CtrlDogs.bpr + $(MAKE) + +DataViewer: src\DataViewer.bpr + $(MAKE) + +Install: src\Install.bpr + $(MAKE) + +ReajustarDinero.exe: src\ReajustarDinero.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + + diff --git a/Documentacion/DataViewer.doc b/Documentacion/DataViewer.doc new file mode 100644 index 0000000..b1edc99 Binary files /dev/null and b/Documentacion/DataViewer.doc differ diff --git a/Documentacion/Descripción de los nuevos objetivos del sistema.doc b/Documentacion/Descripción de los nuevos objetivos del sistema.doc new file mode 100644 index 0000000..3c20471 Binary files /dev/null and b/Documentacion/Descripción de los nuevos objetivos del sistema.doc differ diff --git a/Documentacion/LockIt!.doc b/Documentacion/LockIt!.doc new file mode 100644 index 0000000..fe14b2a Binary files /dev/null and b/Documentacion/LockIt!.doc differ diff --git a/Documentacion/PCD.PUB b/Documentacion/PCD.PUB new file mode 100644 index 0000000..039b6d4 Binary files /dev/null and b/Documentacion/PCD.PUB differ diff --git a/InstalacionControl/ControlMaestro.iwz b/InstalacionControl/ControlMaestro.iwz new file mode 100644 index 0000000..4423015 --- /dev/null +++ b/InstalacionControl/ControlMaestro.iwz @@ -0,0 +1,324 @@ + +[InstallShield Wizard] +iDate=1 +iTime=1 +Flag=0 +ISX.EXE Size=679936 +ISX.EXE Date=11:21:52 8/4/1999 +ISX.EXE Ver=2.1.2.62 +SETUP.EXE Size=45312 +SETUP.EXE Date=9:12:24 23/3/1999 +SETUP.EXE Ver=3.0.111.0 +SETUP.INS Size=81342 +SETUP.INS Date=11:26:40 8/4/1999 +SETUP.INS Ver=Not available +_INST16.EX_ Size=81342 +_INST16.EX_ Date=11:26:40 8/4/1999 +_INST16.EX_ Ver=Not available +_INST32I.EX_ Size=294079 +_INST32I.EX_ Date=9:12:22 23/3/1999 +_INST32I.EX_ Ver=Not available +ISDEPEND.INI Size=6857 +ISDEPEND.INI Date=13:24:36 27/12/1999 +ISDEPEND.INI Ver=Not available +SWDEPEND.INI Size=9711 +SWDEPEND.INI Date=13:24:40 27/12/1999 +SWDEPEND.INI Ver=Not available +ICOMP.EXE Size=119808 +ICOMP.EXE Date=9:12:24 23/3/1999 +ICOMP.EXE Ver=3.00.062 +SPLIT.EXE Size=90624 +SPLIT.EXE Date=9:12:24 23/3/1999 +SPLIT.EXE Ver=3.00.060 +PACKLIST.EXE Size=87552 +PACKLIST.EXE Date=9:12:24 23/3/1999 +PACKLIST.EXE Ver=3.00.060 +Version=2.12 +DevTool=Borland C++Builder 5 +Platform=Win32 +DisksBuilt=1 +DisksDir=CONTRO~2\650MB\ +TabsVisit=11111111100000011 +LangNum=0 +LangDir= + +[VisualDesign] +AppName=ControlMaestro +AppExe=[Program Files]\ctrlmstr.exe +AppExeFile= +Version=1.0.0.101 +Company=JD soft. +Title=ControlMaestro +TitleType=1 +BackgrndBmp= +BackgrndAlign=4 +Backgrnd=1 +BackgrndColor=10 +Uninstall=1 +UninstallChecked=1 +Silent=1 +SmsMode=0 + +[Types] +Types=1 +Type1Components=1 +Type1Name=Complete +Type1ComponentList=1 + +[Components] +Components=1 +Component1Groups=6 +Component1Name=Application Files +Component1Description=Application files needed to run the application +Component1GroupList=1 2 3 4 5 6 + +[Groups] +Groups=6 +Group1Size=1065435 +Group1Files=2 +Group1Name=Program Files +Group1Dir= +Group1Update=2 +Group1TargetOS=-1 +Group1File1=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\CtrlMstr.exe +Group1File2=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\DataViewer.exe +Group2Size=7808738 +Group2Files=28 +Group2Auto=101 +Group2ID=39001 +Group2Name=BDE/IDAPI Files +Group2Dir=\Common Files\Borland Shared\BDE +Group2Update=-1 +Group2TargetOS=-1 +Group2File1=c:\program\cbuilder\Borland Shared\BDE\IDAPI32.DLL +Group2File1Auto=101 +Group2File2=c:\program\cbuilder\Borland Shared\BDE\IDR20009.DLL +Group2File2Auto=101 +Group2File3=c:\program\cbuilder\Borland Shared\BDE\BLW32.DLL +Group2File3Auto=101 +Group2File4=c:\program\cbuilder\Borland Shared\BDE\BDEADMIN.EXE +Group2File4Auto=101 +Group2File5=c:\program\cbuilder\Borland Shared\BDE\BDEADMIN.HLP +Group2File5Auto=101 +Group2File6=c:\program\cbuilder\Borland Shared\BDE\BDEADMIN.CNT +Group2File6Auto=101 +Group2File7=c:\program\cbuilder\Borland Shared\BDE\BDEADMIN.TOC +Group2File7Auto=101 +Group2File8=c:\program\cbuilder\Borland Shared\BDE\DATAPUMP.HLP +Group2File8Auto=101 +Group2File9=c:\program\cbuilder\Borland Shared\BDE\DATAPUMP.CNT +Group2File9Auto=101 +Group2File10=c:\program\cbuilder\Borland Shared\BDE\IDDR32.DLL +Group2File10Auto=101 +Group2File11=c:\program\cbuilder\Borland Shared\BDE\IDPDX32.DLL +Group2File11Auto=101 +Group2File12=c:\program\cbuilder\Borland Shared\BDE\IDSQL32.DLL +Group2File12Auto=101 +Group2File13=c:\program\cbuilder\Borland Shared\BDE\IDBAT32.DLL +Group2File13Auto=101 +Group2File14=c:\program\cbuilder\Borland Shared\BDE\IDQBE32.DLL +Group2File14Auto=101 +Group2File15=c:\program\cbuilder\Borland Shared\BDE\IDDBAS32.DLL +Group2File15Auto=101 +Group2File16=c:\program\cbuilder\Borland Shared\BDE\IDASCI32.DLL +Group2File16Auto=101 +Group2File17=c:\program\cbuilder\Borland Shared\BDE\IDODBC32.DLL +Group2File17Auto=101 +Group2File18=c:\program\cbuilder\Borland Shared\BDE\IDDAO32.DLL +Group2File18Auto=101 +Group2File19=c:\program\cbuilder\Borland Shared\BDE\IDDA3532.DLL +Group2File19Auto=101 +Group2File20=C:\ARCHIVOS DE PROGRAMA\INSTALLSHIELD\INSTALLSHIELD EXPRESS FOR C++BUILDER 5\redist\IDAPINST.DLL +Group2File20Auto=101 +Group2File21=c:\program\cbuilder\Borland Shared\BDE\BANTAM.DLL +Group2File21Auto=101 +Group2File22=c:\program\cbuilder\Borland Shared\BDE\USA.BTL +Group2File22Auto=101 +Group2File23=c:\program\cbuilder\Borland Shared\BDE\EUROPE.BTL +Group2File23Auto=101 +Group2File24=c:\program\cbuilder\Borland Shared\BDE\CEEUROPE.BTL +Group2File24Auto=101 +Group2File25=c:\program\cbuilder\Borland Shared\BDE\JAPAN.BTL +Group2File25Auto=101 +Group2File26=c:\program\cbuilder\Borland Shared\BDE\OTHER.BTL +Group2File26Auto=101 +Group2File27=c:\program\cbuilder\Borland Shared\BDE\FAREAST.BTL +Group2File27Auto=101 +Group2File28=c:\program\cbuilder\Borland Shared\BDE\CHARSET.CVB +Group2File28Auto=101 +Group3Size=6080 +Group3Files=1 +Group3Auto=98 +Group3ID=38998 +Group3Name=BDE/IDAPI CNF File +Group3Dir=\Common Files\Borland Shared\BDE +Group3Update=-1 +Group3TargetOS=-1 +Group3File1=C:\ARCHIVOS DE PROGRAMA\INSTALLSHIELD\INSTALLSHIELD EXPRESS FOR C++BUILDER 5\redist\IDAPI.CNF +Group3File1Auto=98 +Group4Size=183808 +Group4Files=1 +Group4Auto=58 +Group4ID=38958 +Group4Name=System Files - WinSysDir +Group4Dir= +Group4Update=-1 +Group4TargetOS=-1 +Group4File1=C:\WIN98\SYSTEM\BDEADMIN.CPL +Group4File1Auto=58 +Group5Size=77824 +Group5Files=15 +Group5Name=datos +Group5Dir=\DATOS +Group5Update=3 +Group5TargetOS=-1 +Group5File1=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\datos\personas.YG5 +Group5File2=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\datos\personas.MB +Group5File3=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\datos\personas.PX +Group5File4=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\datos\personas.XG0 +Group5File5=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\datos\personas.XG1 +Group5File6=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\datos\personas.XG2 +Group5File7=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\datos\personas.XG3 +Group5File8=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\datos\personas.XG4 +Group5File9=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\datos\personas.XG5 +Group5File10=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\datos\personas.YG0 +Group5File11=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\datos\personas.YG1 +Group5File12=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\datos\personas.YG2 +Group5File13=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\datos\personas.YG3 +Group5File14=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\datos\personas.YG4 +Group5File15=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\datos\personas.DB +Group6Size=8918528 +Group6Files=2 +Group6Name=Ayuda +Group6Dir=\Ayuda +Group6Update=0 +Group6TargetOS=-1 +Group6File1=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\Documentacion\LockIt!.doc +Group6File2=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\Documentacion\DataViewer.doc + +[Sequence] +DestinationLocationDir=\JD soft.\ControlMaestro +DatabaseLocationDir=\data +SelectProgramFolderName=ControlMaestro +WelcomeMessage=1 +WelcomeMessageFile= +DestinationLocation=1 +SelectProgramFolder=1 +ProgressBar=1 +SetupComplete=1 +SetupCompleteExec=[Program Files]\ctrlmstr.exe +SetupCompleteExecParam= +SetupCompleteExecReadme= + +[RegEntries] +Reg1Path=HKEY_CLASSES_ROOT +Reg1Val1Type=0 +Reg1Val1Name=(Default) +Reg1Val1Data=(value not set) +Reg1Vals=1 +Reg2Path=HKEY_CURRENT_USER +Reg2Val1Type=0 +Reg2Val1Name=(Default) +Reg2Val1Data=(value not set) +Reg2Vals=1 +Reg3Path=HKEY_LOCAL_MACHINE +Reg3Val1Type=0 +Reg3Val1Name=(Default) +Reg3Val1Data=(value not set) +Reg3Vals=1 +Reg4Path=HKEY_USERS +Reg4Val1Type=0 +Reg4Val1Name=(Default) +Reg4Val1Data=(value not set) +Reg4Vals=1 +Reg5Path=HKEY_CURRENT_CONFIG +Reg5Val1Type=0 +Reg5Val1Name=(Default) +Reg5Val1Data=(value not set) +Reg5Vals=1 +Reg6Path=HKEY_DYN_DATA +Reg6Val1Type=0 +Reg6Val1Name=(Default) +Reg6Val1Data=(value not set) +Reg6Vals=1 +Regs=6 + +[Registry] + +[Icons] +Icons=5 +Icon1Param= +Icon1Cmd=[Program Files]\ctrlmstr.exe +Icon1Description=Control Maestro +Icon1WorkingDir=[Program Files] +Icon1IconFile=[Program Files]\CtrlMstr.exe +Icon1RealFile=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\CtrlMstr.exe +Icon1WhichIcon=0 +Icon1KeyVirtual=0 +Icon1KeyFlags=0 +Icon1StartMenu=3 +Icon1Window=0 +Icon2Param= +Icon2Cmd=[Program Files]\ctrlmstr.exe +Icon2Description=Control Maestro +Icon2WorkingDir=[Program Files] +Icon2IconFile=[Program Files]\CtrlMstr.exe +Icon2RealFile=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\CtrlMstr.exe +Icon2WhichIcon=0 +Icon2KeyVirtual=0 +Icon2KeyFlags=0 +Icon2StartMenu=0 +Icon2Window=0 +Icon3Param= +Icon3Cmd=[Program Files]\DataViewer.exe +Icon3Description=DataViewer +Icon3WorkingDir=[Program Files] +Icon3IconFile=[Program Files]\DataViewer.exe +Icon3RealFile=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\DataViewer.exe +Icon3WhichIcon=0 +Icon3KeyVirtual=0 +Icon3KeyFlags=0 +Icon3StartMenu=0 +Icon3Window=0 +Icon4Param= +Icon4Cmd=[Program Files]\LockIt!.doc +Icon4Description=LockIt! +Icon4WorkingDir=[Program Files] +Icon4IconFile=[Ayuda]\LockIt!.doc +Icon4RealFile=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\Documentacion\LockIt!.doc +Icon4WhichIcon=0 +Icon4KeyVirtual=0 +Icon4KeyFlags=0 +Icon4StartMenu=0 +Icon4Window=0 +Icon5Param= +Icon5Cmd=[Ayuda]\DataViewer.doc +Icon5Description=DataViewer (Ayuda) +Icon5WorkingDir=[Ayuda] +Icon5IconFile= +Icon5RealFile=C:\Mis documentos\Fuentes de Programacion\CtrlMstr\Documentacion\DataViewer.doc +Icon5WhichIcon=0 +Icon5KeyVirtual=0 +Icon5KeyFlags=0 +Icon5StartMenu=0 +Icon5Window=0 + +[Autoexec] +PathDir= +ShareLocks= +ShareFiles= +Command= + +[CopyToFloppy] +DriveOption= +DestinationPath= +DestinationPathOneFile= +Password= + +[ISObjectIDs] +nTotal=2 +ID1=101 +ID2=58 + +[Uninstall] +UserUninstall=0 diff --git a/Thumbs.db b/Thumbs.db new file mode 100644 index 0000000..4f06fa3 Binary files /dev/null and b/Thumbs.db differ diff --git a/bin/CtrlDogs.exe b/bin/CtrlDogs.exe new file mode 100644 index 0000000..5b844b6 Binary files /dev/null and b/bin/CtrlDogs.exe differ diff --git a/bin/CtrlDogs.tds b/bin/CtrlDogs.tds new file mode 100644 index 0000000..72531ba Binary files /dev/null and b/bin/CtrlDogs.tds differ diff --git a/bin/CtrlMstr.exe b/bin/CtrlMstr.exe new file mode 100644 index 0000000..5a67bdd Binary files /dev/null and b/bin/CtrlMstr.exe differ diff --git a/bin/DataViewer.exe b/bin/DataViewer.exe new file mode 100644 index 0000000..ca650b1 Binary files /dev/null and b/bin/DataViewer.exe differ diff --git a/bin/Install.exe b/bin/Install.exe new file mode 100644 index 0000000..f1fa4c2 Binary files /dev/null and b/bin/Install.exe differ diff --git a/bin/ReajustarDinero.exe b/bin/ReajustarDinero.exe new file mode 100644 index 0000000..5ffad6a Binary files /dev/null and b/bin/ReajustarDinero.exe differ diff --git a/bin/WinRCD.log b/bin/WinRCD.log new file mode 100644 index 0000000..2a4fa05 --- /dev/null +++ b/bin/WinRCD.log @@ -0,0 +1,10 @@ + `------ Durante --> 0:00:30 +Terminal ON +07/02/2004 16:32:48 -------- ALARMA SILENCIOSA ACTIVADA ------- +07/02/2004 16:32:48 ATACANTE DESCONOCIDO (ACCESO NO AUTORIZADO) +07/02/2004 16:32:48 -------- ALARMA SILENCIOSA ACTIVADA ------- +07/02/2004 16:32:48 ATACANTE DESCONOCIDO (ACCESO NO AUTORIZADO) +Listas Cargadas: 0C:: 0A +Listas Cargadas: 0S:: 0N +07/02/2004 16:32:48 :: Estoy escuchando ::0.0.0.0 +07/02/2004 16:32:48 /-----> diff --git a/bin/datos/Appl.DB b/bin/datos/Appl.DB new file mode 100644 index 0000000..f94917b Binary files /dev/null and b/bin/datos/Appl.DB differ diff --git a/bin/datos/ElementosCFG.DB b/bin/datos/ElementosCFG.DB new file mode 100644 index 0000000..8b4b2f5 Binary files /dev/null and b/bin/datos/ElementosCFG.DB differ diff --git a/bin/datos/ElementosCFG.PX b/bin/datos/ElementosCFG.PX new file mode 100644 index 0000000..6c74df7 Binary files /dev/null and b/bin/datos/ElementosCFG.PX differ diff --git a/bin/datos/HistorialElementos.DB b/bin/datos/HistorialElementos.DB new file mode 100644 index 0000000..abb7c77 Binary files /dev/null and b/bin/datos/HistorialElementos.DB differ diff --git a/bin/datos/HistorialElementos.PX b/bin/datos/HistorialElementos.PX new file mode 100644 index 0000000..8b28f30 Binary files /dev/null and b/bin/datos/HistorialElementos.PX differ diff --git a/bin/datos/PreciosConexion.DB b/bin/datos/PreciosConexion.DB new file mode 100644 index 0000000..aa7ed19 Binary files /dev/null and b/bin/datos/PreciosConexion.DB differ diff --git a/bin/datos/PreciosConexion.PX b/bin/datos/PreciosConexion.PX new file mode 100644 index 0000000..7d312b1 Binary files /dev/null and b/bin/datos/PreciosConexion.PX differ diff --git a/bin/datos/bonos.PX b/bin/datos/bonos.PX new file mode 100644 index 0000000..5483b5e Binary files /dev/null and b/bin/datos/bonos.PX differ diff --git a/bin/datos/bonos.db b/bin/datos/bonos.db new file mode 100644 index 0000000..b3106f4 Binary files /dev/null and b/bin/datos/bonos.db differ diff --git a/bin/datos/personas.DB b/bin/datos/personas.DB new file mode 100644 index 0000000..e6ecb07 Binary files /dev/null and b/bin/datos/personas.DB differ diff --git a/bin/datos/personas.MB b/bin/datos/personas.MB new file mode 100644 index 0000000..5a8b7d0 Binary files /dev/null and b/bin/datos/personas.MB differ diff --git a/bin/datos/personas.PX b/bin/datos/personas.PX new file mode 100644 index 0000000..3016699 Binary files /dev/null and b/bin/datos/personas.PX differ diff --git a/bin/datos/personas.XG0 b/bin/datos/personas.XG0 new file mode 100644 index 0000000..9c55052 Binary files /dev/null and b/bin/datos/personas.XG0 differ diff --git a/bin/datos/personas.XG1 b/bin/datos/personas.XG1 new file mode 100644 index 0000000..421a103 Binary files /dev/null and b/bin/datos/personas.XG1 differ diff --git a/bin/datos/personas.XG2 b/bin/datos/personas.XG2 new file mode 100644 index 0000000..752f424 Binary files /dev/null and b/bin/datos/personas.XG2 differ diff --git a/bin/datos/personas.XG3 b/bin/datos/personas.XG3 new file mode 100644 index 0000000..168e581 Binary files /dev/null and b/bin/datos/personas.XG3 differ diff --git a/bin/datos/personas.XG4 b/bin/datos/personas.XG4 new file mode 100644 index 0000000..1396a8b Binary files /dev/null and b/bin/datos/personas.XG4 differ diff --git a/bin/datos/personas.XG5 b/bin/datos/personas.XG5 new file mode 100644 index 0000000..6b3c68b Binary files /dev/null and b/bin/datos/personas.XG5 differ diff --git a/bin/datos/personas.YG0 b/bin/datos/personas.YG0 new file mode 100644 index 0000000..437556b Binary files /dev/null and b/bin/datos/personas.YG0 differ diff --git a/bin/datos/personas.YG1 b/bin/datos/personas.YG1 new file mode 100644 index 0000000..02e9d14 Binary files /dev/null and b/bin/datos/personas.YG1 differ diff --git a/bin/datos/personas.YG2 b/bin/datos/personas.YG2 new file mode 100644 index 0000000..f984aa4 Binary files /dev/null and b/bin/datos/personas.YG2 differ diff --git a/bin/datos/personas.YG3 b/bin/datos/personas.YG3 new file mode 100644 index 0000000..853c325 Binary files /dev/null and b/bin/datos/personas.YG3 differ diff --git a/bin/datos/personas.YG4 b/bin/datos/personas.YG4 new file mode 100644 index 0000000..eed8089 Binary files /dev/null and b/bin/datos/personas.YG4 differ diff --git a/bin/datos/personas.YG5 b/bin/datos/personas.YG5 new file mode 100644 index 0000000..2e0c509 Binary files /dev/null and b/bin/datos/personas.YG5 differ diff --git a/cleanup.bat b/cleanup.bat new file mode 100644 index 0000000..42ad5b0 --- /dev/null +++ b/cleanup.bat @@ -0,0 +1,8 @@ +del *.~* +del *.tds +del *.obj + +del *.ilc +del *.ild +del *.ilf +del *.ils \ No newline at end of file diff --git a/src/ComprarBono.cpp b/src/ComprarBono.cpp new file mode 100644 index 0000000..e1e8484 --- /dev/null +++ b/src/ComprarBono.cpp @@ -0,0 +1,58 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop + +#include "ComprarBono.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "CoolForm" +#pragma link "FormularioREUSABLE" +#pragma resource "*.dfm" +TCBono *CBono; +//--------------------------------------------------------------------------- +__fastcall TCBono::TCBono(TComponent* Owner) + : TFormREUSABLE(Owner) +{ + Label1->Caption = TDateTime::CurrentDate(); +} +//--------------------------------------------------------------------------- +void __fastcall TCBono::BitBtn1Click(TObject *Sender) +{ + try { + if ( Horas->Text.ToInt() < 0 || Horas->Text.ToInt() >50 ) Horas->Text = "0"; + } catch(...) { Horas->Text = "0"; + Horas->SelStart= 0; + Horas->SelLength= 1; + } + try { + if ( Min->Text.ToInt() < 0 || Min->Text.ToInt() >59 ) Min->Text = "0"; + } catch(...) { Min->Text = "0"; + Min->SelStart= 0; + Min->SelLength= 1; + } + if ( Horas->Text.ToInt() == 0 ) + { + ShowMessage( "Debe indicar la DURACIÓN DEL BONO" ); + return; + } +try{ + if ( Currency(CosteBono->Text) == 0 ) + { + ShowMessage( "Debe indicar la COSTE DEL BONO" ); + return; + } +} catch(...) { + ShowMessage( "Debe indicar la COSTE DEL BONO" ); + return; +} + + ModalResult = mrOk; +} +//--------------------------------------------------------------------------- +void __fastcall TCBono::Button1Click(TObject *Sender) +{ + ModalResult = mrCancel; +} +//--------------------------------------------------------------------------- + diff --git a/src/ComprarBono.dfm b/src/ComprarBono.dfm new file mode 100644 index 0000000..e1ffdaa --- /dev/null +++ b/src/ComprarBono.dfm @@ -0,0 +1,254 @@ +inherited CBono: TCBono + Left = 328 + Top = 158 + Caption = 'CBono' + OldCreateOrder = True + Position = poOwnerFormCenter + PixelsPerInch = 96 + TextHeight = 13 + inherited CoolForm1: TCoolForm + Mask2 = { + 3002000020000000010000002100000010020000040000000200000064010000 + 030100001A000000020000004E01000003000000170000000300000051010000 + 0400000015000000040000005301000005000000130000000500000055010000 + 0600000012000000060000005601000007000000100000000700000058010000 + 080000000F0000000800000059010000090000000E000000090000005A010000 + 0A0000000C0000000A0000005C0100000C0000000B0000000C0000005D010000 + 0D0000000A0000000D0000005E0100000E000000090000000E0000005F010000 + 1000000008000000100000006001000011000000070000001100000061010000 + 1300000006000000130000006201000015000000050000001500000063010000 + 18000000040000001800000064010000ED00000005000000ED00000063010000 + F000000006000000F000000062010000F200000007000000F200000061010000 + F400000008000000F400000060010000F500000009000000F50000005F010000 + F70000000A000000F70000005E010000F80000000B000000F80000005D010000 + F90000000C000000F90000005C010000FB0000000E000000FB0000005A010000 + FC0000000F000000FC00000059010000FD00000010000000FD00000058010000 + FE00000012000000FE00000056010000FF00000013000000FF00000055010000 + 0001000015000000000100005301000001010000170000000101000051010000 + 020100001A000000020100004E01000003010000} + end + object Terminal: TLabel [1] + Left = 72 + Top = 5 + Width = 209 + Height = 20 + Alignment = taCenter + AutoSize = False + Caption = 'Comprar Bonos' + Font.Charset = DEFAULT_CHARSET + Font.Color = clAqua + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + Transparent = True + end + object Label6: TLabel [2] + Left = 34 + Top = 41 + Width = 145 + Height = 20 + Caption = 'Fecha de compra:' + Font.Charset = DEFAULT_CHARSET + Font.Color = clYellow + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + Transparent = True + end + object Label1: TLabel [3] + Left = 184 + Top = 41 + Width = 71 + Height = 20 + Caption = '12/02/00' + Font.Charset = DEFAULT_CHARSET + Font.Color = clLime + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + Transparent = True + end + object Label2: TLabel [4] + Left = 34 + Top = 89 + Width = 156 + Height = 20 + Caption = 'Tiempo contratado:' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWhite + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + Transparent = True + end + object Label3: TLabel [5] + Left = 34 + Top = 137 + Width = 137 + Height = 20 + Caption = 'Coste del BONO:' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWhite + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + Transparent = True + end + object Label4: TLabel [6] + Left = 306 + Top = 137 + Width = 11 + Height = 20 + Caption = '€' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWhite + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + Transparent = True + end + object Shape4: TShape [7] + Left = 249 + Top = 105 + Width = 7 + Height = 7 + Shape = stCircle + end + object Shape3: TShape [8] + Left = 249 + Top = 93 + Width = 7 + Height = 7 + Shape = stCircle + end + object Bevel1: TBevel [9] + Left = 32 + Top = 72 + Width = 295 + Height = 9 + Shape = bsTopLine + end + object CosteBono: TEdit + Left = 176 + Top = 134 + Width = 121 + Height = 28 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + TabOrder = 1 + end + object Horas: TComboBox + Left = 208 + Top = 88 + Width = 40 + Height = 28 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ItemHeight = 20 + ParentFont = False + TabOrder = 2 + Text = '00' + Items.Strings = ( + '1' + '2' + '3' + '4' + '5' + '6' + '7' + '8' + '9' + '10' + '12' + '15' + '20' + '24') + end + object Min: TComboBox + Left = 258 + Top = 88 + Width = 40 + Height = 28 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ItemHeight = 20 + ParentFont = False + TabOrder = 3 + Text = '00' + Items.Strings = ( + '0' + '5' + '10' + '15' + '20' + '25' + '30' + '35' + '40' + '45' + '50' + '55') + end + object BitBtn1: TBitBtn + Left = 120 + Top = 176 + Width = 121 + Height = 33 + Caption = 'Aceptar' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + TabOrder = 4 + OnClick = BitBtn1Click + Glyph.Data = { + 8E030000424D8E03000000000000760000002800000042000000160000000100 + 04000000000018030000C40E0000C40E00001000000000000000000000000000 + 80000080000000808000800000008000800080800000C0C0C000808080000000 + FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00555555555555 + 5555555555555555599999999555555555555555555555555555550000005555 + 5555555555555555555555599999999999955555555555555555555555555500 + 0000555555555555555555555555559999999999999955555555555555555555 + 55555500000055555555555555555555555559999FFFFFFF999995552AAAAA2B + C4B2ACACC225550000005555555555555555555555559999FFFFFFFFFF999955 + 2AAAAA2C44C2ACAC22225500000022222222222222222255555999999FFFFFFF + FFF999952AAAAA2B4CB2ACACC2A2250000002AAAAA2BC4B2ACACC22555599999 + 99FF000000FF99952CACCA2C44B2AAAAA2A2220000002AAAAA2C44C2ACAC2222 + 550000F999907777770FF9992CAC2A2BC4C2AAAAA2A2A20000002AAAAA2B4CB2 + ACACC2A2254C4C009999FFF00000F9992CACCA2B44B2AAAAA2A2A20000002CAC + CA2C44B2AAAAA2A222C4C40779999FFF777709992222222BBBB2222222A2A200 + 00002CAC2A2BC4C2AAAAA2A2A2CCCC0FFF9999F00000F9992222222BBBB22222 + 2AA2A20000002CACCA2B44B2AAAAA2A2A2CCCC000FF9999F7770F9992AAAAA2B + C4B2ACACC2AAA20000002222222BBBBB222222A2A200000FF0FF9999000FF999 + 2AAAAA2C44C2ACAC22A2A2000000522AAAA2BBBBB2AAAA22A2999FFFFF0FF999 + 9FFFF9992AAAAA2B4CB2ACACC2A2A2000000552222222BBBBB222222A2999FFF + FFF00F9999FFF9992CACCA2C44B2AAAAA2A2A200000055522AAAA2BBBBB2AAAA + 225999FFFFFFF0F9999F99952CAC2A2BC4C2AAAAA2A2A200000055552222222B + BBBB22222259999FFFFFFF00999999952CACCA2B44B2AAAAA2A2A20000005555 + 555555555555555555559999FFFFFFFFF99999552222222BBBBB222222A2A200 + 0000555555555555555555555555599999FFFFFF99999555522AAAA2BBBBB2AA + AA22A20000005555555555555555555555555599999999999999555555222222 + 2BBBBB222222A200000055555555555555555555555555599999999999955555 + 55522AAAA2BBBBB2AAAA22000000555555555555555555555555555559999999 + 955555555555555555555555555555000000} + NumGlyphs = 3 + end +end diff --git a/src/ComprarBono.h b/src/ComprarBono.h new file mode 100644 index 0000000..190b789 --- /dev/null +++ b/src/ComprarBono.h @@ -0,0 +1,41 @@ +//--------------------------------------------------------------------------- + +#ifndef ComprarBonoH +#define ComprarBonoH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "CoolForm.hpp" +#include "FormularioREUSABLE.h" +#include +#include +#include +//--------------------------------------------------------------------------- +class TCBono : public TFormREUSABLE +{ +__published: // IDE-managed Components + TLabel *Terminal; + TLabel *Label6; + TLabel *Label1; + TLabel *Label2; + TLabel *Label3; + TLabel *Label4; + TEdit *CosteBono; + TComboBox *Horas; + TShape *Shape4; + TShape *Shape3; + TComboBox *Min; + TBevel *Bevel1; + TBitBtn *BitBtn1; + void __fastcall BitBtn1Click(TObject *Sender); + void __fastcall Button1Click(TObject *Sender); +private: // User declarations +public: // User declarations + __fastcall TCBono(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TCBono *CBono; +//--------------------------------------------------------------------------- +#endif diff --git a/src/CtrlCfg.cpp b/src/CtrlCfg.cpp new file mode 100644 index 0000000..44612a3 --- /dev/null +++ b/src/CtrlCfg.cpp @@ -0,0 +1,146 @@ +//--------------------------------------------------------------------------- +#include +#include +#pragma hdrstop + +#include "CtrlCfg.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "CoolForm" +#pragma link "FormularioREUSABLE" +#pragma resource "*.dfm" +TElementosCFG *ElementosCFG; +//--------------------------------------------------------------------------- +__fastcall TElementosCFG::TElementosCFG(TComponent* Owner) + : TFormREUSABLE(Owner) +{ + PosiblesCambios = false; + + TbAppl->Active = true; + TbPrecios->Active = true; + TbElementosCFG->Active = true; +} +//--------------------------------------------------------------------------- +void __fastcall TElementosCFG::FormClose(TObject *Sender, TCloseAction &Action) +{ + try { + TbElementosCFG->Post(); + if ( PosiblesCambios ) + { + // Cambios en la CFG. + if ( Application->MessageBox("Ha efectuado cambios en las listas de control.\n\nPara actualizar los clientes, ahora, siga estos pasos:\n\t-Active todos los clientes\n\t-Asegurese de que existe conexion\n\t-Pulse el boton ACEPTAR\n\n\nY espere unos minutos antes de operar con ningún terminal\nhasta que se concluya el envio completo de las listas.\n\nNO DESCONECTE NINGUN TERMINAL HASTA CONCLUIR EL ENVIO\nTanto CLIENTE y SERVIDOR prodrian quedar ALTAMENTE INESTABLE", "¡¡¡ ACTUALIZACION DE LISTAS !!!", MB_OKCANCEL + MB_DEFBUTTON1) == ID_CANCEL ) + PosiblesCambios = false; + } + } catch(...) { + // do nothing + } +} +//--------------------------------------------------------------------------- + +void __fastcall TElementosCFG::TbPreciosBeforeOpen(TDataSet *DataSet) +{ + // Si la tabla no existe, la creamos + if ( access( (TbPrecios -> TableName).c_str(), 0 ) != 0 ) + { + // Usamos la propiedad FielDefs para definir + // las columnas que contendrá la tabla + TbPrecios -> FieldDefs -> Clear(); + + TbPrecios -> FieldDefs -> Add("Tiempo", ftTime, 0, false ); + TbPrecios -> FieldDefs -> Add("Precio", ftCurrency, 0, false ); + + TbPrecios -> IndexDefs -> Clear(); + TbPrecios -> IndexDefs -> Add("Primary", "Tiempo", TIndexOptions() << ixPrimary << ixUnique ); + + // Creamos la base... + TbPrecios -> CreateTable(); + } +} +//--------------------------------------------------------------------------- + + +void __fastcall TElementosCFG::SpeedButton1Click(TObject *Sender) +{ + Terminal->Caption = "Configuración de los Terminales"; + + DBGrid3->Enabled = false; + DBGrid3->Visible = false; + + DBGrid2->Enabled = false; + DBGrid2->Visible = false; + + DBGrid1->Enabled = true; + DBGrid1->Visible = true; +} +//--------------------------------------------------------------------------- + +void __fastcall TElementosCFG::SpeedButton2Click(TObject *Sender) +{ + Terminal->Caption = "Configuración de Precios"; + + DBGrid3->Enabled = false; + DBGrid3->Visible = false; + + DBGrid1->Enabled = false; + DBGrid1->Visible = false; + + DBGrid2->Enabled = true; + DBGrid2->Visible = true; +} +//--------------------------------------------------------------------------- +void __fastcall TElementosCFG::SpeedButton3Click(TObject *Sender) +{ + Terminal->Caption = "Aplicaciones Protegidas"; + + DBGrid2->Enabled = false; + DBGrid2->Visible = false; + + DBGrid1->Enabled = false; + DBGrid1->Visible = false; + + DBGrid3->Enabled = true; + DBGrid3->Visible = true; +} +//--------------------------------------------------------------------------- + +void __fastcall TElementosCFG::TbApplBeforeOpen(TDataSet *DataSet) +{ + // Si la tabla no existe, la creamos + if ( access( (TbAppl -> TableName).c_str(), 0 ) != 0 ) + { + // Usamos la propiedad FielDefs para definir + // las columnas que contendrá la tabla + TbAppl -> FieldDefs -> Clear(); + + TbAppl -> FieldDefs -> Add("idTA", ftString, 14, false ); + TbAppl -> FieldDefs -> Add("NAppl", ftString, 14, false ); + + // Creamos la base... + TbAppl -> CreateTable(); + } + +} +//--------------------------------------------------------------------------- + +void __fastcall TElementosCFG::TbApplBeforeInsert(TDataSet *DataSet) +{ + if ( TbAppl->RecordCount > 100 ) + { + ShowMessage( "Esta versión posee limitaciones,\nrespecto al nº de aplicaciones a bloquear\n¡Sobrepaso el nº máximo permitido!"); + TbAppl->Cancel(); + } +} +//--------------------------------------------------------------------------- + +void __fastcall TElementosCFG::TbApplAfterPost(TDataSet *DataSet) +{ + PosiblesCambios = true; +} +//--------------------------------------------------------------------------- + + +void __fastcall TElementosCFG::Button1Click(TObject *Sender) +{ + ModalResult = mrCancel; +} +//--------------------------------------------------------------------------- diff --git a/src/CtrlCfg.dfm b/src/CtrlCfg.dfm new file mode 100644 index 0000000..75d47a1 Binary files /dev/null and b/src/CtrlCfg.dfm differ diff --git a/src/CtrlCfg.h b/src/CtrlCfg.h new file mode 100644 index 0000000..1453bef --- /dev/null +++ b/src/CtrlCfg.h @@ -0,0 +1,53 @@ +//--------------------------------------------------------------------------- +#ifndef CtrlCfgH +#define CtrlCfgH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "CoolForm.hpp" +#include +#include +#include +#include +#include +#include +#include +#include "FormularioREUSABLE.h" +//--------------------------------------------------------------------------- +class TElementosCFG : public TFormREUSABLE +{ +__published: // IDE-managed Components + TLabel *Terminal; + TTable *TbElementosCFG; + TDataSource *DsElementosCFG; + TDBGrid *DBGrid1; + TTable *TbPrecios; + TDataSource *DsPrecios; + TDBGrid *DBGrid2; + TSpeedButton *SpeedButton1; + TSpeedButton *SpeedButton2; + TSpeedButton *SpeedButton3; + TDBGrid *DBGrid3; + TTable *TbAppl; + TDataSource *DsAppl; + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall TbPreciosBeforeOpen(TDataSet *DataSet); + void __fastcall SpeedButton1Click(TObject *Sender); + void __fastcall SpeedButton2Click(TObject *Sender); + void __fastcall SpeedButton3Click(TObject *Sender); + void __fastcall TbApplBeforeOpen(TDataSet *DataSet); + void __fastcall TbApplBeforeInsert(TDataSet *DataSet); + void __fastcall TbApplAfterPost(TDataSet *DataSet); + void __fastcall Button1Click(TObject *Sender); +private: // User declarations +public: // User declarations + bool PosiblesCambios; + __fastcall TElementosCFG(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TElementosCFG *ElementosCFG; +//--------------------------------------------------------------------------- +#endif + \ No newline at end of file diff --git a/src/CtrlD_PasswordDlg.cpp b/src/CtrlD_PasswordDlg.cpp new file mode 100644 index 0000000..9c589b0 --- /dev/null +++ b/src/CtrlD_PasswordDlg.cpp @@ -0,0 +1,14 @@ +//--------------------------------------------------------------------- +#include +#pragma hdrstop + +#include "CtrlD_PasswordDlg.h" +//--------------------------------------------------------------------- +#pragma resource "*.dfm" +TPasswordDlg *PasswordDlg; +//--------------------------------------------------------------------- +__fastcall TPasswordDlg::TPasswordDlg(TComponent* AOwner) + : TForm(AOwner) +{ +} +//--------------------------------------------------------------------- diff --git a/src/CtrlD_PasswordDlg.dfm b/src/CtrlD_PasswordDlg.dfm new file mode 100644 index 0000000..3e1a601 Binary files /dev/null and b/src/CtrlD_PasswordDlg.dfm differ diff --git a/src/CtrlD_PasswordDlg.h b/src/CtrlD_PasswordDlg.h new file mode 100644 index 0000000..8134f31 --- /dev/null +++ b/src/CtrlD_PasswordDlg.h @@ -0,0 +1,29 @@ +//---------------------------------------------------------------------------- +#ifndef CtrlD_PasswordDlgH +#define CtrlD_PasswordDlgH +//---------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +#include +#include +//---------------------------------------------------------------------------- +class TPasswordDlg : public TForm +{ +__published: + TLabel *Label1; + TEdit *Password; + TButton *OKBtn; + TButton *CancelBtn; +private: +public: + virtual __fastcall TPasswordDlg(TComponent* AOwner); +}; +//---------------------------------------------------------------------------- +extern PACKAGE TPasswordDlg *PasswordDlg; +//---------------------------------------------------------------------------- +#endif diff --git a/src/CtrlDog.cpp b/src/CtrlDog.cpp new file mode 100644 index 0000000..c65182e --- /dev/null +++ b/src/CtrlDog.cpp @@ -0,0 +1,926 @@ + + /****************************************\ + |* */ +// #define ESTOY_PROBANDO +// #define SIN_BLOQUEOS + /* *| + \****************************************/ + + +//--------------------------------------------------------------------------- +#include +#pragma hdrstop + +#include "CtrlDog.h" +#include "CtrlD_PasswordDlg.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +//#pragma link "Phantom" +#pragma link "DigitNum" +#pragma resource "*.dfm" + +#include +#include +#include + +#include + +#define RECORDSYSTEM ".\\WinRCD.log" + + +TDog *Dog; +//--------------------------------------------------------------------------- +__fastcall TDog::TDog(TComponent* Owner) + : TForm(Owner) +{ + try { + Memo1->Lines->LoadFromFile( RECORDSYSTEM ); + if ( Memo1->Lines->Count > 400 ) + { + for ( int i=0; i<100; i++ ) + Memo1->Lines->Delete( 3 ); + } + } catch(...) { + Memo1->Lines->Clear(); + } + + siMinimizar = new TStringList(); + noMinimizar = new TStringList(); + snMinimizar = new TStringList(); + noAbrir = new TStringList(); + ObtenListaAplicaciones(); + + + AllowClose = false; + CanBeDisconect = true; + + Dig1->Value = 0; Dig2->Value = 0; + + TrayMessage(NIM_ADD); + TrayMessage(NIM_MODIFY); + + Application->OnMinimize = AppRestore; + + HookAutoStartProgram(); + + Top = ( Screen->Height / 2) - (Height / 2 ); + Left = ( Screen->Width / 2 )- (Width / 2 ); + iLockSystem( true ); + + +/* + typedef struct tagACCEL { // accl + BYTE fVirt; + WORD key; + WORD cmd; +} ACCEL; +*/ +/* + ACCEL AltTAB; + AltTAB.fVirt = FALT; + AltTAB.key = VK_TAB; + AltTAB.cmd = 0; + HACCEL hAltTAB = CreateAcceleratorTable( &AltTAB, 1 ); + +*/ + Tiempo = EncodeTime( 0, 0, 0, 0 ); + TryClose = false; + + /****/ + Tiempo = EncodeTime( 0, 0, 30, 0 ); + SetState(true); + /****/ +} +//--------------------------------------------------------------------------- +bool __fastcall TDog::MyExitWindows( unsigned int flags ) +{ + HANDLE hToken; + TOKEN_PRIVILEGES tkp; + + // Get a token for this process. + + if (!OpenProcessToken(GetCurrentProcess(), + TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) + return( false ); + + // Get the LUID for the shutdown privilege. + + LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, + &tkp.Privileges[0].Luid); + + tkp.PrivilegeCount = 1; // one privilege to set + tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; + + // Get the shutdown privilege for this process. + + AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, + (PTOKEN_PRIVILEGES)NULL, 0); + + if (GetLastError() != ERROR_SUCCESS) + return false; + + // Shut down the system and force all applications to close. + + if (!ExitWindowsEx(EWX_SHUTDOWN | EWX_FORCE, 0)) + return false; + + return true; +} + +//--------------------------------------------------------------------------- +/* + Desabilitamos el administrador de tareas, para que no nos puedan cerrar desde allí... +*/ +void __fastcall TDog::DisableTaskMgr(bool bTF) +{ + TRegistry *reg; + + reg = new TRegistry; + reg->RootKey = HKEY_CURRENT_USER; + + reg->OpenKey("Software", True); + reg->OpenKey("Microsoft", True); + reg->OpenKey("Windows", True); + reg->OpenKey("CurrentVersion", True); + reg->OpenKey("Policies", True); + reg->OpenKey("System", True); + + if ( bTF ) + reg->WriteString("DisableTaskMgr", "1"); + else + reg->DeleteValue("DisableTaskMgr"); + + reg->CloseKey(); +} +//--------------------------------------------------------------------------- +void __fastcall TDog::DrawItem(TMessage& Msg) +{ + IconDrawItem((LPDRAWITEMSTRUCT)Msg.LParam); + TForm::Dispatch(&Msg); +} +//--------------------------------------------------------------------------- +void __fastcall TDog::MyNotify(TMessage& Msg) +{ + POINT MousePos; + + switch(Msg.LParam) + { + case WM_RBUTTONUP: + if ( GetCursorPos(&MousePos) ) + { + PopupMenu1->PopupComponent = Dog; + SetForegroundWindow(Handle); + PopupMenu1->Popup(MousePos.x, MousePos.y); + PopupMenu1->PopupComponent = 0; + } + break; + case WM_LBUTTONDBLCLK: + Height = 126; + Visible = true; + break; + default: + break; + } + TForm::Dispatch(&Msg); +} +//--------------------------------------------------------------------------- +bool __fastcall TDog::TrayMessage(DWORD dwMessage) +{ + NOTIFYICONDATA tnd; + PSTR pszTip; + + pszTip = TipText(); + + tnd.cbSize = sizeof(NOTIFYICONDATA); + tnd.hWnd = Handle; + tnd.uID = IDC_MYICON; + tnd.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP; + tnd.uCallbackMessage = MYWM_NOTIFY; + + if (dwMessage == NIM_MODIFY) + { + tnd.hIcon = IconHandle(); + if (pszTip) + lstrcpyn(tnd.szTip, pszTip, sizeof(tnd.szTip)); + else + tnd.szTip[0] = '\0'; + } + else + { + tnd.hIcon = NULL; + tnd.szTip[0] = '\0'; + } + + return (Shell_NotifyIcon(dwMessage, &tnd)); +} +//--------------------------------------------------------------------------- +HANDLE __fastcall TDog::IconHandle(void) +{ + return Image1 -> Picture->Icon->Handle; +} +//--------------------------------------------------------------------------- +PSTR __fastcall TDog::TipText(void) +{ + if (Timer1->Enabled) + return ("Acceso al sistema premitido"); + else + { + Memo1->Lines->Insert( 0, DateTimeToStr(Now()) + " ATACANTE DESCONOCIDO (ACCESO NO AUTORIZADO)" ); + Memo1->Lines->Insert( 0, DateTimeToStr(Now()) + " -------- ALARMA SILENCIOSA ACTIVADA -------" ); + Memo1->Lines->SaveToFile( RECORDSYSTEM ); + return ("SISTEMA PROTEGIDO"); + } +} +//--------------------------------------------------------------------------- +LRESULT IconDrawItem(LPDRAWITEMSTRUCT lpdi) +{ + HICON hIcon; + hIcon = (HICON)LoadImage(g_hinst, MAKEINTRESOURCE(lpdi->CtlID), IMAGE_ICON, 16, 16, 0); + if (!hIcon) + return(FALSE); + + DrawIconEx(lpdi->hDC, lpdi->rcItem.left, lpdi->rcItem.top, hIcon, 16, 16, 0, NULL, DI_NORMAL); + return(TRUE); +} +//--------------------------------------------------------------------------- +void __fastcall TDog::SetState( bool OnOff ) +{ + ///////////// + Memo1->Lines->Insert( 0, "Terminal " + (OnOff ? AnsiString("ON") : AnsiString("OFF") ) ); + if ( OnOff ) + { + TiempoInicio = TDateTime::CurrentTime(); + + Memo1->Lines->Insert( 0, " `------ Durante --> " + Tiempo.TimeString() ); + unsigned short hour, min, sec, msec; + Tiempo.DecodeTime( &hour, &min, &sec, &msec ); + Timer1->Interval = msec + ( sec + ( (min+2) + hour*60 )*60 )*1000 ; + Timer1->Enabled = true; + + Reloj->Enabled = true; + Dig1->Value = hour; Dig2->Value = min; + SystemLock->Enabled = false; + iLockSystem( false ); + } else { + Tiempo = 0; + SystemLock->Enabled = true; + Timer1->Enabled = false; + Reloj->Enabled = false; + Dig1->Value = 0; Dig2->Value = 0; + iLockSystem( true ); + } + Memo1->Lines->SaveToFile( RECORDSYSTEM ); +} +//--------------------------------------------------------------------------- +void __fastcall TDog::ServerSocketAccept(TObject *Sender, + TCustomWinSocket *Socket) +{ + StatusBar1->SimpleText = "Conexión aceptada de " + Socket->RemoteAddress; + Memo1->Lines->Insert( 0, StatusBar1->SimpleText ); + + int CodOp; double pTiempo; + CanBeDisconect = false; + + Socket->ReceiveBuf( &CodOp, sizeof(int) ); + + switch( CodOp ) + { + // On / Off + case 6669: + Socket->ReceiveBuf( &CodOp, sizeof(int) ); + Socket->ReceiveBuf( &pTiempo, sizeof(double) ); + Tiempo = pTiempo; + SetState( CodOp ? true : false ); + CodOp = 54321; + Socket->SendBuf( &CodOp, sizeof(int) ); + break; + // CERRAR WINDOWS + case 6660: + Socket->ReceiveBuf( &CodOp, sizeof(int) ); + Socket->ReceiveBuf( &pTiempo, sizeof(double) ); + Tiempo = pTiempo; + CodOp = 54321; + Socket->SendBuf( &CodOp, sizeof(int) ); + CanBeDisconect = true; + Memo1->Lines->Insert( 0, "Recibida petición de CERRAR WINDOWS ::" + Socket->RemoteAddress ); + CerrarWindows1Click(0); + break; + // Query TIME + case 6661: + Memo1->Lines->Insert( 0, "Recibida petición de Tiempo ::" + Socket->RemoteAddress ); + Socket->SendBuf( &Tiempo, sizeof(double) ); + // Socket->SendBuf( &TiempoInicio, sizeof(double) ); + Socket->SendBuf( &(Tiempo - ( TDateTime::CurrentTime() - TiempoInicio )), sizeof(double) ); + CodOp = 54321; + Socket->SendBuf( &CodOp, sizeof(int) ); + Memo1->Lines->Insert( 0, " -----> Tiempo pedido " + Tiempo ); + Memo1->Lines->Insert( 0, " -----> Tiempo inicio " + TiempoInicio ); + Memo1->Lines->Insert( 0, " -----> Servidor " + Socket->RemoteAddress ); + break; + // Actualizar listas + case 6662: + { + int NumApli, i; + TRegistry *Registro; + char *Buffer; + + Registro = new TRegistry; + + Registro -> OpenKey( "\\Software\\JDsoft\\CtrlMstr", true ); + + Memo1->Lines->Insert( 0, "Actualizando Listas ::" + Socket->RemoteAddress ); + + Socket->ReceiveBuf( &NumApli, sizeof(int) ); + Buffer = new char[ 15*NumApli ]; + Registro -> WriteInteger( "NAppl-sC", NumApli ); + for ( i=0; iReceiveBuf( (Buffer+15*i), sizeof(char)*15 ); + Registro -> WriteBinaryData( "LAppl-sC", Buffer, sizeof(char)*15*NumApli+1 ); + delete Buffer; + + Socket->ReceiveBuf( &NumApli, sizeof(int) ); + Buffer = new char[ 15*NumApli ]; + Registro -> WriteInteger( "NAppl-nC", NumApli ); + for ( i=0; iReceiveBuf( (Buffer+15*i), sizeof(char)*15 ); + Registro -> WriteBinaryData( "LAppl-nC", Buffer, sizeof(char)*15*NumApli+1 ); + delete Buffer; + + Socket->ReceiveBuf( &NumApli, sizeof(int) ); + Buffer = new char[ 15*NumApli ]; + Registro -> WriteInteger( "NAppl-snC", NumApli ); + for ( i=0; iReceiveBuf( (Buffer+15*i), sizeof(char)*15 ); + Registro -> WriteBinaryData( "LAppl-snC", Buffer, sizeof(char)*15*NumApli+1 ); + delete Buffer; + + Socket->ReceiveBuf( &NumApli, sizeof(int) ); + Buffer = new char[ 15*NumApli ]; + Registro -> WriteInteger( "NAppl-nA", NumApli ); + for ( i=0; iReceiveBuf( (Buffer+15*i), sizeof(char)*15 ); + Registro -> WriteBinaryData( "LAppl-nA", Buffer, sizeof(char)*15*NumApli+1 ); + delete Buffer; + + + delete Registro; + } + CodOp = 54321; + Socket->SendBuf( &CodOp, sizeof(int) ); + ObtenListaAplicaciones(); + break; + default: + Memo1->Lines->Insert( 0, "Mensaje desconocido ::" + Socket->RemoteAddress ); + CodOp = -1; + Socket->SendBuf( &CodOp, sizeof(int) ); + } + Memo1->Lines->Insert( 0, "Tramites Finalizados ::" + Socket->RemoteAddress ); + StatusBar1->SimpleText = "Escuchando nuevas ordenes..."; + Memo1->Lines->SaveToFile( RECORDSYSTEM ); + CanBeDisconect = true; +} +//--------------------------------------------------------------------------- +void __fastcall TDog::ObtenListaAplicaciones(void) +{ + int i, nListaS, nListaN, nListaSN, nListaA; char *Buffer; + TRegistry *Registro; + Registro = new TRegistry; + + try { + Registro -> OpenKey( "\\Software\\JDsoft\\CtrlMstr", false ); + + nListaS = Registro -> ReadInteger( "NAppl-sC" ); + Buffer = new char [ nListaS*15 + 1 ]; + Registro -> ReadBinaryData( "LAppl-sC", (void *)Buffer, (sizeof(char)*15*nListaS +1) ); + + siMinimizar->Clear(); +//ShowMessage( AnsiString(nListaS) ); + for ( i=0; i < nListaS; i++ ) +//{ + siMinimizar->Add( AnsiString( (char *)(Buffer+i*15) ) ); +//Memo1->Lines->Insert( 0, AnsiString( (char *)(Buffer+i*15) ) ); +//} + delete Buffer; + + nListaN = Registro -> ReadInteger( "NAppl-nC" ); + Buffer = new char [ nListaN*15 ]; + Registro -> ReadBinaryData( "LAppl-nC", (void *)Buffer, (sizeof(char)*15*nListaN +1) ); + + noMinimizar->Clear(); + for ( i=0; i < nListaN; i++ ) +//{ + noMinimizar->Add( AnsiString( (char *)(Buffer+i*15) ) ); +//Memo1->Lines->Insert( 0, (Buffer+i*15) ); +//} + delete Buffer; + + nListaSN = Registro -> ReadInteger( "NAppl-snC" ); + Buffer = new char [ nListaSN*15 ]; + Registro -> ReadBinaryData( "LAppl-snC", (void *)Buffer, (sizeof(char)*15*nListaSN +1) ); + noMinimizar->Clear(); + for ( i=0; i < nListaSN; i++ ) + snMinimizar->Add( AnsiString( (char *)(Buffer+i*15) ) ); + delete Buffer; + + nListaA = Registro -> ReadInteger( "NAppl-nA" ); + Buffer = new char [ nListaA*15 ]; + Registro -> ReadBinaryData( "LAppl-nA", (void *)Buffer, (sizeof(char)*15*nListaA +1) ); + noAbrir->Clear(); + for ( i=0; i < nListaA; i++ ) + noAbrir->Add( AnsiString( (char *)(Buffer+i*15) ) ); + delete Buffer; + + } catch(...) { + // nothing + } + Memo1->Lines->Insert( 0, Format( "Listas Cargadas: %02dS::%02dN", ARRAYOFCONST( ( siMinimizar->Count, noMinimizar->Count ) ) ) ); + Memo1->Lines->Insert( 0, Format( "Listas Cargadas: %02dC::%02dA", ARRAYOFCONST( ( snMinimizar->Count, noAbrir->Count ) ) ) ); + + delete Registro; +} +//--------------------------------------------------------------------------- + +void __fastcall TDog::ServerSocketClientConnect(TObject *Sender, + TCustomWinSocket *Socket) +{ + StatusBar1->SimpleText = "Cliente Conectado "; + Memo1->Lines->Insert( 0, "Cliente Conectado " ); + Memo1->Lines->SaveToFile( RECORDSYSTEM ); +} +//--------------------------------------------------------------------------- +void __fastcall TDog::ServerSocketClientDisconnect(TObject *Sender, + TCustomWinSocket *Socket) +{ + if ( ! CanBeDisconect ) + Memo1->Lines->Insert( 0, "DESCONEXION FORZADA ::" + Socket->LocalAddress ); + else + Memo1->Lines->Insert( 0, "Desconexión en regla ::" ); + Memo1->Lines->SaveToFile( RECORDSYSTEM ); +} +//--------------------------------------------------------------------------- +void __fastcall TDog::ServerSocketClientError(TObject *Sender, + TCustomWinSocket *Socket, TErrorEvent ErrorEvent, int &ErrorCode) +{ + Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Cliente ¡ ERROR ! " + AnsiString( ErrorCode ) + "::" + Socket->LocalAddress ); + Memo1->Lines->SaveToFile( RECORDSYSTEM ); +} +//--------------------------------------------------------------------------- + +void __fastcall TDog::ServerSocketGetSocket(TObject *Sender, int Socket, + TServerClientWinSocket *&ClientSocket) +{ + Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Obtuvimos un socket" ); + Memo1->Lines->SaveToFile( RECORDSYSTEM ); +} +//--------------------------------------------------------------------------- + +void __fastcall TDog::ServerSocketListen(TObject *Sender, + TCustomWinSocket *Socket) +{ + Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " /----->" + Socket->RemoteAddress ); + Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Estoy escuchando ::" + Socket->LocalAddress ); + Memo1->Lines->SaveToFile( RECORDSYSTEM ); +} +//--------------------------------------------------------------------------- + +void __fastcall TDog::FormClose(TObject *Sender, TCloseAction &Action) +{ + ServerSocket->Active = false; + if ( AllowClose ) + { + delete siMinimizar; + delete noMinimizar; + delete snMinimizar; + delete noAbrir; + } else { +#ifndef ESTOY_PROBANDO + iLockSystem( true ); +#endif + } +} +//--------------------------------------------------------------------------- +void __fastcall TDog::Timer1Timer(TObject *Sender) +{ + SetState( false ); + StatusBar1->SimpleText = "Sistema OFF --FORZADO--"; +} +//--------------------------------------------------------------------------- + +void __fastcall TDog::FormCloseQuery(TObject *Sender, bool &CanClose) +{ + Visible = false; +#ifndef ESTOY_PROBANDO + CanClose = AllowClose; +#else + iLockSystem( false ); +#endif +} +//--------------------------------------------------------------------------- + +void __fastcall TDog::FormShow(TObject *Sender) +{ + if ( Timer1->Enabled ) + { + Reloj->Enabled=true; + RelojTimer(0); + } +} +//--------------------------------------------------------------------------- + + +void __fastcall TDog::RelojTimer(TObject *Sender) +{ + // Actualizamos el tiempo que queda... + unsigned short hour, min, sec, msec; + + (Tiempo - ( TDateTime::CurrentTime() - TiempoInicio )).DecodeTime( &hour, &min, &sec, &msec ); + + Dig1->Value = hour; + Dig2->Value = min; +} +//--------------------------------------------------------------------------- + +void __fastcall TDog::Label1DblClick(TObject *Sender) +{ + if ( Height == 354 ) Height = 126; else Height = 354; +} +//--------------------------------------------------------------------------- + + +void __fastcall TDog::Tiemporestante1Click(TObject *Sender) +{ + Visible = true; + Height = 126; +} +//--------------------------------------------------------------------------- + +void __fastcall TDog::Status1Click(TObject *Sender) +{ + Visible = true; + Height = 354; +} +//--------------------------------------------------------------------------- +void __fastcall TDog::CerrarWindows1Click(TObject *Sender) +{ + // Shut down the system and force all applications to close. + AllowClose = true; + HookAutoStartProgram(); + #ifndef SIN_BLOQUEOS + if ( !MyExitWindows(EWX_POWEROFF | EWX_FORCE) ) +// if (!ExitWindowsEx(EWX_SHUTDOWN | EWX_FORCE | EWX_POWEROFF, 0)) + #endif + { + AllowClose = false; + Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " Error durante el cierre" ); + Memo1->Lines->SaveToFile( RECORDSYSTEM ); + } + #ifdef ESTOY_PROBANDO + DisableTaskMgr(false); + #endif + +} +//--------------------------------------------------------------------------- +void __fastcall TDog::FormDestroy(TObject *Sender) +{ + HookAutoStartProgram(); + TrayMessage(NIM_DELETE); +} +//--------------------------------------------------------------------------- +void __fastcall TDog::HookAutoStartProgram(void) +{ + #ifndef SIN_BLOQUEOS + TRegistry *Registro; + Registro = new TRegistry; + + try { + Registro -> OpenKey( "\\Software\\Microsoft\\Windows\\CurrentVersion\\Run", true ); + Registro -> WriteString( "WinPowerManager", Application->ExeName ); + } catch(...) { + // Do nothing... + } + + delete Registro; + #endif +} +//--------------------------------------------------------------------------- +bool MultimediaActive; +bool GetStyle( HWND hdl ) +{ + long style; + bool dev; + + dev = false; + + style = GetWindowLong(hdl,GWL_STYLE); + if(( style & WS_POPUP) == WS_POPUP) + { + if(((style & WS_GROUP) == WS_GROUP) && ! + ((style & WS_DISABLED) == WS_DISABLED) && + ((style & WS_SYSMENU) == WS_SYSMENU)) + dev = true; + } else { + dev = true; + } + + return dev; +}; +//--------------------------------------------------------------------------- +BOOL __stdcall MinimizeAllAplications( HWND hwnd, LPARAM lParam ) +{ + bool dev; int i; + char lpString[50]; + AnsiString Text; + + dev = true; + if ( hwnd != 0 ) + { + GetWindowText( hwnd, lpString, 40 ); + Text = AnsiString( lpString ); + + + + // Aplicaciones especiales que he de minimizar constantemente... + if ( Text.Pos("Episode I Racer" ) || + Text.Pos("Quake" ) + ) + { + ShowWindow( hwnd, SW_MINIMIZE ); + return dev; + } + + // LISTA DINAMICA DE VENTANAS A MINIMIZAR + for ( i=0; i < siMinimizar->Count; i++ ) + if ( Text.Pos( siMinimizar->Strings[i] ) ) + { + ShowWindow( hwnd, SW_MINIMIZE ); + return dev; + } + + // Solo Ventanas visibles... + if ( IsWindowVisible( hwnd ) ) + { + // ...y ademas ventanas PADRES + if ( GetWindow( hwnd, GW_OWNER) == 0 ) + { + if ( ! GetStyle( hwnd ) ) + { + if ( IsWindow( GetLastActivePopup( hwnd ) ) ) + { + auto HWND hwPop; + hwPop = GetLastActivePopup( hwnd ); + if ( !GetStyle(hwPop) ) return true; + } else return true; + } + + // LA VENTANA ES TIPO -TASK-BAR- y ADEMAS ES VISIBLE + + // Ventanas ante las cuales me oculto + if ( Text.Pos("Reproductor mul") != 0 || + Text.Pos("Informática DJ") + ) + { + MultimediaActive = true; + return true; + } + + // LISTA DINAMICA DE VENTANAS A RESPETAR + for ( i=0; i < noMinimizar->Count; i++ ) + if ( Text.Pos( noMinimizar->Strings[i] ) ) + { + MultimediaActive = true; + return true; + } + + // Ventanas que no he de minimizar (PERO QUEDO DE PRIMER PLANO) + if ( ! ( Text.Pos("Sistema de Control") || + Text.Pos("Creditos ocultos") + ) + ) + { + ShowWindow( hwnd, SW_MINIMIZE ); + } + + } + } + } else { + dev = false; + } + + return dev; +}; + +/* +procedure TForm1.TerminateProcess1Click(Sender: TObject); +const + PROCESS_TERMINATE = 1; +var + ProcHandle: THandle; +begin + if (ListBox1.Items.count < 1) OR (ListBox1.ItemIndex < 0) then exit; + if (MessageDlg('Process: --> ' + ListBox1.Items[ListBox1.itemIndex]+ #10#13#10#13+ + 'TerminateProcess may lead the system into an instable state! '+#10#13+ + 'You should use this function only if you are sure about doing so.'+#10#13+ + 'Are You sure?', mtConfirmation, [mbYes, mbNo], 0) = mrYes) + then begin + ProcHandle := OpenProcess(PROCESS_TERMINATE, FALSE, DWORD(WinList1.GetProcessID(ListBox1.ItemIndex))); + try + if ProcHandle <> 0 then begin + if TerminateProcess(ProcHandle, $FFFFFFFF) then + WaitForSingleObject(ProcHandle, INFINITE); + end else + MessageDlg('Can not find the handle of the selected prozess!', mtError, [mbOK], 0); + finally + CloseHandle(ProcHandle); + end; + Refresh1Click(Sender); + end; +end; +*/ + + +//--------------------------------------------------------------------------- +/* +BOOL __stdcall MyEnumDesktopProc( LPTSTR lpszDesktop, LPARAM lParam ) +{ + EnumDesktopWindows( lpszDesktop, ( WNDENUMPROC )MinimizeAllAplications, 0 ); + return true; +}; +*/ +//--------------------------------------------------------------------------- +void __fastcall TDog::SystemLockTimer(TObject *Sender) +{ + #ifndef SIN_BLOQUEOS + MultimediaActive = false; + + EnumWindows( ( WNDENUMPROC )MinimizeAllAplications, 0 ); + + if ( MultimediaActive || TryClose ) + { + Visible = false; + } else { + + + Top = ( Screen->Height / 2) - (Height / 2 ); + Left = ( Screen->Width / 2 )- (Width / 2 ); + + if ( !Visible )Show(); +// ShowWindow(this->Handle,SW_RESTORE); + SetForegroundWindow(this->Handle); + } + #endif + + iLockSystem( true ); +} +//--------------------------------------------------------------------------- +void __fastcall TDog::AppRestore(TObject *Sender) +{ + Application->Restore(); +} +//--------------------------------------------------------------------------- +void __fastcall TDog::Shape2MouseDown(TObject *Sender, + TMouseButton Button, TShiftState Shift, int X, int Y) +{ + if ( Shift.Contains(ssShift) && Shift.Contains(ssAlt) && + Shift.Contains(ssCtrl) && Shift.Contains(ssDouble) ) + { + TryClose = true; + + TPasswordDlg *PasswordDlg; + PasswordDlg = new TPasswordDlg(this); + PasswordDlg->Password->Clear(); + PasswordDlg -> ShowModal(); + if ( PasswordDlg->Password->Text == "44959229170877" ) +// if ( InputBox( "Creditos ocultos", "Donde estan:", "los creditos ocultos" ) == "44959229" ) + { + TryClose = false; + AllowClose=true; + iLockSystem( false ); + Close(); + } + delete PasswordDlg; + TryClose = false; + } +} +//--------------------------------------------------------------------------- +void __fastcall TDog::FormResize(TObject *Sender) +{ + Top = ( Screen->Height / 2) - (Height / 2 ); + Left = ( Screen->Width / 2 )- (Width / 2 ); + #ifndef SIN_BLOQUEOS + if ( SystemLock->Enabled ) + { + iLockSystem( true ); + } + #endif +} +//--------------------------------------------------------------------------- +void __fastcall TDog::iLockSystem( bool status ) +{ +#ifdef SIN_BLOQUEOS + status = false; +#endif + if ( ! status ) // LIBRE DE BLOQUEOS + { + ClipCursor( NULL ); + SystemParametersInfo(SPI_SCREENSAVERRUNNING, 0, NULL,0); +// BorderIcons = (TBorderIcons()<< biSystemMenu); + } else { // INICIANDO BLOQUEOS + RECT ClipRect = { Left+2, Top+25, Left+Width-2, Top+120-20 }; + ClipCursor( &ClipRect ); + SystemParametersInfo(SPI_SCREENSAVERRUNNING, 1,NULL, 0); +// BorderIcons = BorderIcons - (TBorderIcons()<< biSystemMenu); + } +#define iTRAYBAR 0 +#define iTRAYNOTIFY 1 +#define iSTARTBUTTON 2 +#define iAPPSWITCHBAR 3 +#define iTRAYCLOCK 4 +#define iDESKTOPICONS 5 + + + HideOpt( iTRAYBAR, status ); + HideOpt( iTRAYNOTIFY, status ); + HideOpt( iSTARTBUTTON, status ); + HideOpt( iAPPSWITCHBAR, status ); + HideOpt( iTRAYCLOCK, status ); + HideOpt( iDESKTOPICONS, status ); + +} +//--------------------------------------------------------------------------- +void __fastcall TDog::HideOpt( int Option, bool Hide ) +{ + HWND Wnd; + + switch( Option ) + { + case iTRAYBAR : + Wnd = FindWindow("Shell_TrayWnd", NULL); + break; + case iTRAYNOTIFY : + Wnd = FindWindow("Shell_TrayWnd", NULL); + Wnd = FindWindowEx(Wnd, HWND(0), "TrayNotifyWnd", NULL); + break; + case iSTARTBUTTON : + Wnd = FindWindow("Shell_TrayWnd", NULL); + Wnd = FindWindowEx(Wnd, HWND(0), "Button", NULL); + break; + case iAPPSWITCHBAR : + Wnd = FindWindow("Shell_TrayWnd", NULL); + Wnd = FindWindowEx(Wnd, HWND(0), "ReBarWindow32", NULL); + break; + case iTRAYCLOCK : + Wnd = FindWindow("Shell_TrayWnd", NULL); + Wnd = FindWindowEx(Wnd, HWND(0), "TrayNotifyWnd", NULL); + Wnd = FindWindowEx(Wnd, HWND(0), "TrayClockWClass", NULL); + break; + case iDESKTOPICONS : + Wnd = FindWindow("Progman", NULL); + Wnd = FindWindowEx(Wnd, HWND(0), "ShellDll_DefView", NULL); + break; + } + + if ( Wnd != 0 ) + { + if ( Hide ) + ShowWindow(Wnd, SW_HIDE); + else + ShowWindow(Wnd, SW_SHOW); + } +} +//--------------------------------------------------------------------------- + + + +void __fastcall TDog::Shape1MouseUp(TObject *Sender, TMouseButton Button, + TShiftState Shift, int X, int Y) +{ +#ifdef ESTOY_PROBANDO + static bool Rotate = true; + Tiempo = EncodeTime( 0, 1, 0, 0 ); + if ( Rotate ) + SetState( true ); + else + SetState( false ); + Rotate = !Rotate; +#endif +} +//--------------------------------------------------------------------------- + +void __fastcall TDog::FormClick(TObject *Sender) +{ + if ( !SystemLock->Enabled ) + Visible = false; +} +//--------------------------------------------------------------------------- + + +void __fastcall TDog::Label2Click(TObject *Sender) +{ + char zFileName[80], zParams[80], zDir[80]; + if ( !SystemLock->Enabled ) + ShellExecute(Application->MainForm->Handle, 0, StrPCopy(zFileName, "http:\\\\www.infdj.com"), + StrPCopy(zParams, ""), StrPCopy(zDir, ""), SW_SHOWNOACTIVATE > 32); + +} +//--------------------------------------------------------------------------- + diff --git a/src/CtrlDog.ddp b/src/CtrlDog.ddp new file mode 100644 index 0000000..cdc0ee8 Binary files /dev/null and b/src/CtrlDog.ddp differ diff --git a/src/CtrlDog.dfm b/src/CtrlDog.dfm new file mode 100644 index 0000000..81b444b Binary files /dev/null and b/src/CtrlDog.dfm differ diff --git a/src/CtrlDog.h b/src/CtrlDog.h new file mode 100644 index 0000000..8337587 --- /dev/null +++ b/src/CtrlDog.h @@ -0,0 +1,126 @@ +//--------------------------------------------------------------------------- +#ifndef CtrlDogH +#define CtrlDogH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +#include +//#include "Phantom.hpp" +#include "DigitNum.h" +#include +//--------------------------------------------------------------------------- +#define MYWM_NOTIFY (WM_APP+100) +#define IDC_MYICON 1006 +extern HINSTANCE g_hinst; +LRESULT IconDrawItem(LPDRAWITEMSTRUCT lpdi); +//--------------------------------------------------------------------------- +class TDog : public TForm +{ +__published: // IDE-managed Components + TMemo *Memo1; + TStatusBar *StatusBar1; + TServerSocket *ServerSocket; + TTimer *Timer1; + TTimer *Reloj; + TDigitNum *Dig1; + TShape *Shape2; + TShape *Shape1; + TDigitNum *Dig2; + TImage *Image1; + TBevel *Bevel1; + TBevel *Bevel2; + TBevel *Bevel3; + TBevel *Bevel4; + TLabel *Label1; + TLabel *Label2; + TPopupMenu *PopupMenu1; + TMenuItem *Tiemporestante1; + TMenuItem *Status1; + TMenuItem *CerrarWindows1; + TMenuItem *N1; + TTimer *SystemLock; + void __fastcall ServerSocketAccept(TObject *Sender, + TCustomWinSocket *Socket); + void __fastcall ServerSocketClientConnect(TObject *Sender, + TCustomWinSocket *Socket); + + void __fastcall ServerSocketClientDisconnect(TObject *Sender, + TCustomWinSocket *Socket); + void __fastcall ServerSocketClientError(TObject *Sender, + TCustomWinSocket *Socket, TErrorEvent ErrorEvent, + int &ErrorCode); + void __fastcall ServerSocketGetSocket(TObject *Sender, int Socket, + TServerClientWinSocket *&ClientSocket); + void __fastcall ServerSocketListen(TObject *Sender, + TCustomWinSocket *Socket); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall Timer1Timer(TObject *Sender); + void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose); + void __fastcall FormShow(TObject *Sender); + + void __fastcall RelojTimer(TObject *Sender); + void __fastcall Label1DblClick(TObject *Sender); + + void __fastcall Tiemporestante1Click(TObject *Sender); + void __fastcall Status1Click(TObject *Sender); + void __fastcall CerrarWindows1Click(TObject *Sender); + void __fastcall FormDestroy(TObject *Sender); + + void __fastcall SystemLockTimer(TObject *Sender); + + void __fastcall Shape2MouseDown(TObject *Sender, TMouseButton Button, + TShiftState Shift, int X, int Y); + + + + void __fastcall FormResize(TObject *Sender); + void __fastcall Shape1MouseUp(TObject *Sender, TMouseButton Button, + TShiftState Shift, int X, int Y); + void __fastcall FormClick(TObject *Sender); + + void __fastcall Label2Click(TObject *Sender); +private: // User declarations + + bool __fastcall MyExitWindows( unsigned int flags ); + TDateTime Tiempo, TiempoInicio; + bool AllowClose; + void __fastcall SetState( bool OnOff ); + + void __fastcall DrawItem(TMessage& Msg); + void __fastcall MyNotify(TMessage& Msg); + bool __fastcall TrayMessage(DWORD dwMessage); + void __fastcall ObtenListaAplicaciones(void); + + HANDLE __fastcall IconHandle(void); + PSTR __fastcall TipText(void); + + void __fastcall HookAutoStartProgram(void); + void __fastcall iLockSystem( bool status ); + void __fastcall DisableTaskMgr(bool bTF); + + void __fastcall HideOpt( int Option, bool Hide ); + +public: // User declarations + void __fastcall AppRestore(TObject *Sender); + bool CanBeDisconect; + __fastcall TDog(TComponent* Owner); + bool TryClose; + +BEGIN_MESSAGE_MAP +MESSAGE_HANDLER(WM_DRAWITEM,TMessage,DrawItem) +MESSAGE_HANDLER(MYWM_NOTIFY,TMessage,MyNotify) +END_MESSAGE_MAP(TForm) + +}; +//--------------------------------------------------------------------------- +TStringList *siMinimizar, *noMinimizar, *snMinimizar, *noAbrir; +//--------------------------------------------------------------------------- +extern PACKAGE TDog *Dog; +//--------------------------------------------------------------------------- +#endif + \ No newline at end of file diff --git a/src/CtrlDogs.bpr b/src/CtrlDogs.bpr new file mode 100644 index 0000000..2e53c5a --- /dev/null +++ b/src/CtrlDogs.bpr @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=0 +Build=72 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=3082 +CodePage=1252 + +[Version Info Keys] +CompanyName=JD soft. +FileDescription= +FileVersion=1.0.0.72 +InternalName= +LegalCopyright=Copyright (C) JD soft. 1990-1999 +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments=e-mail: Jose-David.Guillen@cs.us.es + +[Excluded Packages] +c:\archivos de programa\borland\cbuilder6\Bin\dclite60.bpl=Borland Integrated Translation Environment + +[HistoryLists\hlIncludePath] +Count=6 +Item0=$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl;C:\programacion\VCLs\include +Item1=$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl;..\VCLs\include +Item2=..\jd soft\digitnum;..\componentes\cdopping\coolform;l:\programación (-cbuilder-)\jd soft;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl;L:\Programación (-CBuilder-)\Componentes\CDopping;L:\Programación (-CBuilder-)\Componentes;D:\JDsoft\PrjTPVwin\VCLs\include +Item3=..\jd soft\digitnum;..\componentes\cdopping\coolform;l:\programación (-cbuilder-)\jd soft;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl;L:\Programación (-CBuilder-)\Componentes\CDopping;L:\Programación (-CBuilder-)\Componentes +Item4=..\jd soft\digitnum;..\componentes\cdopping\coolform;l:\programación (-cbuilder-)\jd soft;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl +Item5=..\jd soft\jd;l:\programación (-cbuilder-)\jd soft\jd;l:\cbuilder\cbuilder\objrepos;j:\cbuilder\cbuilder\bin;j:\cbuilder\cbuilder\bin;j:\cbuilder\cbuilder\objrepos;$(BCB)\bin;$(BCB)\objrepos;j:\cbuilder\jd soft;j:\progwin95\jd soft;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=7 +Item0=..\VCLs\lib;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;C:\programacion\VCLs\lib +Item1=..\VCLs\lib;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\VCLs\lib;..\jd soft\actimg;..\jd soft;..\jd soft\jd\actimg;..\componentes;..\componentes\cdopping\coolform;..\jd soft\jd;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;D:\JDsoft\PrjTPVwin\VCLs\lib +Item3=..\jd soft\actimg;..\jd soft;..\jd soft\jd\actimg;..\componentes;..\componentes\cdopping\coolform;..\jd soft\jd;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;D:\JDsoft\PrjTPVwin\VCLs\lib +Item4=..\jd soft\actimg;..\jd soft;..\jd soft\jd\actimg;..\componentes;..\componentes\cdopping\coolform;..\jd soft\jd;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\componentes;..\componentes\cdopping\coolform;..\jd soft\jd;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib +Item6=..\jd soft\jd;l:\programación (-cbuilder-)\jd soft\jd;l:\cbuilder\cbuilder\objrepos;j:\cbuilder\cbuilder\bin;j:\cbuilder\cbuilder\bin;j:\cbuilder\cbuilder\objrepos;$(BCB)\bin;$(BCB)\objrepos;j:\cbuilder\jd soft;j:\progwin95\jd soft;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlUnitAliases] +Count=1 +Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE + +[HistoryLists\hlIntOutputDir] +Count=1 +Item0=..\obj + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=..\bin + +[Debugging] +DebugSourceDirs= + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=1 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + + \ No newline at end of file diff --git a/src/CtrlDogs.cpp b/src/CtrlDogs.cpp new file mode 100644 index 0000000..5946e7a --- /dev/null +++ b/src/CtrlDogs.cpp @@ -0,0 +1,45 @@ +//--------------------------------------------------------------------------- +#include +#include +#include + +#pragma hdrstop +USERES("CtrlDogs.res"); +USEFORM("CtrlDog.cpp", Dog); +USEFORM("CtrlD_PasswordDlg.cpp", PasswordDlg); +//--------------------------------------------------------------------------- +HINSTANCE g_hinst; +//extern "C" __declspec(dllimport) int _stdcall RegisterServiceProcess( DWORD dwProcessID, int dwType); +//function RegisterServiceProcess(dwProcessID, dwType: integer): integer; stdcall; external 'KERNEL32.DLL'; + +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE hInstance, LPSTR, int) +{ + AnsiString FsMutex = DateToStr(TDateTime::CurrentDate()) + AnsiString("-mutex-dog"); + +// RegisterServiceProcess(GetCurrentProcessID(), 1); // Hide Aplication +// SetWindowLong(Application->Handle, GWL_EXSTYLE, XWndLong | WS_EX_TOOLWINDOW & ! WS_EX_APPWINDOW | WS_EX_TOPMOST); + + HANDLE FhMutex = OpenMutex(MUTEX_ALL_ACCESS,False, FsMutex.c_str() ); + if ( FhMutex == 0 ) //it's a first instance + { + FhMutex = CreateMutex(NULL,false, FsMutex.c_str() ); + try + { + Application->Initialize(); + g_hinst = hInstance; + Application->Title = "Sistema de Control"; + Application->CreateForm(__classid(TDog), &Dog); + Application->ShowMainForm = false; + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + } else { + if ( CloseHandle(FhMutex) ) FhMutex = 0; + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/src/CtrlDogs.res b/src/CtrlDogs.res new file mode 100644 index 0000000..05326c9 Binary files /dev/null and b/src/CtrlDogs.res differ diff --git a/src/CtrlElemento.cpp b/src/CtrlElemento.cpp new file mode 100644 index 0000000..e1114d8 --- /dev/null +++ b/src/CtrlElemento.cpp @@ -0,0 +1,445 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +#include "CtrlPPal.h" +#include "CtrlSocket.h" +#include "CtrlElemento.h" + +//--------------------------------------------------------------------------- +#pragma package(smart_init) + +#define Blinking 600 + +//########################################################################### +//########################################################################### +//########################################################################### +//--------------------------------------------------------------------------- +__fastcall TElemento::TElemento(TComponent* Owner) + : TImage(Owner) +{ + NumElemento = 0; + myIP="0.0.0.0"; + + SurfaceIs = sfNone; + + BlinkCode = IP_OFF; // Intentando conectar con el TERMINAL + StatusCode= ERROR; // ERROR, aun no hemos conseguido conectar... + + Blink = new TTimer(this); // Establecemos el timer, que mostrará las advertencias + Blink->OnTimer = OnBlink; // visuales de estado del componente. + Blink->Interval = Blinking; // Inicialmente activo, con la advertencia IP_QUERY + Blink->Enabled = true; + + Revisor = new TTimer(this); // Este timer, se encargará de comunicar el estado OFF + Revisor->OnTimer = OnRevisor; // al TERMINAL-DOG, cuando proceda. ( Finalizado su tiempo ). + Revisor->Interval = 0; + Revisor->Enabled = false; + PideMasTiempo = false; +} +//--------------------------------------------------------------------------- +__fastcall TElemento::~TElemento() +{ + delete Blink; + delete Revisor; +} +//--------------------------------------------------------------------------- +void __fastcall TElemento::SetElemento( int Elemento, AnsiString IP, AnsiString Name ) +{ + if ( ! IP.IsEmpty() && IP.Length() >= 7 ) + myIP = IP; + NumElemento = Elemento; + myName = Name; + if ( !CtrlPPal->ServerHook ) + RefreshElement(); +} +//--------------------------------------------------------------------------- +void __fastcall TElemento::RefreshElement(void) +{ + BlinkCode = IP_QUERY; + StatusCode = ERROR; +// Blink->Enabled = true; + Blink->Interval = Blinking; + + //////// Vemos si el terminal esta activo /////////////////////////////////// + ThreadSocket *MySocket; + MySocket = (ThreadSocket *)CtrlPPal->GetThread(); + MySocket->SetSocket( myIP, 5432 ); + MySocket->OWNER_Element = this; + MySocket->CtrlCOP = QueryTIME; + MySocket->CtrlTiempo = TDateTime::CurrentTime(); + MySocket->Resume(); + //////// /////////////////////////////////// +} +//--------------------------------------------------------------------------- +void __fastcall TElemento::HistoricoTermON( TDateTime CtrlTiempo ) +{ + bool UsaBono = (Precio == -1); + if ( UsaBono ) Precio = 0; + if ( PideMasTiempo ) + { + ImporteAcumulado += Precio; + if ( CtrlTiempo > TiempoPedido ) CtrlTiempo = TiempoPedido; + } else { + ImporteAcumulado = Precio; + } + + // Insertamos en el historial de usos, la activación del terminal... + CtrlPPal->TbHistorial -> InsertRecord( ARRAYOFCONST(( NumElemento, + (Variant)TiempoComienzo, + (Variant)CtrlTiempo, idc, idtc, Precio )) ); + CtrlPPal->TbHistorial -> FlushBuffers(); + // Descontamos al cliente su tiempo del bono... + if ( UsaBono ) + { + TBookmark SavePlace; + // get a bookmark so that we can return to the same record + SavePlace = CtrlPPal->TbPersonas->GetBookmark(); + + if ( CtrlPPal->TbPersonas->Locate( "CodCliente1", idc, TLocateOptions() << loCaseInsensitive) ) + { + unsigned short Hour, Min, Sec, MSec; + CtrlTiempo.DecodeTime( &Hour, &Min, &Sec, &MSec ); + + NCliente = CtrlPPal->TbPersonas->FieldByName("Nombre")->AsString + " " + CtrlPPal->TbPersonas->FieldByName("Apellidos")->AsString; + CtrlPPal->TbPersonas->Edit(); + if ( CtrlPPal->TbPersonas->FieldByName("TiempoM")->AsInteger < Min ) + { + CtrlPPal->TbPersonas->FieldByName("TiempoH")->AsInteger = CtrlPPal->TbPersonas->FieldByName("TiempoH")->AsInteger - Hour -1; + CtrlPPal->TbPersonas->FieldByName("TiempoM")->AsInteger = (CtrlPPal->TbPersonas->FieldByName("TiempoM")->AsInteger +60 - Min); + } else { + CtrlPPal->TbPersonas->FieldByName("TiempoH")->AsInteger = CtrlPPal->TbPersonas->FieldByName("TiempoH")->AsInteger - Hour; + CtrlPPal->TbPersonas->FieldByName("TiempoM")->AsInteger = CtrlPPal->TbPersonas->FieldByName("TiempoM")->AsInteger - Min; + } + + CtrlPPal->TbPersonas->FieldByName("FModif")->AsDateTime = TDateTime::CurrentDateTime(); + CtrlPPal->TbPersonas->Post(); + CtrlPPal->TbPersonas->FlushBuffers(); + } else { + NCliente = "## No ENCONTRADO ##"; + } + // Move back to the bookmark + CtrlPPal->TbPersonas->GotoBookmark(SavePlace); + CtrlPPal->TbPersonas->FreeBookmark(SavePlace); + } +} +//--------------------------------------------------------------------------- +void __fastcall TElemento::SetActiveTime( TDateTime Tiempo, int L_idc, int L_idtc, Currency L_Precio ) +{ + idc = L_idc; idtc = L_idtc; Precio = L_Precio; + TDateTime Queda = TiempoRestante(); + BlinkCode = IP_QUERY; + StatusCode = ERROR; +// Blink->Enabled = true; + Blink->Interval = Blinking; + + if ( Revisor->Enabled ) + { + PideMasTiempo = true; + Revisor->Enabled = false; + TiempoComienzo = TDateTime::CurrentDateTime() + Queda; + } else { + PideMasTiempo = false; + TiempoComienzo = TDateTime::CurrentDateTime(); + } + TiempoPedido = Tiempo; + + ThreadSocket *MySocket; + MySocket = (ThreadSocket *)CtrlPPal->GetThread(); + MySocket->SetSocket( myIP, 5432 ); + MySocket->CtrlCOP = SettingSTATUS; + MySocket->OWNER_Element = this; + if ( PideMasTiempo ) + MySocket->CtrlTiempo = TiempoPedido + Queda; + else + MySocket->CtrlTiempo = TiempoPedido; + MySocket->CtrlState = true; + MySocket->Resume(); + + unsigned short hour, min, sec, msec; + if ( PideMasTiempo ) Tiempo = Tiempo + Queda; + Tiempo.DecodeTime( &hour, &min, &sec, &msec ); + Revisor->Interval = msec + ( sec + ( (min+0) + hour*60 )*60 )*1000 ; + Revisor->Enabled = true; +} +//--------------------------------------------------------------------------- +void __fastcall TElemento::OnBlink(TObject *Sender) +{ + + ultImagen = !ultImagen; + // Mostrar parpadeo según corresponda... + switch ( BlinkCode ) + { + case IP_OFF: + if ( SurfaceIs != sfRoja ) + { + SurfaceIs = sfRoja; + Picture = CtrlPPal->iElemento2->Picture; + WriteMyName(); + } + if ( ultImagen ) + Canvas->Draw( 17, 3, CtrlPPal->iElemento3->Picture->Graphic ); + else + Canvas->FillRect(Rect(17,4,60,48)); + break; + case IP_QUERY: + if ( SurfaceIs != sfAzul ) + { + SurfaceIs = sfAzul; + Picture = CtrlPPal->iElementoV->Picture; + WriteMyName(); + } + if ( ultImagen ) + Canvas->Draw( 17, 3, CtrlPPal->iElemento4->Picture->Graphic ); + else + Canvas->FillRect(Rect(17,4,60,48)); + break; + case NONE: + default: + ShowElementInfo(); + break; + } +} +//--------------------------------------------------------------------------- +void __fastcall TElemento::OnRevisor(TObject *Sender) +{ + ForcedTimeOut(); +// ShowMessage( + CtrlPPal->Memo1->Lines->Insert( 0, (Now()).DateTimeString() + Format( " Terminal %d. Fin de Tiempo. :_)", ARRAYOFCONST((NumElemento)))); + + Revisor->Enabled = false; +} +//--------------------------------------------------------------------------- +void __fastcall TElemento::ForcedTimeOut(void) +{ + Revisor->Enabled = false; + StatusCode = ERROR; // Estamos en proceso de COMPROBACION / ERROR + BlinkCode = IP_QUERY; // --- INTENTANDO COMUNICAR -- +// Blink->Enabled = true; // Activamos el parpadeo + Blink->Interval = Blinking; + + /// ENVIAMOS EL MENSAJE... + ThreadSocket *MySocket; + MySocket = (ThreadSocket *)CtrlPPal->GetThread(); + MySocket->SetSocket( myIP, 5432 ); + MySocket->CtrlCOP = SettingSTATUS; + MySocket->OWNER_Element = this; + MySocket->CtrlState = false; + MySocket->Resume(); + + //################################################################################################ + TBookmark SavePlace; + SavePlace = CtrlPPal->TbElementosCFG->GetBookmark(); + if ( CtrlPPal->TbElementosCFG -> Locate( "NumElement", NumElemento, TLocateOptions() << loCaseInsensitive ) ) + { + if ( CtrlPPal->TbElementosCFG->FieldByName( "Activo" )->AsBoolean ) + { + CtrlPPal->TbElementosCFG->Edit(); + CtrlPPal->TbElementosCFG->FieldByName( "Tiempo" )->AsDateTime = EncodeTime( 0, 0, 0, 0 ); + CtrlPPal->TbElementosCFG->FieldByName( "Activo" )->AsBoolean = false; + CtrlPPal->TbElementosCFG->Post(); + } + } + CtrlPPal->TbElementosCFG->GotoBookmark(SavePlace); + CtrlPPal->TbElementosCFG->FreeBookmark(SavePlace); + //################################################################################################ +} +//--------------------------------------------------------------------------- +void __fastcall TElemento::MouseDown(TMouseButton Button, Classes::TShiftState Shift, int X, int Y) +{ + Picture = CtrlPPal->iElemento2->Picture; + if ( CtrlPPal->ChangePositionEnabled ) + { + if ( Button == mbLeft ) + ElementoAnclado = true; + faElmX = X; + faElmY = Y; + } + +} +//--------------------------------------------------------------------------- +void __fastcall TElemento::MouseMove(TShiftState Shift, int X, int Y) +{ + if ( CtrlPPal->ChangePositionEnabled ) + { + if ( ElementoAnclado ) + { + POINT MousePos; + GetCursorPos(&MousePos); + Left = MousePos.x - CtrlPPal->Left - CtrlPPal->Pizarra->Left - faElmX; + Top = MousePos.y - CtrlPPal->Top - CtrlPPal->Pizarra->Top - faElmY; + } + } +} +//--------------------------------------------------------------------------- +void __fastcall TElemento::MouseUp(TMouseButton Button, Classes::TShiftState Shift, int X, int Y) +{ + // (Mover) + if ( Button == mbLeft ) + { + if ( CtrlPPal->ChangePositionEnabled ) + { + ElementoAnclado = false; + if ( Left <= 0 ) Left = 0; + if ( Top <= 0 ) Top = 0; + + // ########################################################################################## + if ( CtrlPPal->TbElementosCFG -> Locate( "NumElement", NumElemento, TLocateOptions() << loCaseInsensitive ) ) + { + CtrlPPal->TbElementosCFG -> Edit(); + CtrlPPal->TbElementosCFG -> FieldByName("PosX") -> AsInteger = Left; + CtrlPPal->TbElementosCFG -> FieldByName("PosY") -> AsInteger = Top; + CtrlPPal->TbElementosCFG -> Post(); + } + // ########################################################################################## + } + } + SurfaceIs = sfNone; + ShowElementInfo(); +} +//--------------------------------------------------------------------------- +// TiempoInicio --> Tiempo que queda hasta la desconexión +void __fastcall TElemento::ClientTimeIs( double Tiempo, double TiempoInicio ) +{ + BlinkCode = NONE; +// Blink->Enabled = false; + Blink->Interval = 60000; + + if ( Tiempo <= 0 ) + { + StatusCode = FREE; + Revisor->Enabled = false; + } else { + if ( StatusCode !=WORKING || (double)TiempoPedido < Tiempo ) + { + TiempoComienzo = ( TDateTime::CurrentTime() - (Tiempo - TiempoInicio) ); +// TiempoComienzo = TiempoInicio; + TiempoPedido = Tiempo; + + unsigned short hour, min, sec, msec; + RTiempoRestante = TiempoInicio; + RTiempoRestante.DecodeTime( &hour, &min, &sec, &msec ); + + Revisor->Enabled = false; + Revisor->Interval = msec + ( sec + ( (min+0) + hour*60 )*60 )*1000 ; + Revisor->Enabled = true; + } + StatusCode = WORKING; + } + + ShowElementInfo(); +} +//--------------------------------------------------------------------------- +void __fastcall TElemento::ShowElementInfo( void ) +{ + if ( StatusCode != ERROR ) + { +// Picture = StatusCode != FREE ? CtrlPPal->iElementoV->Picture : CtrlPPal->iElemento5->Picture; + Picture = CtrlPPal->iElementoV->Picture; + WriteMyName(); + + unsigned short h, m, s, ms; int w; + AnsiString sOUT; + + Canvas->Font->Size = 12; + sOUT = "# " + AnsiString( NumElemento ) + " #"; w = ( 44 - Canvas->TextWidth( sOUT ) ) / 2; + + // En caso de estar activo el terminal + if ( StatusCode == WORKING ) + { + Canvas->Font->Color = clRed; /*Nombre del Terminal*/ Canvas->TextOut( 17+w, 3, sOUT ); + + Canvas->Font->Color = clBlue; Canvas->Font->Size = 10; + + // Hora en la que inicia la sesión. + TiempoComienzo.DecodeTime( &h, &m, &s, &ms ); + sOUT = Format( "%02d:%02d", ARRAYOFCONST(( h, m )) ); + w = ( 44 - Canvas->TextWidth( sOUT ) ) / 2; + Canvas->TextOut( 17+w, 22, sOUT ); + // Tiempo de juego que le queda + TDateTime Queda; + Queda = TiempoRestante();//TiempoPedido + TiempoComienzo - TDateTime::CurrentTime(); + Queda.DecodeTime( &h, &m, &s, &ms ); + Canvas->TextOut( 17, 35, Format( "R: %02d:%02d", ARRAYOFCONST(( h, (m+1) ))) ); +/* + // Tiempo de juego que le fue asignado + (TbElementosCFG->FieldByName( "Tiempo" )->AsDateTime).DecodeTime( &h, &m, &s, &ms ); + E->Canvas->TextOut( 17, 40, Format( "((( %02d:%02d )))", ARRAYOFCONST(( h, m ))) ); +*/ + } else { + Canvas->Font->Color = clBlue; + // Nombre/Número del terminal + Canvas->TextOut( 17+w, 3, sOUT ); + + // El terminal esta libre + Canvas->Font->Color = clGreen; + Canvas->TextOut( 15, 25, "LIBRE" ); + } + } +} +//--------------------------------------------------------------------------- +void __fastcall TElemento::CerrarWindows( void ) +{ + StatusCode = ERROR; // Estamos en proceso de COMPROBACION / ERROR + BlinkCode = IP_QUERY; // --- INTENTANDO COMUNICAR -- +// Blink->Enabled = true; // Activamos el parpadeo /// ENVIAMOS EL MENSAJE... + Blink->Interval = Blinking; + + ThreadSocket *MySocket; + MySocket = (ThreadSocket *)CtrlPPal->GetThread(); + MySocket->SetSocket( myIP, 5432 ); + MySocket->CtrlCOP = CloseWINDOWS; + MySocket->CtrlState = CloseWINDOWS; + MySocket->Resume(); + + // Actualizamos el historial + CtrlPPal->TbHistorial -> InsertRecord( ARRAYOFCONST(( NumElemento, + (Variant)TDateTime::CurrentDateTime(), + (Variant)TiempoRestante(), 0, 999, 0 )) ); + +} +//--------------------------------------------------------------------------- +void __fastcall TElemento::EnviarListasAppl( void ) +{ +/* + StatusCode = ERROR; // Estamos en proceso de COMPROBACION / ERROR + BlinkCode = IP_QUERY; // --- INTENTANDO COMUNICAR -- + Blink->Interval = Blinking; +*/ + + ThreadSocket *MySocket; + MySocket = (ThreadSocket *)CtrlPPal->GetThread(); + MySocket->SetSocket( myIP, 5432 ); + MySocket->CtrlCOP = sendLIST; + MySocket->CtrlState = sendLIST; + MySocket->Resume(); + + // Actualizamos el historial + CtrlPPal->TbHistorial -> InsertRecord( ARRAYOFCONST(( NumElemento, + (Variant)TDateTime::CurrentDateTime(), + (Variant)TiempoRestante(), 0, 997, 0 )) ); + +} +//--------------------------------------------------------------------------- +void __fastcall TElemento::WriteMyName( void ) +{ + int W; + + Canvas->Font->Color = clRed; + Canvas->Font->Style = Canvas->Font->Style << fsBold; + Canvas->Font->Size = 10; + W = ( 77 - Canvas->TextWidth( myName ) ) / 2; + Canvas->TextOut( W, 64, myName ); + Canvas->Font->Style = Canvas->Font->Style >> fsBold; +} +//--------------------------------------------------------------------------- +TDateTime __fastcall TElemento::TiempoRestante(void) +{ + return TiempoPedido + TiempoComienzo - TDateTime::CurrentTime(); +} +//--------------------------------------------------------------------------- +TDateTime __fastcall TElemento::TiempoInicio(void) +{ + return TiempoComienzo; +} +//--------------------------------------------------------------------------- + diff --git a/src/CtrlElemento.h b/src/CtrlElemento.h new file mode 100644 index 0000000..47cc371 --- /dev/null +++ b/src/CtrlElemento.h @@ -0,0 +1,74 @@ +//--------------------------------------------------------------------------- +#ifndef CtrlElementoH +#define CtrlElementoH +//--------------------------------------------------------------------------- +//########################################################################### +//########################################################################### +//########################################################################### +//--------------------------------------------------------------------------- +enum BlinkCodes { NONE=-1, IP_OFF=0, IP_QUERY=1 }; +enum SurfaceAre { sfNone=-1, sfRoja=1, sfAzul=2 }; + +class TElemento : public TImage +{ +private: + TTimer *Revisor; // Salta cuando se acaba el tiempo + DYNAMIC void __fastcall MouseDown(TMouseButton Button, Classes::TShiftState Shift, int X, int Y); + DYNAMIC void __fastcall MouseUp (TMouseButton Button, Classes::TShiftState Shift, int X, int Y); + DYNAMIC void __fastcall MouseMove(TShiftState Shift, int X, int Y); + + void __fastcall OnBlink(TObject *Sender); + void __fastcall OnRevisor(TObject *Sender); + bool ultImagen, PideMasTiempo; + + int idc; int idtc; Currency Precio; +protected: + AnsiString myIP; + AnsiString myName; + + TDateTime TiempoPedido, TiempoComienzo; + + bool ElementoAnclado; // ¿Elemento cogido con el ratón? + int faElmX, faElmY; // Factores de ajuste al mover... + +#define ERROR -1 +#define FREE 0 +#define WORKING 1 + +// enum StatusCodes { ERROR=-1, FREE=0, WORKING=1 } StatusCode; + +public: + AnsiString NCliente; + TTimer *Blink; // Encargado de hacer parpadear la imagen (p.e: errores) + BlinkCodes BlinkCode; + SurfaceAre SurfaceIs; + + int StatusCode; + int NumElemento; + + __fastcall TElemento(TComponent* Owner); + __fastcall ~TElemento(); + + AnsiString __fastcall GiveMyIP(void){return myIP;}; + AnsiString __fastcall GiveMyName(void){return myName;}; + void __fastcall WriteMyName(void); + void __fastcall ShowElementInfo(void); + void __fastcall EnviarListasAppl(void); + void __fastcall SetElemento( int Elemento, AnsiString IP, AnsiString Name ); + void __fastcall HistoricoTermON( TDateTime CtrlTiempo ); + void __fastcall RefreshElement(void); + void __fastcall SetActiveTime( TDateTime Tiempo, int L_idc, int L_idtc, Currency L_Precio ); + void __fastcall ClientTimeIs( double Tiempo, double TiempoInicio ); + void __fastcall CerrarWindows(void); + void __fastcall ForcedTimeOut(void); + TDateTime __fastcall TiempoRestante(void); + TDateTime __fastcall TiempoInicio(void); + TDateTime __fastcall iTiempoPedido(void){return TiempoPedido;}; + TDateTime RTiempoRestante; + Currency ImporteAcumulado; + +}; +//--------------------------------------------------------------------------- + + +#endif diff --git a/src/CtrlMstr.bpr b/src/CtrlMstr.bpr new file mode 100644 index 0000000..0f7f3ad --- /dev/null +++ b/src/CtrlMstr.bpr @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=0 +Build=103 +Debug=1 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=3082 +CodePage=1252 + +[Version Info Keys] +CompanyName=JD soft. +FileDescription=Control Maestro de sistemas +FileVersion=1.0.0.103 +InternalName=CtrlMstr +LegalCopyright=Copyright (C) JD soft. 1990-2000 +LegalTrademarks=JD Soft. +OriginalFilename=CtrlMstr +ProductName=Lock It! +ProductVersion=1.0.0.0 +Comments=e-mail: Jose-David.Guillen@cs.us.es + +[HistoryLists\hlIncludePath] +Count=10 +Item0=$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl;..\VCLs\include;..\C++ Builder\VCLs\include +Item1=..\AgendaLlamadas;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl;..\VCLs\include +Item2=$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl;..\VCLs\include;C:\Mis documentos\Fuentes de Programacion\C++ Builder\VCLs\include\ +Item3=$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl;..\VCLs\include;C:\Mis documentos\Fuentes de Programacion\C++ Builder\VCLs\include +Item4=$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl;..\VCLs\include +Item5=$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl;C:\Mis documentos\Fuentes de Programacion\C++ Builder\VCLs\include +Item6=..\jd soft\actimg;..\jd soft\jd\actimg;..\componentes\cdopping\coolform;..\jd soft\jd;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl;D:\JDsoft\PrjTPVwin\VCLs\include +Item7=..\jd soft\actimg;..\jd soft\jd\actimg;..\componentes\cdopping\coolform;..\jd soft\jd;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl +Item8=..\componentes\cdopping\coolform;..\jd soft\jd;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl +Item9=..\jd soft\jd;l:\programación (-cbuilder-)\jd soft\jd;l:\cbuilder\cbuilder\objrepos;j:\cbuilder\cbuilder\bin;j:\cbuilder\cbuilder\bin;j:\cbuilder\cbuilder\objrepos;$(BCB)\bin;$(BCB)\objrepos;j:\cbuilder\jd soft;j:\progwin95\jd soft;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=14 +Item0=$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;..\VCLs\lib;..\C++ Builder\VCLs\lib +Item1=$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;..\VCLs\lib;..\C++ Builder\VCLs\include +Item2=..\AgendaLlamadas;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;..\VCLs\lib +Item3=$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;..\VCLs\lib;C:\Mis documentos\Fuentes de Programacion\C++ Builder\VCLs\lib\ +Item4=$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;..\VCLs\lib;C:\Mis documentos\Fuentes de Programacion\C++ Builder\VCLs\lib +Item5=$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;..\VCLs\lib;C:\Mis documentos\Fuentes de Programacion\C++ Builder\VCLs\include\ +Item6=$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;..\VCLs\lib;C:\Mis documentos\Fuentes de Programacion\C++ Builder\VCLs\include +Item7=$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;..\VCLs\lib +Item8=$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;C:\Mis documentos\Fuentes de Programacion\C++ Builder\VCLs\lib +Item9=..\VCLs\lib;..\jd soft\actimg;..\jd soft;..\jd soft\jd\actimg;..\componentes;..\componentes\cdopping\coolform;..\jd soft\jd;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;D:\JDsoft\PrjTPVwin\VCLs\lib +Item10=..\jd soft\actimg;..\jd soft;..\jd soft\jd\actimg;..\componentes;..\componentes\cdopping\coolform;..\jd soft\jd;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;D:\JDsoft\PrjTPVwin\VCLs\lib +Item11=..\jd soft\actimg;..\jd soft;..\jd soft\jd\actimg;..\componentes;..\componentes\cdopping\coolform;..\jd soft\jd;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib +Item12=..\componentes;..\componentes\cdopping\coolform;..\jd soft\jd;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib +Item13=..\jd soft\jd;l:\programación (-cbuilder-)\jd soft\jd;l:\cbuilder\cbuilder\objrepos;j:\cbuilder\cbuilder\bin;j:\cbuilder\cbuilder\bin;j:\cbuilder\cbuilder\objrepos;$(BCB)\bin;$(BCB)\objrepos;j:\cbuilder\jd soft;j:\progwin95\jd soft;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlUnitAliases] +Count=1 +Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=d:\temp\ +Item1=d:\temp + +[Debugging] +DebugSourceDirs= + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=1 +LinkDebugVcl=1 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + + \ No newline at end of file diff --git a/src/CtrlMstr.cpp b/src/CtrlMstr.cpp new file mode 100644 index 0000000..d9618c2 --- /dev/null +++ b/src/CtrlMstr.cpp @@ -0,0 +1,40 @@ +//--------------------------------------------------------------------------- +#include + +#pragma hdrstop +USERES("CtrlMstr.res"); +USEFORM("CtrlPPal.cpp", CtrlPPal); +USEFORM("TStatus.cpp", Status); +USEUNIT("CtrlSocket.cpp"); +USEFORM("CtrlCfg.cpp", ElementosCFG); +USEUNIT("CtrlElemento.cpp"); +USEFORM("FichasClientes.cpp", FClientes); +USEFORM("FormularioREUSABLE.cpp", FormREUSABLE); +USEFORM("ComprarBono.cpp", CBono); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + AnsiString FsMutex = DateToStr(TDateTime::CurrentDate()) + AnsiString("-mutex-ctrlmstr"); + HANDLE FhMutex = OpenMutex(MUTEX_ALL_ACCESS,False, FsMutex.c_str() ); + if ( FhMutex == 0 ) //it's a first instance + { + FhMutex = CreateMutex(NULL,false, FsMutex.c_str() ); + + try + { + Application->Initialize(); + Application->Title = "Control Maestro"; + Application->CreateForm(__classid(TCtrlPPal), &CtrlPPal); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + + } else { + if ( CloseHandle(FhMutex) ) FhMutex = 0; + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/src/CtrlMstr.res b/src/CtrlMstr.res new file mode 100644 index 0000000..393696b Binary files /dev/null and b/src/CtrlMstr.res differ diff --git a/src/CtrlPPal.cpp b/src/CtrlPPal.cpp new file mode 100644 index 0000000..47d9eb8 --- /dev/null +++ b/src/CtrlPPal.cpp @@ -0,0 +1,909 @@ +//--------------------------------------------------------------------------- +#include +#include +#pragma hdrstop + +#include +#include +#include +#include +#include + +#include "CtrlPPal.h" +#include "TStatus.h" +#include "CtrlSocket.h" +#include "CtrlCfg.h" +#include "CtrlElemento.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "CoolForm" +#pragma resource "*.dfm" +TCtrlPPal *CtrlPPal; + +//////////////////////////////////////////////////////////////////////////////// +#define MsgDEMO "No olvide que esto es solo una demostración.\nPara adquirir la aplicación completa:\nPongase en contacto con JD soft.\n\te-mail: jd@infdj.com\n\tTlf: 95561-58-54 Fax: 95561-49-13" +#define DEMOSTRACION +#ifdef DEMOSTRACION + #define CnElementosMAX 3 +#else + #define CnElementosMAX 11 // Num. máximo de elementos permitidos +#endif +//////////////////////////////////////////////////////////////////////////////// + +#define opLOG "Historic.log" + +//--------------------------------------------------------------------------- +__fastcall TCtrlPPal::TCtrlPPal(TComponent* Owner) + : TForm(Owner) +{ + // Remote Control + ClientHook = false; + ServerHook = false; + RemoteStart -> Visible = true; + + + remoteBack->Visible = false; + remoteLog->Visible = false; + remoteClose->Visible = false; + // Remote Control + + siMinimizar = new TStringList(); // Listado de Aplicaciones Especiales + noMinimizar = new TStringList(); // Listado de Aplicaciones Especiales + snMinimizar = new TStringList(); // Listado de Aplicaciones Especiales + noAbrir = new TStringList(); // Listado de Aplicaciones Especiales + + LoadProtectedList(); // Carga los listados de Aplicaicones protegidas + + nElementosMAX = CnElementosMAX; // Número maximos de elementos + Elementos = new TList(); // Lista de Elementos en funcionamiento + AnySocketActive = 0; // Nº de socket REALMENTE activos + pCache = new TThreadList; // Lista de Hilos de comunicación + + ChangePositionEnabled = false; // Permiso para mover la posición de los elementos + + CheckAppIntegrity(); // El directorio de instalacion no puede moverse + StartEventRecorder(); // Comenzamos la grabación de eventos + TbElementosCFG->Active = true; // Abrimos la tabla de elementos para hacerlos visibles + TbPersonas->Active = true; +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::LoadProtectedList(void) +{ + //LoadProtectedList(); +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::StartEventRecorder(void) +{ + TbHistorial->Active = true; // Tabla de eventos del sistema + try { + // Cargamos todos los eventos anteriores + Memo1->Lines->LoadFromFile( opLOG ); + // Si hay demasiados registros + if ( Memo1->Lines->Count > 700 ) + { + for ( int i=0; i<100; i++ ) // Eliminamos las 100 últimas entradas + Memo1->Lines->Delete( 3 ); + } + } catch(...) { + Memo1->Lines->Clear(); // En caso de error, las eliminamos todas + } + //Fecha y hora del inicio de sesión + Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Inicio de la sesión" ); +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::iCloseDblClick(TObject *Sender) +{ + Close(); +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::iMinClick(TObject *Sender) +{ + Application->Minimize(); +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::iPosVClick(TObject *Sender) +{ +#ifdef DEMOSTRACION + ShowMessage( MsgDEMO ); +#endif + if ( ChangePositionEnabled || ( !ChangePositionEnabled && InputBox( "Programa BETA!!!", "Modificar:", "¿Que Modificar?") == "Esto es una beta" ) ) + { + Graphics::TBitmap *Picture; + + ChangePositionEnabled = !ChangePositionEnabled; + + Picture = iPosV->GlyphNormal; + iPosV->GlyphNormal = iPosV->GlyphPress; + iPosV->GlyphPress = Picture; + } +} +//--------------------------------------------------------------------------- +/** + Comprueba que el directorio de la aplicación es siempre el mismo + + (De este modo, la aplicación no correra en ningún directorio distinto, del + que se eligió para instalar) +**/ +void __fastcall TCtrlPPal::CheckAppIntegrity(void) +{ + TRegistry *Registro; + Registro = new TRegistry; + Registro -> OpenKey( "\\Software\\JDsoft\\CtrlMstr", true ); + AnsiString AppPath; + + if ( ! Registro->ValueExists( "AppPath" ) ) + { + Registro -> WriteString( "AppPath", Application->ExeName ); + } else { + AppPath = Registro -> ReadString( "AppPath" ); + if ( AppPath != Application->ExeName ) + { + ShowMessage( "Copia corrupta o ilegal del programa.\nVuelva a reinstalar el producto." ); + nElementosMAX = 0; + } + } + + AnsiString DiskSerial; + char VolumeLabel[255], FileSystem[255]; + DWord SerialNumber, DW, SysFlags; + + GetVolumeInformation( "C:\\", VolumeLabel, 250, &SerialNumber, &DW, &SysFlags, FileSystem, 250); + DiskSerial = AnsiString( ltoa(SerialNumber, FileSystem,10) ); + + + if ( ! Registro->ValueExists( "SerialNum" ) ) + { + AnsiString Serial; + Serial = InputBox( "Registrando el Programa:", "Número de Serie:", DiskSerial ); + if ( ! Manipula2( DiskSerial, Serial ) ) + { + Registro -> WriteString( "SerialNum", Serial ); + } + } + if ( Manipula( DiskSerial, Registro -> ReadString( "SerialNum" ) ) ) + { + ShowMessage( "Copia corrupta o ilegal del programa.\nVuelva a reinstalar el producto." ); + nElementosMAX = 0; + Registro -> DeleteValue( "SerialNum" ); + Registro -> DeleteKey( "\\Software\\JDsoft\\CtrlMstr\\SerialNum" ); + } +} +//----------------- +bool __fastcall TCtrlPPal::Manipula2(AnsiString Serial, AnsiString Image) +{ + char buffer[80]; + AnsiString Sol; + double ser = Serial.ToDouble(); + if ( ser < 0 ) ser = -1*ser; + Sol = ltoa(sqrtl(ser), buffer, 10); +#ifndef DEMOSTRACION + if ( Image == Sol ) +#endif + return false; + + return true; +} +//----------------- +bool __fastcall TCtrlPPal::Manipula(AnsiString Serial, AnsiString Image) +{ + char buffer[80]; + AnsiString Sol; + double ser = Serial.ToDouble(); + if ( ser < 0 ) ser = -1*ser; + Sol = ltoa(sqrtl(ser), buffer, 10); +#ifndef DEMOSTRACION + if ( Image == Sol ) +#endif + return false; + + return true; +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::FormDestroy(TObject *Sender) +{ + delete siMinimizar; + delete noMinimizar; + delete snMinimizar; + delete noAbrir; + + for( int i=0; i < Elementos->Count; i++ ) + delete (TElemento *)Elementos->Items[i]; + delete Elementos; +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::NewElementAt(int X, int Y, int NumEl, AnsiString IP, AnsiString Name ) +{ + TElemento *Elemento; // Elemento a ser insertado + Elemento = new TElemento(this); // Pedimos memoria para él + Elemento->Left = X; // + Elemento->Top = Y; // FIJAMOS SUS PROPIEDADES + Elemento->AutoSize = true; // + Elemento->Transparent = true; // + Elemento->PopupMenu = mElementoCFG; // Menú contextual + Elemento->OnDblClick = ElementoDblClick; // + + Elementos->Add( Elemento ); // Añadimos el elemento a la lista + // Lo hacemos visible + Pizarra->InsertControl( Elemento ); + + Elemento->SetElemento( NumEl, IP, Name ); // Y comenzamos la comunicación +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::PizarraDblClick(TObject *Sender) +{ + POINT MousePos; + int X, Y; + + // Si lo que quiere es reubicar un nuevo elemento + if ( ChangePositionEnabled ) + { +#ifndef DEMOSTRACION + // Anexamos un nuevo elemento a la lista (Si no hemos llegado al límite) + if ( Elementos->Count < nElementosMAX ) + { + GetCursorPos(&MousePos); + X = MousePos.x - Left - Pizarra->Left - iElementoV->Picture->Width / 2; + Y = MousePos.y - Top - Pizarra->Top - iElementoV->Picture->Height / 2 ; + try { + // Lo damos de Alta en la tabla +/* + TbElementosCFG -> InsertRecord( ARRAYOFCONST( + ( Null, // Numero de Elemento + X, // Posición X + Y, // Posición Y + false, "0.0.0.0", "new"+AnsiString(Elementos->Count) + ) ) ); +*/ + + AnsiString NameOfElement = "new"+AnsiString(TbElementosCFG->FieldByName("NumElement")->AsInteger); + + TbElementosCFG -> Insert(); + TbElementosCFG -> Edit(); + TbElementosCFG -> FieldByName( "PosX" )-> AsInteger = X; + TbElementosCFG -> FieldByName( "PosY" )-> AsInteger = Y; + TbElementosCFG -> FieldByName( "Activo" )-> AsBoolean = false; + TbElementosCFG -> FieldByName( "IP" )-> AsString = "0.0.0.0"; + TbElementosCFG -> FieldByName( "Name" )-> AsString = NameOfElement; + TbElementosCFG -> Post(); + + NewElementAt( X, Y, TbElementosCFG->FieldByName("NumElement")->AsInteger, "0.0.0.0", NameOfElement ); + Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Inserción de nuevos elementos" ); + } catch (...) { + ShowMessage( "¿¿¿ SIN MEMORIA ???\nTu Güindows está petando" ); + } + } else + ShowMessage( "Ha superado el máximo número de elementos\n¡¡¡ IMPOSIBLE AÑADIR MAS !!!" ); +#else + ShowMessage( MsgDEMO ); +#endif + } +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::EliminarElemento(TObject *Sender) +{ + if ( ServerHook ) return; + + int TraceMeHacker; + TraceMeHacker = Elementos->Count; + +#ifndef DEMOSTRACION + if ( ChangePositionEnabled ) + { + TElemento *Elemento = (TElemento *)(mElementoCFG->PopupComponent); + + // Eliminamos el objeto de la tabla + if ( TbElementosCFG -> Locate( "NumElement", Elemento->NumElemento, TLocateOptions() << loCaseInsensitive ) ) + { + TbElementosCFG -> Delete(); // Eliminamos el elemento de la TABLA + Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Elemento nº " + AnsiString( Elemento->NumElemento ) + ", eliminado." ); + + Pizarra->RemoveControl( Elemento ); // Eliminamos el elemento de la PIZARRA + Elementos->Remove( Elemento ); // Eliminamos el elemento de la MEMORIA + Elementos->Pack(); + } + } +#else + + ShowMessage( MsgDEMO ); + +#endif + + if ( TraceMeHacker == Elementos->Count ) + ShowMessage( "Lo siento pero carece de permisos para modificar los terminales.\n¡¡Su intento ha quedado registrado!!" ); + +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::TbElementosCFGBeforeOpen(TDataSet *DataSet) +{ + // Si la tabla no existe, la creamos + if ( access( (TbElementosCFG -> TableName).c_str(), 0 ) != 0 ) + { + // Usamos la propiedad FielDefs para definir + // las columnas que contendrá la tabla + TbElementosCFG -> FieldDefs -> Clear(); + + TbElementosCFG -> FieldDefs -> Add("NumElement", ftAutoInc, 0, false ); + TbElementosCFG -> FieldDefs -> Add("PosX", ftInteger, 0, false ); + TbElementosCFG -> FieldDefs -> Add("PosY", ftInteger, 0, false ); + TbElementosCFG -> FieldDefs -> Add("Activo", ftBoolean, 0, false ); + TbElementosCFG -> FieldDefs -> Add("IP", ftString, 15, false ); + TbElementosCFG -> FieldDefs -> Add("Name", ftString, 8, false ); + TbElementosCFG -> FieldDefs -> Add("Comienzo", ftDateTime, 0, false ); + TbElementosCFG -> FieldDefs -> Add("Tiempo", ftDateTime, 0, false ); + + TbElementosCFG -> IndexDefs-> Clear(); + TbElementosCFG->IndexDefs->Add("Primary", "NumElement", TIndexOptions() << ixPrimary << ixUnique ); + + // Creamos la base... + TbElementosCFG -> CreateTable(); + Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Iniciando sistema por primera vez..." ); + } +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::TbElementosCFGAfterOpen(TDataSet *DataSet) +{ + int i; HoraActual = TDateTime::CurrentTime(); + + // Cargamos todos los elementos + TbElementosCFG -> First(); i = 0; + while ( ! TbElementosCFG->Eof && i < nElementosMAX ) + { + +/* + if ( TbElementosCFG->FieldByName( "Activo" )->AsBoolean ) + { + if ( MessageBox( NULL, AnsiString("El equipo arriba indicado se encuentra \"ocupado\"\n¿ Desea dejar libre este equipo ?").c_str(), AnsiString("Equipo " + TbElementosCFG->FieldByName( "NumElement" )->AsString + " ¿Activo?").c_str(), MB_YESNO ) != IDNO ) + { + TbElementosCFG->Edit(); + TbElementosCFG->FieldByName( "Activo" )->AsBoolean = false; + TbElementosCFG->Post(); + Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Elemento nº" + TbElementosCFG->FieldByName( "NumElement" )->AsString + ", estaba activo" ); + } else { + Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Elemento nº" + TbElementosCFG->FieldByName( "NumElement" )->AsString + ", SIGUE activo" ); + } + } +*/ + NewElementAt( TbElementosCFG->FieldByName( "PosX" )->AsInteger, + TbElementosCFG->FieldByName( "PosY" )->AsInteger, + TbElementosCFG->FieldByName( "NumElement" )->AsInteger, + TbElementosCFG->FieldByName( "IP" )->AsString, + TbElementosCFG->FieldByName( "Name" )->AsString + ); + TbElementosCFG -> Next(); i++; + } +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::Estado1Click(TObject *Sender) +{ + if ( !ServerHook ) + ElementoDblClick(mElementoCFG->PopupComponent); +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::ElementoDblClick(TObject *Sender) +{ + // Abrimos el cuadro de dialogo de Status... + if ( ((TElemento *)Sender)->StatusCode != -1 ) + { + TStatus *Status; + Status = new TStatus(this); + Status->SetElement( (TElemento *)Sender ); + Status -> ShowModal(); + delete Status; + } +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::FormClose(TObject *Sender, TCloseAction &Action) +{ +#ifdef DEMOSTRACION + ShowMessage( MsgDEMO ); +#endif + clientHook->Close(); + Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Fin de la sesión" ); + Memo1->Lines->SaveToFile( opLOG ); +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::FormDeactivate(TObject *Sender) +{ + FreeThreads(); +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::Propiedades1Click(TObject *Sender) +{ + if ( ServerHook ) return; + + if ( ChangePositionEnabled ) + { + TElementosCFG *ElementosCFG; + ElementosCFG = new TElementosCFG(this); + ElementosCFG -> ShowModal(); + delete ElementosCFG; + Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Se han modificado las direcciones IP" ); + + LoadProtectedList(); + } +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::CerrarWindows1Click(TObject *Sender) +{ + TElemento *Elemento = (TElemento *)(mElementoCFG->PopupComponent); + + if ( MessageBox( NULL, "¿ Realmente quiere cerrar el equipo ?", AnsiString("Equipo n: -- " + AnsiString( Elemento->NumElemento ) + " --" +" Nombre: \""+Elemento->GiveMyName()+"\"" ).c_str(), MB_OKCANCEL ) == IDOK ) + { + if ( ServerHook ) + { + ServerHookCode = 5660; ServerHookElement = Elemento->NumElemento; + serverHook->Active = true; + } else + Elemento->CerrarWindows(); + } +} +//--------------------------------------------------------------------------- +TThread * TCtrlPPal::GetThread(void) +{ + TList *pList = pCache->LockList(); + TThread *NewThread; + if (pList->Count) // cache is not empty + { + NewThread = (TThread *)pList->Items[0]; + pList->Delete(0); // remove from cache + } + else + NewThread = (TThread *)new ThreadSocket(true); // create but don’t run + pCache->UnlockList(); + return NewThread; +}; +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::FreeThreads(void) +{ + TList *pList = pCache->LockList(); + for (int i = pList->Count - 1; i >= 0; i--) + { + + delete pList->Items[i]; + pList->Delete(i); + } + pCache->UnlockList(); +}; +//--------------------------------------------------------------------------- +//########################################################################### +//########################################################################### +void __fastcall TCtrlPPal::FormCloseQuery(TObject *Sender, bool &CanClose) +{ + // Esperamos a que se cierren los Sockets... + if ( AnySocketActive > 0 ) + { + if ( Application->MessageBox("La aplicación sigue intentando comunicarse\ncon algún terminal.\nPor favor, espere...\n(Cancelar el proceso dejará la aplicación\nen un estado Altamente INESTABLE)", AnsiString("¡¡¡ " + AnsiString( AnySocketActive ) + " Alerta(s) !!!").c_str(), MB_OKCANCEL + MB_DEFBUTTON1) != ID_CANCEL ) + { + CanClose = false; + } + } +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::ActualizarEstado1Click(TObject *Sender) +{ + if ( ServerHook ) + { + ServerHookCode = 5661; ServerHookElement = ( (TElemento *)(mElementoCFG->PopupComponent) )->NumElemento; + serverHook -> Active = true; + } else { + ( (TElemento *)(mElementoCFG->PopupComponent) ) -> RefreshElement(); + } +} +//--------------------------------------------------------------------------- + +void __fastcall TCtrlPPal::SinTIEMPO1Click(TObject *Sender) +{ + TElemento *Elemento = (TElemento *)(mElementoCFG->PopupComponent); + + if ( MessageBox( NULL, "¿ Realmente quiere QUITAR EL TIEMPO al equipo ?", AnsiString("Equipo n: -- " + AnsiString( Elemento->NumElemento ) + " --"+" Nombre: \""+Elemento->GiveMyName()+"\"").c_str() , MB_OKCANCEL ) == IDOK ) + { + // Actualizamos el historial + TbHistorial -> InsertRecord( ARRAYOFCONST(( Elemento->NumElemento, + (Variant)TDateTime::CurrentDateTime(), + (Variant)Elemento->TiempoRestante(), 0, 998, 0 )) ); + TbHistorial -> FlushBuffers(); + if ( ServerHook ) + { + ServerHookCode = 5668; ServerHookElement = Elemento->NumElemento; + serverHook -> Active = true; + } else + Elemento -> ForcedTimeOut(); + + } +} +//--------------------------------------------------------------------------- + +void __fastcall TCtrlPPal::TbHistorialBeforeOpen(TDataSet *DataSet) +{ + // Si la tabla no existe, la creamos + if ( access( (TbHistorial -> TableName).c_str(), 0 ) != 0 ) + { + // Usamos la propiedad FielDefs para definir + // las columnas que contendrá la tabla + TbHistorial -> FieldDefs -> Clear(); + + TbHistorial -> FieldDefs -> Add("NumElement", ftInteger, 0, false ); + TbHistorial -> FieldDefs -> Add("FComienzo", ftDateTime, 0, false ); + TbHistorial -> FieldDefs -> Add("Tiempo", ftTime, 0, false ); + TbHistorial -> FieldDefs -> Add("idc", ftInteger, 0, false ); + TbHistorial -> FieldDefs -> Add("idtc", ftInteger, 0, false ); + TbHistorial -> FieldDefs -> Add("precio", ftCurrency, 0, false ); + + TbHistorial -> IndexDefs -> Clear(); + TbHistorial -> IndexDefs -> Add("Primary", "NumElement;FComienzo", TIndexOptions() << ixPrimary << ixUnique ); + + // Creamos la base... + TbHistorial -> CreateTable(); + } + +} +//--------------------------------------------------------------------------- + +void __fastcall TCtrlPPal::AsignarHora1Click(TObject *Sender) +{ +/* + iAnclada = GetNumElement( Sender ); + if ( iAnclada != -1 ) + { + Elementos[ iAnclada ]-> EnviarListasAppl(); + } +*/ +} +//--------------------------------------------------------------------------- + + +void __fastcall TCtrlPPal::RemoteStartClick(TObject *Sender) +{ + // Remote Start... + if ( AnySocketActive > 0 ) + { + ShowMessage( "Imposible enganche remoto,\nhasta que todos los terminales\nacaben su comunicación" ); + return; + } + if ( ClientHook ) + { + ShowMessage( "Alguien nos tiene enganchados.\nImposible realizar enganche remoto.\n(Pruebe en otro orden)" ); + return; + } + + RemoteStart -> Visible = false; + ServerHook = true; + + remoteBack->Visible = true; + remoteLog->Visible = true; + remoteClose->Visible = true; + + + remoteLog->Caption= "Inicializando sistema remoto..."; + + serverHook->Address = InputBox("Conexión Control Remoto", "IP Destino:", "0.0.0.0"); + + + remoteLog->Caption= "Eliminando terminales actuales" ; + Elementos->Pack(); + for( int i=0; i < Elementos->Count; i++ ) + { + Pizarra->RemoveControl( (TElemento *)Elementos->Items[i] ); + delete (TElemento *)Elementos->Items[i]; + } + Elementos->Clear(); + + remoteLog->Caption= "Accediendo a los terminales remotos" ; + ServerHookCode = 5650; ServerHookElement = 5650; + serverHook->Active = true; + +} +//--------------------------------------------------------------------------- + +void __fastcall TCtrlPPal::remoteCloseDblClick(TObject *Sender) +{ + if ( ClientHook ) + { + ShowMessage( "Alguien nos tiene enganchados.\nImposible des-enganche remoto.\nRiesgo de incomunicación parcial" ); + return; + } + + remoteLog->Caption= "Eliminando terminales actuales" ; + Elementos->Pack(); + for( int i=0; i < Elementos->Count; i++ ) + { + Pizarra->RemoveControl( (TElemento *)Elementos->Items[i] ); + delete (TElemento *)Elementos->Items[i]; + } + Elementos->Clear(); + + ServerHook = false; + + remoteLog->Caption= "Cargando Terminales Locales" ; + TbElementosCFGAfterOpen(0); + + RemoteStart -> Visible = true; + + remoteBack->Visible = false; + remoteLog->Visible = false; + remoteClose->Visible = false; +} +//--------------------------------------------------------------------------- + +void __fastcall TCtrlPPal::clientHookClientConnect(TObject *Sender, + TCustomWinSocket *Socket) +{ + Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Nos han enganchado :: " + Socket->LocalAddress ); + ClientHook = true; +} +//--------------------------------------------------------------------------- + +void __fastcall TCtrlPPal::clientHookClientDisconnect(TObject *Sender, + TCustomWinSocket *Socket) +{ + Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Desenganche " ); + ClientHook = false; +} +//--------------------------------------------------------------------------- + +void __fastcall TCtrlPPal::clientHookClientError(TObject *Sender, + TCustomWinSocket *Socket, TErrorEvent ErrorEvent, int &ErrorCode) +{ + Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Cliente ¡ ERROR ! " + AnsiString( ErrorCode ) + "::" + Socket->LocalAddress ); +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::SetActiveTimeElement( TElemento *Elemento, TDateTime Tiempo, int L_idc, int L_idtc, Currency L_Precio ) +{ + if ( ServerHook ) + { + ServerHookCode = 5669; ServerHookElement = Elemento->NumElemento; + ServerTiempo = Tiempo; ServerL_idc = L_idc; ServerL_idtc = L_idtc; ServerL_Precio = (double)L_Precio; + serverHook -> Active = true; + } else + Elemento->SetActiveTime( Tiempo, L_idc, L_idtc, L_Precio ); +} +//--------------------------------------------------------------------------- +TElemento * __fastcall TCtrlPPal::SearchElement( int NumEl ) +{ + for (int i = Elementos->Count - 1; i >= 0; i--) + { + if ( ((TElemento *)(Elementos->Items[i]))->NumElemento == NumEl ) + return (TElemento *)(Elementos->Items[i]); + } + + return NULL; +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::clientHookAccept(TObject *Sender, + TCustomWinSocket *Socket) +{ + int CodOp, dev; + double Tiempo; + TElemento *Elemento; + TWinSocketStream *pStream; + + Memo1->Lines->Insert( 0, "Conexión aceptada de " + Socket->RemoteAddress ); + + try { + pStream = new TWinSocketStream( Socket, 60000 ); + try{ +// Socket->ReceiveBuf( &CodOp, sizeof(int) ); + pStream->WaitForData(30000); pStream->Read( &CodOp, sizeof(int) ); + + if ( CodOp != 5650 ) + { + dev = ( Elemento = SearchElement( CodOp ) ) == NULL ? 1 : 0; +// Socket->SendBuf( &dev, sizeof(int) ); + pStream->Write( &dev, sizeof(int) ); + if ( dev ) return; + } + + ClientHook = true; + +// Socket->ReceiveBuf( &CodOp, sizeof(int) ); + pStream->WaitForData(30000); pStream->Read( &CodOp, sizeof(int) ); + + switch( CodOp ) + { + // On + case 5669: + int L_idc, L_idtc; + float L_Precio; +/* + Socket->ReceiveBuf( &Tiempo, sizeof(double) ); + Socket->ReceiveBuf( &L_idc, sizeof(int) ); + Socket->ReceiveBuf( &L_idtc, sizeof(int) ); + Socket->ReceiveBuf( &L_Precio, sizeof(float) ); +*/ + pStream->WaitForData(30000); pStream->Read( &Tiempo, sizeof(double) ); + pStream->WaitForData(30000); pStream->Read( &L_idc, sizeof(int) ); + pStream->WaitForData(30000); pStream->Read( &L_idtc, sizeof(int) ); + pStream->WaitForData(30000); pStream->Read( &L_Precio, sizeof(float) ); + + SetActiveTimeElement( Elemento, Tiempo, L_idc, L_idtc, (Currency)L_Precio ); + break; + // Off + case 5668: + Elemento -> ForcedTimeOut(); + break; + // CERRAR WINDOWS + case 5660: + Elemento->CerrarWindows(); + break; + // Query TIME (Refresh) + case 5661: + Elemento -> RefreshElement(); + Tiempo = Elemento->iTiempoPedido(); +// Socket->SendBuf( &Tiempo, sizeof(double) ); + pStream->WaitForData(30000); pStream->Read( &Tiempo, sizeof(double) ); + Tiempo = Elemento->RTiempoRestante; +// Socket->SendBuf( &Tiempo, sizeof(double) ); + pStream->WaitForData(30000); pStream->Read( &Tiempo, sizeof(double) ); + break; + // Lista de elementos... + case 5650: + dev = Elementos->Count; +// Socket->SendBuf( &dev, sizeof(int) ); + pStream->Write( &dev, sizeof(int) ); + + for (int i = Elementos->Count - 1; i >= 0; i--) + { + Elemento = (TElemento *)(Elementos->Items[i]); + //void __fastcall TCtrlPPal::NewElementAt(int X, int Y, int NumEl, AnsiString IP, AnsiString Name ) +/* + Socket->SendBuf( &(Elemento->Left), sizeof(int) ); + Socket->SendBuf( &(Elemento->Top), sizeof(int) ); + Socket->SendBuf( &(Elemento->NumElemento), sizeof(int) ); + Socket->SendBuf( Elemento->GiveMyIP().c_str(), 70 ); + Socket->SendBuf( Elemento->GiveMyName().c_str(), 70 ); + + Tiempo = Elemento->iTiempoPedido(); Socket->SendBuf( &Tiempo, sizeof(double) ); + Tiempo = Elemento->RTiempoRestante; Socket->SendBuf( &Tiempo, sizeof(double) ); + +*/ + pStream->Write( &(Elemento->Left), sizeof(int) ); + pStream->Write( &(Elemento->Top), sizeof(int) ); + pStream->Write( &(Elemento->NumElemento), sizeof(int) ); + pStream->Write( Elemento->GiveMyIP().c_str(), 70 ); + pStream->Write( Elemento->GiveMyName().c_str(), 70 ); + + Tiempo = Elemento->iTiempoPedido(); pStream->Write( &Tiempo, sizeof(double) ); + Tiempo = Elemento->RTiempoRestante; pStream->Write( &Tiempo, sizeof(double) ); + + Elemento -> RefreshElement(); + } + break; + default: + Memo1->Lines->Insert( 0, "Mensaje desconocido ::" + Socket->RemoteAddress ); + } + } + catch (Exception &E) + { + if (!E.ClassNameIs("EAbort")) + { + Memo1->Lines->Insert( 0, "ERROR en la comunicación ::" + Socket->RemoteAddress ); + } + } + } + __finally + { + delete pStream; + Socket->Close(); + } + Memo1->Lines->Insert( 0, "Tramites Finalizados ::" + Socket->RemoteAddress ); + +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::serverHookConnect(TObject *Sender, + TCustomWinSocket *Socket) +{ + double TiempoPedido, TiempoRestante; + TWinSocketStream *pStream; + int Data; + // create a TWinSocketStream for reading and writing + try { + pStream = new TWinSocketStream( Socket, 60000 ); + + try + { + pStream->Write( &ServerHookElement, sizeof(int) ); + + if ( ServerHookCode != 5650 ) + { + pStream->WaitForData(30000); + pStream->Read( &Data, sizeof(int) ); + if ( Data == 1 ) + { + Socket->Close(); + return; + } + } + + pStream->Write( &ServerHookCode, sizeof(int) ); + + // Comunicamos según código en ServerHookCode + switch ( ServerHookCode ) + { + // On + case 5669: + pStream->Write( &ServerTiempo, sizeof(double) ); + pStream->Write( &ServerL_idc, sizeof(int) ); + pStream->Write( &ServerL_idtc, sizeof(int) ); + pStream->Write( &ServerL_Precio, sizeof(float) ); + break; + // Off + case 5668: + // Nada mas + break; + // CERRAR WINDOWS + case 5660: + // Nada mas + break; + // Lista de elementos... + case 5650: + pStream->WaitForData(30000); // Inicio + pStream->Read( &Data, sizeof(int) ); + int X,Y, NumEl; char IP[80], Name[80]; + for (int i = Data - 1; i >= 0; i--) + { + pStream->WaitForData(30000); pStream->Read( &X, sizeof(int) ); + pStream->WaitForData(30000); pStream->Read( &Y, sizeof(int) ); + pStream->WaitForData(30000); pStream->Read( &NumEl, sizeof(int) ); + pStream->WaitForData(30000); pStream->Read( &IP, 70 ); + pStream->WaitForData(30000); pStream->Read( &Name, 70 ); + + NewElementAt( X, Y, NumEl, IP, Name ); + + pStream->WaitForData(30000); pStream->Read( &TiempoPedido, sizeof(double) ); + pStream->WaitForData(30000); pStream->Read( &TiempoRestante, sizeof(double) ); + + SearchElement( NumEl ) -> ClientTimeIs( TiempoPedido, TiempoRestante ); + } + break; + // Query TIME (Refresh) + case 5661: + pStream->WaitForData(30000); // Inicio + pStream->Read( &TiempoPedido, sizeof(double) ); + + pStream->WaitForData(30000); // Restante + pStream->Read( &TiempoRestante, sizeof(double) ); + + SearchElement( ServerHookElement ) -> ClientTimeIs( TiempoPedido, TiempoRestante ); + break; + default: + Memo1->Lines->Insert( 0, "Mensaje desconocido ::" + Socket->RemoteAddress ); + } + } + catch (Exception &E) + { + if (!E.ClassNameIs("EAbort")) + { + Memo1->Lines->Insert( 0, "ERROR en la comunicación ::" + Socket->RemoteAddress ); + } + } + } + __finally + { + delete pStream; + Socket->Close(); + } + +} +//--------------------------------------------------------------------------- +void __fastcall TCtrlPPal::ActiveImage3Click(TObject *Sender) +{ + clientHook -> Active = !clientHook -> Active; +} +//--------------------------------------------------------------------------- + + +void __fastcall TCtrlPPal::Image1Click(TObject *Sender) +{ + char zFileName[80], zParams[80], zDir[80]; + ShellExecute(Application->MainForm->Handle, 0, StrPCopy(zFileName, "http:\\\\www.infdj.com"), + StrPCopy(zParams, ""), StrPCopy(zDir, ""), SW_SHOWNOACTIVATE > 32); +} +//--------------------------------------------------------------------------- + +void __fastcall TCtrlPPal::TbPersonasNewRecord(TDataSet *DataSet) +{ + TbPersonas->FieldByName( "FAlta" )->AsDateTime = TDateTime::CurrentDateTime(); + TbPersonas->FieldByName( "FModif" )->AsDateTime = TDateTime::CurrentDateTime(); +} +//--------------------------------------------------------------------------- + diff --git a/src/CtrlPPal.dfm b/src/CtrlPPal.dfm new file mode 100644 index 0000000..05d5461 Binary files /dev/null and b/src/CtrlPPal.dfm differ diff --git a/src/CtrlPPal.h b/src/CtrlPPal.h new file mode 100644 index 0000000..b5a4c94 --- /dev/null +++ b/src/CtrlPPal.h @@ -0,0 +1,157 @@ +//--------------------------------------------------------------------------- +#ifndef CtrlPPalH +#define CtrlPPalH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "CoolForm.hpp" +#include +#include +#include +#include +#include +#include "actimg.h" +#include +#include "CtrlElemento.h" +#include + + +//--------------------------------------------------------------------------- +class TCtrlPPal : public TForm +{ +__published: // IDE-managed Components + TCoolForm *CoolForm1; + TScrollBox *Pizarra; + TImage *iElementoV; + TImage *iElemento2; + TPopupMenu *mElementoCFG; + TMenuItem *Propiedades1; + TMenuItem *N1; + TMenuItem *Eliminar1; + TTable *TbElementosCFG; + TMenuItem *N2; + TMenuItem *AsignarHora1; + TMenuItem *Estado1; + TActiveImage *iPosV; + TActiveImage *iClose; + TActiveImage *ActiveImage3; + TActiveImage *iMin; + TMemo *Memo1; + TMenuItem *CerrarWindows1; + TImage *iElemento3; + TImage *iElemento4; + TMenuItem *ActualizarEstado1; + TMenuItem *N3; + TMenuItem *SinTIEMPO1; + TTable *TbHistorial; + TImage *remoteBack; + TActiveImage *RemoteStart; + TActiveImage *remoteClose; + TServerSocket *clientHook; + TClientSocket *serverHook; + TLabel *remoteLog; + TImage *Image1; + TTable *TbPersonas; + TAutoIncField *TbPersonasCodCliente1; + TStringField *TbPersonasNombre; + TStringField *TbPersonasApellidos; + TStringField *TbPersonasTelefono1; + TStringField *TbPersonasDocumentoDNP; + TDateTimeField *TbPersonasFAlta; + TDateTimeField *TbPersonasFModif; + TIntegerField *TbPersonasTiempoH; + TIntegerField *TbPersonasTiempoM; + void __fastcall iCloseDblClick(TObject *Sender); + void __fastcall iMinClick(TObject *Sender); + + void __fastcall iPosVClick(TObject *Sender); + + void __fastcall FormDestroy(TObject *Sender); + void __fastcall PizarraDblClick(TObject *Sender); + void __fastcall EliminarElemento(TObject *Sender); + + void __fastcall TbElementosCFGBeforeOpen(TDataSet *DataSet); + void __fastcall TbElementosCFGAfterOpen(TDataSet *DataSet); + void __fastcall ElementoDblClick(TObject *Sender); + void __fastcall Estado1Click(TObject *Sender); + + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall FormDeactivate(TObject *Sender); + void __fastcall Propiedades1Click(TObject *Sender); + void __fastcall CerrarWindows1Click(TObject *Sender); + + void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose); + + void __fastcall ActualizarEstado1Click(TObject *Sender); + void __fastcall SinTIEMPO1Click(TObject *Sender); + + void __fastcall TbHistorialBeforeOpen(TDataSet *DataSet); + void __fastcall AsignarHora1Click(TObject *Sender); + void __fastcall RemoteStartClick(TObject *Sender); + void __fastcall remoteCloseDblClick(TObject *Sender); + void __fastcall clientHookClientConnect(TObject *Sender, + TCustomWinSocket *Socket); + void __fastcall clientHookClientDisconnect(TObject *Sender, + TCustomWinSocket *Socket); + void __fastcall clientHookClientError(TObject *Sender, + TCustomWinSocket *Socket, TErrorEvent ErrorEvent, + int &ErrorCode); + void __fastcall clientHookAccept(TObject *Sender, + TCustomWinSocket *Socket); + void __fastcall serverHookConnect(TObject *Sender, + TCustomWinSocket *Socket); + void __fastcall ActiveImage3Click(TObject *Sender); + + void __fastcall Image1Click(TObject *Sender); + void __fastcall TbPersonasNewRecord(TDataSet *DataSet); +private: // User declarations + void __fastcall ElementoMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y); + void __fastcall ElementoMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y); + void __fastcall ElementoMouseMove(TObject *Sender, TShiftState Shift, int X, int Y); + // Obtiene el indice del elemento sobre el que esta el puntero del ratón. + void __fastcall NewElementAt( int X, int Y, int NumEl, AnsiString IP, AnsiString Name ); + + TDateTime HoraActual; // Hora "ACTUAL" (se actualiza por minutos) + +/**********************/ + int nElementosMAX; + TList *Elementos; + void __fastcall CheckAppIntegrity(void); + void __fastcall StartEventRecorder(void); + +/**********************/ + int ServerHookCode; int ServerHookElement; int ServerHookTime; + double ServerTiempo; int ServerL_idc, ServerL_idtc; float ServerL_Precio; + bool ClientHook; + + TElemento * __fastcall SearchElement( int NumElemento ); + + void __fastcall LoadProtectedList(void); + +public: // User declarations + + bool __fastcall Manipula2(AnsiString Serial, AnsiString Image); + bool __fastcall Manipula(AnsiString Serial, AnsiString Image); + + bool ServerHook; + + + __fastcall TCtrlPPal(TComponent* Owner); + + void __fastcall SetActiveTimeElement( TElemento *Elemento, TDateTime Tiempo, int L_idc, int L_idtc, Currency L_Precio ); + TStringList *siMinimizar, *noMinimizar; + TStringList *snMinimizar, *noAbrir; + bool ChangePositionEnabled; + + //////////////////// MANTENIMIENTO DE LOS HILOS ////////////////////////// + TThread *GetThread(void); + void __fastcall FreeThreads(void); + int AnySocketActive; + //////////////////// MANTENIMIENTO DE LOS HILOS ////////////////////////// +}; +//--------------------------------------------------------------------------- +extern PACKAGE TCtrlPPal *CtrlPPal; +//--------------------------------------------------------------------------- +#endif diff --git a/src/CtrlSocket.cpp b/src/CtrlSocket.cpp new file mode 100644 index 0000000..7eabc88 --- /dev/null +++ b/src/CtrlSocket.cpp @@ -0,0 +1,226 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop + +#include "CtrlElemento.h" +#include "CtrlSocket.h" +#include "CtrlPPal.h" + +#pragma package(smart_init) +//--------------------------------------------------------------------------- +// Important: Methods and properties of objects in VCL can only be +// used in a method called using Synchronize, for example: +// +// Synchronize(UpdateCaption); +// +// where UpdateCaption could look like: +// +// void __fastcall ThreadSocket::UpdateCaption() +// { +// Form1->Caption = "Updated in a thread"; +// } +//--------------------------------------------------------------------------- +__fastcall ThreadSocket::ThreadSocket(bool CreateSuspended) + : TThread(CreateSuspended) +{ + CtrlCOP = 0; + FreeOnTerminate = false; +} +//--------------------------------------------------------------------------- +void __fastcall ThreadSocket::SetSocket( AnsiString IP_dst, int Socket ) +{ + ClientSocket = new TClientSocket( CtrlPPal->Owner ); + ClientSocket->OnConnect = SocketConnect; + ClientSocket->OnDisconnect = SocketDisconnect; + ClientSocket->OnError = SocketError; + ClientSocket->ClientType = ctBlocking; + ClientSocket->Address = IP_dst; + ClientSocket->Port = Socket; + + SocketCreated = true; +} +//--------------------------------------------------------------------------- +void __fastcall ThreadSocket::SocketDisconnect(TObject *Sender, TCustomWinSocket *Socket) +{ + CtrlPPal->Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Tramites Finalizados " + Socket->LocalAddress + " :: " + ClientSocket->Address ); +} +//--------------------------------------------------------------------------- +void __fastcall ThreadSocket::SocketError(TObject *Sender, + TCustomWinSocket *Socket, TErrorEvent ErrorEvent, int &ErrorCode) +{ + if ( OWNER_Element ) + { + OWNER_Element->StatusCode = ERROR; // Estamos en proceso de COMPROBACION / ERROR + OWNER_Element->BlinkCode = IP_OFF; // --- ERROR INTENTANDO COMUNICAR -- +// OWNER_Element->Blink->Enabled = true; // Activamos el parpadeo + OWNER_Element->Blink->Interval = 500; + } + + CtrlPPal->Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Cliente ¡ ERROR ! " + AnsiString( ErrorCode ) + "::" + Socket->LocalAddress + " :: " + ClientSocket->Address ); + ErrorCode = 0; + ClientSocket->Active = false; +} +//--------------------------------------------------------------------------- +void __fastcall ThreadSocket::SocketConnect(TObject *Sender, + TCustomWinSocket *Socket) +{ + TWinSocketStream *pStream; + + CtrlPPal->Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Cliente Conectado ::" + Socket->LocalAddress + " :: " + ClientSocket->Address ); + + // create a TWinSocketStream for reading and writing + pStream = new TWinSocketStream( Socket, 60000 ); + try + { + // fetch and process commands until the connection or thread is terminated + if ( !Terminated && ClientSocket->Active ) + { + try + { + int CodOp; double doubleT = (double)CtrlTiempo; + CodOp = (CtrlCOP == QueryTIME) ? 6661 : (CtrlCOP == CloseWINDOWS) ? 6660 : (CtrlCOP == SettingSTATUS ) ? 6669 : (CtrlCOP == sendLIST) ? 6662 : 0; + pStream->Write( &CodOp, sizeof(int) ); + switch( CtrlCOP ) + { + case QueryTIME: + double dTiempoInicio; + pStream->WaitForData(30000); + pStream->Read( &doubleT, sizeof(double) ); + pStream->WaitForData(30000); + pStream->Read( &dTiempoInicio, sizeof(double) ); + if ( OWNER_Element ) + OWNER_Element->ClientTimeIs( doubleT, dTiempoInicio ); // Comunicamos el tiempo que dice tener el Clt. + + CtrlPPal->Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Peticion de Tiempo " + Socket->LocalAddress + " :: " + ClientSocket->Address ); + break; + case CloseWINDOWS: + CodOp = CtrlState; + pStream->Write( &CodOp, sizeof(int) ); + pStream->Write( &doubleT, sizeof(double) ); + if ( OWNER_Element ) + { + OWNER_Element->StatusCode = ERROR; // Estamos en proceso de COMPROBACION / ERROR + OWNER_Element->BlinkCode = IP_OFF; // --- ERROR INTENTANDO COMUNICAR -- + OWNER_Element->Blink->Interval = 500; + } + CtrlPPal->Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Cierre de Windows " + Socket->LocalAddress + " :: " + ClientSocket->Address ); + break; + case SettingSTATUS: + CodOp = CtrlState; + pStream->Write( &CodOp, sizeof(int) ); + pStream->Write( &doubleT, sizeof(double) ); + if ( OWNER_Element ) + { + OWNER_Element->BlinkCode = NONE; // Desactivamos el parpadeo + OWNER_Element->StatusCode = CtrlState ? WORKING : FREE;// Estamos en proceso de COLOCAR ESTADO + OWNER_Element->Blink->Interval = 60000; + OWNER_Element->ShowElementInfo(); + // Contabilizamos la conexión + if ( CtrlState ) + OWNER_Element->HistoricoTermON( CtrlTiempo ); + } + + CtrlPPal->Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Cambio de estado (" + (CtrlState ? "ON":"OFF") + ")" + Socket->LocalAddress + " :: " + ClientSocket->Address ); + break; + case sendLIST: + CodOp = CtrlPPal->siMinimizar->Count; +// CtrlPPal->Memo1->Lines->Insert( 0, "Elementos A: " + AnsiString( CodOp ) ); + pStream->Write( &CodOp, sizeof(int) ); + for ( int i=0; iWrite( (void *)((CtrlPPal->siMinimizar->Strings[i]).c_str()), sizeof(char)*15 ); + CodOp = CtrlPPal->noMinimizar->Count; + pStream->Write( &CodOp, sizeof(int) ); + for ( int i=0; iWrite( (void *)((CtrlPPal->noMinimizar->Strings[i]).c_str()), sizeof(char)*15 ); + + + CodOp = CtrlPPal->snMinimizar->Count; + pStream->Write( &CodOp, sizeof(int) ); + for ( int i=0; iWrite( (void *)((CtrlPPal->snMinimizar->Strings[i]).c_str()), sizeof(char)*15 ); + CodOp = CtrlPPal->noAbrir->Count; + pStream->Write( &CodOp, sizeof(int) ); + for ( int i=0; iWrite( (void *)((CtrlPPal->noAbrir->Strings[i]).c_str()), sizeof(char)*15 ); + + break; + default: + break; + } + pStream->WaitForData(30000); + pStream->Read( &CodOp, sizeof(int) ); + if ( CodOp != 54321 ) + { + CtrlPPal->Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Cliente RESPONDE ANORMALMENTE " + Socket->LocalAddress ); + } + } + catch (Exception &E) + { + if (!E.ClassNameIs("EAbort")) + { + if ( OWNER_Element ) + { + OWNER_Element->StatusCode = ERROR; // Estamos en proceso de COMPROBACION / ERROR + OWNER_Element->BlinkCode = IP_OFF; // --- ERROR INTENTANDO COMUNICAR -- +// OWNER_Element->Blink->Enabled = true; // Activamos el parpadeo + OWNER_Element->Blink->Interval = 500; + } + CtrlPPal->Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Error en el HILO de " + Socket->LocalAddress ); + } + } + } + } + __finally + { + delete pStream; + OWNER_Element = NULL; + Socket->Close(); + } +} +//--------------------------------------------------------------------------- +void __fastcall ThreadSocket::Execute() +{ + if ( SocketCreated ) + { + CtrlPPal->AnySocketActive++; + try { + ClientSocket->Active = true; + } catch (Exception &E) { + if (!E.ClassNameIs("EAbort")) + { + if ( OWNER_Element ) + { + OWNER_Element->StatusCode = ERROR; // Estamos en proceso de COMPROBACION / ERROR + OWNER_Element->BlinkCode = IP_OFF; // --- ERROR INTENTANDO COMUNICAR -- +// OWNER_Element->Blink->Enabled = true; // Activamos el parpadeo + OWNER_Element->Blink->Interval = 500; + } + CtrlPPal->Memo1->Lines->Insert( 0, (Now()).DateTimeString() + " :: Error en el HILO de " + ClientSocket->Address + " (" + E.Message+")" ); // you must write HandleThreadException + } + } + + while ( !Terminated && ClientSocket->Active ); // Do nothing + CtrlPPal->AnySocketActive--; + } +} +//--------------------------------------------------------------------------- + + +////////////////// GESTION DE LOS HILOS DE COMUNICACIÓN ///////////////////// +void __fastcall ThreadSocket::Terminate(TObject *Sender) // this is the OnTerminate handler +{ + if ( SocketCreated ) + { + if ( ClientSocket->Active ) + ClientSocket->Active = false; + delete ClientSocket; + SocketCreated = false; + } + pCache->Add( this ); // add pointer to this thread to the cache +} +//--------------------------------------------------------------------------- +//########################################################################### +//########################################################################### +//########################################################################### + + diff --git a/src/CtrlSocket.h b/src/CtrlSocket.h new file mode 100644 index 0000000..7ef33ff --- /dev/null +++ b/src/CtrlSocket.h @@ -0,0 +1,37 @@ +//--------------------------------------------------------------------------- +#ifndef CtrlSocketH +#define CtrlSocketH +//--------------------------------------------------------------------------- +#include +#include +#include "CtrlElemento.h" +//--------------------------------------------------------------------------- +TThreadList *pCache; +enum CtrlCOPs { CloseWINDOWS = 6660, QueryTIME = 6661, SettingSTATUS = 6669, sendLIST = 6662 }; + +class ThreadSocket : public TThread +{ +private: + void __fastcall Terminate(TObject *Sender); // this is the OnTerminate handler +protected: + TClientSocket *ClientSocket; + void __fastcall Execute(); + void __fastcall SocketDisconnect(TObject *Sender, TCustomWinSocket *Socket); + void __fastcall SocketError(TObject *Sender, TCustomWinSocket *Socket, TErrorEvent ErrorEvent, int &ErrorCode); + void __fastcall SocketConnect(TObject *Sender, TCustomWinSocket *Socket); +public: + bool CtrlState; + CtrlCOPs CtrlCOP; + TDateTime CtrlTiempo; + + void __fastcall SetSocket( AnsiString IP_dst, int Socket ); + __fastcall ThreadSocket(bool CreateSuspended); + TElemento *OWNER_Element; + bool SocketCreated; +}; +//--------------------------------------------------------------------------- +//########################################################################### +//########################################################################### +//########################################################################### + +#endif diff --git a/src/DViewer.cpp b/src/DViewer.cpp new file mode 100644 index 0000000..bf24a10 --- /dev/null +++ b/src/DViewer.cpp @@ -0,0 +1,589 @@ +//--------------------------------------------------------------------------- +#include +#include +#pragma hdrstop + +#include + +#include "DViewer.h" +#include "DViewer_Print.h" +#include "DViewer_PrintHistoric.h" +#include "DViewer_PrintBonos.h" +#include "DViewer_PrintClientes.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "ElastFrm" +#pragma link "ElastFrm" +#pragma resource "*.dfm" +TDViewerF *DViewerF; +//--------------------------------------------------------------------------- +#define TIPO_CONEXION 1 +#define CAMBIO_PERIODO 2 + +__fastcall TDViewerF::TDViewerF(TComponent* Owner) + : TForm(Owner) +{ + MargenRuptura->ItemIndex = 1; + SelIndex->ItemIndex = 1; + MinFecha->Date = TDateTime::CurrentDate(); + MaxFecha->Date = TDateTime::CurrentDate(); + TerminalFiltered = false; + RefiltraDatos(); + StatusBar1->Panels->Items[0]->Text = "Visualizador listo..."; +} +//--------------------------------------------------------------------------- +void __fastcall TDViewerF::TbHistoricoBeforeOpen(TDataSet *DataSet) +{ + // Si la tabla no existe, la creamos + if ( access( (TbHistorico -> TableName).c_str(), 0 ) != 0 ) + { + ShowMessage( "Esta aplicación es un complemento de visualización a CtrlMstr\nY no puede se ejecutada por separado\n(Primero a de activar el control maestro)" ); + Abort(); + Close(); + } +} +//--------------------------------------------------------------------------- +void __fastcall TDViewerF::TbHistoricoCalcFields(TDataSet *DataSet) +{ + switch ( TbHistorico->FieldByName("idtc")->AsInteger ) + { + // Internet + case 0: TbHistorico->FieldByName("TipoConexion")->AsString="Internet"; break; + // Juegos + case 1: TbHistorico->FieldByName("TipoConexion")->AsString="Juegos"; break; + // Otros + case 2: TbHistorico->FieldByName("TipoConexion")->AsString="Otros..."; break; + // Envio de Listas + case 3: TbHistorico->FieldByName("TipoConexion")->AsString="Clases"; break; + // Envio de Listas + case 997: TbHistorico->FieldByName("TipoConexion")->AsString="ENVIO LISTAS"; break; + // Tiempo Anulado + case 998: TbHistorico->FieldByName("TipoConexion")->AsString="TIEMPO ANULADO"; break; + // Cierre de Windows + case 999: TbHistorico->FieldByName("TipoConexion")->AsString="Cerrar Windows"; break; + default: TbHistorico->FieldByName("TipoConexion")->AsString="DESCONOCIDA"; break; + } + +} +//--------------------------------------------------------------------------- +int __fastcall TDViewerF::Obten_idtc(void) +{ + int dev; + switch( (idtConexion->ItemIndex-1) ) + { + case 0: + dev = 0; + break; + case 1: + dev = 1; + break; + case 2: + dev = 3; + break; + case 3: + dev = 2; + break; + case 4: + dev = 997; + break; + case 5: + dev = 998; + break; + case 6: + dev = 999; + break; + default: + dev = 0; + break; + } + return dev; +} +//--------------------------------------------------------------------------- +void __fastcall TDViewerF::RefiltraDatos(void) +{ + StatusBar1->Panels->Items[0]->Text = "Evaluando filtro..."; + + TDateTime FechaMin, FechaMax; + TbHistorico->FilterOptions = TbHistorico->FilterOptions << foCaseInsensitive; + + MaxFecha->Time = 36544.9999891088;//EncodeTime( 23, 59, 59, 59 ); + FechaMax = MaxFecha->Date; + MinFecha->Time = 0; + FechaMin = MinFecha->Date; + + TbHistorico->Filter = "[FComienzo] >= '" + FechaMin + "' AND [FComienzo] <= '" + FechaMax +"'"; + TbHistorico->Filtered = true; + + // Refiltramos los bonos + TbBonos->FilterOptions = TbBonos->FilterOptions << foCaseInsensitive; + TbBonos->Filter = "[FechaCompra] >= '" + FechaMin + "' AND [FechaCompra] <= '" + FechaMax +"'"; + TbBonos->Filtered = true; + + StatusBar1->Panels->Items[0]->Text = "Rellenando gráficas..."; + CalculaGraficas(); + StatusBar1->Panels->Items[0]->Text = ""; +} +//--------------------------------------------------------------------------- +void __fastcall TDViewerF::CalculaGraficas(void) +{ + unsigned short hh, mm, ss, mss; + Currency TotalF, TotalR; + int NConF, NConR, NumBonos; + + TDateTime HoraFinAnterior; // Hora a la que debío acabar el elto. anterior + int EltoAnterior; // Elemento anterior + TDateTime Ruptura; // Tiempo Maximo para admitir que la conexion actual + // es continuacion de la anterior (¿Reinicia la máquina?) + + TbHistorico->DisableControls(); // Deshabilitamos los controles asociados + + NumBonos = 0; + NConF = 0; NConR = 0; + TotalF = 0; TotalR = 0; + ProgressBar1->Min = 0; + ProgressBar1->Max = TbElementos->RecordCount; + HoraFinAnterior = 0; + EltoAnterior = 0; + if ( MargenRuptura->ItemIndex == -1 ) + Ruptura = EncodeTime( 0, 0, 0, 0 ); + else + Ruptura = EncodeTime( 0, (MargenRuptura->ItemIndex + 1)*5, 0, 0 ); + + // Vaciamos las conexiones / hora + for ( int i = 0; i<48; i++ ) + { + ConexionesHoraR[ i ] = 0; + ConexionesHoraF[ i ] = 0; + } + // Vaciamos los tipos de conexiones + for ( int i=0; i < 8; i++ ) + NConexionesTipo[i] = 0; + // Vaciamos la parrilla de datos + for ( int i=0; i < Equipos->Items->Count; i++ ) + { + Parrilla[i].ConF = 0; + Parrilla[i].TotalF = 0; + Parrilla[i].ConR = 0; + Parrilla[i].TotalR = 0; + Parrilla[i].horasF = 0; + Parrilla[i].horasR = 0; + Parrilla[i].minF = 0; + Parrilla[i].minR = 0; + } + + TbHistorico->First(); + while ( ! TbHistorico->Eof ) + { + // Si se trata de una conexion + if ( TbHistorico->FieldByName("idtc")->AsInteger < 50 ) + { + NConF ++; + TotalF += TbHistorico->FieldByName("Precio")->AsCurrency; + TbHistorico->FieldByName("FComienzo")->AsDateTime. DecodeTime( &hh, &mm, &ss, &mss ); + ConexionesHoraF[hh*2+ ((mm<30)?0:1)] ++; + + // Si el elemento que estamos estudiando: + // -- Termina su tiempo "justo" ó ANTES que cuando debía hacerlo su ultima conexion + if ( TbHistorico->FieldByName( "NumElement" )->AsInteger == EltoAnterior && + (TbHistorico->FieldByName("FComienzo")->AsDateTime + + TbHistorico->FieldByName("Tiempo")->AsDateTime ) <= HoraFinAnterior + ) + { + // Estamos ante una conexión REAL + InsertaEnParrilla( TbHistorico->FieldByName("NumElement")->AsInteger, + TbHistorico->FieldByName("Precio" ) ->AsCurrency, + TbHistorico->FieldByName("Tiempo" ) ->AsDateTime, + false + ); + } else { + NConR++; + TotalR += TbHistorico->FieldByName("Precio")->AsCurrency; + ConexionesHoraR[hh*2+ ((mm<30)?0:1)] ++; + + InsertaEnParrilla( TbHistorico->FieldByName("NumElement")->AsInteger, + TbHistorico->FieldByName("Precio" ) ->AsCurrency, + TbHistorico->FieldByName("Tiempo" ) ->AsDateTime, + true + ); + + switch ( TbHistorico->FieldByName("idtc")->AsInteger ) + { + case 0: NConexionesTipo[0]++; break; // Internet + case 1: NConexionesTipo[1]++; break; // Juegos + case 2: NConexionesTipo[2]++; break; // Otros + case 3: NConexionesTipo[3]++; break; // Clases + default: NConexionesTipo[7]++; break; // -- DECONOCIDO -- + } + } + EltoAnterior = TbHistorico->FieldByName("NumElement")->AsInteger; + HoraFinAnterior = TbHistorico->FieldByName("FComienzo")->AsDateTime + + TbHistorico->FieldByName("Tiempo")->AsDateTime + + Ruptura; + } else { + switch ( TbHistorico->FieldByName("idtc")->AsInteger ) + { + case 997: NConexionesTipo[4]++; break; // Envio de Listas + case 998: NConexionesTipo[5]++; break; // Tiempo Anulado + case 999: NConexionesTipo[6]++; break; // Cierre de Windows + default: NConexionesTipo[7]++; break; // -- DECONOCIDO -- + } + + } + + // Cuando se usa bonos + if ( TbHistorico->FieldByName("idc")->AsInteger > 0 && + TbHistorico->FieldByName("precio")->AsCurrency == 0 + ) + { + NumBonos++; + } + + ProgressBar1->Position++; + try { TbHistorico->Next(); } catch( ... ) { break; } + } + + TbHistorico->EnableControls(); // Habilitamos de nuevo los controles + + + ConexionesHora -> Series[0] -> Clear(); + ConexionesHora -> Series[1] -> Clear(); + for ( int i = 0; i < 24; i++ ) + { + ConexionesHora -> Series[0] -> AddXY(i*2, ConexionesHoraF[i*2], i, clTeeColor); + ConexionesHora -> Series[0] -> AddXY(i*2+1, ConexionesHoraF[i*2+1], "½", clTeeColor); + + ConexionesHora -> Series[1] -> AddXY(i*2, ConexionesHoraR[i*2], i, clTeeColor); + ConexionesHora -> Series[1] -> AddXY(i*2+1, ConexionesHoraR[i*2+1], "½", clTeeColor); + } + + +// StatusBar1->Panels->Items[1]->Text = TotalF; + ConexionesEquipos -> Series[0] -> Clear(); + ConexionesEquipos -> Series[1] -> Clear(); + for ( int i=0; i < Equipos->Items->Count; i++ ) + { + StringGrid1->Cells[2][1+i] = Parrilla[i].ConF ; + StringGrid1->Cells[4][1+i] = Parrilla[i].TotalF ; + StringGrid1->Cells[3][1+i] = Parrilla[i].ConR ; + StringGrid1->Cells[5][1+i] = Parrilla[i].TotalR ; + StringGrid1->Cells[6][1+i] = AnsiString( Parrilla[i].horasF )+ " : " + AnsiString( Parrilla[i].minF ); + StringGrid1->Cells[7][1+i] = AnsiString( Parrilla[i].horasR )+ " : " + AnsiString( Parrilla[i].minR ); + ConexionesEquipos -> Series[0] -> Add( Parrilla[i].TotalF, Equipos->Items->Strings[i], clGreen ); + ConexionesEquipos -> Series[1] -> Add( Parrilla[i].TotalR, "", clRed ); + } + + // Etiquetas globales + Label4->Caption = NConR; + Label6->Caption = NConF; + Label8->Caption = TotalR; + Label9->Caption = TotalF; + NBonos->Caption = NumBonos; + + + // Rellenamos la gráfica TIPO de Conexion + TipoConexion->Series[0]->Clear(); + TipoConexion->Series[0]->Add( NConexionesTipo[0], "Internet", clTeeColor ); + TipoConexion->Series[0]->Add( NConexionesTipo[1], "Juegos", clTeeColor ); + TipoConexion->Series[0]->Add( NConexionesTipo[2], "Otros", clTeeColor ); + TipoConexion->Series[0]->Add( NConexionesTipo[3], "Clases", clTeeColor ); + TipoConexion->Series[0]->Add( NConexionesTipo[4], "Env.Listas", clTeeColor ); + TipoConexion->Series[0]->Add( NConexionesTipo[5], "Anulaciones", clTeeColor ); + TipoConexion->Series[0]->Add( NConexionesTipo[6], "Cierres", clTeeColor ); + TipoConexion->Series[0]->Add( NConexionesTipo[7], "## NID ##", clTeeColor ); + + TbBonos->DisableControls(); // Deshabilitamos los controles asociados + NBonosVendidos = 0; + TotalBonos = 0; + TbBonos->First(); + while ( ! TbBonos->Eof ) + { + NBonosVendidos++; + TotalBonos += TbBonos->FieldByName("coste")->AsCurrency; + TbBonos->Next(); + } + TbBonos->EnableControls(); // Deshabilitamos los controles asociados + BonosVendidos->Caption = AnsiString( NBonosVendidos ) + " ( " + TotalBonos + " )"; +} +//--------------------------------------------------------------------------- +void __fastcall TDViewerF::InsertaEnParrilla( int Elto, Currency CantidadF, TDateTime Tiempo, bool Repetido ) +{ + unsigned short Hour, Min, Sec, MSec; + Tiempo.DecodeTime( &Hour, &Min, &Sec, &MSec ); + + // Localizamos la casilla del elemento + for ( int i=0; i < Equipos->Items->Count; i++ ) + if ( Parrilla[i].Elto == Elto ) + { + Parrilla[i].ConF ++; + Parrilla[i].TotalF = Parrilla[i].TotalF + CantidadF; + + Parrilla[i].horasF += Hour + ( ( Parrilla[i].minF + Min ) / 60 ); + Parrilla[i].minF = ( Parrilla[i].minF + Min ) % 60; + + if ( Repetido ) + { + Parrilla[i].ConR ++; + Parrilla[i].TotalR = Parrilla[i].TotalR + CantidadF; + + Parrilla[i].horasR += Hour + ( ( Parrilla[i].minR + Min ) / 60 ); + Parrilla[i].minR = ( Parrilla[i].minR + Min ) % 60; + } + break; + } +} +//--------------------------------------------------------------------------- +void __fastcall TDViewerF::MinFechaChange(TObject *Sender) +{ + RefiltraDatos(); +} +//--------------------------------------------------------------------------- +void __fastcall TDViewerF::DBGrid1DrawColumnCell(TObject *Sender, + const TRect &Rect, int DataCol, TColumn *Column, + TGridDrawState State) +{ + if ( TbHistorico->FieldByName("idtc")->AsInteger > 900 ) + { + if ( TbHistorico->FieldByName("idtc")->AsInteger == 998 ) + DBGrid1->Canvas -> Font -> Color = clGreen; + else + DBGrid1->Canvas -> Font -> Color = clRed; + DBGrid1->DefaultDrawColumnCell( Rect, DataCol, Column, State ); + } + if ( TbHistorico->FieldByName("idc")->AsInteger > 0 && + TbHistorico->FieldByName("precio")->AsCurrency == 0 + ) + { + DBGrid1->Canvas -> Font -> Color = clPurple; + DBGrid1->DefaultDrawColumnCell( Rect, DataCol, Column, State ); + } + +} +//--------------------------------------------------------------------------- +void __fastcall TDViewerF::TbElementosAfterOpen(TDataSet *DataSet) +{ + ProgressBar1->Min = 0; + ProgressBar1->Max = TbElementos->RecordCount; + StringGrid1->RowCount = TbElementos->RecordCount + 1; + + Parrilla = new DatosEltos[(TbElementos->RecordCount)]; + TbElementos->First(); + for (int i = ProgressBar1->Min; i < ProgressBar1->Max; i++) + { + ProgressBar1->Position = i; + Equipos->Items->Add(TbElementos->FieldByName("Name")->AsString); + + Parrilla[i].Elto = TbElementos->FieldByName("NumElement")->AsInteger; + StringGrid1->Cells[0][i+1] = TbElementos->FieldByName("NumElement")->AsInteger; + StringGrid1->Cells[1][i+1] = TbElementos->FieldByName("Name")->AsString; + + TbElementos->Next(); + // do something with record... + } + + StringGrid1->Cells[2][0] = "ConexF"; + StringGrid1->Cells[3][0] = "ConexR"; + StringGrid1->Cells[4][0] = "TotalF"; + StringGrid1->Cells[5][0] = "TotalR"; + StringGrid1->Cells[6][0] = "TiempoF"; + StringGrid1->Cells[7][0] = "TiempoR"; +} +//--------------------------------------------------------------------------- + + +void __fastcall TDViewerF::FormDestroy(TObject *Sender) +{ + delete[] Parrilla; +} +//--------------------------------------------------------------------------- + +void __fastcall TDViewerF::idtConexionChange(TObject *Sender) +{ + TDateTime FechaMin, FechaMax; + TbHistorico->FilterOptions = TbHistorico->FilterOptions << foCaseInsensitive; + + MaxFecha->Time = 36544.9999891088;//EncodeTime( 23, 59, 59, 59 ); + FechaMax = MaxFecha->Date; + MinFecha->Time = 0; + FechaMin = MinFecha->Date; + + if ( idtConexion->ItemIndex > 0 ) + { + AnsiString CadenaFiltro = "([FComienzo] >= '" + FechaMin + "' AND [FComienzo] <= '" + FechaMax +"' AND [idtc] = '" + AnsiString( Obten_idtc() ) + "' )"; + TbHistorico->Filter = CadenaFiltro; + TbHistorico->Filtered = true; + } else { + TbHistorico->Filter = "[FComienzo] >= '" + FechaMin + "' AND [FComienzo] <= '" + FechaMax +"'"; + TbHistorico->Filtered = true; + } +} +//--------------------------------------------------------------------------- + +void __fastcall TDViewerF::Button1Click(TObject *Sender) +{ + TQuickReport1 *QR; + + StatusBar1->Panels->Items[0]->Text = "Preparando documento para imprimir..."; + QR = new TQuickReport1(this); + QR->Preview(); + StatusBar1->Panels->Items[0]->Text = ""; + delete QR; +} +//--------------------------------------------------------------------------- + +void __fastcall TDViewerF::Button2Click(TObject *Sender) +{ + TQRHistoric *QR; + + QR = new TQRHistoric(this); + StatusBar1->Panels->Items[0]->Text = "Preparando documento para imprimir..."; + QR->QuickRep1->Print(); + StatusBar1->Panels->Items[0]->Text = ""; + delete QR; + +} +//--------------------------------------------------------------------------- + +void __fastcall TDViewerF::Edit1KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift) +{ + if ( !Edit1->Text.IsEmpty() ) + TbPersonas->Locate( SelIndex->Items->Strings[SelIndex->ItemIndex], Edit1->Text, TLocateOptions() << loCaseInsensitive << loPartialKey ); +} +//--------------------------------------------------------------------------- + +void __fastcall TDViewerF::DBEdit1KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift) +{ + if ( Key == VK_RETURN ) + { + if(TbPersonas->State == dsInsert || TbPersonas->State == dsEdit) + TbPersonas->Post(); + DBEdit2->SetFocus(); + } +} +//--------------------------------------------------------------------------- + +void __fastcall TDViewerF::DBEdit2KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift) +{ + if ( Key == VK_RETURN ) + { + if(TbPersonas->State == dsInsert || TbPersonas->State == dsEdit) + TbPersonas->Post(); + DBEdit3->SetFocus(); + } +} +//--------------------------------------------------------------------------- + +void __fastcall TDViewerF::DBEdit3KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift) +{ + if ( Key == VK_RETURN ) + { + if(TbPersonas->State == dsInsert || TbPersonas->State == dsEdit) + TbPersonas->Post(); + DBEdit4->SetFocus(); + } +} +//--------------------------------------------------------------------------- + +void __fastcall TDViewerF::DBEdit4KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift) +{ + if ( Key == VK_RETURN ) + { + if(TbPersonas->State == dsInsert || TbPersonas->State == dsEdit) + TbPersonas->Post(); + DBEdit5->SetFocus(); + } +} +//--------------------------------------------------------------------------- + +void __fastcall TDViewerF::DBEdit5KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift) +{ + if ( Key == VK_RETURN ) + { + if(TbPersonas->State == dsInsert || TbPersonas->State == dsEdit) + TbPersonas->Post(); + DBEdit6->SetFocus(); + } +} +//--------------------------------------------------------------------------- + +void __fastcall TDViewerF::DBEdit6KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift) +{ + if ( Key == VK_RETURN ) + { + if(TbPersonas->State == dsInsert || TbPersonas->State == dsEdit) + TbPersonas->Post(); + DBEdit1->SetFocus(); + } +} +//--------------------------------------------------------------------------- + +void __fastcall TDViewerF::TbPersonasBeforeDelete(TDataSet *DataSet) +{ + switch( MessageDlg( "Atención, está apunto de eliminar\na un cliente...\n¡¡¡ Su historico TAMBIEN será ELIMINADO\n¿Realmente desea continuar?", mtWarning, TMsgDlgButtons() << mbNo << mbYes, 0 ) ) + { + case mrNo: + Abort(); + break; + default: + // Borramos todos los registros asociados... + while( TbBonosCliente -> RecordCount != 0 ) + TbBonosCliente -> Delete(); + break; + } + +} +//--------------------------------------------------------------------------- + +void __fastcall TDViewerF::TbPersonasNewRecord(TDataSet *DataSet) +{ + TbPersonas->FieldByName("FAlta")->AsDateTime = TDateTime::CurrentDateTime(); + TbPersonas->FieldByName("FModif")->AsDateTime = TDateTime::CurrentDateTime(); + TbPersonas->FieldByName("TiempoH")->AsInteger = 0; + TbPersonas->FieldByName("TiempoM")->AsInteger = 0; +} +//--------------------------------------------------------------------------- + +void __fastcall TDViewerF::Button4Click(TObject *Sender) +{ + TQRBonos *QR; + + QR = new TQRBonos(this); + StatusBar1->Panels->Items[0]->Text = "Preparando documento para imprimir..."; + QR->QuickRep1->Print(); + StatusBar1->Panels->Items[0]->Text = ""; + delete QR; + +} +//--------------------------------------------------------------------------- + + +void __fastcall TDViewerF::Button3Click(TObject *Sender) +{ + TQRClt *QR; + + QR = new TQRClt(this); + StatusBar1->Panels->Items[0]->Text = "Preparando documento para imprimir..."; + QR->QuickRep1->Print(); + StatusBar1->Panels->Items[0]->Text = ""; + delete QR; + +} +//--------------------------------------------------------------------------- + + +void __fastcall TDViewerF::EquiposClick(TObject *Sender) +{ + + if ( TbElementos->Locate( "Name", Equipos->Items->Strings[Equipos->ItemIndex], TLocateOptions() << loCaseInsensitive << loPartialKey ) ) + // Localizamos el primer registro del terminal seleccionado... + TbHistorico->Locate( "NumElement", TbElementos->FieldByName("NumElement")->AsInteger, TLocateOptions() << loCaseInsensitive << loPartialKey ); + +} +//--------------------------------------------------------------------------- + diff --git a/src/DViewer.dfm b/src/DViewer.dfm new file mode 100644 index 0000000..07749dc Binary files /dev/null and b/src/DViewer.dfm differ diff --git a/src/DViewer.h b/src/DViewer.h new file mode 100644 index 0000000..af05fdd --- /dev/null +++ b/src/DViewer.h @@ -0,0 +1,192 @@ +//--------------------------------------------------------------------------- +#ifndef DViewerH +#define DViewerH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "elastfrm.hpp" +#include "ElastFrm.hpp" +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- +class TDViewerF : public TForm +{ +__published: // IDE-managed Components + TTable *TbHistorico; + TDataSource *DsHistorico; + TIntegerField *TbHistoricoNumElement; + TDateTimeField *TbHistoricoFComienzo; + TTimeField *TbHistoricoTiempo; + TIntegerField *TbHistoricoidc; + TIntegerField *TbHistoricoidtc; + TCurrencyField *TbHistoricoprecio; + TStringField *TbHistoricoTipoConexion; + TTable *TbElementos; + TStringField *TbHistoricoNombreTerminal; + TDataSource *DsElementos; + TStatusBar *StatusBar1; + TPanel *Panel2; + TPanel *Panel3; + TDateTimePicker *MinFecha; + TComboBox *idtConexion; + TCheckListBox *Equipos; + TDateTimePicker *MaxFecha; + TLabel *Label1; + TLabel *Label2; + TSplitter *Splitter1; + TProgressBar *ProgressBar1; + TPageControl *PageControl1; + TTabSheet *TabSheet1; + TLabel *Label3; + TLabel *Label4; + TLabel *Label5; + TLabel *Label6; + TTabSheet *TabSheet2; + TChart *ConexionesEquipos; + TTabSheet *TabSheet3; + TChart *TipoConexion; + TPieSeries *Series3; + TTabSheet *TabSheet4; + TChart *ConexionesHora; + TLabel *Label7; + TLabel *Label8; + TLabel *Label9; + TLabel *Label10; + TComboBox *MargenRuptura; + TLabel *Label11; + TPageControl *PageControl2; + TTabSheet *TabSheet5; + TDBGrid *DBGrid1; + TTabSheet *TabSheet6; + TBevel *Bevel1; + TStringGrid *StringGrid1; + TLabel *Label12; + TLabel *Label13; + TLabel *NBonos; + TBarSeries *Series1; + TBarSeries *Series2; + TAreaSeries *Series4; + TAreaSeries *Series5; + TButton *Button1; + TTabSheet *TabSheet7; + TDBGrid *DBGrid2; + TTable *TbPersonas; + TTable *TbBonos; + TDataSource *DsBonos; + TIntegerField *TbBonosIDcliente; + TDateTimeField *TbBonosFechaCompra; + TIntegerField *TbBonosBhoras; + TIntegerField *TbBonosBmin; + TCurrencyField *TbBonoscoste; + TStringField *TbBonosNombreClt; + TStringField *TbBonosApellidos; + TLabel *Label14; + TLabel *BonosVendidos; + TButton *Button2; + TTabSheet *TabSheet8; + TImageList *Historicos; + TPanel *Panel1; + TDBGrid *DBGrid3; + TDataSource *DsPersonas; + TTable *TbBonosCliente; + TDataSource *DsBonosClientes; + TComboBox *SelIndex; + TEdit *Edit1; + TDBNavigator *DBNavigator1; + TBevel *Bevel2; + TLabel *Label15; + TLabel *Label16; + TLabel *Label17; + TDBEdit *DBEdit1; + TLabel *Label18; + TDBText *DBText1; + TDBEdit *DBEdit2; + TDBEdit *DBEdit3; + TDBEdit *DBEdit4; + TLabel *Label19; + TDBEdit *DBEdit5; + TDBEdit *DBEdit6; + TShape *Shape1; + TShape *Shape2; + TLabel *Label20; + TDBText *DBText2; + TButton *Button3; + TButton *Button4; + TElasticForm *ElasticForm1; + void __fastcall TbHistoricoBeforeOpen(TDataSet *DataSet); + void __fastcall TbHistoricoCalcFields(TDataSet *DataSet); + void __fastcall MinFechaChange(TObject *Sender); + + void __fastcall DBGrid1DrawColumnCell(TObject *Sender, + const TRect &Rect, int DataCol, TColumn *Column, + TGridDrawState State); + void __fastcall TbElementosAfterOpen(TDataSet *DataSet); + void __fastcall FormDestroy(TObject *Sender); + void __fastcall idtConexionChange(TObject *Sender); + void __fastcall Button1Click(TObject *Sender); + void __fastcall Button2Click(TObject *Sender); + void __fastcall Edit1KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift); + void __fastcall DBEdit1KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift); + void __fastcall DBEdit2KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift); + void __fastcall DBEdit3KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift); + void __fastcall DBEdit4KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift); + void __fastcall DBEdit5KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift); + void __fastcall DBEdit6KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift); + void __fastcall TbPersonasBeforeDelete(TDataSet *DataSet); + void __fastcall TbPersonasNewRecord(TDataSet *DataSet); + void __fastcall Button4Click(TObject *Sender); + void __fastcall Button3Click(TObject *Sender); + void __fastcall EquiposClick(TObject *Sender); + +private: // User declarations + int __fastcall Obten_idtc(void); + bool TerminalFiltered; + void __fastcall RefiltraDatos(void); + +public: // User declarations + __fastcall TDViewerF(TComponent* Owner); + void __fastcall CalculaGraficas(void); + void __fastcall InsertaEnParrilla( int Elto, Currency CantidadF, TDateTime Tiempo, bool Repetido ); + + struct DatosEltos + { + int Elto; + int ConF, ConR; + Currency TotalF, TotalR; + int horasF, minF; + int horasR, minR; + } *Parrilla; + + int NConexionesTipo[8]; + int ConexionesHoraF[48], ConexionesHoraR[48]; + + int NBonosVendidos; + Currency TotalBonos; +}; +//--------------------------------------------------------------------------- +extern PACKAGE TDViewerF *DViewerF; +//--------------------------------------------------------------------------- +#endif diff --git a/src/DViewer_Print.cpp b/src/DViewer_Print.cpp new file mode 100644 index 0000000..c43a630 --- /dev/null +++ b/src/DViewer_Print.cpp @@ -0,0 +1,51 @@ +//---------------------------------------------------------------------------- +#include +#pragma hdrstop + +#include "DViewer_Print.h" +#include "DViewer.h" +//---------------------------------------------------------------------------- +#pragma resource "*.dfm" +TQuickReport1 *QuickReport1; +//---------------------------------------------------------------------------- +__fastcall TQuickReport1::TQuickReport1(TComponent* Owner) + : TQuickRep(Owner) +{ + +} +//---------------------------------------------------------------------------- + + + +void __fastcall TQuickReport1::QuickRepStartPage(TCustomQuickRep *Sender) +{ + QRConexionesF->Caption = DViewerF->Label4->Caption + " ( " + DViewerF->Label8->Caption + " )"; + QRConexionesR->Caption = DViewerF->Label6->Caption + " ( " + DViewerF->Label9->Caption + " )"; + QRNBonos->Caption = DViewerF->NBonos->Caption; + QRRuptura->Caption = DViewerF->MargenRuptura->SelText; + QRBonosVendidos->Caption = DViewerF->BonosVendidos->Caption; + + QRMemo1->Lines->Clear(); + QRMemo2->Lines->Clear(); + QRMemo3->Lines->Clear(); + QRMemo4->Lines->Clear(); + QRMemo5->Lines->Clear(); + QRMemo6->Lines->Clear(); + QRMemo7->Lines->Clear(); + QRMemo8->Lines->Clear(); + // Rellenamos la tabla de datos + for (int i = 0; i < DViewerF->Equipos->Items->Count; i++) + { + QRMemo2->Lines->Add( DViewerF->StringGrid1->Cells[0][i+1] ); + QRMemo1->Lines->Add( DViewerF->StringGrid1->Cells[1][i+1] ); + + QRMemo3->Lines->Add( DViewerF->StringGrid1->Cells[2][i+1] ); + QRMemo4->Lines->Add( DViewerF->StringGrid1->Cells[3][i+1] ); + QRMemo5->Lines->Add( DViewerF->StringGrid1->Cells[4][i+1] ); + QRMemo6->Lines->Add( DViewerF->StringGrid1->Cells[5][i+1] ); + QRMemo7->Lines->Add( DViewerF->StringGrid1->Cells[6][i+1] ); + QRMemo8->Lines->Add( DViewerF->StringGrid1->Cells[7][i+1] ); + } +} +//--------------------------------------------------------------------------- + diff --git a/src/DViewer_Print.dfm b/src/DViewer_Print.dfm new file mode 100644 index 0000000..3bcbb62 Binary files /dev/null and b/src/DViewer_Print.dfm differ diff --git a/src/DViewer_Print.h b/src/DViewer_Print.h new file mode 100644 index 0000000..692fbfa --- /dev/null +++ b/src/DViewer_Print.h @@ -0,0 +1,64 @@ +//---------------------------------------------------------------------------- +#ifndef DViewer_PrintH +#define DViewer_PrintH +//---------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//---------------------------------------------------------------------------- +class TQuickReport1 : public TQuickRep +{ +__published: + TQRBand *QRBand1; + TQRBand *QRBand2; + TQRChart *ConexionesHora; + TQRDBChart *QRDBChart1; + TAreaSeries *Series1; + TAreaSeries *Series2; + TQRChart *TipoConexion; + TQRDBChart *QRDBChart2; + TPieSeries *Series3; + TQRChart *ConexionesEquipos; + TQRDBChart *QRDBChart3; + TBarSeries *Series4; + TBarSeries *Series5; + TQRLabel *QRLabel7; + TQRLabel *QRNBonos; + TQRLabel *QRConexionesR; + TQRLabel *QRConexionesF; + TQRLabel *QRLabel3; + TQRLabel *QRLabel1; + TQRLabel *QRLabel2; + TQRMemo *QRMemo1; + TQRLabel *QRLabel8; + TQRLabel *QRRuptura; + TQRMemo *QRMemo2; + TQRLabel *QRLabel4; + TQRMemo *QRMemo3; + TQRMemo *QRMemo4; + TQRMemo *QRMemo5; + TQRMemo *QRMemo6; + TQRMemo *QRMemo7; + TQRMemo *QRMemo8; + TQRLabel *QRLabel5; + TQRLabel *QRBonosVendidos; + void __fastcall QuickRepStartPage(TCustomQuickRep *Sender); +private: +public: + __fastcall TQuickReport1::TQuickReport1(TComponent* Owner); +}; +//---------------------------------------------------------------------------- +extern TQuickReport1 *QuickReport1; +//---------------------------------------------------------------------------- +#endif \ No newline at end of file diff --git a/src/DViewer_PrintBonos.cpp b/src/DViewer_PrintBonos.cpp new file mode 100644 index 0000000..10db032 --- /dev/null +++ b/src/DViewer_PrintBonos.cpp @@ -0,0 +1,16 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop + +#include "DViewer_PrintBonos.h" +#include "DViewer.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TQRBonos *QRBonos; +//--------------------------------------------------------------------------- +__fastcall TQRBonos::TQRBonos(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- diff --git a/src/DViewer_PrintBonos.dfm b/src/DViewer_PrintBonos.dfm new file mode 100644 index 0000000..9e565d8 Binary files /dev/null and b/src/DViewer_PrintBonos.dfm differ diff --git a/src/DViewer_PrintBonos.h b/src/DViewer_PrintBonos.h new file mode 100644 index 0000000..498d416 --- /dev/null +++ b/src/DViewer_PrintBonos.h @@ -0,0 +1,46 @@ +//--------------------------------------------------------------------------- +#ifndef DViewer_PrintBonosH +#define DViewer_PrintBonosH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TQRBonos : public TForm +{ +__published: // IDE-managed Components + TQuickRep *QuickRep1; + TQRBand *PageFooterBand1; + TQRExpr *QRExpr1; + TQRBand *ColumnHeaderBand1; + TQRBand *DetailBand1; + TQRLabel *QRLabel1; + TQRExpr *QRExpr2; + TQRLabel *QRLabel2; + TQRExpr *QRExpr3; + TQRLabel *QRLabel3; + TQRExpr *QRExpr4; + TQRLabel *QRLabel5; + TQRExpr *QRExpr6; + TQRLabel *QRLabel6; + TQRExpr *QRExpr7; + TQRBand *QRBand1; + TQRLabel *QRLabel4; + TQRBand *QRBand2; + TQRExpr *QRExpr5; + TQRShape *QRShape1; + TQRExpr *QRExpr8; +private: // User declarations +public: // User declarations + __fastcall TQRBonos(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TQRBonos *QRBonos; +//--------------------------------------------------------------------------- +#endif diff --git a/src/DViewer_PrintClientes.cpp b/src/DViewer_PrintClientes.cpp new file mode 100644 index 0000000..94eca7c --- /dev/null +++ b/src/DViewer_PrintClientes.cpp @@ -0,0 +1,17 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop + +#include "DViewer_PrintClientes.h" +#include "DViewer.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TQRClt *QRClt; +//--------------------------------------------------------------------------- +__fastcall TQRClt::TQRClt(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- + diff --git a/src/DViewer_PrintClientes.dfm b/src/DViewer_PrintClientes.dfm new file mode 100644 index 0000000..3749866 Binary files /dev/null and b/src/DViewer_PrintClientes.dfm differ diff --git a/src/DViewer_PrintClientes.h b/src/DViewer_PrintClientes.h new file mode 100644 index 0000000..849f04e --- /dev/null +++ b/src/DViewer_PrintClientes.h @@ -0,0 +1,46 @@ +//--------------------------------------------------------------------------- +#ifndef DViewer_PrintClientesH +#define DViewer_PrintClientesH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TQRClt : public TForm +{ +__published: // IDE-managed Components + TQuickRep *QuickRep1; + TQRBand *PageFooterBand1; + TQRExpr *QRExpr1; + TQRBand *ColumnHeaderBand1; + TQRBand *DetailBand1; + TQRLabel *QRLabel1; + TQRExpr *QRExpr2; + TQRLabel *QRLabel2; + TQRExpr *QRExpr3; + TQRLabel *QRLabel3; + TQRExpr *QRExpr4; + TQRLabel *QRLabel4; + TQRExpr *QRExpr5; + TQRLabel *QRLabel6; + TQRExpr *QRExpr7; + TQRLabel *QRLabel7; + TQRExpr *QRExpr8; + TQRBand *QRBand1; + TQRLabel *QRLabel5; +private: // User declarations +public: // User declarations + __fastcall TQRClt(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TQRClt *QRClt; +//--------------------------------------------------------------------------- +#endif diff --git a/src/DViewer_PrintHistoric.cpp b/src/DViewer_PrintHistoric.cpp new file mode 100644 index 0000000..bd4dcee --- /dev/null +++ b/src/DViewer_PrintHistoric.cpp @@ -0,0 +1,16 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop + +#include "DViewer_PrintHistoric.h" +#include "DViewer.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TQRHistoric *QRHistoric; +//--------------------------------------------------------------------------- +__fastcall TQRHistoric::TQRHistoric(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- diff --git a/src/DViewer_PrintHistoric.dfm b/src/DViewer_PrintHistoric.dfm new file mode 100644 index 0000000..cd2b2b5 Binary files /dev/null and b/src/DViewer_PrintHistoric.dfm differ diff --git a/src/DViewer_PrintHistoric.h b/src/DViewer_PrintHistoric.h new file mode 100644 index 0000000..ea0cfde --- /dev/null +++ b/src/DViewer_PrintHistoric.h @@ -0,0 +1,42 @@ +//--------------------------------------------------------------------------- +#ifndef DViewer_PrintHistoricH +#define DViewer_PrintHistoricH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TQRHistoric : public TForm +{ +__published: // IDE-managed Components + TQuickRep *QuickRep1; + TQRBand *PageFooterBand1; + TQRExpr *QRExpr1; + TQRBand *ColumnHeaderBand1; + TQRBand *DetailBand1; + TQRLabel *QRLabel1; + TQRExpr *QRExpr2; + TQRLabel *QRLabel2; + TQRExpr *QRExpr3; + TQRLabel *QRLabel3; + TQRExpr *QRExpr4; + TQRLabel *QRLabel4; + TQRExpr *QRExpr5; + TQRLabel *QRLabel5; + TQRExpr *QRExpr6; + TQRLabel *QRLabel6; + TQRExpr *QRExpr7; +private: // User declarations +public: // User declarations + __fastcall TQRHistoric(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TQRHistoric *QRHistoric; +//--------------------------------------------------------------------------- +#endif diff --git a/src/DataViewer.bpr b/src/DataViewer.bpr new file mode 100644 index 0000000..48895db --- /dev/null +++ b/src/DataViewer.bpr @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=3082 +CodePage=1252 + +[Version Info Keys] +CompanyName=JD Soft. +FileDescription=Visualizador de Datos +FileVersion=1.0.0.0 +InternalName=DViewer +LegalCopyright=JD Soft. +LegalTrademarks=JD Soft. +OriginalFilename=DataViewer +ProductName=CtrlMstr: Visualizador de Datos +ProductVersion=1.0.0.0 +Comments=Permite la visualizacion de los datos, generados por el Control Maestro. + +[Excluded Packages] +c:\archivos de programa\borland\cbuilder6\Bin\dclite60.bpl=Borland Integrated Translation Environment + +[HistoryLists\hlIncludePath] +Count=2 +Item0=$(BCB)\include;$(BCB)\include\vcl;..\C++ Builder\VCLs\include +Item1=$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=3 +Item0=..\C++ Builder\VCLs\include;$(BCB)\lib\obj;$(BCB)\lib;..\C++ Builder\VCLs\lib +Item1=$(BCB)\lib\obj;$(BCB)\lib;..\C++ Builder\VCLs\lib +Item2=$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlIntOutputDir] +Count=1 +Item0=..\obj + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=..\bin + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=1 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + + \ No newline at end of file diff --git a/src/DataViewer.cpp b/src/DataViewer.cpp new file mode 100644 index 0000000..ad0918d --- /dev/null +++ b/src/DataViewer.cpp @@ -0,0 +1,38 @@ +//--------------------------------------------------------------------------- +#include +#include + +#pragma hdrstop +USERES("DataViewer.res"); +USEFORM("DViewer.cpp", DViewerF); +USEFORM("DViewer_Print.cpp", QuickReport1); /* TQuickRep: File Type */ +USEFORM("DViewer_PrintHistoric.cpp", QRHistoric); +USEFORM("DViewer_PrintBonos.cpp", QRBonos); +USEFORM("DViewer_PrintClientes.cpp", QRClt); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE hPrevInstance, LPSTR, int) +{ + AnsiString FsMutex = DateToStr(TDateTime::CurrentDate()) + AnsiString("-mutex-dataviewer"); + HANDLE FhMutex = OpenMutex(MUTEX_ALL_ACCESS,False, FsMutex.c_str() ); + if ( FhMutex == 0 ) //it's a first instance + { + FhMutex = CreateMutex(NULL,false, FsMutex.c_str() ); + + try + { + Application->Initialize(); + Application->Title = "Visualizador de Datos"; + Application->CreateForm(__classid(TDViewerF), &DViewerF); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + + } else { + if ( CloseHandle(FhMutex) ) FhMutex = 0; + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/src/DataViewer.dfm b/src/DataViewer.dfm new file mode 100644 index 0000000..30016c6 Binary files /dev/null and b/src/DataViewer.dfm differ diff --git a/src/DataViewer.h b/src/DataViewer.h new file mode 100644 index 0000000..b394b9d --- /dev/null +++ b/src/DataViewer.h @@ -0,0 +1,20 @@ +//--------------------------------------------------------------------------- +#ifndef DataViewerH +#define DataViewerH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TForm1 : public TForm +{ +__published: // IDE-managed Components +private: // User declarations +public: // User declarations + __fastcall TForm1(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TForm1 *Form1; +//--------------------------------------------------------------------------- +#endif diff --git a/src/DataViewer.res b/src/DataViewer.res new file mode 100644 index 0000000..72741e4 Binary files /dev/null and b/src/DataViewer.res differ diff --git a/src/FichasClientes.cpp b/src/FichasClientes.cpp new file mode 100644 index 0000000..82c726c --- /dev/null +++ b/src/FichasClientes.cpp @@ -0,0 +1,212 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop + +#include "FichasClientes.h" +#include "CtrlPPal.h" +#include "ComprarBono.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "CoolForm" +#pragma link "DigitNum" +#pragma link "FormularioREUSABLE" +#pragma resource "*.dfm" +TFClientes *FClientes; +//--------------------------------------------------------------------------- +__fastcall TFClientes::TFClientes(TComponent* Owner) + : TFormREUSABLE(Owner) +{ + SpeedButton1Click(0); + SelIndex->ItemIndex = 0; + TbBonos->Active = true; +} +//--------------------------------------------------------------------------- + +void __fastcall TFClientes::Button1Click(TObject *Sender) +{ + ModalResult = mrCancel; +} +//--------------------------------------------------------------------------- +void __fastcall TFClientes::DBGrid1DblClick(TObject *Sender) +{ + Label1->Visible = false; + SelIndex->Visible = false; + Edit1->Visible = false; + DBGrid1->Visible = false; + + Label2->Visible = true; + Label3->Visible = true; + Label4->Visible = true; + Label5->Visible = true; + Label6->Visible = true; + DBText1->Visible = true; + DBEdit1->Visible = true; + DBEdit2->Visible = true; + DBEdit3->Visible = true; + DBEdit4->Visible = true; + Button2->Visible = true; + Button3->Visible = true; + Dig1->Visible = true; + Dig2->Visible = true; + Shape1->Visible = true; + Shape2->Visible = true;} +//--------------------------------------------------------------------------- + +void __fastcall TFClientes::SpeedButton1Click(TObject *Sender) +{ + Label2->Visible = false; + Label3->Visible = false; + Label4->Visible = false; + Label5->Visible = false; + Label6->Visible = false; + DBText1->Visible = false; + DBEdit1->Visible = false; + DBEdit2->Visible = false; + DBEdit3->Visible = false; + DBEdit4->Visible = false; + Button2->Visible = false; + Button3->Visible = false; + Dig1->Visible = false; + Dig2->Visible = false; + Shape1->Visible = false; + Shape2->Visible = false; + + Label1->Visible = true; + SelIndex->Visible = true; + Edit1->Visible = true; + DBGrid1->Visible = true; +} +//--------------------------------------------------------------------------- +void __fastcall TFClientes::SpeedButton2Click(TObject *Sender) +{ + DBGrid1DblClick(0); + CtrlPPal->TbPersonas->Insert(); +} +//--------------------------------------------------------------------------- + + +void __fastcall TFClientes::SelIndexChange(TObject *Sender) +{ + CtrlPPal->TbPersonas->IndexFieldNames = SelIndex->Items->Strings[SelIndex->ItemIndex]; +} +//--------------------------------------------------------------------------- + +void __fastcall TFClientes::Edit1KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift) +{ + if ( !Edit1->Text.IsEmpty() ) + CtrlPPal->TbPersonas->Locate( SelIndex->Items->Strings[SelIndex->ItemIndex], Edit1->Text, TLocateOptions() << loCaseInsensitive << loPartialKey ); +} +//--------------------------------------------------------------------------- + +void __fastcall TFClientes::Button3Click(TObject *Sender) +{ + ModalResult = mrOk; +} +//--------------------------------------------------------------------------- + +void __fastcall TFClientes::DsPersonasDataChange(TObject *Sender, + TField *Field) +{ + Dig1->Value = CtrlPPal->TbPersonas->FieldByName("TiempoH")->AsInteger; + Dig2->Value = CtrlPPal->TbPersonas->FieldByName("TiempoM")->AsInteger; + +} +//--------------------------------------------------------------------------- + +void __fastcall TFClientes::Button2Click(TObject *Sender) +{ + // Aun no desarrollado... + TCBono *CBono; + CBono = new TCBono(this); + if ( CBono->ShowModal() == mrOk ) + { + int H, M; + H = CBono->Horas->Text.ToInt(); + M = CBono->Min->Text.ToInt(); + CtrlPPal->TbPersonas->Edit(); + CtrlPPal->TbPersonas->FieldByName("TiempoH")->AsInteger = CtrlPPal->TbPersonas->FieldByName("TiempoH")->AsInteger + H + ( CtrlPPal->TbPersonas->FieldByName("TiempoM")->AsInteger + M)/60; + CtrlPPal->TbPersonas->FieldByName("TiempoM")->AsInteger = ( CtrlPPal->TbPersonas->FieldByName("TiempoM")->AsInteger + M)%60; + CtrlPPal->TbPersonas->Post(); + TbBonos->InsertRecord(ARRAYOFCONST((CtrlPPal->TbPersonas->FieldByName("CodCliente1")->AsInteger,(Variant)TDateTime::CurrentDateTime(),(Variant)TDateTime::CurrentDate(), H, M, Currency(CBono->CosteBono->Text) ))); + } +} +//--------------------------------------------------------------------------- + +void __fastcall TFClientes::TbBonosBeforeOpen(TDataSet *DataSet) +{ + if ( !FileExists( TbBonos->TableName ) ) + { + TbBonos -> TableType = ttParadox; + + TbBonos -> FieldDefs -> Clear(); + + /********************\ + |* Datos Básicos *| + \********************/ + TbBonos -> FieldDefs -> Add("IDcliente", ftInteger, 0, false ); + TbBonos -> FieldDefs -> Add("FechaCompra", ftDateTime, 0, false ); + TbBonos -> FieldDefs -> Add("fecha", ftDate, 0, false ); + TbBonos -> FieldDefs -> Add("Bhoras", ftInteger, 0, false ); + TbBonos -> FieldDefs -> Add("Bmin", ftInteger, 0, false ); + TbBonos -> FieldDefs -> Add("coste", ftCurrency, 0, false ); + TbBonos -> IndexDefs-> Clear(); + + TbBonos->IndexDefs->Add("Primary", "IDcliente;FechaCompra", TIndexOptions() << ixPrimary ); + + // Creamos la base... + TbBonos -> CreateTable(); + } +} +//--------------------------------------------------------------------------- + +void __fastcall TFClientes::DBEdit1KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift) +{ + if ( Key == VK_RETURN ) + { + CtrlPPal->TbPersonas->Post(); + DBEdit2->SetFocus(); + } +} +//--------------------------------------------------------------------------- + +void __fastcall TFClientes::DBEdit2KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift) +{ + if ( Key == VK_RETURN ) + { + CtrlPPal->TbPersonas->Post(); + DBEdit3->SetFocus(); + } + +} +//--------------------------------------------------------------------------- + +void __fastcall TFClientes::DBEdit3KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift) +{ + if ( Key == VK_RETURN ) + { + CtrlPPal->TbPersonas->Post(); + DBEdit4->SetFocus(); + } + +} +//--------------------------------------------------------------------------- + + +void __fastcall TFClientes::DBEdit4KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift) +{ + if ( Key == VK_RETURN ) + { + CtrlPPal->TbPersonas->Post(); + DBEdit1->SetFocus(); + } +} +//--------------------------------------------------------------------------- + + + diff --git a/src/FichasClientes.dfm b/src/FichasClientes.dfm new file mode 100644 index 0000000..e0a6aae --- /dev/null +++ b/src/FichasClientes.dfm @@ -0,0 +1,450 @@ +inherited FClientes: TFClientes + Left = 378 + Top = 210 + ActiveControl = Edit1 + Caption = 'copia' + OldCreateOrder = True + PixelsPerInch = 96 + TextHeight = 13 + inherited CoolForm1: TCoolForm + Mask2 = { + 3002000020000000010000002100000010020000040000000200000064010000 + 030100001A000000020000004E01000003000000170000000300000051010000 + 0400000015000000040000005301000005000000130000000500000055010000 + 0600000012000000060000005601000007000000100000000700000058010000 + 080000000F0000000800000059010000090000000E000000090000005A010000 + 0A0000000C0000000A0000005C0100000C0000000B0000000C0000005D010000 + 0D0000000A0000000D0000005E0100000E000000090000000E0000005F010000 + 1000000008000000100000006001000011000000070000001100000061010000 + 1300000006000000130000006201000015000000050000001500000063010000 + 18000000040000001800000064010000ED00000005000000ED00000063010000 + F000000006000000F000000062010000F200000007000000F200000061010000 + F400000008000000F400000060010000F500000009000000F50000005F010000 + F70000000A000000F70000005E010000F80000000B000000F80000005D010000 + F90000000C000000F90000005C010000FB0000000E000000FB0000005A010000 + FC0000000F000000FC00000059010000FD00000010000000FD00000058010000 + FE00000012000000FE00000056010000FF00000013000000FF00000055010000 + 0001000015000000000100005301000001010000170000000101000051010000 + 020100001A000000020100004E01000003010000} + end + object Terminal: TLabel [1] + Left = 72 + Top = 5 + Width = 209 + Height = 20 + Alignment = taCenter + AutoSize = False + Caption = 'Fichas de Clientes' + Font.Charset = DEFAULT_CHARSET + Font.Color = clAqua + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + Transparent = True + end + object Label1: TLabel [2] + Left = 34 + Top = 41 + Width = 62 + Height = 20 + Caption = '&Buscar:' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWhite + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + Transparent = True + end + object SpeedButton1: TSpeedButton [3] + Left = 329 + Top = 64 + Width = 23 + Height = 22 + Hint = 'Localizar cliente' + Flat = True + Glyph.Data = { + 8E030000424D8E03000000000000760000002800000042000000160000000100 + 04000000000018030000C40E0000C40E00001000000010000000010102000000 + 310039393900000063006F006F006C6C6C00000094000000B5000000E9006A00 + FF006F6FD900800080009400FF00AEAEAE008F8FCF00F3F3F300B2E75BBBBBBB + BD2A83DBBBBBBBBBBBBBBBBBBBBBBBBBB2E75BBBBBBBBD2A83DBBB000000B170 + 000000000036063DBBBBBBBBBBBBBBBBBBBBBBBBB170000000000036063DBB00 + 0000B175FFFFFFFFFD365571FBBBBBBBBBBBBBBBBBBBBBBBB175FFFFFFFFFD36 + 5571FB000000B0000000000FFD365B571FBBBB000000000000BBBBBBB0000000 + 000FFD365B571F0000000FFFFFFFFFF0FD000DB280BBB0DDDDDDDDDDDD0BBBBB + 0FFFFFFFFFF0FD000DB2800000000FDFFFFFDFF0FD5BB5DB28BBB0D000000000 + 0DD0BBBB0FDFFFFFDFF0FD5BB5DB280000000FFFFFFFFFF0FD5B50DBB0BBBB0D + 0FFFFFF0B0DD0BBB0FFFFFFFFFF0FD5B50DBB0000000B2FFFFFFFFFF2D5D550D + BBBBB0000000000F0F0D0BBBB2FFFFFFFFFF2D5D550DBB000000B2FFD2DFD0FF + 00005BB2FBBBB0FFFFFFFFF0F00D0BBBB2FFD2DFD0FF00005BB2FB000000082F + 55FF2FFFF174BD50FBBBBB0F00F00FFF0F0D0BBB082F55FF2FFFF174BD50FB00 + 0000800002200500174C60DBBBBBBB0FFFFFFFFF0F0D0BBB800002200500174C + 60DBBB00000082FD25FD2FDD1739B00DBBBBB000FFFFFFFFF0000BBB82FD25FD + 2FDD1739B00DBB00000008000220050001736DF2FBBBB0800F00000F00080BBB + 08000220050001736DF2FB000000BB2F55FF2FFFF0005500FBBBB080FFFFFFFF + F0080BBBBB2F55FF2FFFF0005500FB000000BB2FD2DFD0FFF2D5FF50FBBBB000 + FFFFFFFFF0F00BBBBB2FD2DFD0FFF2D5FF50FB000000BB2FFFFFFFFFF2D5FFF2 + 0FBBBBB0F000F00FF0F0BBBBBB2FFFFFFFFFF2D5FFF20F000000BB2FDDDDDFDF + F2FD5FFF2FBBBBB0FFFFFFFFF000BBBBBB2FDDDDDFDFF2FD5FFF2F000000BB2F + FFFFFFFFF2FD00000FBBBBB0FFF0000000BBBBBBBB2FFFFFFFFFF2FD00000F00 + 0000BB2FDDDDFFFFF2FD0DBBBBBBBBBB000BBBBBBBBBBBBBBB2FDDDDFFFFF2FD + 0DBBBB000000BB2FDDDDDFFFF2FF5DBBBBBBBBBBBBBBBBBBBBBBBBBBBB2FDDDD + DFFFF2FF5DBBBB000000BB2FFFFFFFFFF0000DBBBBBBBBBBBBBBBBBBBBBBBBBB + BB2FFFFFFFFFF0000DBBBB000000BB000000000002BBBBBBBBBBBBBBBBBBBBBB + BBBBBBBBBB000000000002BBBBBBBB000000} + NumGlyphs = 3 + ParentShowHint = False + ShowHint = True + OnClick = SpeedButton1Click + end + object SpeedButton2: TSpeedButton [4] + Left = 329 + Top = 96 + Width = 23 + Height = 22 + Hint = 'Alta de clientes' + Flat = True + Glyph.Data = { + 0E0A0000424D0E0A000000000000360400002800000042000000160000000100 + 080000000000D8050000C40E0000C40E00000001000000010000000000000000 + 5500000080000000AA000000D5000000FF00002B0000002B5500002B8000002B + AA00002BD500002BFF000055000000555500005580000055AA000055D5000055 + FF000080000000805500008080000080AA000080D5000080FF0000AA000000AA + 550000AA800000AAAA0000AAD50000AAFF0000D5000000D5550000D5800000D5 + AA0000D5D50000D5FF0000FF000000FF550000FF800000FFAA0000FFD50000FF + FF005500000055005500550080005500AA005500D5005500FF00552B0000552B + 5500552B8000552BAA00552BD500552BFF005555000055555500555580005555 + AA005555D5005555FF005580000055805500558080005580AA005580D5005580 + FF0055AA000055AA550055AA800055AAAA0055AAD50055AAFF0055D5000055D5 + 550055D5800055D5AA0055D5D50055D5FF0055FF000055FF550055FF800055FF + AA0055FFD50055FFFF008000000080005500800080008000AA008000D5008000 + FF00802B0000802B5500802B8000802BAA00802BD500802BFF00805500008055 + 5500805580008055AA008055D5008055FF008080000080805500808080008080 + AA008080D5008080FF0080AA000080AA550080AA800080AAAA0080AAD50080AA + FF0080D5000080D5550080D5800080D5AA0080D5D50080D5FF0080FF000080FF + 550080FF800080FFAA0080FFD50080FFFF00AA000000AA005500AA008000AA00 + AA00AA00D500AA00FF00AA2B0000AA2B5500AA2B8000AA2BAA00AA2BD500AA2B + FF00AA550000AA555500AA558000AA55AA00AA55D500AA55FF00AA800000AA80 + 5500AA808000AA80AA00AA80D500AA80FF00AAAA0000AAAA5500AAAA8000AAAA + AA00AAAAD500AAAAFF00AAD50000AAD55500AAD58000AAD5AA00AAD5D500AAD5 + FF00AAFF0000AAFF5500AAFF8000AAFFAA00AAFFD500AAFFFF00D5000000D500 + 5500D5008000D500AA00D500D500D500FF00D52B0000D52B5500D52B8000D52B + AA00D52BD500D52BFF00D5550000D5555500D5558000D555AA00D555D500D555 + FF00D5800000D5805500D5808000D580AA00D580D500D580FF00D5AA0000D5AA + 5500D5AA8000D5AAAA00D5AAD500D5AAFF00D5D50000D5D55500D5D58000D5D5 + AA00D5D5D500D5D5FF00D5FF0000D5FF5500D5FF8000D5FFAA00D5FFD500D5FF + FF00FF000000FF005500FF008000FF00AA00FF00D500FF00FF00FF2B0000FF2B + 5500FF2B8000FF2BAA00FF2BD500FF2BFF00FF550000FF555500FF558000FF55 + AA00FF55D500FF55FF00FF800000FF805500FF808000FF80AA00FF80D500FF80 + FF00FFAA0000FFAA5500FFAA8000FFAAAA00FFAAD500FFAAFF00FFD50000FFD5 + 5500FFD58000FFD5AA00FFD5D500FFD5FF00FFFF0000FFFF5500FFFF8000FFFF + AA00FFFFD5003F3F3F006B6B6B0095959500C0C0C000FFFFFF00F6F6F6F6F6F6 + F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F60505050505050505F6 + F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F60000F6F6 + F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F605050505050505 + 0505050505F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6 + 0000F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F605050505 + 05050505050505050505F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6 + F6F6F6F6000000000000000000000000000000000000000000000000F6F6F605 + 050505FAFAFAFAFAFAFA0505050505F6F6F60000000000000000000000000000 + 0000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 + F6F605050505FAFAFAFAFAFAFAFAFAFA05050505F6F600FFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFF00000000FFFF1D1DFFFF1D1DFFFF1D1DFFFF1D1DFF + FF1DFF00F6050505050505FAFAFAFAFAFAFAFAFAFA05050505F600FF1DFFFF1D + 1DFFFF1D1DFFFF1D1DFFFF1D1DFFFF00000000FF1DFFFF1D1DFFFF1D1DFFFF1D + 1DFFFF1D1DFFFF00F605050505050505FAFA000000000000FAFA050505F600FF + FF1D1DFFFF1D1DFFFF1D1DFFFF1D1DFFFF1DFF00000000FFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFF0000000000FA0505050500FEFEFEFEFEFE00FAFA05 + 050500FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0054D254D2000005050505FFFFFF000000 + 0000FA05050500FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FF + FFFFFFFFFF000000000000FFFF0000000000FF00D254D25400FEFE05050505FF + FFFFFEFEFEFE0005050500FFFFFFFFFFFF000000000000FFFF0000000000FF00 + 000000FF0505D205FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00D2D2D2D200FFFFFF + 05050505FF0000000000FA05050500FFD2D229D2FFFFFFFFFFFFFFFFFFFFFFFF + FFFFFF00000000FF292905FFFF000000FF000000000000FF0000FF00D2D2D2D2 + 000000FFFF05050505FFFEFEFE00FA05050500FF0505D2FFFF000000FF000000 + 000000FF0000FF00000000FF2905D229FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 + 0000000000FAFA00FFFF05050505000000FAFA05050500FF05D22905FFFFFFFF + FFFFFFFFFFFFFFFFFFFFFF00000000FF0529D2FFFF0000000000FF0000FF0000 + 0000FF00050505FAFAFAFAFA00FFFF05050505FAFAFAFA05050500FFD20529FF + FF0000000000FF0000FF00000000FF00000000FFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFF00050505FAFAFAFAFAFA0000FF05050505FAFAFA05050500FF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000 + 000000000000000000000000F6050505FAFAFAFAFAFAFA00FF05050505FA0505 + 05F6000000000000000000000000000000000000000000000000F6F6F6F6F6F6 + F6F600FEFEFEFEFE00F6F6F6F6F6F6F6F605050505FAFAFAFAFAFAFA00000505 + 0505050505F6F6F6F6F6F6F6F6F600FEFEFEFEFE00F6F6F6F6F6F6F60000F6F6 + F6F6F6F6F6F6F600FE00FE00F6F6F6F6F6F6F6F6F6F605050505FAFAFAFAFAFA + FAFAFA0505050505F6F6F6F6F6F6F6F6F6F6F600FE00FE00F6F6F6F6F6F6F6F6 + 0000F6F6F6F6F6F6F6F600FEFEFEFEFE00F6F6F6F6F6F6F6F6F6F60505050505 + FAFAFAFAFAFA0505050505F6F6F6F6F6F6F6F6F6F6F600FEFEFEFEFE00F6F6F6 + F6F6F6F60000F6F6F6F6F6F6F6F6F60000000000F6F6F6F6F6F6F6F6F6F6F6F6 + 0505050505050505050505050505F6F6F6F6F6F6F6F6F6F6F6F6F60000000000 + F6F6F6F6F6F6F6F60000F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6 + F6F6F6F6F6050505050505050505050505F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6 + F6F6F6F6F6F6F6F6F6F6F6F60000F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6 + F6F6F6F6F6F6F6F6F6F6F60505050505050505F6F6F6F6F6F6F6F6F6F6F6F6F6 + F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F60000} + NumGlyphs = 3 + ParentShowHint = False + ShowHint = True + OnClick = SpeedButton2Click + end + object Label2: TLabel [5] + Left = 34 + Top = 65 + Width = 68 + Height = 20 + Caption = 'Nombre:' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWhite + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + Transparent = True + end + object Label3: TLabel [6] + Left = 34 + Top = 113 + Width = 28 + Height = 20 + Caption = 'Nif:' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWhite + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + Transparent = True + end + object Label4: TLabel [7] + Left = 178 + Top = 113 + Width = 31 + Height = 20 + Caption = 'Tlf.:' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWhite + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + Transparent = True + end + object Label5: TLabel [8] + Left = 34 + Top = 137 + Width = 162 + Height = 20 + Caption = 'Tiempo RESTANTE:' + Font.Charset = DEFAULT_CHARSET + Font.Color = clYellow + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + Transparent = True + end + object Dig1: TDigitNum [9] + Left = 44 + Top = 168 + Width = 65 + Height = 55 + Brush.Style = bsClear + LED_OFF = clBlack + LED_BRDon = clWhite + LED_BRDoff = clBlue + Value = 12 + MaxLength = 2 + end + object Shape2: TShape [10] + Left = 109 + Top = 199 + Width = 10 + Height = 10 + Brush.Color = clRed + Pen.Color = clWhite + Shape = stCircle + end + object Shape1: TShape [11] + Left = 109 + Top = 178 + Width = 10 + Height = 10 + Brush.Color = clRed + Pen.Color = clWhite + Shape = stCircle + end + object Dig2: TDigitNum [12] + Left = 124 + Top = 168 + Width = 65 + Height = 55 + Brush.Style = bsClear + LED_OFF = clBlack + LED_BRDon = clWhite + LED_BRDoff = clBlue + Value = 12 + MaxLength = 2 + end + object Label6: TLabel [13] + Left = 34 + Top = 41 + Width = 148 + Height = 20 + Caption = 'Código de Cliente:' + Font.Charset = DEFAULT_CHARSET + Font.Color = clYellow + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + Transparent = True + end + object DBText1: TDBText [14] + Left = 208 + Top = 40 + Width = 121 + Height = 25 + Alignment = taRightJustify + DataField = 'CodCliente1' + DataSource = DsPersonas + Font.Charset = DEFAULT_CHARSET + Font.Color = clLime + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + Transparent = True + end + inherited Button1: TButton + TabOrder = 9 + end + object Edit1: TEdit + Left = 205 + Top = 40 + Width = 121 + Height = 21 + TabOrder = 1 + OnKeyUp = Edit1KeyUp + end + object DBGrid1: TDBGrid + Left = 32 + Top = 64 + Width = 294 + Height = 168 + DataSource = DsPersonas + ReadOnly = True + TabOrder = 2 + TitleFont.Charset = DEFAULT_CHARSET + TitleFont.Color = clWindowText + TitleFont.Height = -11 + TitleFont.Name = 'MS Sans Serif' + TitleFont.Style = [] + OnDblClick = DBGrid1DblClick + end + object SelIndex: TComboBox + Left = 98 + Top = 40 + Width = 105 + Height = 21 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ItemHeight = 13 + ParentFont = False + TabOrder = 0 + Text = 'Nombre' + OnChange = SelIndexChange + Items.Strings = ( + 'CodCliente1' + 'Nombre' + 'Apellidos' + 'Telefono 1') + end + object DBEdit1: TDBEdit + Left = 104 + Top = 64 + Width = 121 + Height = 21 + DataField = 'Nombre' + DataSource = DsPersonas + TabOrder = 3 + OnKeyUp = DBEdit1KeyUp + end + object DBEdit2: TDBEdit + Left = 104 + Top = 88 + Width = 217 + Height = 21 + DataField = 'Apellidos' + DataSource = DsPersonas + TabOrder = 4 + OnKeyUp = DBEdit2KeyUp + end + object DBEdit3: TDBEdit + Left = 72 + Top = 112 + Width = 97 + Height = 21 + DataField = 'DocumentoDNP' + DataSource = DsPersonas + TabOrder = 5 + OnKeyUp = DBEdit3KeyUp + end + object DBEdit4: TDBEdit + Left = 208 + Top = 112 + Width = 113 + Height = 21 + DataField = 'Telefono 1' + DataSource = DsPersonas + TabOrder = 6 + OnKeyUp = DBEdit4KeyUp + end + object Button2: TButton + Left = 208 + Top = 138 + Width = 113 + Height = 17 + Caption = '&Comprar Bono' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + TabOrder = 7 + OnClick = Button2Click + end + object Button3: TButton + Left = 208 + Top = 170 + Width = 113 + Height = 47 + Caption = '&USAR BONO' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + TabOrder = 8 + OnClick = Button3Click + end + object DsPersonas: TDataSource + DataSet = CtrlPPal.TbPersonas + OnDataChange = DsPersonasDataChange + end + object TbBonos: TTable + BeforeOpen = TbBonosBeforeOpen + TableName = 'datos\bonos.db' + Top = 232 + end +end diff --git a/src/FichasClientes.h b/src/FichasClientes.h new file mode 100644 index 0000000..438cebb --- /dev/null +++ b/src/FichasClientes.h @@ -0,0 +1,78 @@ +//--------------------------------------------------------------------------- + +#ifndef FichasClientesH +#define FichasClientesH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "CoolForm.hpp" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "DigitNum.h" +#include "FormularioREUSABLE.h" +//--------------------------------------------------------------------------- +class TFClientes : public TFormREUSABLE +{ +__published: // IDE-managed Components + TLabel *Terminal; + TLabel *Label1; + TEdit *Edit1; + TDataSource *DsPersonas; + TDBGrid *DBGrid1; + TSpeedButton *SpeedButton1; + TSpeedButton *SpeedButton2; + TComboBox *SelIndex; + TDBEdit *DBEdit1; + TDBEdit *DBEdit2; + TLabel *Label2; + TLabel *Label3; + TDBEdit *DBEdit3; + TLabel *Label4; + TDBEdit *DBEdit4; + TLabel *Label5; + TDigitNum *Dig1; + TShape *Shape2; + TShape *Shape1; + TDigitNum *Dig2; + TButton *Button2; + TButton *Button3; + TLabel *Label6; + TDBText *DBText1; + TTable *TbBonos; + void __fastcall Button1Click(TObject *Sender); + void __fastcall DBGrid1DblClick(TObject *Sender); + void __fastcall SpeedButton1Click(TObject *Sender); + void __fastcall SpeedButton2Click(TObject *Sender); + void __fastcall SelIndexChange(TObject *Sender); + void __fastcall Edit1KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift); + void __fastcall Button3Click(TObject *Sender); + void __fastcall DsPersonasDataChange(TObject *Sender, + TField *Field); + void __fastcall Button2Click(TObject *Sender); + void __fastcall TbBonosBeforeOpen(TDataSet *DataSet); + void __fastcall DBEdit1KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift); + void __fastcall DBEdit2KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift); + void __fastcall DBEdit3KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift); + void __fastcall DBEdit4KeyUp(TObject *Sender, WORD &Key, + TShiftState Shift); +private: // User declarations +public: // User declarations + __fastcall TFClientes(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TFClientes *FClientes; +//--------------------------------------------------------------------------- +#endif diff --git a/src/FormularioREUSABLE.cpp b/src/FormularioREUSABLE.cpp new file mode 100644 index 0000000..56773c2 --- /dev/null +++ b/src/FormularioREUSABLE.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop + +#include "FormularioREUSABLE.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "CoolForm" +#pragma resource "*.dfm" +TFormREUSABLE *FormREUSABLE; +//--------------------------------------------------------------------------- +__fastcall TFormREUSABLE::TFormREUSABLE(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- + +void __fastcall TFormREUSABLE::Button1Click(TObject *Sender) +{ + ModalResult = mrCancel; +} +//--------------------------------------------------------------------------- diff --git a/src/FormularioREUSABLE.dfm b/src/FormularioREUSABLE.dfm new file mode 100644 index 0000000..e74d9d1 --- /dev/null +++ b/src/FormularioREUSABLE.dfm @@ -0,0 +1,1534 @@ +object FormREUSABLE: TFormREUSABLE + Left = 562 + Top = 388 + BorderStyle = bsNone + Caption = 'FormREUSABLE' + ClientHeight = 259 + ClientWidth = 358 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + Position = poOwnerFormCenter + PixelsPerInch = 96 + TextHeight = 13 + object CoolForm1: TCoolForm + left = 0 + top = 0 + Width = 358 + Height = 259 + Align = alClient + Picture.Data = { + 07544269746D617092B60000424D92B600000000000076000000280000006601 + 00000301000001000400000000001CB60000C30E0000C30E0000100000000000 + 0000CF0906005D030300A9070600D11A1800D3282700B7272500D4353400DC42 + 4000E0504E00BD505000E3666600DE9F9F00E0231F00E434300080FF80000000 + 0000EEEEEEEEEEEEEEEEEEEEEEEEEBBE91111111111111111111111111111111 + 1111111111111111111111111111111111111111111111111111111111111111 + 1111111111111111111111111111111111111111111111111111111111111111 + 1111111111111111111111111111111111111111111111111111111111111111 + 1111111111111111111111111111111111111111111111111111111111111111 + 111111111111119BBBEEEEEEEEEEEEEEEEEEEEEEEE00EEEEEEEEEEEEEEEEEEEE + EEBBE11111BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB + BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB + BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB + BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB + BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB111119EBEEE + EEEEEEEEEEEEEEEEEE00EEEEEEEEEEEEEEEEEEEEBB11119BBB48AAA7C6CD8877 + 888DDD88887DDCCCDD78AA8A8CCAAAAA8AAA844D8D00CCD878D3C47DC8AAA83D + 6D787787ADCD88887DDC33CD78AA888CCAAAAA88AA8C778AAA8AAAAACD888AA8 + 8DDC46D688888D67A8888888D747AAA83D76637888D4D3238DDD8AA88AAAAA30 + 888AA7D4303344D8877D4688877777DD37AAA834748AA88AAAAACC8A8AA87DDC + CCDD78888DDDA887787DD637AAA80BBB91111BBEEEEEEEEEEEEEEEEEEE00EEEE + EEEEEEEEEEEEEEBB111BBB237437AA8700D88DD78DD3CDD8DD8DC000D8DDDDC7 + AD7A8A87DCCD000D8C0D8CD777D03C8DC7AA8700D87DD77D433D77CD7DC000C7 + DDDD38ADDAAA8843C40200CD4DD8AAAA8DA8DD7DC8D003368D477DC34777D788 + D337AAA83D7DC3D8886D8D038D220433388AA8D3A8346447002204730D74303D + 77DD88D00DAAA74D800DCCD78AAADDA7CDDDD8D000CD8DDD7D33DD77DD88D00D + 8AA734753BB9111BBEEEEEEEEEEEEEEEEE00EEEEEEEEEEEEEEEEEB111BB22223 + 3034744000887DDD0000CC7DDDDD0CCC88CCDCC8D3DA888DC3000C0C7D88A4CD + 303004C3CD7D43007A7D440200CC7DCDDD003C88CCDC38D078778D300000CDC0 + CCD7878A7377DCD3C87D330CDCD77440020D6D7880046D733344200004CD8A7D + 800C00003D7D7A60673340078300234307D33002046DDA70034474303C0003DD + 878A73D8CCDCC88CC0CDDDD8DCC0000DDD787003447430332222BB111EEEEEEE + EEEEEEEEEE00EEEEEEEEEEEEEEEBE119B5222223334DD00006AAD4D3000DD788 + 88D7DC8A888D88DDDCD830DDDDDC787D7D8AA73D3000044DD7D0000CAADD4000 + 04DD8877DDDCDA8D7D88CCDC6800D43443D8787CDDDDD3387CDDD87D878ADC4D + 77777DD300036D4AAD00006834CD00220406A88D8D676346044207D034377477 + 88D34467777D4C0200D6DAAD0000DDD3387CDDDDD038DCDDD88D888A7DDD8888 + 87DD3003D4DAAD00004D4333222220BB119BEEEEEEEEEEEEEE00EEEEEEEEEEEE + EEB111B223220003646A4000C7A80030CCCD7D78D788D78AA8AA8A8D8D7D0C8D + C300477C7AD7700D30CC347D7AD303C7A800003CCDDD78DD87DD8AAAAA7A8D7C + DC0C8330003D77D00CCD8D0C7D7D888AA8A87DD78DD77DD433000008ADC300CA + 8C643C30030046DAD3DDC000047C2C607D7878A88AD4667D3874D430020008A7 + 3003DA73D74003CD8C0D7D8D8A8AAA8A87778DD87DDDCCC03008A7C0004A7363 + 20022322B111BEEEEEEEEEEEEE00EEEEEEEEEEEEEE11BB222000363333670388 + DCD000003DD7D4CDD8DDD7DDAA87C8A88D3CC77DC3000C0CDADC000DDDD7D4CC + D7CC88DC4000000CDDDC0CDDDCDDCDA887C7A87C00CD630020000C0000CD7DC0 + 0D77A7C778AD4D43DDC433DDCC00000033C77C07D33CC6C3330203CAD00C0220 + 0364320377A73678A64430463C03DD4300000043487C07D00C0003CD77C3CD88 + A8C88AA7DDDDD8DDC4D7DD3000006CD8833D6333363000212BB11BEEEEEEEEEE + EE00EEEEEEEEEEEB911B402224400302000C3D88C3CC30C3DDDDDDCDDD7DCDD7 + 8DCC0D8DDDC0CD000CCD8A8AA77400C77DDDDCCC0DCD88C3CC0000CDDDDCCCDD + 7CCCCD8C000C8CCD303300000CDA8A8C00000CC00DCC7C000C7D3C00DDDC3CCD + 3CC0000000C78D000003CC307D0003DDAA8ADC000203300404DC20007D03036D + 430C4D3430330C00C88DC3000A8DCC000DC0CDDD8D00CD87DDCD8DDDCDDDDDC3 + C33CC3C88D33000003004422207B119BEEEEEEEEEE00EEEEEEEEEEEE19BA3212 + 23022020033C888D30DDCCCDDDDCCDD7787C37DD7D0C0C87D8D00000DDC8AAAA + AAD000CDD330003CCD888DC0DDDCCCDDCCCDDDDDD00DDCD0000C8DD7C000003C + CDAAAAA8CCC00000CDDD800000CCCD00DDDCDCC00DCCC0CD300C778C00000000 + 0C0020CAAAAAAD300020003DCC702020333D00DDDDD4C0C44CCCCDC00D788C00 + 0AA8DCD00000D8D78CCC0DDDD7CC7877DDCCDDDDCCCDD03D888C330020220322 + 120ABE1EEEEEEEEEEE00EEEEEEEEEEB19BA6222200000C003D7DAAD00CDD8DDD + DDDDDDDDDDDCCDDDDDD7D8A87D300CCD77AA77D7AD0000DDDDDDCCC78DAAD00C + CD8DDDCDCCDCDCDDDC0DDCCDCDCDA8DC0000CCDDAADDDDDAAD7DCC000CD7ADCC + 0C0CCC00CC33CCCC0C3CCDDDC000CAAD7D00CC3003C0002DADCDDAADDC000203 + D7ADCC0C00C40043334DCC3CCCDD7DD000CAAD7D078AA78DCC000D78A8DDDDDD + D7CCDDDDDDDDCDDDDD8DDC00CAAD8D300C0000022104AB91BEEEEEEEEE00EEEE + EEEEEB11B22212207344D77DDAA8A8C03CC7888DDDD888DDD87DD87DD8DD8AA8 + C000C88AAAAADCC00000CD8D8D8888DAA8A8C00CDD888DDDD888DCD7DDCDDDCD + CD8AA80000CD8A8AA8C00CD8AA8AAD000007AA8CCC3CDD0CCDCCCD77DDCCD87D + 000008A8AADD777CDD8C00022000C8AA8A8D022207AA7C3C0CDC0CDDD3C787DD + CDD78DC000C8A8AADCD8AAAAA8C000C8AA87D8DD77D7D8DDD8887DDD8887CC30 + C8A8AADD77734CD0221222B11BEEEEEEEE00EEEEEEEEB11BD222203D8D3CD77D + 8AA77D00CCDD77A7DA887DDD88A7DDDD7DDDAA8D000D8A8AA88D0C730CCCD8A8 + DDD8888AA78730CCD7D888DA88DCDDD8ADCCDCDDCDAA8C000C88D8A87C00D00C + 88A8D870000C7AAC0DC333CDA8DC3CDD78DD87DDC0000DDDAA7D77DDDD8DC000 + 00D00C88A8D87000208AAC3CD333CDA8DDCCD78ADDA7DDCC0007DDAA8C0D88AA + DA8D000D8AADDD7DDDD7A88DDD788AD8887DDCC0077DAA8D7DDC3D8D3022227B + 11BEEEEEEE00EEEEEEEE91B88303DDA8ADCC78DC8A8DD8DCDDA8888D7887CCCD + D88DCCD7D7D8AAD3CCD8A878A887D8ADCD88A8A8D88A8D8A8DD7CC4D88878DD8 + 8DCCCDD88C00CDCCC7AAD000C8A8D8A8DDC888CDD888D8A8C000CAADC3C33000 + 77C0000D88DD8D888CC00D3C7A8CD87DC7A8A8DC008D0CD788C7A8C0004AA7CD + CDC00387DCC0CD887D878A8DDCCDDD8A88D7888888A8DCC0DAA8DDDDDCCD88DD + CCC7887D888A8DDCD8DD8A8CDA7CC7A8ADD30387B1EEEEEEEE00EEEEEEEB1E8A + A73CAAAAAAD7A8DC7ADDD88DAAAAAD77DC43CCCD787C3D87DDD8AD00CD8888D8 + A7CD8AA8CDAAAAAA78A87D78D44776788A8D87C330000CD6D30D8D334D8D000C + 8888D88D0C7AAA7D0D88C7877302038DC3344000CDD300000004D38A8A8C7D30 + 48DCC8ADDA88AA83068A6304763D877C0003A7D4DD7C00D7DD0000CCCD7DAAAA + 8D88DDDADA8DD7A8D8A88DD00DA8DD888DCC787DDCCCCCD77DAAAA8D88DDDADC + D8A7DAAAAAAC37AA891BEEEEEE00EEEEEEB11B67D747AAAAAAD88CCC88DC88AA + 888A7DD70000003D76C4C8A87D76200077888D788400466747A8888867633376 + CCD887666843DD02222224D403C7A7DC452220D7787D688C2034440000673364 + 464022387247642224DC02222223324A8DA877322CD300D7D8778AA706330220 + 7843D6666220C874687D00367D32020206D38A88AA887CC887D03DAA878A888C + 0CDAAD8AA8DDD88DDC3C30C7DD8AA8AAA87DC88CCC88D8AAAAA747678B11BEEE + EE00EEEEEEE1B4C4CDDDAAA7CCCC000DA7038A4774D4020C30C300487D444D88 + 8775222797776768633033043477763032222573226725C20221222032023773 + 3333788D652226967DD6674202000022025C5435676522066006222221232002 + 220300033344CA32125221220224977334221222365635676422077047422222 + 2600C0003DC0C7DD77DA800484C3C48A8878AAA8CCDA878A86DDDD88D3CDC0C7 + 43DD7D78DA8CCDAD000CCCC8AAADDDCC48B1BEEEEE00EEEEEB11BA87DA8CD88C + 00C300DAADC4684330222222234522388C467746888665565556764602224358 + 5225212222212692212622111212112035212872354756888652555255663422 + 2232332222212543555692255355221212221203122222222222084222561212 + 22123422663322122225456456952555452222125520452200220003204AD223 + 753220C6787788A8A86887666774447860464C33033C3CDDDA8DD8AAD00CC00C + 78DC8AD887B11BEEEE00EEEEE91BA8D88A8038C30CCC3D8AA777644340120222 + 1235222211225552587662546225522222223567622522222222255325222232 + 2122121122121111225522577562155212521222212363222122222222155725 + 2555752222512151211111121211157531255112112222124643221211222221 + 1557252555751222D12162111121212101267642532222222475468888796676 + 7673356764642200C3000C7DD8A888AAADCCCC00C8308A88D88B1EEEEE00EEEE + B11B8888AADCDADCDDDDC8887644340482222221210422112121121212122121 + 2111212221222277322732322111221222222382122121212321212111111112 + 11211212111112012222753542220121111112127757A512111212C311111111 + 11111111212551211212252115942352222212111112127757A5222112124422 + 121121211221123125222121222222225003888886222255224530238433037D + DDC788AAA8CD7DDDDADCDAA888AB11BEEE00EEEEE1B88AAAAA8D8A8D88A87784 + 4630025872230120224A42321212111111112112121111112222222522575052 + 2211111121211772122122126A22221121111111111111111111111221222555 + 3022211111111111122422222224112A52211111112111111211521111211512 + 2124553220111111111111225525202226213A65012112121111112215412111 + 121211122122277435221112122862237424657A630CD888AADA888D8A8D8AAA + AA8AB1EEEE00EEEE91BA88887DD7AADDD8A7D875522220557566856D21555205 + 2222252111111221121111112121111112522225221111111212556265825721 + 2552222121121111111121111111112112111222211211211111111111112222 + 311D22156D225652225121111112271111111521111113121112111111111111 + 122222D127212576226652525212111121152111111121211211122237211111 + 112555227567A68AA4000D87AA88A8DDDAA7DD788888B19EEE00EEEB11A8A88D + C3D8A730C88D000222222254212582143522552122202D212112111122C21111 + 1225221122111122311111111111251215722225142521222223211211111112 + 32111112251111151122122121111111111211124221C1125712565228221221 + 2121112211111262111122111222211111111111221212421222122910564558 + 312212121223621211222212211211110231211111125525222675077320003C + DCCD88C008A8D3CD8888811BEE00EEEE1BA88A87C0D7C000CDC0220222122222 + 2112221121125522211120222221222212262112222871111111112221111111 + 11112121122111121125112121222121111212122621122228421121111524D4 + 1111111111111112211111222121211125222512111111111111111451111111 + 1522661121111111112110511212225011011124322512122125222112162D31 + 11211121122212121111111221120212545000000000CDC000C7D0C78A88AB1E + EE00EEE91BA77DD303C0000CC000022221211531211121211221211125212113 + D212222D21121111111121112111111211111111111521111111112121111125 + 1112124122122521211111111211121111121115112111111221111125112211 + 1211111112127D11121211111111111111112111121125121111111221111125 + 2121121121121112107622111221211211122222212111121122121111111121 + 1111221256602000000000CC0000C00CDD77BB19EE00EEE91BADCCC0000000D8 + DC00000022211112111111122112121222211227A62122122222121111111111 + 2121121121111211111111111112112121211122121127A51121112112111111 + 1111112212112121211111211112111112211121111121111112451121121121 + 1211111111112111111211111121211112211112211221212121211120521121 + 211212221111111213A522111212121111211111111112223602003CC00C0CD8 + D0000000CCCD7B19EE00EEE1197DDDDCCC78DDAAA77A87656522152121111221 + 2222212122222122252122121222251211111111222145122551212121211111 + 1111221212212112121112251212121121222111111111212121121212111121 + 2121211112211212212121252111251212252595222212111111112121111221 + 1111212121211112212122221222151111251212212112122111111112522212 + 1111112111111121111111221D65778888AA78AAADD87DCCDDDD8811EE00EEE1 + B888AA8AAA8AAAAA8CD8784552955995511212521999B95992151159519A1259 + AA999959151212121589112159251121541A491511155119A9B9599415115955 + 9B5159BA99A91955121512159A112159151212141955511121511999B9599215 + 1159159A5159BA999919151215212599111299121121241A555112155219A9B9 + 5991552159559B5159BA99991915112121159921125911111121291212111541 + 1BA4488888A8DC8AAAAA8AAA8AA889B1EE00EEE1B88AA8AAAA78A887C0034300 + 2259551555A1211151255951521521A929A921219BA5999999A5292121155215 + 5112521215551555B2152152255A55515521B959BA2222ABB599A999A5592121 + 2152155121521215551555B2122155255A55522521A959A92222ABA999A99AA5 + 5912112552151212521115551455B5212155155955521512B959BA1211BBB599 + 9999B21911112512151212112112112111A22112545227433DDC00C78AA8DAAA + 8AAA89B1EE00EEE1B9AA887788CD8ADCDDDD6022225AB951129415212219B955 + 59B95255229212125BA995555599A95212125255B552125159B9512595551255 + 1AB9595ABA5555559212215BA9A5555599955512155525B552222159A9512595 + 5512521AB95959B95555559212115BA9A5555598995512155255B551222259B9 + 5114951512512AB99559B95145529121212BA9A5452599955122105125A51212 + 1129991111911121511203200CD7DDDCDAADC888788AA8B1EE00EEE1BAAADDCD + D000A8C7AA8870212155AA91211122225255AA95529A9912112221212A929521 + 2255999B912259125995125255AA92225255555599BA99959B9A51222551215B + 9595212255A99B912259125595125256A982225255555599AA95558B98212225 + 22125B9595522259A9AB92255921D95512515599A1215155555555BA5552AB9A + 11211212112B9292112125999B91115511515211111199911112122125522222 + 038A8AA7D7A000CDCDDAAAB1EE00EEE1BAAD0CDD30038D3DAADD302222211121 + 1212151221225556522569222256552128525552212599AABA55552225665222 + 222555525559255522679952599922256966525A555552222599ABBA55552255 + 9725222225555255552555256799525599222256652228555555222599AABA55 + 6522255652222225252252552252225599512559121255522129222522121255 + 9AB952152122511212111111111111111211222020CDDAAD3D8300CDDC0DAAB1 + EE00EEE1B7C0037CC3DCDC0D7D303304221212121AA925212221225522256932 + 32322453352456A722225ABA7998B97456BBBA625433545ABA56425522255652 + 05885252532655555669A922225ABA9898B88637ABB8632423555AAA66423522 + 25564225886255525663555569A922225ABB789AB87636BBAA625450555ABA56 + 52522225555222992221221522151555A511212BAA5559A55512ABA511211212 + 199921112111212322303DDD3DDDCC3CDC0039B1EE00EEE1B603C03C34DDCC0C + CC00D88885ABB99559BB9AB67865322555549655222222325645569A842057AA + 96ABBBABBBBBBBBAABBA896ABB8AB78A66332655569946332020535665468A86 + 0357AB67ABBBABBBBBBBBAABBA876ABB8AB78876332654468946430303546766 + 46AA863367AA97ABBBABBBBBBBBAABBAA87ABBAAB88A66532655569755222222 + 225555259A652225AB559ABB9ABBBBBBB59BB92129B919B11912122556400CD3 + 03CDD43C30C00DB1EE00EEE1B9CD7DCCDCCCC303D3C0474D339BBB9525998989 + ABA8865676698777887503546775458AAB7C36AAA77ABBBBA8ABBBBAABBBB867 + AAAAAAABAAA8477778A888AA7644667886668BAB74C6AAA87ABBBAA8ABBBBAAB + BBA867AA8A8AABAA87668778A888AA8633666876668AAB74C6AAA77ABBBBA8AB + BBBAABBBA867AAAAAAABB8A867887AA888AA7633667885447ABB73248AA66ABB + BBA78BBBBA9ABAA2125555259A9222223663C3DC0CC3CCDCCD7DC7B1EE00EEE1 + B7D877D83C403C0DD4233522215215522569A767AAAABAA7867AAAAABBAA8688 + 8778888ABBB84477A778AAA864888AA7877886467AA868BAABBAA8A76BAAABBB + BA878A878A88AABBB846788878AAA7647888A77768874678A867BAAABAA8877A + AAAABBAA878A888A87AABBB84477A878AAA764788AA87768864678A868BAABBA + A8A78ABAABBBBA87AA898A89AABBB835779769AA864567799655555221259112 + BA920212244DCDDC0CC04C387D8777B1EE00EEE1BDD888D0CDDCCDD873354322 + 229529AA995AAA87BBABBAAA867AA788A778A78A878A877AAABB88878A888866 + 67878ABAA768BAA87ABA87BBBBBBAA878BA8AAB87AA8AAA88A878AAABBA88788 + 88886647878ABAA878AAA87ABA87BBABBBAA877BA8AAA87AA8AA8888A78AAABB + 88877A88886647878AAAA768AAA87ABA87BBBBBBAA878BAAAAB88AA8AAA8AAA7 + 8AAABBA8877897896657979AAAA555A99D19A951ABA232222577DD887DCCDDC0 + D888D6B1EE00EEE1B7DD78CC0DCC7A888646632223AB9AA9A656AA87ABBAAAAA + A78A8887A7464478A8A8767788ABBBAA8A768AA8888AAAABABBAAAA867AA87AB + BBAAAAA88A88A8A8474678AAAA767788ABBBAA8A848AA8887AAAAABAAAAAA867 + AA87AABBAAAAA78A8888A7474678AAAA677788ABBBAA8A848AA8888AAAAABABA + AAA867AA88ABBBAAABA88AA8A8A867467AAAAA768788ABBBAAAA868AA88888AA + AAABAAAAA52599525AB222222068DD888A7CCD3CC77D77B1EE00EEE1B6888DC0 + 03CDDDCC7D443222225955559456687778ABA8AAA8887AA8A86444668A8888A8 + 788AABAA8A878AAA878AAA7AAAA888A767788688BBAAABB78A8AAAAA644467A8 + A88AA8888AABAAAA878AAA878AAA7A8A8A788767788688BBAAAAA8888AAAAA64 + 4467AAA888A8888AABAA8A878AAA878AAA88AA8888A767787788BBAAABA88A8A + AAAA644467AAAA8AAA888ABBAAA8878AAA878AAA888A98769525552255A12232 + 2247D77DCDDDC300CD887DB1EE00EEE1B4D883000CDDD3CD7864254522225212 + 55325767767A878A867A678678A4446687888A88888AAAA78AA88AAA77AABAA7 + 67744676434777767AA7AAA78A78A77AA446668888AAA8888AAA878AA88AAA87 + AAAA8777744676434777767A878AA77A77A67AA446668888AA888888AA878AA8 + 8AAA878AAA8767744676434877768AA7AAA78A78A77AA666678888AA888A88AA + 878AA88AAA87AAAA877776567521251522522225623D7A8CC3DDDC000C88D5B1 + EE00EEE1BD77C033CCDD7CDA8732222221155121256233677677A66886644664 + 367844677677AA878887AA888AA88ABA76676A8678A646667333677678A76A86 + 666664468A46678778AA877887AA888AA88ABA64676886688746667333677678 + A66886664664468A46687778AA8787A88A878AA88ABA64676886788646667333 + 677778A77AA6666666468A46788788AB8888A8AA888AB88ABA646768867A8766 + 6652121241222212222048AADC7DDCC330C776B1EE00EEE1B9DDC00C6D7DDCD8 + 8322221212599A55966650567787746AA6444344644684446678AA8677A8ABBA + AA8888AA744346648AAB88A87763467787747AA7444466664784447688AA7778 + A8ABBBAA8888AA744336448AAA88A77763467787746AA7444466664684447688 + AA7778A8ABBBAA8888AA744336648AAA88A87763467788766AA8444464664784 + 44778AAA8778A8ABBBAA8888A8744346648AAA8AA86521121551122202220488 + DCD7DD6C00CD77B1EE00EEE1B5D000CDD4D78DD8DC3221212125999555676044 + 4676746AAA746688A74466333436877777A8AABBBB87668BAA84466678AAAA77 + 7863446677766AAA7667A8A74666433446A78778A8AABBBB87667AAA8C464668 + AAA8877863444676746AAA766688A74666433446A7877788AABBBB87668AAA8C + 464668AAA8867863446677766AAA7667AAA74667434446A788788AAABBBB8766 + 7BAAD3466668AAAA877651211212211223203C78DD8DDDD6C000D4B1EE00EEE1 + B6C0CDDDDDD88D8874D83552222555555568A333346673468A87668788446663 + 3333467877886478BA88866BBBBA8A8677A888747AA433346773468BA867888A + 4667733333477877886478BA88764BBBAA8A876788876478A433346764468B88 + 6787886467733333467877A86478BA87764BBBAA8A8667A887647AA433346774 + 468BA86888AA6677733333677887A86478BA88764BBBBA8A8777A8A8766A9212 + 1121212245464D888D88DCDDDDC0C6B1EE00EEE1BDDDDDDDDD8A888A84D74663 + 5299222A957897334447664688787634664468743333344676874336877AA748 + BBBBAAA8AA768AA78A874344477766A88A763477647884433334466687443687 + 7AA748BBBBAA87AA767BA68A874344477646A87A763476646884433334467687 + 4336876AA648BBBBAA87A8767BA78A874444677667A88A764477647884433334 + 6677886346877AA748BBBBAA878A778AA8889521212122126326DD8A888AADDD + DDDD46B1EE00EEE1B6DD88DD7AAA888A735644225229512B9469884446648AAA + A76A8633474446877663344666676644787AB7347ABB87887A866BB6778A4447 + 668AAAA87AA643676447877663344676676644777AB6347ABB87877A866BA777 + 8A4446648AAAA77A8743476447877663344666676644678AB6347ABB87877A84 + 6BA7778A4446668BAAA87AA743676448A87764344676776644787AB7347ABA87 + 877A867BB7869812121212554257648A888AAA7DD88DD7B1EE00EEE1B9D888DD + 8A8AAA87D337855251599255A55888644764477A866887433463336767744444 + 6444874468A8A64467AA8AA88AA77AA77AA86446646788A67888443464336868 + 7643446446874468A8A63466AA8A887AA768A77AA8644764677A8768A8443463 + 336868764444644477446888A63467AA8A887AA678A77AAA644764678AA66AA8 + 4436643378787644447446874468A8A63467AA88A87AA77AA779992122212155 + 4268D4D78AAA8A8DD888D7B1EE00EEE1B4DD8DCD8888A877D42566556D4A9559 + A567A77A446344347646684333443346676663334433466644777776448A8A88 + 8BA88AA878A87A4663443686477A633444346777766433643346464477777644 + 8AA888AAA88AA778A87A46634436764678433344346677766333633346644667 + 76764488A888AAA88AA778A87A46636436876778633466347777766433643367 + 66467777764488A888AAA88AA888A55912211225255744D778A8888DCD8DD6B1 + EE00EEE1BD88787788887D3DD405222111152229845486466444443464447876 + 77AA78A77446764466334766467767743467633467764AA74686467464643474 + 46788777AA7AA87446764666334876467676643466433467764AA84686467464 + 44347444788778AA88A87446764466334776467676643367433367664AA74686 + 466464643474448A8878AA8AA87647764466434876467676743467633467766A + A86565202111111201244DDCCD788887788885B1EE00EEE1B9A8788DD8CC300D + C3222212112122125520534446764434644368AAAA8A88AA844877888A766A77 + 68A87787CC346333344433663343464677443464447AAABAAAAAAA864888888A + 76687668A8778D43344303344433663343444676443464446AAAAA8AA8AA8648 + 87888A66787668A8678D43344303334433663343444776643664447AAABAAAAA + AAA64887A8AA76787768A8777D443443333446346732221110212111122203CD + 000C48D488D8A8B1EE00EEE1B988C43030000CDDD00025021212221226230376 + 44667446774444487776446AA877878AAA8787877AAAAABBB7D7A7C3C4663347 + 33337644667647874466688786646AB888878AAA8888877AAA8ABBB777A73334 + 64334830337744667646874464678786446AB788888AAA8787777AAA8ABBB867 + A7333464304843337744668647874466688886666BB88888AAAA8888877AAAAA + BBB867AD334474336842225521121212222202CDDC3000303C4888B1EE00EEE1 + B3CC4D3CC3CCDDD7D0CD4420215255226AA404664333A747BA66644666744336 + 878A8AA88A87A8766AAAA8ABBBABBB847677448ABD34674334A748BB77644677 + 744437888A8AAAAA87A87768AAA7ABBAABBB8C7477448ABD34664334A747BA77 + 644667744337888A88A88A87886668AAA7ABBAABBB847467447AAD34764334A7 + 47BB87744667744437A8AA8AAAAA87A8776AAAA8ABBAABBB867677448AA42252 + 12112121263430D8DDDCCC4C3D4CC5B1EE00EEE1BCDCDDDDDDDDA877DD8A7602 + 02A599858BAB44344333A768BBAA864446433334446A878AA868A8766778746B + BBABBBBBA88A878BBB64444333B878BBAAA66446644334446A888AA878A87467 + 78644BBBAAABBBA888A78BBB64346333B868BBAAA644464443344478878AA867 + A8766778746ABBAAABBAA788A6ABBB6434633CBA6ABBAAA66446644334446AA8 + 8AAA78A8746778646ABBAAABBA8888A7ABAB52212111321237688DD888A7DDDD + DDDCD5B1EE00EEE1B68DDD00DDC8A877D887404443BBAAA509BAA777A846AB76 + 77677644474464346446867AA76767887AA76368A877ABBBBBBAA748BAA877A8 + 46AB7777787664464464446447767AA86667877A884368A777ABBBBBBB8748BA + A8788836AB7677677664464464446447867AA76767877A884368A777ABBBBBBA + A738BAA8788846AB7677688664674664466447868AA86677888AA76368A777AB + BBBBBAA74ABAA55999124322220788DDD8A8CDD00DDD86B1EE00EEE1B98D3D3C + DDDDD87D7D46224524BBBBA8548BBAABAA78BA87443466648867866664677678 + A77788868877777877433668BBBBBA66ABBAABBB7ABAA764447646AA77776664 + 678678A78888868876777867333468BBBBBA66ABBAABBB7ABAA7443466668A67 + 766664677677A77777767876776867433647BBBBA866ABBAABBB7ABAA8443476 + 668A77876664678678A88888867877777877433667ABBBAA76ABBAAAAB258532 + 21254CD888DDDDDD3D3D87B1EE00EEE1B6DC3D7DD888A8D87DC402252256ABAB + A667AA8BBA8BAABBA67AAA8AAA768863337876678AABA74347647A8867634334 + 77BBABA768AAABBAABAABBA48AABAAAA76AA64347876678AABA74347647A7866 + 43643378ABABA768AAABBAABAABBA67ABA8AAA76AA64337876678AABA7434764 + 7A886633433368ABABA768AAABBAABABBBA68AABAABA87AA63347877678AABA7 + 4367647A886643643468BBABA877AA9BBA985667520DDD88D8A888DC7D3C66B1 + EE00EEE1BC33C8A7D8AAA888A87A703635225458A6444434446847ABA88ABAAA + A8768A433346444677676333674337888AA8B86344676AA6466434447867BBBA + 8ABAAAA8868A433346444777676433674337878BAAA86334676AA66664444478 + 67BBAA8ABAAAA88688603346444767676333484337787BA8AA4334676AA64464 + 44447867BBB88BBAAAA8878A633366444777677433684337788BA8A86444776A + A764522112221278026A8AA888AAA8D7A8C335B1EE00EEE1B74C8A8AAA88D87D + A88A748AA5226525774333300033006864343344444347640333033343344433 + 7A63346ABBAABAA6447636884333330033306874443444444348643033333344 + 3463337A63336ABAAABA86447634884333300033004874443444444348643333 + 0333433343337863336ABAAAB8A6446434874333300033306874433346446368 + 6433330333643463337A63346ABAAABAA6667746A862212111111158625678A8 + 88888AAA8ADDC7B1EE00EEE1B9C8A88D888788D87800477885669A64AB844463 + 333300034330003303337A733330333364C4D8638B7643378644666888AA76AB + A44663333300044333003333337A8333330333664D68638B7643368644467877 + AA86ABA44663333300034330003333337A7333303333644667638B7640367634 + 466877AA76AB844663333300034333033033337A8333303333744D68648B7643 + 367644667888AA87AB845221121111122522288878D7888788A8C8B1EE00EEE1 + B7C8ADD7D7D78ADD7D3297983556AABA8BB86A86334733034464003033346874 + 4444464688ABAA8767A873334303366368ABBA8BB87A86436743306664003033 + 34787446444646888BAA87678873334303344368ABBA8BB87A87334743334664 + 00303334787444434644888AAA876787733343033443678BBA8BB87A86436743 + 3346640033043478744644464688ABAA8667A873336303366468ABBAABB85A92 + 211221115662378D7A87D77DDDA846B1EE00EEE1B6DAADD887D7888D87666672 + 3224564536768A843348BA3348874464433346886778AAAA8BBBBAA764677763 + 3300376336676646878AA6336AA84348884D64443347886778AAAA8BBBBAA644 + 6777633300366336676646778A86336AAA3348A84D64443337886778AAAA8BBB + BA86446778433000366336666646778AA6336AA843488866764433378A7888AA + AA8BBBBAA744678843330337633777674689889212222521588D78ADD888D788 + DDAAD6B1EE00EEE1B68AA88A8D788A8A8784222222220200034788886467AA64 + 68A88BB7863336BBAAA88AA76BBBA77A64678B744C0037633433000347888876 + 67BB4668B88BB7863337BBAAA8AAA77ABBA77A74668B744C0036733433300347 + 88887668BA6468A88BB7763336BBAAA88AA76ABBA77A64667A74630336633433 + 30034788887668BB466AB88BB7863337BBAAA8AAA77ABBA87A74668A866C3036 + 7334333034669989521122122546A88AAA88DD8A88AA8DB1EE00EEE1B97A8C7A + 778AAA87C33022212122222034668AABAA748A86888A6AB78763348AA7766AA6 + 47AB877AB7678A8ABAD003600330333466AABBAA848AA688A87AB88863348AA7 + 766AA646AB867AA7678A7ABA7303430330033466AABBAA848AA688AA7AB88863 + 348AA7766AA646AA866AA7668A7AAA6003400330033466A8BBAA848AA688AA7A + BA8863348AA7766AA646AB867AA7678A88AA63346304333446668AABA9921121 + 22203CD78AAA877A748A77B1EE00EEE1B8D87D4CCD8A8DC00000022121232346 + 6466A878AB634A64667648ABA666346784344784346887ABBA767BABBBB764DC + 3D34666466A88AAB746A74677648ABA6764467843467744468A78BBA667BABBB + AD64D03434666446A88AAB746A74677648ABA6673467843347843468A78BBA66 + 7AAABBA644D334446644668A7AAB746A74677648ABA6774467843447844468A7 + 8BBA767AABBBA7466C3C34676665A999AB21121121222000CD8A8D4CDC88D9B1 + EE00EEE1BC07876C0C88DCCC0CCCDC2208BBA987644366678B834843344434AB + B678A764643334444468A7ABB877ABBBBABB8BBBBBA887644467678B83484434 + 6636ABB678A76664333464446887ABB877AABBABBB8BBBBBA887644366678B84 + 4844436636ABB678A76664333444446886ABB776AABBAABB8ABABA8887644366 + 67AB834844346636ABB678A86664334444446887ABB877ABABAABBAABABBAA88 + 765565259A92152121333C0CCDC88C03D78705B1EE00EEE1B50333CDDAA8D888 + 88887A34AABBBA8B884346766A868A863344334BA744786663344344466A768B + A7688AAAAABB8ABBBBBAABAA6346777AA68AA63344334BB7467A466344333446 + 68768BA7678AAAA8BB88BBBBBA8BAA4346776AA48AA63444334BB7447A464433 + 43344668747BA767888A88BA88BBBBB88B884346776AA68AA43344334BB7647A + 46634443344668768BA8678AAA8ABA88BBBBBA8BA84325552A912882152477AA + 8D88AADDC33003B1EE00EEE1B5C300CD8AA8878AAA8878868ABBA97A8B844344 + 4666ABB874443037A6336847666763464346436A876666AA86AA744ABBB888AA + 8643444767ABBA76464037A63378477466644643464368876666AA87AA644ABB + AA7A8A8643444767ABBA76643037A63368477466634643444368866446AA66AA + 6348BBA87AAB7443443767ABB876643337A63378477667444743464378876666 + AA76AA744ABBAA8AAB86222212212AA6465888AAAD88AA8DC00CC3B1EE00EEE1 + B3DDD8AA88DCDDD88D677A82226888868AA633478868BBBAAA7886446634678A + A7AA74673334336788766AAA86AA633378A8A78BA633488868BBBAAA78864476 + 44688AA7AA74673334336788666AAA76AAD3037888A78BA633488868BBBAAA7A + 86447644688AA7AA646633343366786648AA768A63037888A68AA633488868BB + BBAA7AA6467744688AA7AA74663334336778766AAA768A63337888A88BA62125 + 592124328867DD88D8CDD88AA8DDD5B1EE00EEE1BC7D8AA87DDD88D88C477AA2 + 2205A8AA6AA7468BB846ABBABB78B864686448867AAAA667444434467A743688 + 777AB70046A8AA6AA746ABBA46BBBABB78BA64686448867AAAA6764444444678 + 743688767AB73046A8AA6AA836ABBA46BBBABB78BA64686467867AAAA6664444 + 334678743487666AA600348A8A68A7468BBA44BBBABB78BA646864488688AAA6 + 774444444668743688767AA633478AAA7AA725ABB9212022AA67DCA8D88DDD78 + AA8775B1EE00EEE1B66888DDCDAAAAAA8A88864321224AB868A8764AA43468AA + B8468A647A744643468A87867A87444468863366666ABB83336AB86AA8864AA4 + 4478AAB8668A647A764743468A87867A8744446AA43366666ABB73336AB86AA8 + 864AA44478AAB8668A648A76474344A8867668864444688433466468BB633368 + B868A8764AA4447AAAB8668A648A86474346A88776688644446AA43366666ABB + D3337AB87AA89529911121223578AAAAAAAAADCDD888D6B1EE00EEE1B6CD88DD + DAAAAA88A88802222222238A7AB8843373033367A84448778AB66630334678A6 + 6A8876667AB764467647BBA60034AA8ABA863373033368A86668778AB6763033 + 4677A76A8876666AA764447746BBA600348A7AB8873383033368A84668778AB6 + 6630334667A66A88766468A644446646BBA400348A6AB8743373033368A84668 + 878AB67630334677A66A88764668A766446667BBA43334AA8ABA851152111111 + 21078AA88AAAAADD788DC6B1EE00EEE1BA7DAAA88AADCCCC4634212222222237 + ABABBA6430000034866477766AA7A833334688764678A8646777477647668BBA + 400047ABABBA6430030036866478767AA7A843334688764678A8646777477646 + 668BBA400048ABABBA6430030006876478766AA8A84333468874466887644667 + 466646468AB8400047ABABBA6430000034876478767AA7A84333467876466888 + 646767466667668BBA430348ABABBA2211111111212347DCCCCDAA88AAAD7AB1 + EE00EEE1BA88AA8DD7AD0CDCD7663222327422233688AA77D7A7000364434433 + 4687BA43334677644644666646643774664767B88630344688AA77D7A7030364 + 4444434687BA43334677644644666646643764464667AA7630334688AA77D7A7 + 0333444444434687BA43334677444644646446633744444666A87630034688AA + 87D7A70003444444434687BA43334677444644666446634764474777A8873334 + 4798AA9555921111222548DCDC0D87DD8AA88AB1EE00EEE1B9C33D000D8DCD8D + D86422224259522203444ABBBBBB6303364333333334A8863346644467446677 + 78734766643334A768733303464ABBBBBB6303364333333444A8863346444467 + 44667678734766643334A668633303444ABBBBBB7303464333333444A8843346 + 44446643467677734664643334A6686333004448ABBBBB6333464333333444A8 + 86334644446644467677744766743334A7787433334558ABBBB41111112C58DD + 8DCDAD000D3C38B1EE00EEE1B640000C0C888AADCC022222225602350034468A + ABB7743337744443333446A8433434444667666677864647A63336A667434633 + 34368B8BB7763347744643333446A8433434434667676677864647A63436A667 + 43463334468BABB7743347744643333446A84334334346476646767446478433 + 36864643443333368AABB7743337744644333446A84334334346676646777646 + 67843337A76744674353259A9BB1211112210CDDAAD88C0C0000C7B1EE00EEE1 + B6CDDCD8778DAAA8030222122285225774433336337A64333464474444683487 + 444333334668764777866877BAAA6ABA86446886343336337A64333466474444 + 674487444333334467764777766868AAA84ABA86444776440336337A64333466 + 674444684487444333333467764767766767BAA848B886334774433034337A64 + 333666474444684478444333334467764767867767BAAA6ABA87446886452212 + 1252112121222CCDAAAD87787CDDC6B1EE00EEE1BDC000DDDCDA88800C020202 + 32A56525A6643367747A777336334434768A433337AA44334466878A77A887AB + BABAABA8A68636A7633367747A777336434446768A433347AA33334466778A77 + A887ABBBABABA8868636A6443367747A787336333444768A433346A833334446 + 778A678876AABAAB8B8786763686443367746A777334334436768A433346A833 + 334446878A778887AABBAAABA8A68747A7652255515622212212030C888ADCDD + C003C5B1EE00EEE1B500000CCCDADD000C33032222556A327766747A7786AAA6 + 343030344447633336BB6664333678AA8888648BAAA7AA66748A4C7767747A76 + 86AAA6443030346647633334BB6663333678AA8887648BA8A78A66747A4C7766 + 747A7787AAA7343033366647633336BB6643333668888877647BA8878846747A + 33776664787677AAA6363033346447633034BB6663333678A88877648BA8A7A8 + 67768A668767655955922121122223000DDADCCC000004B1EE00EEE1B2003C7A + 8AA8DD0004D0222221627BA8A744333433877AA64643333443448644337A7666 + 3333648867764444AA46744A748BAAA764333434877AA6464343344344666333 + 7A77663333668867763446AA34744A748BA8A764333433877AA6664343344344 + 7664037A66643033647867763344AA446438747AA8A743333433867AA6664333 + 344344D664337A66663033647867774446A866746A74ABAAAA65221212911212 + 222234300DD8AA8A7D0000B1EE00EEE1B2CCC8AAAAAADC000302221012B57BBB + BA44D84336A436866A8863368648ABA7336A87677764468866A743336A67876A + B68BBBBA6C784336A436866A8863368647BAA8336886677763478867A743336A + 67874AB67BBBBA64784336A436766A8863368647BAA8336A7667776446786687 + 333368667768A67BBBA844D74034A434866A8863368647BAA733688667874447 + 78678743336A668748B78BBBAA63672212A11121222203000CDAAAAAA8CCC2B1 + EE00EEE1BC8DAA7DDDAD0000C300030122A52BBBBBABBBA667A4034468886344 + 7438BBA846678878A8B767A8AA876444668ABBAAA44BBBBBABBBA667A4034468 + 8863447438BBA746678878A8B6678AAA866444667ABBAAA44BBBBBABBBA668A4 + 0364688863447448BBA74446886788A646A8AA7644444678BA8AA34ABBBBAABB + 8647A40344688863447438BBA84447887788B766A8AA866444667ABBAAA64BBB + BAABBB9555A12111100000C0000DADDDDAA775B1EE00EEE1BA8AA8C00000000D + 8D3045D407A23ABBBB67BBBA8BBDC33467664333434768A734478B666787768A + ABAA76767866BB8AA44ABBBB77BBBA8BBD333467664333434667A633468A7667 + 87767A8BAA76767866BB88A44ABBBB77BBBA8BB7C33467674033344667A63346 + 7A76678666788AAA66666746BB78A44ABBBA76BBBA8BBD333467674333334767 + A633467A766686767AAAAA76766766BB7AA44ABBBB77BBB99BB2121225505CAD + 00000000C8AA8AB1EE00EEE1B9A88C00D000CCD887342322587223456636AA76 + 7ABBAAA7AAAA6333444638A433466644676444677ABA8AA48A73376A84346677 + 468A766ABBAAA7AAA8633334643AA433466644676644777ABA8AA48A63366A74 + 346477468A766BBBAB87AAAA643344463AA4333664444664446668B88A848A63 + 3668733364763488746ABBAAA7AAAA633344643AA4334676444774446768BA8A + 868A63376A74367687568A655AB5885254333688DCC000DC0C88A8B1EE00EEE1 + B787D4C88CCD88AAA8C3652237222223546A886436ABBBABAAABA88634644BA8 + 644464337A74464467AABAA48B633667333334667A886436ABBBAAAAABA87643 + 646AA8444444337A74344467AABA848B6336673333366678A87636ABBBABBAAB + A88644646AA8634443336A64344467AAAA848A6334663333344668886436ABBB + AAAAABAA7643666AA8644444337A64444466AABA848B6346774343466778A752 + 15A048524764C8AAA88DCC88C4D787B1EE00EEE1B7863C7AA8DDAAAAAA778602 + 5569555653678BB8643666478448ABB434434BAB86677644AAA4444446874764 + 6A7686A667646664678BB8644466468648ABB434434AAA8667764488A4444446 + 8737646A74868647446664778BB8644666668468ABB434434BAA866676348884 + 4444468736636874768667444643678AB8633466478668ABB634434BAA866676 + 3488A44444478737647874868677666776798BB9522122210587DAAAAAADC8AA + 743D89B1EE00EEE1BA8C004DD8D8AAAAAAD6422223AAA665254668BB86433436 + 8678AAB7D83036AA877AA84468AA87776684376666466778BA8876344648BA86 + 43343684688AB6683036A87678A84468AAA7776684476664446777BAA8663466 + 48BB86433436A678ABBD674006A876688744678A87664674376664444767AA87 + 64344447BA864334368678ABBDD83006AA7678A844688A886666844766644667 + 78AA8877466649BA9511121222566AAAAAA8D8DDC00C8AB1EE00EEE1BA7C303C + C7DDAAAADCC3212262976966334430368BBD768AAAAA8ABABB40333443478766 + 668AAA864774444774464474777866444430367BA7747AAAAA8BAABA40303443 + 3786464688AA874773444773643464787867434430367BBD768AAAAAAABABBC0 + 3334433786464688A8864674444663444464776866434400347AB6748AAAAAAA + BABB433334434786464688A8874674444774664666787877644422255AB21143 + 21033CDAAAADD7CC303C7AB1EE00EEE1B8323DD7DA8D7A8D0330022883255966 + 542343444AB6447886888B68BBA443343336A6688887A8AA6664433877666676 + 364776433333343BA6346876788A67BB844334333686477887A8AA4664433776 + 666766444876643333346AB6447887788B68BBA4433433367647778688884643 + 333776644764344766440333334AA4447786888B68BB844334333686677887A8 + 886664333787666776466787763542222BA121782220330D8A7D8ADDD63039B1 + EE00EEE1B0003CDD8A8CD8DCCCD3208883952699A63777633486333303366433 + 6A8773366446864887788ABAA88766677764677A873788A63776630374333303 + 34643368867336443676488677A8BAA78776677764477A863788A63777630384 + 3333034664336A86733644367447866788B8A78664667664467A763678A43666 + 6303743333033664336AA6733644467648867788BAA88766677766678A8748A8 + A74777521192121221203CCCD8DC8A87DC3002B1EE00EEE1B23378D8AADDDA8D + DDD325887289AA9AB86A744334AA8430003303300334743764434468666777AA + AAAAAAA87644466787AA8AB848744334AB843000330300033473376434336866 + 6776AABAAA8AA87644446787AA8AB86A744334AB743000303030033473366434 + 33676647668AAAAA8AA766434446778A8AB848643334AB743300330330033473 + 3766344368666776AAAAAAAA887764466788AA8AB868722122A2222212123DDD + 8ADDDAA8D87332B1EE00EEE1B24C88AAAA8D8A8D88883662255AA76AA88AA46B + 668BBA86434333000030633764430368666444677ABAAB87664033467A876AB7 + 8A846A748BAA86434333300033433663330368466444687ABAABA7664033467A + 876AB87AA46B768BBAA6433333300033433763330347464444677AAA8B876640 + 33466A8768A77A836A648BAA86434333000033633763330367466444677AAAAB + A7664033478AA87AB8AB855A559224225525778D8A8D8AAAA88C30B1EE00EEE1 + B204D777DDDDAADDD8A7375222689979A6ABB8ABA3678A8888A7D87334334364 + 68740347787644468A87AABA76330334688877A68BB7AB84668A8888A7676333 + 33434448630336776C64467A87AAAA76330334688877A6ABB8AB84668A8A88B7 + D8C333334343484303367676444678878AAA66330334677776868AB68B84468A + 8888A7D8733333434448633346777664367A878AAA76430344788888A8AAB6AB + A1411232884488DDDAA7DDD7776402B1EE00EEE1B3D4787C00D8A8C0D8732222 + 2125799A656BB66AA7448A6688A8BBA4786677646AB843447AABA6668A667A8A + A443303346788A646AA668A64688668A88BBA6674466644AB733447ABBA6468A + 667AAAA443303347788A744BB66AA6468A64A8A8BBB6684466644AB733447AAA + 86447A4478A8A633300336777A646AB668A6468A6688A8BBA4686467664AB733 + 347AAAA6668A467A8AA643303347888A867BB669A5121212202C78D0C8A8D00C + 777DD5B1EE00EEE1BAA7D87D00C7C000CDC012211222567A664AA6477667A866 + 8846BBBB8867AA8778A844436ABBBA84863447AAAA4467333366786648B34676 + 6688668746ABBA8866AA8767A844336AABBA848634478AAA44683333678A7648 + B4477667A866A746BBBAA867AA7767A843336AABBA748434478A886467333366 + 786638A446666688668846BBBB8867AA8768A843436AABBA74863447AA8A4668 + 4334678A864AA5255551221221223DD000CDD00D78D7AAB1EE00EEE1BA730330 + 00C0000CC000222121212589A848B88688A6676888447BABBA668AAB87786433 + 6788AA77874636768A666643030688A847B8868886676888447AABB8667AAAA6 + 676433478AAA77866436778A667463000688A848B88678A468688A447BABBA66 + 7AAA866744334778AA76876434668A444443000677A747A87687866767A8447B + ABBA668AAAA77764334788AA7786463677AA666663303788AA6AB89595A21121 + 221200CC0000C00033037AB1EE00EEE1B6020000000000DADC00222221621269 + A6648B8BAB878777BAAAA6BBBA66447ABA8AA8434366887ABBA6466866866646 + 630377A7467A8AAB878767AAAA86BBB866447AAA8AA8334346787ABBA7466876 + 866646730378A7647B8BBBA88877BAAAA6BBB866446AAA7AA8333346776ABA86 + 446866766644630377A6447A8AAB877777AAAAA6BBBA66447AAA8AA833334678 + 6ABBA7466876877666740488A8678A8AAB91121222200C88D0000000000206B1 + EE00EEE1B2000000CCD8D8AAA7D886567566255964434AB87ABABA88AAABA46A + 8876647AAA8AAA74334466778AA76667AB766667773677643348B778BAB888AA + AB84688864446AA88AAA6433446667AAA77667AB67666677468866334AB86AAB + B888AAAB846A8866446AA888A864333446668AA666468B666446663476643348 + B76AABB888AAAB846A8866447AAA8AAA64334446678AA766678B776667784788 + 766468B95AB26577678A7DAAADD8DCC0000002B1EE00EEE1B50D888AAA8AAAAA + 8CD8784665555A667466488678AAB888A6684478777A667AAAAAA87877744663 + 78AA76668A467644666A87767447846888B87A86674478667A6668AA8A886877 + 644664688A76668A467644776A88866447867AAABA7A86684478767A6478AA88 + 8868676446637788764788466434666A77766437846888B87A86674478768A66 + 78AA8A88687764466377AA76668A467644777A888777499259923767566633AA + AAAA8AAA888D04B1EE00EEE1B27AA88AAADAAA8DC00202222559955699B66766 + 77677888766846A868A86467ABA88AAAAAA77A74366776487446864468866787 + A7464676676887766846A868A84466AAA788AAAAA77A63447776688446864468 + 876788B6474676687A88767846A868A844468AA788A88AA67863346776477634 + 764467766677A6464476677887766846A868A84466AAA88AA8AAA77A63366776 + 688646866678877888B7462255522422222200C88AAADAAA88AAD0B1EE00EEE1 + BDA88DDD8DCDAA8DDDC63222225AA95226A76744664ABA786AAA867676843443 + 6BA8A88778AAA87733478767B86646666AA86437876743664ABA776AA8766666 + 8434434BA8A777788AA88633478768B86766647AAA6437A76734674ABA787AAA + 8676668434436AA8877777A8A87633367648A76644446AA86436A646334648B8 + 776AAA8676768434434BA8877778A8A87633378668A87666647AA87447A86922 + 55122222224D3DDD8AADC78DDD8AA6B1EE00EEE1BAAA3003C000A8D8AA887021 + 21559A82226577767688AA8776AA8843444664336A868666467AAAABA6467844 + 8787346467A8A4346466666777AA77768A8833444643336A8686644678AAABA4 + 4678648886347668AAA4346667766688AA8776AA8843444643334A7676444678 + A88BA44677447786346467A884346466666677AA77768A8843344643306A7686 + 444478A8AB864678448887347668AAA6367776555551222122788AA8D8A000C3 + 003AAAB1EE00EEE1B9A300CC300CADCDA8632212222222222254664666446777 + 63467843446766434866676634468AABAA767644477D44433346444344664464 + 446777433677434466664348446664333688ABBA666734477866433346664344 + 664464446788634778433466644338446644333688AAAA667633466D44433344 + 444344464464346777434767434447664348446644333688AAB8667744467764 + 43436666646666222212122221226AA7CDAC003CC0038AB1EE00EEE1B50200D4 + 3CDDDDCD7D0202022121212258AA6643443334464334774443433644463667A7 + 33336AAA8888AA7646ABA7433433444A8A664344033446403467433343346346 + 3667A833336AAA7888B88747ABA8D434C3446AAA464343333446403477434333 + 3443443467A733336AAA7878A87667AB8743333344488A464343333346403468 + 4333433443443447A733334AAA7888A8774DABA8634644666AAA652212121212 + 12220D8DCDDDDC3CD02203B1EE00EEE1B020000C0DDDDDCCDC006768828BBA55 + 5ABA7AB66864333643447644333003334664468A873347AA668BBAABABBBBBB8 + AAB8766ABA7AA76864333443347644333003334644447A763347AA668BBAABAB + BBBBB8ABBA776ABB88B678643334443476443330033346443488743347AA468A + BAAAAABBBBB88BB8764ABA6AA667443334443476443330033346444478643346 + AA667BBBAABBBBBBBAAABA877ABB9AB559512122222203DCCDDDDD03000025B1 + EE00EEE1B403D30CDCCDDC0C70023454255ABAA525979888AAA7763666667666 + 786333444674447AAA83348AA668BBAAA78ABBAA7BBAA646878877AAA7763466 + 467667886433444664447AAA73348AA678BBABA78BBBBA8BBBA646888A88ABA8 + 864466667666776433344664446AAA63348AA66AABAA877BBBA88ABA86347778 + 77AAA7763464667666786433344664346AAA63348A866AABAAA78BBBAA8BBAA6 + 4688AA699AA22212252030DC0DDCDCDC03D305B1EE00EEE1B6CD7DD70CD0CC0C + DC0222212151255225468747AAAAB887766A888ABAA876686768778ABBA7C467 + 8667AA864367778666467434678646AA8AB886744A888AAAA866777678778ABB + A733778667AA86446778A66666843468A646AAAABA86766AA88ABBA864776668 + 668ABBAD34667646AA864366678664466434678646AA8AB886764AA88ABAA866 + 7776686678BBA733667667AA86436768866666764678A525AA92212122230D7D + 0CCCCC08DD7D44B1EE00EEE1B54777C00DCCDD787325521212A525896558A876 + ABAABAA8766AA677A66886888688867AA8BB877678777744467668A886478886 + 48AA66ABAABAA8666AA677A668868886788668A8BB877668777764467678AAA6 + 47A88768AA77ABABBAA8766AA688A66886888678766888BB7766687676443466 + 68A88646887648A866ABAABAA8746AA688A66886887678766888BA7666686677 + 44467678AAA768AA886AAA55ABA1221212263C887DDCCD00CD77CCB1EE00EEE1 + B3CCD7000CCCD8888304322222AA99AAA654AA778ABAA88A87787776A6344467 + 8888666688ABBBA8887478877777A8AAAAAAAAA646A8768ABAA88A86787776A6 + 3434678887647677ABBBA88A7478877778AAAAABAAAAA747AA768ABAA8AA8778 + 7777863434678888646677ABBAA78864688777788A8AAAAA8AA646A8768ABAA8 + 8A86787776A63434678887646676ABBB888864688777788AAAAAAAAAA767A965 + 9AB2222122563D8A8ADCCD0007DC45B1EE00EEE1BC47DC0000CDDCCC8D342221 + 225995557556677677AA888AA67778A788433346888888A8788AABA888767AAA + 6678A8687887778644776477AA888AA66868A78843334688888888778AABA887 + 767AAA777AA8788A88778646677677AB88AAA67878A7A8433344888777A7777A + ABA887766AA8666887677877668444676466AA888AA66868A788433346788777 + 877678ABA788667AAA6678A8778888788766775255A2222222253D8CCDDDC000 + 0CD7C5B1EE00EEE1B2CD70000CCDC00DD84220522125221255023767666A867A + 867866866884344677778A877888AA868AA78AAA768AAA866664346443366664 + 6A867A867866866884444677778A877878AA868AA77A8A768AAA866674346643 + 3766647A877A867867866884344676778A8677788A867AA77A8A667AAA764664 + 3464333666646A867A867866866884344476778A7767788A7678A678AA767AAA + 7766643676435555514122223223488DCCDDC0000077C2B1EE00EEE1B5C43000 + 0CCDDCC88702222222159222556033667667864776444443447844477667AA77 + 8787AA877AA87AAA646648746774446463334666678448744444433478444766 + 778A877787AA777AA88ABA636668846886446463336676678648744444434478 + 444766678A7767868A7D7AA77AA8644647746774344443304666678448744444 + 434468344766678A7677868A777AA77AA8636668846886466674322555512112 + 2222088ADCDDDC00003CCCB1EE00EEE1B4CC0203DDDDDCC880222112115A9A56 + 966643467777644886444344443473336678AA7767A88BABAA8888A86C333444 + 7AAA77876640447677644886344344644673336678AA7768A88BBBAA8888A874 + 3334447AAA78A77640446777644AA6343444644673336678A87667A7AABBA887 + 78A8633334346A8A678766433466766448A6343344444483336677A87647878A + BAA87778A86C3334447AAA88A877422255412122212223A8CCDDDDD30003C5B1 + EE00EEE1B002000CDCDD8CCDD0002211215599A9659763444666744AAA644677 + 863466333436877777A8AABBBB86667BAAD3444467AAA8666763334466646AAA + 64467886346633333687877788AABBBB76667BAAD3444667AAA8777763434466 + 646AAA744688864466303334867767888ABABB76466BAA63444466A8A8766663 + 334466646AAA644678863444333334867776888ABABB76467BAAD3446467AAA8 + 777852222152121122220CD8DD8DDCDC002002B1EE00EEE1B2000CCCDCD8DDD8 + D346032222555965556AA433346763468A87667778444663333346787788647A + BA87864ABBB88A7666878764688433344663368A876677884446633333476877 + A8647ABA87766ABBBA7A866788876468A333344763368A876787884466633303 + 467776884468BA77744ABBAA7A7666878663688433344663348A876777884466 + 633033466766874368BA77644ABBB88A8677A888667AA5212221212230030388 + 8D88DCDCCC0000B1EE00EEE1B503CDCCDDAA88887C3635425299525AA6788744 + 4446664488786433664367843333344676874336876AA648BBBB8A878A667AA6 + 7876433446664688786443664368843333344666874336876AA648BBBBAA87AA + 667BA77A87433446664688786633764368843333344666874336876A8648BBBA + A88688647AA678863333466444887866337643488333333344667643348668A6 + 48BBBBA887A8768AA78A86212121221252233CAA888AADDCCDCC03B1EE00EEE1 + B40C8DCDDAAA8888D2363322215A525BA697886446648AAAA76A863346444686 + 7663344666676644788AB7346ABB86877A744BA677884446648A8AA76A863346 + 6446877663344676776644687AB7337ABB87877A846BA777884436648AAAA77A + 8633476446877663344466676644677AB6336ABB767768744BA676883446448A + AAA76A8633464446877643344464676643677AB6336ABB87777A866BB7888A22 + 2521223222264C8A888AAADCDD7C35B1EE00EEE1B4C787DC8A8AAA8D40377022 + 525AA559A66A8A644764677886678743346333676774344464468744688AA634 + 67AA8A887AA668A6688863466447788667874334633368687644446446874668 + AAA63466AA88A87AA778A678A86447644778A668884334633368677443446436 + 76446888A434668A88877AA667A6688863466447788668874334633367686443 + 34443476446888A63466AA8AA88AA77AA77AA8521551115352483CD88AAA8A8C + C78735B1EE00EEE1B2CD8DCD8888A88DD3067455679AA99AA677A87A44644434 + 7646774333443366776664336433466646777776448A88888AA87AA768A77A44 + 6344347646684333443466776664336433676446677776448AA888AAA88AA878 + A87A444344347646784333443466676663336433474446677774447A88788AA7 + 7AA678876A444343347646784333433346666643334333464444676766448A88 + 888AA88AA888A96A2222245222563C7D88A888ADCD7DC0B1EE00EEE1B5DDDDDD + 8A887DCCD30522221225552AA6568646744444347444687677A878A864667644 + 663348764687767434666334476648A74676466444443474447877788A78A876 + 47764467434876468767643447433367764AA7468646646444347444787778AA + 78A874466644663347764477666433464333466648A74476446444443464347A + 7667AA78A87446664466334764367667633346633467766AA866A52552211112 + 222534DCCD788A8DD7DDD3B1EE00EEE1B8A8D88DDDDDCC0C3002221112122222 + 5522434647766434644368AAAA8A88AA84488788AA766A7768A878874C344303 + 3344336433434446764434644468AAA8AAA8AA8668888AAA76687778A878874C + 346333334433663333444676643464436AAAAAAAA8AA84488788AA66687668A7 + 777DC3344300333433643333343676443464436AAABAAAA8AA84488788AA6668 + 7767A8678DC33443033464337734422215512121122200CD0CCDDDDD87D8A9B1 + EE00EEE1B7883CC0CC00CDDDC000232121225222563224874476764787446447 + 7676646AB87887AAAA8888877BAAAABBB867A733C46433483033764466744677 + 4464478776646AB88888AAAAA8A8877ABAAABBB7D8A733347433474334764466 + 7646874446488776646AB87887AAAAA887867AAA8ABBB867AD33346403473333 + 7643667646774464488776446AB878778AAA8787767AAA8ABBB86DA733346433 + 6833336522411212222200CDDDC00CC03CC889B1EE00EEE1B2C0CCCCCCDCD888 + D0CC4420125256226AA734674334A747AA7664466774333787AA8AAAAA88A877 + 68AAA8ABBAABBB8D6477447AAD34674333A747BA76644667744437A7AA8AAA8A + 88A87668AAA8ABBBABBB8D7477447BAD34664334A747BA77644667744337A7AA + A8AAAA77A86768AAA7ABBAABBB8D6467446AA433664333A647BA776446677443 + 3787AA8AAAAA87886648AAA7ABBAABBB7C7678467ABD355521122121243300D8 + 87DDDCDCCCC0C0B1EE00EEE1B2DCDDDDDD88A888DD8A642202A96986ABBA6444 + 6334AA68BB8A864446444333446AA88AAA78A8866788766BBBABBBBAA887878B + BB44344333B868BB8AA64446644334447AA88AB878A8766788766BBBABABBBAA + 88A6ABBB44344333B768BBAAA64446644333446A888AA878A8746778646BBBAA + ABBAA788868BBB44344333B848BBAAA64446444333446A878AA868A866667864 + 6BBBABBBBBA8A8A7ABBBD5225121021207488C7888A87DDDDDDCC0B1EE00EEE1 + BD7DCD00DDC8A888D8A6303333BBBA9928BAA888AA46AA777767766446446446 + 6447868AA86778888AA86368A878AABBBBBBA748BAA777A836AB767767766447 + 4464466447868AA86778888AA86368A877BBBBBBBBA848BBA88AA846AB777768 + 7664474464466447868AA86677777A884368A877ABBBBBBAA838BAA7778736AB + 7677677644464464446446867AA76767777AA763688877ABBBBBBBA84ABBA899 + A9213322222688D888A8CDD00DCD85B1EE00EEE1BDACCDCCDDD88888DC342155 + 25BBBBA8558BBAABAA78BAA7644466668876866664677778A87A88868A777878 + 77433667BBBBAA668BBAABAB78BAA864347666A877876674678778A878888688 + 87778876403668BBBBA866ABBAAABB7ABAA74446766688778766646776788878 + 88877877777776333467BBBBA8648BBAABBB6ABAA7444467668A768666646786 + 78A87788867877676876403668BBBBAA76ABBAABAB54852251233DD88888DDDC + CD0D89B1EE00EEE1B5CC0DDDD888A8888D3C22221256ABABA669AAABBAAB8AAB + A68AAAAAAA778A64347A8767AABAA84347647A886643643368ABABA767AAABBA + ABAABAA68AAAAAAA878A64347A7768AABBA74447647A886643443468BBBBB768 + AAABBAABABBBA68AAB8ABA878A63347A7767AAAB874347647A886743343368AB + ABA767AA8BBAABAABBA67ABAAABA878A63337876778AAB874347647A88674344 + 3378BBBBB878BB8BBA9A56D73224CD8888A888DCDDCCCCB1EE00EEE1B500C8AD + D8AAA888888AD03622225558A6466644467866BBA88ABA8AA8768A4333664447 + 77777333686347888BAAAA4444676AA6664443447867BBA88ABAAAA876AA6333 + 66446777777433686347888BAAB86344677AA7666644447A66BBAA8ABAAAA886 + AA633346444777676433484337888AA8B84334666AA6444444446867BBAA8ABA + AAAA86AA433346444677676333484337888AA8B86444677AA867652222422287 + 326A88A888AAA8DDA8C00CB1EE00EEE1BDCCDA8AAA88887DA888748885225525 + 9743433303333367744434444443486433333333443364337863337ABBAABAA6 + 4476448843333300330048744434444463487433333333443464338A63337ABB + AABAA64477348863333300333068744434466463686433330333633363337A43 + 336ABBAABAA64466348743333000330068744434444443486433333333433443 + 3378433368BBAABAA64676468864322121121158622C588788888AAA8ADCC5B1 + EE00EEE1BDCDA88D88ADD877770326577556AA55AB8666643343003443330033 + 33337A8333303334644778648B8643378644667888AA77AB8646630333000343 + 33003333337A8433303334764777648B7643378746667888AA87ABA666633333 + 00034333003333338A8433333333644D68438B8643368644466878AA76AB8444 + 63033300034333003333338A8333330333663D67437B7643368644667888AB87 + BBA66552121112152221247878DD888DD8AD09B1EE00EEE1B5C7ADCDDDD78ADD + 7C02556722598BBAABB87A87436743334664033033347884466467668AABAAA7 + 78A884344333366368ABBAABB87A87436763334664033034347884476467668A + ABAB8778AA84344303366468ABBAABB87AA74368433366640030343478744663 + 676688ABAAA767A874334333364368ABBA8BB87AA64347430366640030333478 + 844663676688ABAAA667A87334430336646AABBAABBA9AA5215211126662247D + D888DDDDDDA8CCB1EE00EEE1B5DAADD88DDD88DD86522542022556663697AAA6 + 336ABA4348A846744433468A7888AAAAABBBBAA7647787633300376336776646 + 878A86336AAA4348884676443347AA788AAAAAABBBBAA7647787633300376337 + 77664687AA86336AA84348874676443347AA788AAAAAABBBBAA7646787433300 + 376336676646878886336AA84348874676443347AA788AAAAAABBBBAA7446787 + 43330337733777766688AA85122205214884478DD88DDD88DDAACCB1EE00EEE1 + BD8AAD8A8CD88888DD7021222122222223478A887768AA7678AA8BB7864337BB + AAAAAAA87BBBA87A74778B86D4300773343330034788888667BA6468B88BB886 + 3437BBAAAAABA87BBBA78A84778B86DC00376334303033678A888767BB6668BA + 8BB7864337BBAAA8AAA77BBBA77874677B864C30077334303003478A887667BB + 6668B8ABB7863337BBBAAAAAA77BBBA87864677B844C00377334333304688A98 + 52512211233D88888888DC8A8DAA86B1EE00EEE1B7DA8CDADD8AA88DC0002212 + 121212223467AAABAA868A8688AA7AB88763348AA8876AA647ABA77BA7678B8A + BAD334633330333466AABBAA848A8688AA8AB88864348BA8876AA748AAA78BA7 + 778B8ABBD334633330333667AABBAA868AA688AA8ABA886334AAA8876AA647AB + 877BA7678ADABAD333630330333466A8BBAA848AA688AA7ABA8863348BA8866A + A647AB867BA7678ADABAD304630433344679AABBBA922221022000CD88AA8DDA + DC8AD9B1EE00EEE1B7D88CC00D8ADC0000000221212222576566A88AAB746A76 + 677648ABA7764667844448864468A7ABBA778BABBBB7447CCD44676466AA8AAB + 746A76667648ABA7774668A44468A6446AA8ABBA878BABBBB7447CC746676466 + AA8AAB746A74678648ABA7774477A44348864468A7ABBA777ABBBBB74C6CCD34 + 676466AA8AAB646A74777648ABA7774667A44448864468A7ABBA767ABBBBB744 + DCCD44677667AA9AAB512212122220000DDA8C00CC88D7B1EE00EEE1B50DDDD0 + 00DD0C00000CCC0207BAA98766446777AB844864446636ABB67AA76674344464 + 4478A7ABBA87ABBBBBBBABBBBBAAA864646768ABA44863446646ABB778A86774 + 344664467AA7ABBA87ABBBBBBBABBBBBAAA864446768ABA44A64446646BBB77A + A866743444644478A7ABB877ABBBBABBABBBBBAAA764446667AB844844346646 + BBB77AA866743344644478A6ABBA77ABBBBABBABBBBBAAA876646655AB912621 + 212020000C0D7C00CDDD0CB1EE00EEE1BC0000CCCAADDCD88D76D834AABBB88B + A86467887A868A863444436BB7667A6663444336466A868BB778AAAAAABBAABB + BBB88BA84447877A867AA63444336BB8668A6664444436476A868BB878AAAAAA + BBAABBBBB88BAA4447878A867AA63444436BB8667A6664444344466A768BB877 + AAAAAABBAABBBBB88BAA6446877A867BA73444336BB8667A6664444344466A76 + 8BA8678AAAAABBAABBBBB8ABAA7455695A922882122233887CDDA8CCC00003B1 + EE00EEE1BCCC000DDAADDD888888D8726ABBA968AB8644444778ABBA76664037 + A7337A68867764676366636AA86766AA87AB746ABBBA8AABA644444777BBB876 + 664337A7347868867664676366647AA77676AA87AB746ABBBA8A8BA644444777 + BBB876664337A7337A68767764674346646A876667AA87AA746ABBBA8AAAA644 + 44476DBBB876664037A6337A68867744474346636A876667AA87AA746ABBBA8A + AAA6422225512AA4552666788DDDAADD000CC5B1EE00EEE1BCCDC8AA8DC00C0D + DC367872225889899AA643688868BBBAAA7AA6667644788AA8AA867743444467 + 88766ABB87AA73338A8AA88BA6336A8A68BBBBAA7AA666774478AAAAAB767743 + 4444678A766ABA87AA73338A8AA8ABA6436A8868BBBBAA7AA66677447A8AA8AA + 8677434444678A766AAA86AA630388A8A78BA633688868BBBBAA7AA666774478 + AAA8AA86674334346788766AAA87AA73338A8AA8ABA7225999520DC0873DC07D + 0C00CD8AA7CDDCB1EE00EEE1B578DAA8DCCCDDCD8C0D6AA012259AA968A847AB + BA66ABBABB78BA64687468A68AABA677666444678A8447A8868ABA3347AAAA7A + A847ABBA66BBBABB88BA766A7668A6AAABA68766644467888437A8868ABAC347 + AAAA6AAA46ABBA66BBBABB8ABA767A6668878AABA677646444477A743688777A + B8C346AAAA6AA846ABBA46BBBABB8ABA747A766A878AABA67664644346788436 + A8767AB8C347AAAA7AA856ABBA212000AA46CCDDCDDDCCD8AAD8DCB1EE00EEE1 + B7D88DDC0DAAAA8888887DC3221258B84AA8764AA6467AAAB8668A768A864743 + 46AAA7A77AA7444678A63367677ABB83337ABA7ABA874AA6467AAABA668A768A + 86684446AAA8A87AA764467AA64367677ABB73337ABA7AA8864AA6467AAABA66 + AA768AA6674347AAA8877A87644678A63366666ABB73336ABA7AA88648A4466A + AABA66AA768A86474346AAA8876A8744447A863367667ABB73337ABA7ABA8529 + A1212222045788A88AAAAD0CD788D7B1EE00EEE1B6CD88DDDAAAAA7D88870200 + 0221228968BA863483033468A8666886AAB77633346688A77AAA86767AB86666 + 7768BBA63034AAAABAA73483033368A8666887AAB87733346788A77AA886667A + B766667768BBA63034AAAABAA63483033368A8666887AAB87733346688A77AA8 + 87667AB766646768BBA43034AA8ABA863483033368A8666887AAB77733346678 + A77AA876666AB766447668BBA60334AA8ABAA512511111222226888D8AAAAADD + D88DC7B1EE00EEE1BA8DAAA88AAD000CCD33020200212126ABAABA6443030036 + 877487777AA8A84333478A866778AA66787767766776ABBA430048ABABBA7440 + 030336A76688877AA8A84344678A86677AAA66687767776767ABBA430048ABAB + BA7443030336A77688877AA8A84333478A86677AA866687767766766ABBA4300 + 48ABABBA6430330036876688877AA8A84333478A764768A864677747766766AA + BA630348ABABBA52121111122222CDCC000DAA88AAA78AB1EE00EEE1BA88AA8D + CD8C00DCCDD40202305521220678AA87D6A73303664446434788BB6334668866 + 6646777666743776676778BA873334478ABA8778B833036644464347A8BB6334 + 6688666646667666644774676778BA8733344788BA8777A833036464464367A7 + BB43346688666646667666643774666768B88633344688BA8777A83033644446 + 434788BB43344687664644667666643766666768B886403467A8BA6555A52121 + 22224730C00C8DDD8AA88AB1EE00EEE1B8DDCD000DAC0D8CDDDC221262565222 + 22544AABBBBB6333464333333446A88633676466676666778A844867743334A7 + 78733333664ABBBBBB6333464333333446A8A633676466776467778884486774 + 3434A878733333664ABBBBBB6333464333333446AAA733676466676467778884 + 4866743334A7786333036468BBBBBB6333474333333446AAA633676464666466 + 7778734766643334A76A743333765ABBBBBD1121122206CCDD0CAD000DCDD8B1 + EE00EEE1B7DC000C0C8DDAADCD02222202552255222346AA8AB7763347846644 + 434448AA444444446767776777A66768A74338A76843663334478BABB8763348 + 866644443448AA434444446768776778866747A64337A76843663334468BABB8 + 843348846644443648AA434444444767776778866767A73336A7674366333436 + 8BABB7863347846644433447AA434434444767666677866747A44337A7674367 + 3345358BABB2211212220CCC888D8C0C000CD9B1EE00EEE1B76DDCDA8D8DAAAD + CC0002100095222665332046447A744336666744447844886464333346788647 + 7886787ABAAA7ABAA7446887443046447A763336666766647844886664333346 + 78866777867878BAA87ABA87446886443046347A644336666766647844886474 + 33334677864777867878BAAA6ABA87446886443336446B643336666764447844 + 88666433334668764777866868BB8A6ABAA74468876422122153121212220C0D + AAAD8D88DCDDD7B1EE00EEE1B6DC0CDDDC8A88DCCD00000032A55525A6543368 + 746A777336434446768A643448AA4444446788AA88AA88ABBBBBABAAA78746A7 + 643468847B888436434446768B443447AA44444467888A88A888ABBBBBABA8A7 + 8737A7643468747A878336434646868B444448AA4443446787AA88A887ABBBBB + ABA8A68736A7643368747B787436434446868B443447AA44344466878A77A887 + ABBABBABA8A68747A77422565156222112122C00DD8ADDDDDC0CCDB1EE00EEE1 + BDCC000CCCDADCC00DCC353022525A226666767A7786AAA74640333466676333 + 37BB7764434688AA8A8866ABBAA8AA77768ACC8867768A8887AAA74640333666 + 68733337BB7764434778AAA888668BBAA7AA67768AD48767768A7787AAA74643 + 33366668733337BB767443477AAA8A88668BBAA7AA77768AD47867768A7787AB + A7464333366668633336BB6764333678AAA888648BB8A7AA67768AD68879655A + 5592222222222300CCDADCCC000CC6B1EE00EEE1B00CCD8AAAA88CC0C7D30022 + 22529A899643333633877AA64643430664468764338A87763334668A77874447 + AA46766A84ABBAA864433434878AA66643433664467674338A87673334668877 + 874446AA46766A848BAAA864333434878AA66643433664468774348A87673334 + 668877774446AA46744A848BAAA864333434A78AA66633433644468764338A87 + 663333648876863446AA46746A84ABAAA864221221921222221244300C88AAAA + 8DCC00B1EE00EEE1B0DCC8AAAAAADC0C0430022222A55BBBA846D74336A43686 + 7A8873468648ABA83C7A87788774678867A744436A88A84AB78BBBBA77883336 + A636867A8A7336A648BBA8337A87778764478867A743336A68876AB68BBBBA67 + 884336A436867A887446A748BBA8437A87788764478867A744336A77A86AB68B + BBBA77883336A436867AA87446A748BBA8337A87688764478867A743336A67A7 + 6AB68BBBBA77691215921221120033000CDAAAAAA8CCD0B1EE00EEE1B788AADD + DDA70000DC33033023A22ABBBBAABBA667A4034468886346764ABBA84667A888 + AAB767AABA877644678ABBBBA64BBBBBAABBB668A633646A8A6366764ABBA846 + 678878AAB767AAAA876644678ABBAAA64BBBBBAABBA767A603647A8A6466864A + BBA84668A888AAB767AABAA76644668ABBABA64BBBBBAABBB668BC33646A8A63 + 66764ABBB84667A8788AB767AAAA876644678ABBAAA64BBBBBAABBA525A11112 + 200033C00007ADDDDAA886B1EE00EEE1BA8AA8DCC00000CD8D436476379228BB + BA67BBBA8BB4344467674333444778B744678B877887778AABBA87877878BB8A + A44BBBBB88BBBAABB7CC3467774333444778B744478B877787777AABAA777677 + 67BB7AA44BBBBB78BBBAABBDC43468784333446878B744478B877887778AABAA + 77777868BB8AA44BBBBB78BBBAABB7C33477784333444878A744678B87778676 + 78ABAA77767767BB8AA46ABBBB88BBBA9BB221212523337C000000CCD8AA8AB1 + EE00EEE1B8A88C0CD00CCCD8AD4D33535862225256568A767ABBAA88AAAA6333 + 46663AA434467644676666777ABAAAA6AB73387A8434668746AA866BBBAB87AB + AA7C3346663AA4334676446776467778BAAAA67B63376A8434668746AA866BBB + AA87AAAA643346664AB634468644687666777ABAAAA68B63376A8434667746AA + 86DBBBBB88ABAA6C3346663AB634467644677646777AB88AA67B73376A863676 + 884798555AB687524644CD78DCCC00DC0C88AAB1EE00EEE1B888DDC88CCD88AA + A7DD6522461211225568886436ABABAAAAABAA7644664BAA646464347A844446 + 78ABBAA6AB733678333346667AA87636ABBBBBBAABAA8644666BAA646464338A + 74444477ABAAA4AB733667333346667A887436ABBBBBBAABBAA644766BAA6664 + 64348A84466477ABBAA4AB733667333346667AAA7436BBBBBBAAABBAA644766B + AA646464347A74444477ABBAA4AB6336773343467788895214AC7A42766DD8A8 + 888DCC88CDD888B1EE00EEE1B98DCC8AA8C8AAAAAAD786324556522533678BB8 + 644466678668ABBD34436BAB87788744AAA6464447A738647A86A7A778666764 + 788BB8644667678668ABB734436BAB86777744AAA4444446873764787687A667 + 666764788BB8644667678668ABB834636BBBA7788746AAA6444467A737647A76 + 86A667666764788BBA64466767A66AABB834436BBB87788644AAA44444478737 + 647A7686A768667776899BB92121122205667AAAAAADD8AA8DCD88B1EE00EEE1 + BA8D00CDD8D8AAAAA866422235A99555255647BA8643343686788BB6784037AA + A77AA8466AAAA8776786476776466888BAA866446648BBAD433447A688ABB678 + 4037AA877AA84468AAA8676784476666466778BAA876444647BB86433437A78A + ABB68A4038AAA88AAA447AAAA8776686476766446888BAA876446648BBA74334 + 47A678ABB77A4038AAA78AAA4468AAA8676686476766466878BAA877466626BB + 921121122247D8AAAAA8D87DC00D8AB1EE00EEE1BA7DCCCCC7DDAAA8D4332212 + 52555656223320367AB7668AAAAAAABABB4333464367A76666AAAAA767846467 + 74664674887877444430367BB7768AAAAA8BBABB60334643478666668AAA8646 + 74444764664666787876444430367BB776AAAAAAABABBB6333464368A76767AA + AAA74784644774664666888877444430368AB786AAABAB8BABBB6033464347A7 + 66678AAAA74774664774664676888887644522145BB2126222234CD8AAA8DDCC + CCCC8AB1EE00EEE1B760CDD7DA8D8A8D0030222875222655202233444BA64478 + 77788B68BBA443344337A668A887A8AA6664434877766777464876643333434B + A644788788AB68BBA643364336A6688887A8AA66644338876667764668776433 + 43434BA644788788AB7ABBA763364337A7688A87AAAA67644348877667774668 + 77643343444BB64488A7A8AB78BBA763364337A6688887A8AA66644348877667 + 86666887760221211BA121580220300D8A8D8AD7DDC3C8B1EE00EEE1B5C0DDDD + 8A8CD8DC3CC3027883952596A526666334863333334666336AA783376447876A + 8778AABAA88776688776678A87478AA737766333843333034666336AA7743664 + 47764887688ABAA88766677776678A873788A737776333863333334666336AA7 + 833766478768A778AABAA78766677776678A874888A737776303863333334666 + 336AA7843764478668A778AABAA8A777778776678A8748A8A756955212912112 + 11233300D8DC8A8DDDD0CCB1EE00EEE1B3DD88D8AADDDADDDDD4056762669A6A + B9396333348B8633033303300346843874443478767877AABBABABA887644667 + 88AA8AB768744334AB7433003330300346834774344468666877AAAAAAAAA877 + 44466788AAAAB768744334AB8633033333300346A4487644647A777877AABBAB + ABAA8764466788AAAAB86A744334AB7633003333303346844776444478777877 + AABAABAAA887646677A8AA8BB869621121A32121212253438ADDDAA8D88DD5B1 + EE00EEE1BCCC88AAAA8D8AAD888856D22559A559A79A836A768BAA8643433333 + 0033633773433368676464788ABAABA7776033478AA86AB88BA36B668BBA8643 + 3333300033643764430368666444687ABAABA7674033477AA768B88B83DB668B + BA86433333330333644874430378676464688ABAABA7774033678AA87AB88BA4 + 7B66ABBAA6434333330333634874430378666464788ABAABA7774033478AA87A + BA8B825A529225325226767C8A8D8AAAA88C45B1EE00EEE1B2CD8888DDD8AACC + D7A6475122565596A59AB7AB84678A8A88A888D3343343646A733347877DD446 + 8AA8AABA76330334788888A6AAB8ABA4668A8A88B788D3343343636863333687 + 7664468A878ABA76330334688878A78AB8ABA4678AAA88B78AD3343344646A74 + 3347877674478AA8AABA76430334788888A7AAB8ABA467AAAA8AB78A73343364 + 646A733347787D66478AA8AABA774303467A8AA8A7AAB5AB912112528844874C + DAA8DD78887DC0B1EE00EEE1B587888D30D8A8C0C873222121255669524AB66A + A74688668A8AABBD786678766ABA34447BABA7668A668AAAB443303346888A74 + 6BB66AA6468A668A8AABBD786668766AB843447ABAA7468A468AAAA643303347 + 888A646BBD6AA6468A668A8AABB77A6688766BBA44448BBBA8668A668AAAB643 + 303347888A746BB66AA6468A76AAAABBB78A6677666ABA34448BABA7668A668A + AAB4443333478A8A866BB55995112212222CD8C008A8DC0D88877DB1EE00EEE1 + BAA7788DC0D8C000DC302122112255586528A45676678A668846BBBA8A78AA87 + 68AA44436ABBBA8686C447AAAA64683334677A764AA44676668866A744BBBAAA + 68AA8768A844436AABBA748644478AAA64683333777A7648B6667766AA66A846 + BBBBAA78AAA87AAA44446ABBBA84A64447AAAA66783433778A764AB4667767AA + 67A867BBBBAA78ABA878AA44436ABBBA86A64448AAAA66784443778A8658B222 + 5222112111123CC000C8D0CD7877AAB1EE00EEE1BA8DDDD003C0000030021211 + 211215999609A87688A66768AA467ABBBA668AABA778643367A8BA88A7663677 + AA666663000688A848B87688A6676888467ABBB8768AAB877764336788AA7786 + 6636778A667663000688A748A87688A668688A447BBBBA778BABA88A7643688A + AA88A7663677AA667663303788A848B87788A66868AA448BBBBA778AABA78864 + 4367A8BA88A7664677AA6677633337A8AA39B99559912112221220C00000C003 + DDDD8AB1EE00EEE1B7D00000000C00D8DC00222222521256A4557A8ABAA88877 + AAAAA7BBBA67647ABAAAAA434466887ABB87667876866666733378A7447B8ABA + 888777AAAAA6BBBA66647ABA8AA8334346787ABBA6466876866666730378A764 + 8B8BABA78876BAABA7BBBA77667BBAAAAA444467888ABBA7666877A767667403 + 88A7468B8BBB8A8888ABABA8BBBA67668ABAAAAA344466887ABBA7667887A767 + 67743488B7556A9ABA91121122200078D00C00000003D7B1EE00EEE1B96DDDCD + CDD8DDAAAD68865452552265552338B878BAB888AAABA47A8A76647AAA8ABA64 + 33466677AAB76667AB676666773687643348B768BAB888AAABA46AA876647AAA + 8AAA64334446678AA77667AB67666677368764434AB87AABB8A8BAABA47AAA87 + 648BAAAABA7434446777AAB77768AB77766778468866444AB87ABABAA8BAABA4 + 7AAA87667AAAAABA7433466777AAA87768AB7776778847A886522AB559A26366 + 46AAD68AA8D8DDCDCDDDD7B1EE00EEE1B7D8888AAAAAAAAA8348773565555A56 + 656557846AA8BA8AA768647A778A6678BAAAAA787874466478AA76478A466644 + 676A88767447846A88B878A6674478678A667AAAAAA8687774476478A876668A + 467446676A88766447866AA8BA8AA668647A778A778ABAAAAA8A8876476478AA + 7667AA477646777A88876447866AAABA8AA678667A878A778ABAAAAA7A887447 + 6478AA76678A677646777A8A87622591299235565677308AAAAA8AAA88A7D9B1 + EE00EEE1BD8AAA8AAA7AAAA7000022222259555569A6364676677A88767866A8 + 78AA4666ABA88AAAAAA77A73366876687636864468866788A6464476476A8776 + 6846A878A84466AAA888AAAAA67863446886688636774468866787B647467668 + 7A88777846B87AAA6667ABA8AAAAAAA78A73467886688646874478867888B747 + 4687788A88877A66BA7AAA6667AAB8AAAAAAA77A7446788668864687667A8788 + 88B62522552225222200003D8AAA8AAAA8AAA5B1EE00EEE1B9AA877888CDAADC + C4C430222258A85225A66643664AB8777AAA8677768434437BA8A8887AAAAA77 + 43478668B86766647AAA6436A76643664AB8776AAA7676768434436BA8887778 + 8AAA8733478668A87666647AAA6437A76743674ABA787AAA8677878644637BBA + A88A7AAAAA874347877AB86766767ABA6437A76744664ABA887AAA877786A634 + 646BAAA88878AAAA874347877AB87766767ABA7647A955115121221222463CCC + 7AADC888778AA8B1EE00EEE1BAAAD43DD30CA8C8A87842122155A99223446676 + 7788AA87768A8843444664336A868666467AAAAB844678447886346467A8A434 + 6466666677AA77768A8843444643336A8686444678A8AAA44678448887347467 + A8A4346467667688AA8776AB8A43446664337B87A766667AAAABA647786488A7 + 347668AAA4446677676788AA8887AB8A63446664336B878766467AAAABA64678 + 648887447668AAA6446255552251221210688AA8C8AC00DD34DAAAB1EE00EEE1 + BAA704DDC00CADCD884002221221222232454646644467876346784344676643 + 4864766634368AABBA7477444677444333466443636644443466774346774344 + 4766434764666433368AABBA7477344677444333466643446644644477786347 + 7843467766644A6677764347AAABBA767744478876644C466644646746744478 + 8863678844366876644A66776644468AAABA7677444788766444667663552522 + 112112121123D88CCDAC00CDD407AAB1EE00EEE1B78D3C7AA8CDAAA8A846A822 + 22222222588A6663443334664034784343433663464467A833336AAA788AA777 + 47ABA74344334448AA4643443034463334674333433643463467A733336AAA78 + 8AA87748ABA7433C334448AA6443443334664036784443444663664678A84333 + 6ABA8888BA7768ABA86434C4466AAA6643443334674334886443444664464677 + A833337ABA8888B88847ABA8743D44666AAA2521211121212275DAAAAAADC8AA + 7C3D89B1EE00EEE1B98DDD388CCDD8AAA8337830569AA9565ABA7AA768643334 + 444476443330033346444488763347AA768ABBAABABBBBB88AB8776ABA7AA668 + 44333443347644330003334644447A763347AA668ABBAABABBBBB88BB8776ABA + 8AB67864333644447766333033446666468A873367AA768BBBABABBBBBB8ABBA + 876ABB7AB77864433644468746433033436664468A873347AA768BBBAABBBBBB + B8ABB8887ABA5AA52522121115333888A8DDCC87CCD787B1EE00EEE1B9A88C03 + D000CCD887332444485AB98505778A77AAA7764666667667786433346674447A + AA73338AA66ABBAAA78BBBAA8BBAA636778877AAA76444664676677764333446 + 74347AAA73348AA66ABBAAA78BBBAA8BBAA646878888AAA87646666786678876 + 33446784448AAA8434AAA77ABBABA8ABBBBAABBBA646888A88ABAA8646776887 + 788A7633466776448AAA74348AA67ABBABA78BBBBAABBBA7469699559A915512 + 25233788DCC000DC0C88A8B1EE00EEE1BA8AA8C00000000C8402352225522552 + 25678747AA8AB886764A8788BAA866777678777ABBA734678667AA8643667886 + 66466434678646AA8AB876664A8788BAA864676668768ABBAD34668667AA8643 + 66778666667634688746AAAABA87766AA8AABBA88688877A878ABBA844778767 + AA87446788A76667864667A747BAAABAA7867AAAAABBA886887778878ABBA734 + 768767AA87447778A776778646568512B995852222334D8D00000000C8AA8AB1 + EE00EEE1B47DAADDD7AD000030020221129525797648A867ABAAAAA8667AA677 + A667868886788678A8BB877668777744467668A88647887748A866ABAABAA866 + 6AA677A668868876787678A8BB867668777744467678A8A647888768A877ABAA + BAA8767AA788A76A87AA888A877AAABB87767887876446777AAAA768AA876AAA + 77ABABBAAA867AA88AA77A87AA878A8778AABB87777877776446777AAAA768AA + 8759A9559BA26221122003C0000DADDDDAA775B1EE00EEE1B23C38AAAAAADC00 + 0302212222AAA9A9A656AA768ABAA88A8768777686363467A888666677ABBBA8 + 8874788777788AAAAAAAAAA646A8768ABA888A86687776863434678888666677 + ABBBA88A74788777788AAAAAAAAAA746AA778ABAA8AAA77A7888A7464478AAA8 + 777788ABBBAA8A748AA8888AAAAABAAAAAA867AA77AABAAAAAA78A8888A74646 + 68AAA8767787ABBBA88A767A88877AAAAAABAAAAA935A9555BB1211212220300 + 0CDAAAAAA8C3C2B1EE00EEE1B2003C7A8AA8DD000D4022221159565675366776 + 76AA888AA67868A788433346788878A8778AABA888767AAA6678A86888786786 + 44676466AA878AA67868A78843334478877888778AABA888767AAA7678A86888 + 87778646676677AB8AAAA87888A8A8644366AAA888A8888AABA8A8868AAA877A + AA788A88888646787678BBAAAAA8788AA8AA6444668A8888A8788AABA888767A + AA778AAA7A8A8A78865555512291212222004D000DD8AA8A7C3002B1EE00EEE1 + B400000CCCDADD000C3223222225522253203766666A867A8678668468843446 + 76778A877878AA868AA77AAA768AAA8666643464433666646A867A8678668468 + 84344676778A877878AA868AA77AAA768AA88666643466434766647A868A8678 + 67A66AA446678788AA88888AAA878AA88AAA77AAAA8667743476434776767A87 + 8AA78A77A77AA6446688888A87888AAA878AA78A8A778AAA8777744684312525 + 22422112222203000DDADCCC000006B1EE00EEE1B6C000D7DCDA888003022212 + 21255222554233667667764776444444446844677677AA7777878A787AA88AA8 + 64466874678444446333666667844774444444347834477666AA7777878A888A + A88AA864666884678444646333667667A66884664664467A64688778AB878888 + AA888AA88AAA76676A86788646666333677678A66A86664664468844688778AB + 8788888A888AA88ABA64666886688746656212125112221212222000888ADDD7 + D003C5B1EE00EEE1B6CDDCD8D78DAAA83C221221125A9A569666434676876448 + 86443344444473336678A88768A8ABBAAA8878AA6C3334447A8A678766433466 + 766448A6333344443673336678A88667A7ABBAAA8878A8643334447AAA788776 + 63366777646AA6434446644784447788AA8778A8AABBAA8888BA7C4336667AAA + 88A77763467787747AA74444666647A444778AAA8768A8ABBAAA8888A874C336 + 648AAA88A75521222251112212122307AAA78DD8DCDDC6B1EE00EEE1B640000C + 0C887AADCC02211121558AA9656663444666746AA86446778634663333348777 + 7788AABBBB77667BAAD3444467AAA8767763334466646AA87446788634463303 + 34877777A8AABBBB77667BAA73444467AAA8777763444666746AAA766788A746 + 76433446A788788AABBBBB87678BAB74466678AAAA777863446667866AAA8667 + A8A746664334468888788AAABBBB87667BAA73464678AAAA8666512112221112 + 222203DDAA8D8C0C0000C6B1EE00EEE1B8CCCDC00D8DCD8DD877322222559575 + 55688433346663368A876676884446633333467877A86478BA87766ABBB87A86 + 66887764688333344663348A876676884466633333466877886478BA87766ABB + AA7A8667888764688433346763468B8867888A6477743334677887A8647ABA88 + 866BBBBAAA8677A8887478A43336676446AAA87888AA6677743334677877A864 + 7ABA87766BBBBA8A867788A87558821121212112224468DDADCD8D000DCCC9B1 + EE00EEE1BA88AA8DD7AD0CDCD87742022189525B969877444447664678686433 + 664367843333344666874336877AA648BBBBAA87AA667AA67887333446644678 + 786433664347843333344666874436877AA648BBBBA88788667AA77A86434446 + 7646887A7644776468863443446677884436A87AA74ABBBBAAA8AA768AA78A87 + 4444677667AA8A764477646A863433346676884436876AA648BBBBAAA7AA778A + A7795521212112112236684CDC0DA8DD8AA88AB1EE00EEE1BA7DAAA88AADCCCC + CD4602112159925AA667986447647AA8A76A7633466446867663344676676644 + 787AB6337ABB768778746BA677884446447AAAA76A8633464446767643344676 + 676644787AB6346ABA86877A846BA7778A4446648AAAA87A8643676668A88764 + 464676787644787AB7348ABB88887A866BB6878A6447668BAAA87AA744686648 + A88764464776786644788AB7347ABB87887A866BB666581212112121212DCDCC + CCCDAA88AAAD7AB1EE00EEE1B63D887DDAAAAA8888873212225A9559A468A864 + 476447788647874334633367686644446446874468A8A63466AA8A877AA668A6 + 688864466447788667874334433367677634446446874468A8A63466AA7A877A + A678A67888644764477A8668A844367433787A764446664687466AAAA74467AA + AAA88AA67AA77AAA644774688AA76AA844467434787A76446466468744688AA6 + 3467AA88A88AA67AA6599921222112122238A88D8AAAAADD888DCDB1EE00EEE1 + B6D888DDCDAAAAAAA8888622129AA56AA979887A446344347646674334443367 + 667764346433474646777776447A8888AAA88AA7688778444344347646684333 + 443346676664336433676646677676447AA8888AA87AA778A87A446344368746 + 886434664477788664336433676666788886468AA888ABAA8AA87AA88A666464 + 3687677A6334664477787764346433476646787776448AAA888BAA8AA966A559 + 12211111257A88AAAAAAADCDD888D6B1EE00EEE1BC778AA8DDDD88D883366862 + 11255528A6468646646444346444687667A877A7744676446643487646777764 + 34666333677448A7468646644444346444787677A877A7644666446643477646 + 8767643466433367664AA74686466444643474467A877AAA8AAA764886667643 + 4876478777744467643467766AA86687467664663484668AA88AAAAAAA866786 + 6677334876468767643466633467766AA72555222111111296674D88D887DDD8 + AA7775B1EE00EEE1B3DDD8AA88DCCDD78D444661212222125603444647774434 + 64436888A88A88AA86488788AA76787768A8678D4C3463333444336433333446 + 764434644468AAA88A87AA84478788AA766A7768A8778D433463033444336633 + 43444677443664447AAABAAAAAAAA76888AAAB777A8778AA8AA8D43663333444 + 33763C43464777664676447AAABAAAAABAA76A88AAAA866A7768A888A7D43663 + 3334443374222121222121216566DD88DDDCD88AA8D7D3B1EE00EEE1B53C0037 + 8AA888AAAAA85786551252225753348644767647864444477676446AA88888AA + 8A8889877AAAAABBB777AD333464304743347644667646874444477774444AA8 + 7887AAAAA7A8877AAAAABBB877AD33346430474334764466864787446668A787 + 667BB8AAA8AAAAA8A8878ABAAABBB878A8334474336843348646778667A76666 + 6A8887767BBA8AA8AAAAA8A8777AAAAABBB777A8334474336821225211211555 + 57688A8AA888AA87C00CC3B1EE00EEE1B403C344DAA87D8A8787680496525522 + 7AA634764334A747AA66644667744336878A88AAAA88A8776AAAA8ABBAABBB86 + 7667447AA604664333A748AA76644667744336878A8AAAAA88A8776AAAA8ABBA + ABBB867667448AAC34664334A748BB87764778844448A8AAAAAAAA88A8876AAA + A8BBBBABBBAD7678468ABD34774334A748BB88766778864448AAAAAAAAAA88A8 + 876AAAA8ABBBABBB8D7678468AB31152211165220A67778887D8AAD443C005B1 + EE00EEE1BC0D87DC0C88DDC303C6332006A698968BAB64466434A878BA888444 + 464443344478888AA878A8746778664BBBAAABBAA788868BAB44444334A868BB + 8A864446443334446A888AA878A8766788746BBBAABBBAA888A78BBB64346333 + B878BBAAA66467646334667AA8AAAA7AAA866888766BBBBABBBBAAAAA7ABBB76 + 46643CBA7ABBAAA67467646434667AAAAAAA78A876677A766BBBABABBBAAA8A7 + ABBB222121217D122C44C00CCCD88C0CD78705B1EE00EEE1B9D88CDCDDAA8DC0 + 0020222122BBBAA928BAA88AA847AA7777677664464464346447867AA8677888 + 8AA76368A777ABABBBBAA748BAA777A846AA7677677644464464346447868AA8 + 7778888AA86368A877ABBBBBBAA748BAA8888847AB7788788764476676466668 + A78AB87778A88AAA646AAA88BBBBBBBBA84ABBA888A867BB8788788766686676 + 667668A78AB77778888AA8636AA888BBBBBBBBA848BB85599912221212200000 + C78A8DDCCD78D8B1EE00EEE1B97A8D7AD78AAA8DC002221121BBBBA866ABBAAA + AA7AAAA8644466668866776664677778A88888868887787877433467ABBBA866 + ABBAABAA78BAA7644467668867876664677678A88888878887777876430668BB + BBAA66ABBAABBB7ABAA864467D77AA8888767678878AAA88AA878A8788887743 + 3678BBBBAA76ABBAABBB7ABAA864467776AA88A8777678878AAA8888A68A8778 + 8877433668BBBBAA749BBAABAB212121122030DDA8AA877A7D8A77B1EE00EEE1 + B68AA88A8DD88AA8878321221156ABABA978AA8BBAAAAAAAA778AA88A8768864 + 347886678AABA76367668A886643443468ABABA767AA8BBA8BAABAA67AAA8AAA + 768844347A8777AAABA84467667A887763443377BBABA768AAABBAABABBBA68A + BBAABA88AA74448A8778AABBA86468768AA87763643478BBBBB878BBABBBABAB + BBA6AABBABBA88AA74448A8778AABBA84467668A887643443478BBBBB765AA8B + BA922022054DA88A8A887D8A88AA86B1EE00EEE1B6DAADD887D7887D88778A82 + 2221565AA7666644467A67ABA88ABA8AA8768843334644677768743368634788 + 8BA8A843346678A6666444447846BBA88ABA8AA8768A63336644677768643368 + 6347888AAABA6444677AA7666644448867BBBA8BBAAAAA87AA73347766688878 + 74346863488A8BAABA6444777AA7666644468A67BBBAABBAAABAA7AA73347766 + 67877874336863478A8BAABA6444777AA653521112221264888888878887D788 + DDAA76B1EE00EEE1B648ADDD7D7888D487C38888552255258863434333333047 + 744434446443476433330334443464338A63346ABAAABAA64476348743333303 + 333048744434466463476433330334443464337A63347ABBAABAA66476368843 + 333003333068864434466664687433433344643464338A63347ABBAABAA76676 + 44886433330333336A864444676664687633433334643464337A73346ABBAABA + A7667646885212121111112767733D8D78A8DD7DDDA8C6B1EE00EEE1B9C8A88D + 888DD8D76720255672599A76AB866664334330343343003303336A7333333334 + 764D78748B7643368644466888AA86AB844663033300334333003033337A8433 + 333334764DD864AB7743378744667888AA87ABA6466433430034444300333434 + 8B864343333476D78864AB8743478746677888AB88BBA6676433433034444300 + 3334448B844333333476677864AB7743478746667A88AB88BBA3225112121115 + 55322787D8DD888D88A7C8B1EE00EEE1B74C7A8AAA8888D67655215652558BBA + ABB88AA74367433366643333343477744644466688ABAA8777A8743463033663 + 68AABA8BB87A87436743334664033334347876466467668AABBAA778A8843463 + 33466478ABBAABB87A87436843336764333334468A8667667767AABBABA878AA + 8434630346647AABBAABB88AA8436843336674333334468A8666747767AAABAB + A878A88434633336637AABBAABB95A95212121126268D7AD88888AAA8A8C47B1 + EE00EEE1BC33C8A7D8AAA88D843521255215555546888AA6436ABA4368A84464 + 443346887778AAAAABBBBAA7647787633303377336676646878AA63368BA3368 + 886674443347887888AAAAABBBBAA766788863330037733777764687AAA64378 + BA4368A86786644368AA8AAAABAAABBBBAA866788873433048733778774788AA + A6436ABA436AA86886644368AA8AAAABAAABBBBAA76678886433034874377877 + 66859A9212123521207A788888AAA8D7A8C335B1EE00EEE1B66C3D7CD888A878 + 72221212212212222468AAA88678AA7668AA8BB6864337BAA8A8AAA87ABBA87A + 74778B764430366334333033478A887668AA7668B88BB8874337BBAAAAAAA87B + BBA88A84778A86D433377334330333678A8A7778BA767ABA8BB8874438BBBAAA + ABB88BBBA88A76788B87D43337843633303368AA8A7778BA767ABAABB8A74438 + BBBAAAABB88BBBA88A74778B8DD43037733633333355998921255322203D4D88 + D8A888D47D3CD6B1EE00EEE1B98D3D34DDD7D8D7D4C62122221121223677AAAB + AA868A8688A87ABD7763348AA7766AA647AB878AB7778A88BA73346304330334 + 67AAABAA848AA688AA7AB8886434AAA8866AA747ABA78BA8878B8ABAD0336304 + 33333667AABBAA868BA7AAAA8BBAA87436ABAA877AA768BBA88BB877AA8ABBD3 + 34633433344667AABBAA868BA6AAAA8BBAA87436ABAA877AA767BBA78BB8878B + 7ABAD334733433344655A9ABAA92553283374D7788DDDDD43D3D87B1EE00EEE1 + B67DDD00DDC8A8D7D7A84222211212556567AA8AAB746A76678648ABA6764467 + 844447864668A7ABBA777BABBBA7466C3C34676466AA8AAB746A66678648ABA6 + 774668864468864678A8ABBA778BABBBB7647CCD44676476AA8ABB747A767786 + 6ABBB8886678A66478A6667AA8ABBA877BBBBBB86D8CC746777667AA8ABB847A + 8678876ABBB8886678A64668A6467AA8ABBA778BBBBBB76D7CD7667774558999 + AB212222204788D8D8A8CDD00DDD86B1EE00EEE1BCDCDDDDDDDDA877D4786702 + 22BAA99966447778ABA46864446646ABB678A766643444644678A8ABBA77ABAB + BABB8ABABBAA88744466688B844864446646ABB78AA87774344664467AA8ABBA + 88ABBBBBBBABBBBBAAA876447768ABA46864447746BBB88AAA7786444674667A + A8ABBA87BBBBBBBBABBBBBAAA876647768ABA44864466746BBB88AAA77764446 + 76467AA8ABB888ABBBBBBBABBBBBAAAA842255259A92121215687C7788A7DDDD + DDDCD5B1EE00EEE1B3CCCD3CCC3CDD77C03444222CBBB88B886467887A868A86 + 4464436BA8667A6664444444467A768BA8788AAAA8BB88BBBBB8AAAA6447877A + A68AA4C444436BB7668A6664444446676A868BB878AAAAAABBAABBBBBAABA864 + 47887BA68BA74464437BB8668A7774466446677A87ABB878AAAAAABBAABBBBBA + ABAA6467887AA68BA74464446BB8768A6774466446677A86ABAA78AAAAAABBAA + BBBBBAABAA5225455991222122440047DDDCCCCC3DCCC3B1EE00EEE1B988CCC0 + 30000CCCC202452211BBA89AAB8664666777ABB876764337A634776776676447 + 6446647A876667AA87AA7468BBA88AAAA644444777ABBA76664338A733786886 + 8864676467647AA77677AA88AB746ABBB88AABA664464777BBBA86764338A744 + 8A68878866686467647AA87778AB88AB766ABBBA8AABA664664877BBBA877763 + 48A7448A68878774686467647AA77767AAA8AB766ABBBAAAAB75221212522202 + 2263223DDC000030CCD888B1EE00EEE1B8AAD88DD8DC300D3322531111599989 + 8AA734688A78BBBAA878A6666744688AA7AA7677434444778A776AAA868A7333 + 7888A88AA633688A68BBBBAA8AA76677467AAAA8AA8678434644688A877ABA87 + AA733388AAA88BA74378AA6ABBBABA8AA77688667AABAAAB868844464477AA77 + 7AAB87AA8C348AAAA8ABA7437AAA7ABBBABAAAA87688667AABAAAB8778434444 + 788A767ABA87AA8C338AAAA8ABA52125592122202463333C003CC8DD88D8A9B1 + EE00EEE1B487887788887DCCD5335532121599AA5AA947ABBA67ABBABB8ABA66 + 6866688688AAA677646446667A8637A8778AA63346A8AA6AA847ABBA66BBBABB + 8ABA767A7668A7AAABA778666644678A8637AA878AB83347AAAA7AA867ABBA66 + BBBBBB8ABA768A767AA7AABBA788766646678AA647AA888AB83367AAAA8AA867 + ABBA66BBBBBB8ABA768A767AA7AABBA788666646678A8636AA878AB83367AAAA + 8AB525ABB92127656677D6DDCD788887787885B1EE00EEE1B5D78DCD8888A87D + D326548851125AB94AA8876AA6467AAAB8678A748A87674446AA87867A876466 + 7AA64367767ABBD3336AB86AA8866AA6467AAAB876AA768AA6684447AAA8A77A + A866668AA64477777ABB83337ABA7AAA876AA6468ABAB876AA868AA7686467AA + AAA87AA866668AA64467777ABB83347ABA7ABA876AA6668ABABA77AA878AA768 + 4447AAA8A87AA864668AA64467777ABB83348ABA8AA96229A112278676884CDD + 78A8888DCD87D4B1EE00EEE1B9D888DD8A8AAA8DD03622876121118A9ABA8636 + 84334468A86668878AA76733346788A77AAA87677AA866667767BBA63336AA8A + BA843483334478AA667887AAB88733446788A87BAA87778AB866667767BBA733 + 36AAAABAA7368333446AAA667888ABB8883344778AA87BAA87678AB867678768 + BBB63336AAAABAA7348303447AB8777A88ABB8884344778AA87BAA86677AB766 + 667767BBB63336AA8AB8951151111154547844D78AAA8A8DD888D7B1EE00EEE1 + B6DD88DD7AAA888A7325223575111116ABABBA7643030346A77688777AA7A843 + 444788866778AA66687868776777ABBA430048ABABBA7443030036A8768A888A + AAA84344678AA6688AAA76787868877777ABBA630348ABABBA66C3330336A776 + 8A888AAAAA634468AAA7688AAA76788868877877ABBA63004AABABBA76433303 + 47A8778AA88AAAAA434467AA87688AAA76787867877777ABBA43004AABABB952 + 1111111243676D8A888AAA7DD78D67B1EE00EEE1BDDDD7DDDDAA888885252252 + 655512122689AAA777A73333666446444788BA63346678666766777666744776 + 676778A88643344788AB8777A833336666664467A8BB743467A8776766778667 + 864876676778BA87333467AAAB8888A830336666464467AABB744467A8766767 + 77867774487667687ABA87433467AAAB888AA833337766666467AABB64347788 + 77676677866674487667777ABAA743366696BA5525A1112155364D8A888AA7DD + D7DD46B1EE00EEE1B6C0CDDDDCD88D78733212120155512122566AABBBBB7434 + 476443334446A886436766667764678888846877763446A77A733333666AABBB + BB7434676444444647AAA74468666678767788AA844877863436A87A74333366 + 6ABBBBBB7333476444444666AAA744787667786667888884487786C446A88A74 + 4433666ABBBBBB8433676444444667AAA744687666776677888A844877763446 + A88A7444305219ABBBB52112253644788D88DCDDDDC0C6B1EE00EEE1B5D000CD + 44DD8D4D4332212122251215222467ABAAB8864448866664444667A844444464 + 6778776788876768A74337A7675366334446ABABB8873448866766444668AA64 + 4646666778887888A76868AD4437A8886467434466ABABB7763348A667644446 + 68AA644646666878887788A7686AA74638AA786467434667ABABBA864468A677 + 66644668BA644644666878776788876868AD4437A87864674222229A9BB22121 + 20233378DD87D4DDC000DDB1EE00EEE1B87DC00CDD777CD87300201222952115 + 96543347447A76434676676664784488646433444678876778A67A78BAAA6ABA + A7454886443346448A664046777866768A66AA76744344678A876888A78A8ABB + AA7BBAA7646A87663346347B654236767866668844AA766634446788876888A6 + 888ABBAA8ABAA86678A7643347448A774347777876668A66AA76763434668887 + 6778A6888ABBAA7BBAA76678A52221121222121212020D88DCDD7D4C00CDD7B1 + EE00EEE1BDD7C003CCDDDCD8884335445191522596565478849A887447446646 + 878A643446AA45444677A8AB88AAA8ABBBBBABA9A68756A766446A867B888436 + 535667878B764668BA66446678AAABAAAA8AABBBBBABA8A7A847A8663478946B + 886336436667878B753568BA64466678A8AB88AAA8ABBBBBABAAA7A848A87644 + 7A867B878447656667A7AB743468BA44646677A8AB88AAA8ABBBBBABA8A7A839 + A6521255515212222333C8A8DC7DDCCC00C8D9B1EE00EEE1B5D88C000CDDD333 + 687632C5225259126967768A7787AAA7464333366667633326BB6665453788AA + AAA876ABBAA9AA67748A648767868A8788ABA7564033367778744447BB887644 + 488AAAAAA8878BBAA8AA7886AAD68878869A8787AAB6564033367678733337BB + 878443478AAAAAA8768BBAA8AA78768AD6887886AA88A8ABB747533337767875 + 3336BB777443478AAAAA8A778BBAA8AA79868A4486555159549225522354788D + CCDDDC000C88DCB1EE00EEE1B6788DC033CDDDC36447221122915B99A9453536 + 35879AA66963443664467665038A76662033768A67876666AA66945A959BAAA7 + 65434646A88AA7675053266567A87634AB8888434687AA88A86667AA67866AA4 + 8BBABA74335425A79AA66653433665468775238B89775335768A69975456AA66 + 966AA4ABBABA76444635A88BA7694343366466A775238B98773336768A78A744 + 66AA66756A858BBAA95221211191123222C6D68DCDDDC3033D8876B1EE00EEE1 + B77DD8CC0DCC78887337522212A55ABBA855473226A504967A8A7447A648BAA7 + 226A96677965598998A853336A66A75AB67BBBBA647A6337A636897AAA7539A7 + 6ABBB8448AA888AA8668AA88AA64447A87A86AB7ABBBBA777A4226A506867AAA + 9457A75ABBA8358AA878A87449A966A743536A77A86AB7ABBBBA768A6007A536 + A78AAA9457A75ABBA9329AA778A87568AA77A864437A77A86AB68BBBBA211911 + 21A112212478DD88887CCD0CC78D77B1EE00EEE1B6D888D0CDD3C7D763254532 + 22A21BBBBBAABBA65685236578A874667458BBA934568969A8B656AAAA976455 + 569ABBABA25BBBBBABBBA77AA605646AAA6566866ABBBA687AAAAAAAB898AABB + A88766788BBBABA46BBBBBABBBA767B322656AAA6466865ABBBA5658AA98AAB7 + 78AABA896645579BBBABB44BBBBBABBBA978B405656AAA6366945ABBBA5667AA + 99AAB768AABAA87666678BBBABA55BBBBB9BBB9215A1112126774C8877CCDDC0 + D878D6B1EE00EEE1B7778DD834C0CC0C63032330129129BBBA55BBBA8BB42223 + 67694330535657A622559B655996659AABAA99766956BB9AA22ABBBB67BBBAAB + B703359969320055688AB86668AB8878A987AAABBAA8888877BBAAA55ABBBB96 + BBBA9BB722256968502355697AB725499B896989779AABBA99979866BBAAA54B + BBBB98BBBAABB820254969322253596AB725579B766989779AABBA89869966BB + 9AA52ABBBB55BBBA9BB1111226443C7C0CC04438D78777B1EE00EEE1B9CD7DCC + DCC3C303D003312223521152952589755ABB8A99AAA8652555542AA522256522 + 5655256669BA9AA59A62265A9222556655AA967BBBBBA9AABA652256693AB645 + 679755798766988ABAAAB7AB72396A8405759726AA956BBBBB89AABA92225666 + 2AB522266522596555596ABA9AA69B52296A9424659755AA955BBBBBA6BBAB52 + 2225552AB522559625576545679ABAAAA68B62276A922265551299511BB84322 + D7D330D303C3CCDCCD7DCDB1EE00EEE1BD00C03C3CDDCC0CD000222552112122 + 1559895225AABBAAAAABA87422555AA6525252225A62222559ABAAA2AB512555 + 2121255579A87554BBBBABBBBBBAA935666BBA756565358A94566688BBBAA5AB + 6206972222255569A96225ABBBBABAABAA8522555BBA655252229A92225259AB + BAA2AB622669222225556AA96525BBBBBBBABBBAA922555BBA655552229A9225 + 5569ABBAA5AB5225692111221559952121A8888888600CDC0CCDDC3C30C006B1 + EE00EEE1B7C0037C33CDDC3DDC0022223259521522559AB8522555558559ABB5 + 22225BBB85555522A9A52222259929525A9295A559525555689BBA5525D656A5 + 58BBB525526BBBA6989955AAA5566559A839656A9595A659555552569BB95225 + D5599558BBB512225BBBA9599622AAA52222259D15525A5595A669525552699B + B852259559A55ABBB522225BBB99599522AAA52552569629559A9595A5595215 + 12155BB9121212222000CDDD3DDCC3CC7C00C9B1EE00EEE1BAAD0CDDC00C8DCD + A8D3222222A99555122526BA952212259559AAB547211589955A9822589A9959 + 5592252952225969A9A95525555DBBA52212299569ABB99A2229AAA99AAA559A + ABA9986685595655255969BAA965225529BB85221225A55A9BB96A2115AA9569 + A9226AAA99552592255552225969BA9955225529BBA5212225A598ABB99A2115 + AA9D5AA9125AAA9955559526555522D999BA9555121215BA91212122003DDAAD + CD8C00CDDC0DAAB1EE00EEE1BAAADDCDCC00A8D7AA8742222199595522221225 + 5AB55598AAAA8BB9BB512225222685555599AA95256252255255125299595552 + 2521259AB5658AABAB9BBABB9122255259A956699AAAA9599555569252229299 + 9959222222155BB5559AABAB9BBABB912225225999555599A995255122255225 + 2292999956122212159AB655ABABAB9BBABB5121052145A5525599A999259252 + 2562251252565955211111125BB1222203888AADD8A000DCCDDAAAB1EE00EEE1 + B8AA88D887CDAADDDDCD422222252555121221222AA522589579AA59BB952212 + 221595599996A9AA5552212595522955222956552222222BB522989D9A9B59BB + A552252129A6599999B9AA5655222996552955252955521221222AB52259A69A + AB59BBA552152219A5599995A9AA1522212955515955222955221221222BB522 + 98A6A9AB69BBA551152115A5599996A9A9252221299952295521295511111121 + 1AB22220037DDDDDDAADC888D88AA8B1EE00EEE1B78AA8AAAA78AA8DC0034020 + 579519999415555212851211102555215A85922552255558A559A9BAA9956555 + 9655269A951699AD29965212A52112112555215BA9922D5259995AA699AABBA9 + 9665599692559A9529999516565122951221122555215AA6912552259559A559 + 9ABAA995555595D2269A941999A515665122851212122555125BA59015522555 + 2895599ABAA99655556562259A951555A215551111921222204C00CD8AAADAAA + A8AA89B1EE00EEE1BA78AA8AAA8AAAAA8CD88745665067220124212122762221 + 2111221212122122222C26622246388668788862255525562266222124222222 + 7722211111121211212211122546D21265278867732367572111211212254522 + 212211565512212221112222525526222157775755885CD22277561112112122 + 234222121212566521211212211022415D252112575652222222222332221211 + 2225652231251211126456555777DC8AAAAA8AAA8AA889B1EE00EEE119AD7D4C + C478DDAAA87885446535752221222222222302122122122212225212212112C2 + 2222212224238A72266222432065212122012222222211121111112212521212 + 1211512212112210222265222121125545253212222112232222112111211121 + 2255525112587212112112122232222121225345253221221212232022121212 + 11211122211121115222212112454733322221211122222222222112226D4687 + 66A8D7AAADD87C4C4D777A11EE00EEE11B8DCCC0000000D8DC00002202002322 + 2222212221212221050122225522423222222122221211211221243222112112 + 2223021222121221212212232121225522522121211222112111112101235212 + 1211226256622121222121212221221212121221222121212122211111111212 + 1252121211226557620212230221212202222121121222122212112122122222 + 2354266D221121112122112121122220312230330000CCD8D0000000CCCDAB11 + EE00EEE91BA8DDDC03C0000CC000222222224842212222120212202237302222 + 0022222023672258602022122212122221211211225852212121212212222156 + 2222222222122222662126522221212212586252212121212222211244222212 + 1222121212225831112112112121111212112212586252222212122202012245 + 2222222222222222225822112122022522265322222222222222222112122222 + 1212012266202020000000C00000C30CDDD89B19EE00EEEB1B988A87C0D7C000 + CDCC000022224640202002222536673230334022222220220448844886387321 + 0221222022122121123542222202223556662202222212221122210338622674 + 5742225522575488222112111122122442223547655222213502562222121121 + 2122122651025222775488522221121122122440225447763200223D00460222 + 225635652278463221221122223522222225523222223222343200000000DCC0 + 00C7D0C78A8AAB1BEE00EEEB11BA888DC3D8A8C0D78DCCC30022247746567866 + 4888765002223400022224322033332044676322057322244322322222236DD4 + 5678655888745222222322211220221222221222345022452222222322222211 + 12212023222254A8884678554648742222200222552125840212455222222C20 + 21222112220320322046A8886678D447D88422222C4453222220202222021222 + 2233222252555864775467466400000CDCCD87D037A8D3CD8888A11BEE00EEEE + 91B888887DD7AADCD8A88AADDC002588A774788448A86334C03368D3C0222330 + 00022222046DD7D344A83336864884432224AAA886788448A842233202384032 + 21222222222121222555367632222121221220121222483202043468A8238866 + 87AAA4122244AA46842227752206D6422221212222201121004832503D447888 + 448A87A8AAA42223467643022121222203022222573202342547665387448A8A + A7000D7DAA88A8DCDAA7DD78888AB11EEE00EEEEE1BAA8AAAA8D8A8D888A78A8 + 78D3037886533883048874D8844DD7C78832203200020003CD78AA8ADC887447 + 884AADD740037AA6432783048860387333473D88021222122122222255787887 + 6022122212212221078D382020873368830387344388602204DDAA4886626840 + 3888A66022222222222222088DC7503C8834DAAD34884DD68A7302364A877430 + 22222212022037843744337633686303662347A87C0CD888AA78A88D8A8D8AAA + AAA9B1BEEE00EEEEB11BA888AADCDADDDD7DC8AA8D7DCDD68330366003478DDA + A74CC888A88DCCD00C0CDDC3C48878AAD34AD44D64378AADDDCCD78402346023 + 36744A86333888A883003000000000036656744660222020222202008AAA88C0 + 37AACC7D302044002274300443AAAD0364304A323A874660022030000200038A + A888D337AADD7DC30C7733338D433D4488777C4034C0000030338A8778C43788 + C466330366302C8DDDD788AAA8CD7DDDDADCDAA888AB11BEEE00EEEEE91BB977 + 8A8038C00CCCCDAAA77888DCD300043033477D8AADDD8AAAAAAA8AAAAA888DDD + C3C4D78A83C8C3034304AAAD88A7DCD30003320006737A8D448AAA8AAAD888AA + 878C300030046322020003DD488888DA8888AA8C4CAA8CDD300030002030CDA8 + D4AAA30330203D007AD40000000DDDD8A888DA888A8A8DDDAA8D88DC30CCC30C + DCD7A8D4AD44403CCD8888AA88D88888888446A8847743304CC30CD4D8888DAA + ADCCCC00C8C08A8777AB1EEEEE00EEEEEB11B8877A8CD88C00C0C0DAADDD88D4 + 33C330033448DDDAA8D7888888AA88AAAAA88A88D3CD7DDA8DDA8D3CC300CAAD + DD8ACCCCCC30000337D3DA8DDDD88888A88DAAAAA88A873003D4DC30000DD88D + AAAAAD78A88887DDCD8AD0C83300000000C338D30DAA300000008ACC8ADDD300 + C88A88AAAAA78AA888787D4DAADCD84DCC00CCCCDCCADC3DA46D33D88A88AAAA + A8788888888DDD8863D8DCC300CCCCDCD88DD8AAD003C00C88DC8A777AB11BEE + EE00EEEEEEE1B7444DDDAAA8CCCC000DAD0C88D7DDDDC33D30CCC0D88DDDDD8A + 8DAADCD8AAA88A8A8DCCCDD8D8AAA8DDDDC0C7A7008AC88DDDC3CD303CC0C88D + CCCD8ADD8AD038AAA8D88A8000000C000C887DD7AAA700CA8DD883303D77C003 + 003D000DDCDDCAD00D8D00033CD8AAADDD0300038A88D8AAA800CA8CDA8CCCCC + 88C0CCC0C7CCDDDDD8DA800C8CCCCC8AA888AAA8CCDA8D7A8CDDDD78C0CCC0C7 + CCDDDDD8D88CCDAD000CCCC8AAADDD4469B1BEEEEE00EEEEEEB11B976747AAAA + AAD88CCC87DC78888788DDD6000C3CDD88DDD8AA8D8ADC0088A8888AADC0D8D8 + DAAAAAAA888DDD88DD8AAAA8AA8DDD300C00CD87DCD88A8D88D000D8888D8A8C + 00CDDDC00C8ADD8788D000C88CDA880CCDDD0000000DDCDA888A88DCCD7C3C88 + DAAAAAA8C7DDC00CAADD8888D020C88D78A8CCC87DC00000CDDD8A88AA887CC8 + 88D0CDAA8D8888800CD88D8888DCD8DDDC3C00CD7D8AA8AAAA7DD88CCC88DAAA + AAA747D79B11BEEEEE00EEEEEEEB199AA733AAAAAAD7A8DC7ADDD78D7AAA8DDD + CCCCCCDD888CCD888D88A700CD88A8DAADDD8AAADDAAAAAA88AADD8ADDD8878A + AAAD88DDCCC3CD78DC0D88DDD8AD00CC8888D88D0C7AAADDCD88C8878C000CA8 + DCDDDC00D7DC000CCCCDDDAAAA8D88CCD8DCDAA8DAAAAAADC7AA8CCDA7C8887C + 000CA8DDD78C00D7DD330CCCD78DAAAA8D88DDDADA87D7A8DAA8ADC00DAA7D88 + 8D3C888DDCCCDCD7DDAAAA8D88DDDADCDAA7DAAAAAAC37AA991BEEEEEE00EEEE + EEEE91EA83034DA8A73C88DC8A8DD8CCDD8A8787D887CCCDD88DCCD7DDD8AADC + CCD8A8D8A887D88DCD78AAA8D88A8D8A8DD8DCCDAA888D788DCCCDD88D00DDDD + D8AAD000C8A8D888DCC787CDD887D7A8C000CAA7CCCCC00CD7CC000D88DD8D88 + 8C300DCC8A7CD87DD7A8A7DC03883CDD88D7A8C000CAA74CDCC00387DC30CD88 + 7D8D8AADCCC7DD8A88DD88A8D8A8DCCCDAA8DD77DCCD88DDCCDD8AD78888ADDC + D8DD8A8CD87C3DA8AD432399B19EEEEEEE00EEEEEEEEB91B9222203D8634C77D + 8AA7D7000CDDD787DA88DDDD78A7DDDD7DDDAA8D000C8ADAA88D0C800CCCD8A8 + 77D8888AAD87C03CDDD8A7DA88DCDDD8ADCCDCDDCDAA8C000C8A78A88C00D00D + 88AADA70000CDAAC0CC33CCDA8CCCCDD78DD8DDDC0000DDDAA8D77DDDD87C000 + 20D00C88A8D870020C7AAC0DC33CCDA8DDCCD78ADDA77DCC000DDDAA8C0D88A8 + 888C000D8AA7DDDDDDD8A87DDDD88A7DA777DC300D8DAA8D77D436863222229B + 19BEEEEEEE00EEEEEEEEEB11B52212207343777DDAA8A8C03CCD887DD77888DD + D8D7D87DD7D78AA8D00038AAAAA8DDC000003D87DD88877AA8A8C0CCC7887DDD + D888DCDDDDCDDDCDCD8AA830000D8A8AA8C00CC8AA8A8D000008AA7CCCCCDD0C + DDC3CD77DD3C778D000008A8A8DD777CDD7C00200000C8AA8A8D022007AA7CCC + 3CD4044DD3C777DDCD777DC000C8A8AADCD8AAAAA83000C8AA8DD7DD8DDD78DD + D8887DDD888DCCC0C8A8AADD77D34C70222225B11BEEEEEEEE00EEEEEEEEEEB1 + 1BB92222000003000677AAD00CD78DDDCDCDDDDDDDDC0DDDDDDDD8A87DC00CCD + 87AAD7D8A70000DDDDDDC3C787AAD00CDD77DDCDCCDCDCDDDC0DDCCDCDCDA8DC + 00000C7DAADDDDDA8DDDC0000CD7ADCC0C03CC00CC33DCC30C3CCDDD3000CAA7 + 7D003C0003C0002DADCDDAAD7C002203D7ADCC0300C4004333444C3CCCCD7DD0 + 00CAA77D077AA78DCC003D78A8DDDDDDD7CCDDDDDDDDCDCDC787D300DAA77600 + 03000202221DAB91BEEEEEEEEE00EEEEEEEEEEEE11B9521220022020233C888D + 30DDC3CDDDDC4DD7D87CC7DDDD000C87D7D00000CDC8AAAAAAD000CDD303030C + CD888D30DDDCCCDDCCCDDD77D00DCCD000008DD7D00020003DAAAAA8CCC00000 + CDCD800000CCCD00DDDCDC300DCCC0CD300D7780000000000C0020CAAAAAA700 + 0020003734802020333400DDDDD4C0C44C3CDDC00D788C000AA8CDC00000D8D7 + 8C000DDDD73CD877DDCCD7DDC3CDD03D888C332020220002122BB11EEEEEEEEE + EE00EEEEEEEEEEEB911B95222460033000033788C33C33C3DDDDDDCD8D8DCDD8 + 8DCC0D8DD7C0CD000C3D8A8AA77400C77DDDDCCC3CC788C3CC0000CDDDDC3CDD + 7C3DCD8C000C8CCD003C00000C7A8A8C00000DC00DCD7C000C7DCC00DDDCCCCD + 3C30000000C78D00000CC4307D0003DDAA887300220332040CD320007D33006D + 440C4D3430300C00C88DC3000A84CC000DC0C7DD8D0CCD87DDCD8D7DCDDDDDCC + C33CC3C88733000033006422259B119BEEEEEEEEEE00EEEEEEEEEEEEEB11BB51 + 20003623336D3378DCD300003DD77CCDD7DDD8DDA888C8A87DC3C77DC3000C0C + DADD000DDDD7C4CCD7CC88DCC300000CDDDC3CCDDCDDCDA887CDA8DD303D7300 + 22000C0000CDDDC00D7787C7888DCD43DDCD03DD4C0000003CC77307D33C4DC3 + 330203CAD0030220036D300377A73D78AD3443D60403D443020000C3487C07D0 + 0C0003CD77C3CD78A8C88A87D7DDD8DDCC77DD300000DCD7730D633326300021 + 5BE11BEEEEEEEEEEEE00EEEEEEEEEEEEEEB111B125222003647A400037A80300 + CCCDDD78DD887D8AAAAA8A878D7D0C8DC300477C7ADDD00D30C4347D7AD30037 + A8000033CDDDD8DD77DD8AAAAA8A877CD40C733000CD77D00CCD8D0C7D7D8A7A + A8AA7DD78DD77DD430000008A733204A83640C300300DDDAD3D7C000047C2C60 + 767878AA8A74467D38DDD430000008A830034A73D74003DD8C0D7D878A8AAAAA + 87788DD87DDDCCC00008A7C0004A746300022251B111BEEEEEEEEEEEEE00EEEE + EEEEEEEEEEEB911EB5522223334DD0000DAAD4D3000DD788888DDC7A888D88DD + DCD830DDDDDC787D7D8AA70D300004DCD7D0000DAADD40000CD788777DDCDA87 + 7D783C4CD700D4444347787CD7D7D0C8DCDDD78D87887CC777778DD300036DDA + A60000D834CD0202040DA88D86D763D60D4207D03437748D8863446777764C02 + 00DDDAAD0200D743387CDDCDD038DCDDD88D888A7CDD788887DD0003DDDAA600 + 00DD4333222159B9119BEEEEEEEEEEEEEE00EEEEEEEEEEEEEEEEEB111BB15523 + 30347D4300787DDD0000CC7DDDDD33CC88CC4CC86378888DD300030C7D7AA44D + 303004C34D7DD3007A7D440200CCD7CDDD0033883CDC38D3DA778D3000033D30 + 3CD7888A7C77D4D338843003D4C774400006DD78800C6D73334400000C4D8A7D + 80240020367D7860D733402783002343076330020D47DA7000DD7430330003DD + 878A73D8CC4CC88CC036DDD77CC0000DDD7870034D7430535551BB111BEEEEEE + EEEEEEEEEE00EEEEEEEEEEEEEEEEEEBB111EBB559907AAA62357966796453569 + 6677420267667547A67AAA88664602069D0686679772358638AA872357966676 + 6535793676302057666659A478AA8853662220476668AAAA97A8667558623556 + 96679653579767989357AAA9379653698965762585022653388AAA75A9366558 + 22225563267650567666796327AAA936900656688AAA76A74676686023477667 + 7643679666796327AAA759A51BBE111BBEEEEEEEEEEEEEEEEE00EEEEEEEEEEEE + EEEEEEEEBB11119EBB99A9A955599999999959999995555559999A999559A9A9 + 999A95599512555999555595599A9955599999999559999995555555999A9995 + 59A9A9999A959999A99A9A9A559999A999555559999999599999999959599A99 + 5595959999959125995599A999A9A9229999A995152555999995599999999955 + 599A99559599A999A9A9559999A995555555999995599999999955599A9A5BBB + 91111BBEEEEEEEEEEEEEEEEEEE00EEEEEEEEEEEEEEEEEEEEEEBB911111BBBBBB + BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB + BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB + BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB + BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB + BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB111119BBEEEEEEEEEEEEEEEEEEE + EE00EEEEEEEEEEEEEEEEEEEEEEEEEBBB91111111111111111111111111111111 + 1111111111111111111111111111111111111111111111111111111111111111 + 1111111111111111111111111111111111111111111111111111111111111111 + 1111111111111111111111111111111111111111111111111111111111111111 + 1111111111111111111111111111111111111111111111111111111111111111 + 111111111111119BBBEEEEEEEEEEEEEEEEEEEEEEEE00EEEEEEEEEEEEEEEEEEEE + EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE + EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE + EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE + EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE + EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE + EEEEEEEEEEEEEEEEEE00EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE + EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE + EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE + EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE + EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE + EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE00} + Mask2 = { + C003000020000000010000003A000000A0030000040000000200000064010000 + 030100001A000000020000004E01000003000000170000000300000051010000 + 0400000015000000040000001B000000050000001C0000000400000053010000 + 050000001300000005000000170000000600000018000000050000004F010000 + 0600000050010000050000005501000006000000120000000600000056010000 + 0700000010000000070000001300000008000000140000000700000058010000 + 080000000F0000000800000059010000090000000E0000000900000056010000 + 0A00000057010000090000005A0100000A0000000C0000000A0000005C010000 + 0B0000000D0000000B0000005B0100000C0000000B0000000C0000005D010000 + 0D0000000A0000000D0000005E0100000E000000090000000E0000005F010000 + 0F000000090000000F0000000A000000100000000B0000000F0000005F010000 + 1000000008000000100000006001000011000000070000001100000061010000 + 1200000008000000120000006101000013000000060000001300000062010000 + 1400000006000000140000006101000015000000050000001500000063010000 + 1600000006000000160000006301000017000000050000001700000063010000 + 18000000040000001800000064010000EB00000005000000EB00000063010000 + EC00000004000000EC00000064010000ED00000005000000ED00000063010000 + EE00000006000000EE00000062010000EF00000005000000EF00000063010000 + F000000006000000F000000061010000F100000006000000F100000062010000 + F200000008000000F200000061010000F300000007000000F300000061010000 + F400000008000000F400000009000000F50000000A000000F400000060010000 + F500000009000000F50000005E010000F600000009000000F60000005F010000 + F70000000A000000F70000005E010000F80000000B000000F80000005D010000 + F90000000D000000F900000059010000FA0000005A010000F90000005B010000 + FA0000000C000000FA0000005C010000FB0000000F000000FB0000005A010000 + FC0000000F000000FC00000059010000FD00000011000000FD00000058010000 + FE00000012000000FE00000055010000FF00000013000000FF00000055010000 + 0001000015000000000100005301000001010000170000000101000018000000 + 0201000019000000010100004F01000002010000500100000101000051010000 + 020100001A000000020100001B000000030100001C000000020100004E010000 + 03010000} + end + object Button1: TButton + Left = 120 + Top = 240 + Width = 121 + Height = 17 + Caption = '&Cerrar' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + TabOrder = 0 + OnClick = Button1Click + end +end diff --git a/src/FormularioREUSABLE.h b/src/FormularioREUSABLE.h new file mode 100644 index 0000000..ffb1576 --- /dev/null +++ b/src/FormularioREUSABLE.h @@ -0,0 +1,27 @@ +//--------------------------------------------------------------------------- + +#ifndef FormularioREUSABLEH +#define FormularioREUSABLEH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "CoolForm.hpp" +#include +#include +//--------------------------------------------------------------------------- +class TFormREUSABLE : public TForm +{ +__published: // IDE-managed Components + TCoolForm *CoolForm1; + TButton *Button1; + void __fastcall Button1Click(TObject *Sender); +private: // User declarations +public: // User declarations + __fastcall TFormREUSABLE(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TFormREUSABLE *FormREUSABLE; +//--------------------------------------------------------------------------- +#endif diff --git a/src/Instalador.cpp b/src/Instalador.cpp new file mode 100644 index 0000000..d29141b --- /dev/null +++ b/src/Instalador.cpp @@ -0,0 +1,47 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop + +#include "Instalador.h" +#include + +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TForm1 *Form1; +//--------------------------------------------------------------------------- +__fastcall TForm1::TForm1(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TForm1::Image1Click(TObject *Sender) +{ + char zFileName[80], zParams[80], zDir[80]; + ShellExecute(Application->MainForm->Handle, 0, StrPCopy(zFileName, "http:\\\\www.infdj.com"), + StrPCopy(zParams, ""), StrPCopy(zDir, ""), SW_SHOWNOACTIVATE > 32); +} +//--------------------------------------------------------------------------- + +void __fastcall TForm1::Button2Click(TObject *Sender) +{ + char zFileName[80], zParams[80], zDir[80]; + ShellExecute(Application->MainForm->Handle, 0, StrPCopy(zFileName, "Guardian.exe"), + StrPCopy(zParams, ""), StrPCopy(zDir, ""), SW_SHOWNOACTIVATE > 32); +} +//--------------------------------------------------------------------------- + +void __fastcall TForm1::Button1Click(TObject *Sender) +{ + char zFileName[80], zParams[80], zDir[80]; + ShellExecute(Application->MainForm->Handle, 0, StrPCopy(zFileName, "Control.exe"), + StrPCopy(zParams, ""), StrPCopy(zDir, ""), SW_SHOWNOACTIVATE > 32); +} +//--------------------------------------------------------------------------- + +void __fastcall TForm1::Image2Click(TObject *Sender) +{ + ShowMessage( "Si necesita crear una distribución\ndel Guardian en discos, copie el\nfichero GUARDIAN.EXE manualmente." ); +} +//--------------------------------------------------------------------------- + diff --git a/src/Instalador.dfm b/src/Instalador.dfm new file mode 100644 index 0000000..f04f1f4 Binary files /dev/null and b/src/Instalador.dfm differ diff --git a/src/Instalador.h b/src/Instalador.h new file mode 100644 index 0000000..c17cfa6 --- /dev/null +++ b/src/Instalador.h @@ -0,0 +1,39 @@ +//--------------------------------------------------------------------------- +#ifndef InstaladorH +#define InstaladorH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TForm1 : public TForm +{ +__published: // IDE-managed Components + TImage *Image1; + TBevel *Bevel1; + TLabel *Label1; + TLabel *Label2; + TBevel *Bevel2; + TButton *Button1; + TLabel *Label3; + TLabel *Label4; + TBevel *Bevel3; + TButton *Button2; + TLabel *Label5; + TLabel *Label6; + TImage *Image2; + void __fastcall Image1Click(TObject *Sender); + void __fastcall Button2Click(TObject *Sender); + void __fastcall Button1Click(TObject *Sender); + void __fastcall Image2Click(TObject *Sender); +private: // User declarations +public: // User declarations + __fastcall TForm1(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TForm1 *Form1; +//--------------------------------------------------------------------------- +#endif diff --git a/src/Install.bpr b/src/Install.bpr new file mode 100644 index 0000000..4a35b59 --- /dev/null +++ b/src/Install.bpr @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=3082 +CodePage=1252 + +[Version Info Keys] +CompanyName=JD Soft +FileDescription=Visualizador de ficheros +FileVersion=1.0.0.0 +InternalName=recolector +LegalCopyright=JD Soft. 199x-2000 +LegalTrademarks=JD Soft. +OriginalFilename=Recolector.EXE +ProductName= +ProductVersion=1.0.0.0 +Comments= +url=http://www.jd.infdj.com +e-mail=jd@infdj.com + +[Excluded Packages] +c:\archivos de programa\borland\cbuilder6\Bin\dclite60.bpl=Borland Integrated Translation Environment + +[HistoryLists\hlIncludePath] +Count=2 +Item0=$(BCB)\include;$(BCB)\include\vcl;D:\JDsoft\PrjTPVwin\VCLs\include +Item1=$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=3 +Item0=..\prjtpvwin\vcls\lib;$(BCB)\lib\obj;$(BCB)\lib;D:\JDsoft\PrjTPVwin\VCLs\lib +Item1=$(BCB)\lib\obj;$(BCB)\lib;D:\JDsoft\PrjTPVwin\VCLs\lib +Item2=$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=..\bin + +[HistoryLists\hIBPIOutputDir] +Count=1 +Item0=..\obj + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + + \ No newline at end of file diff --git a/src/Install.cpp b/src/Install.cpp new file mode 100644 index 0000000..d6bda80 --- /dev/null +++ b/src/Install.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Install.res"); +USEFORM("Instalador.cpp", Form1); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TForm1), &Form1); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/src/Install.res b/src/Install.res new file mode 100644 index 0000000..74d46d2 Binary files /dev/null and b/src/Install.res differ diff --git a/src/ReajustarDinero.bpr b/src/ReajustarDinero.bpr new file mode 100644 index 0000000..25f2251 --- /dev/null +++ b/src/ReajustarDinero.bpr @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=0 +Build=2 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=3082 +CodePage=1252 + +[Version Info Keys] +CompanyName=JD Soft. +FileDescription= +FileVersion=1.0.0.2 +InternalName= +LegalCopyright= +LegalTrademarks=JD soft. +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= +url=www.infdj.com +e-mail=jd@infdj.com + +[Excluded Packages] +c:\archivos de programa\borland\cbuilder6\Bin\dclite60.bpl=Borland Integrated Translation Environment + +[HistoryLists\hlIncludePath] +Count=2 +Item0=$(BCB)\include;$(BCB)\include\vcl;..\VCLs\include +Item1=$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=3 +Item0=C:\VCLs\lib\;$(BCB)\lib\obj;$(BCB)\lib;..\VCLs\lib +Item1=..\..\..\..\VCLs\lib;$(BCB)\lib\obj;$(BCB)\lib;..\VCLs\lib +Item2=..\..\..\..\VCLs\lib;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=1 +Item0=..\obj + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=..\bin + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + + \ No newline at end of file diff --git a/src/ReajustarDinero.cpp b/src/ReajustarDinero.cpp new file mode 100644 index 0000000..a201c56 --- /dev/null +++ b/src/ReajustarDinero.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +USERES("ReajustarDinero.res"); +USEFORM("Unit2.cpp", Form2); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TForm2), &Form2); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/src/ReajustarDinero.res b/src/ReajustarDinero.res new file mode 100644 index 0000000..e210b70 Binary files /dev/null and b/src/ReajustarDinero.res differ diff --git a/src/TStatus.cpp b/src/TStatus.cpp new file mode 100644 index 0000000..ad59c41 --- /dev/null +++ b/src/TStatus.cpp @@ -0,0 +1,328 @@ +//--------------------------------------------------------------------------- +#include +#include +#pragma hdrstop + +#include "TStatus.h" +#include "CtrlPPal.h" + +#include "CtrlElemento.h" +#include "FichasClientes.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "CoolForm" +#pragma link "DigitNum" +#pragma link "FormularioREUSABLE" +#pragma resource "*.dfm" +TStatus *Status; + +#define Comienzo TbElementosCFG->FieldByName("Comienzo")->AsDateTime + +#define pTiempo TbElementosCFG->FieldByName("Tiempo")->AsDateTime +//--------------------------------------------------------------------------- +__fastcall TStatus::TStatus(TComponent* Owner) + : TFormREUSABLE(Owner) +{ + // CtrlPPal->TbElementosCFG->FieldByName("NumElement")->AsString + " --"; + + TbPrecios->Active = true; + TbHistorial ->Active = true; + TbElementosCFG->Active = true; + +// TiempoPedido->DateTime = 0; +// TiempoPedido->Time = 0; + + ltime2Click( 0 ); +} +//--------------------------------------------------------------------------- +void __fastcall TStatus::SetElement( TElemento *Elto ) +{ + Elemento = Elto; + + Terminal->Caption = "Terminal número: -- " + AnsiString( Elemento->NumElemento ) + " --"; + + if ( CtrlPPal->ServerHook ) return; + + if ( ! TbElementosCFG->Locate( "NumElement", Elemento->NumElemento, TLocateOptions() << loCaseInsensitive ) ) + ShowMessage( "ERROR, EL TERMINAL NO SE ENCONTRO!!\nAPPLICATION MALFUNTIONNNN Granted" ); + +// if ( ! TbElementosCFG->FieldByName( "Activo" )->AsBoolean ) + if ( Elemento->StatusCode == FREE ) + { + MasTiempo->Visible = false; + + Label2->Caption = "&Tiempo que pide:"; + Label4->Caption = "&Tipo de Conexión:"; + PrecioAcumulado = 0; + ActivarTerminal->Visible = true; + ActivarTerminal->Enabled = true; + TipoConexion->Enabled = true; + +// TiempoPedido->Enabled = true; + Edit1->Enabled = true; + Edit2->Enabled = true; + SetCliente->Enabled = true; + TbElementosCFG->Edit(); + Comienzo = TDateTime::CurrentTime(); + TbElementosCFG->Post(); + } else { + // El terminal está ocupado + unsigned short Hour, Min, Sec, MSec; + Label4->Caption = AnsiString(PrecioAcumulado) + " acumuladas."; + pTiempo.DecodeTime( &Hour, &Min, &Sec, &MSec ); + Edit1->Text = AnsiString( Hour ); + Edit2->Text = AnsiString( Min ); + Label3->Caption = Elemento->NCliente; +// TiempoPedido->Time = pTiempo; +// TiempoPedidoChange( 0 ); + MasTiempo->Visible = true; + } +} +//--------------------------------------------------------------------------- +void __fastcall TStatus::Time1MouseUp(TObject *Sender, TMouseButton Button, + TShiftState Shift, int X, int Y) +{ + ltime1Click( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TStatus::Time2MouseUp(TObject *Sender, TMouseButton Button, + TShiftState Shift, int X, int Y) +{ + ltime2Click( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TStatus::Time3MouseUp(TObject *Sender, TMouseButton Button, + TShiftState Shift, int X, int Y) +{ + ltime3Click( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TStatus::ltime1Click(TObject *Sender) +{ + unsigned short nullValue, h, m; + Time1 -> Brush -> Color = clRed; + Time2 -> Brush -> Color = clBlack; + Time3 -> Brush -> Color = clBlack; + + Comienzo.DecodeTime( &h, &m, &nullValue, &nullValue ); + Dig1->Value = h; + Dig2->Value = m; +} +//--------------------------------------------------------------------------- +void __fastcall TStatus::ltime2Click(TObject *Sender) +{ + TDateTime lleva; unsigned short nullValue, h, m; + + Time1 -> Brush -> Color = clBlack; + Time2 -> Brush -> Color = clRed; + Time3 -> Brush -> Color = clBlack; + + lleva = TDateTime::CurrentTime() - Comienzo; + + lleva.DecodeTime( &h, &m, &nullValue, &nullValue ); + Dig1->Value = h; + Dig2->Value = m; +} +//--------------------------------------------------------------------------- +void __fastcall TStatus::ltime3Click(TObject *Sender) +{ + TDateTime Queda; unsigned short nullValue, h, m; + + Time1 -> Brush -> Color = clBlack; + Time2 -> Brush -> Color = clBlack; + Time3 -> Brush -> Color = clRed; + + Queda = ( pTiempo + Comienzo ) - TDateTime::CurrentTime(); + Queda.DecodeTime( &h, &m, &nullValue, &nullValue ); + Dig1->Value = h; + Dig2->Value = m + 1; +} +//--------------------------------------------------------------------------- +void __fastcall TStatus::ActivarTerminalClick(TObject *Sender) +{ + int HorasP = Edit1->Text.ToInt(); + int MinutP = Edit2->Text.ToInt(); + // Una vez asignado el terminal a una persona, ya no le puede ser reasignado + // tiempo, ni puede cambiarse el usuario propietario de él. + + // Abrimos la tabla de ventas de mi otro programa + // Insertamos esto como venta: (Cliente | [TipoConexion+Tiempo] | 1und | PrecioConexionTotal) + // Cerramos la tabla + + if ( HorasP == 0 && MinutP == 0 ) + return; + + // Comprobamos que no se le asigne mas tiempo del que dispone en el bono + if ( idCliente > 0 && ClienteUsaBono && + ( HorasP > TBonoH || + (HorasP ==TBonoH && MinutP > TBonoM) + ) + ) + { + ShowMessage ( "Atención, al cliente: \n" + Label3->Caption + "\nsolo le quedan " + TBonoH +":"+TBonoM + " disponible.\nNo puedo asignar mas tiempo." ); + return; + } + + + // Desactivamos los controles... + TipoConexion->Enabled = false; +// TiempoPedido->Enabled = false; + Edit1->Enabled = false; + Edit2->Enabled = false; + + ActivarTerminal->Enabled = false; + ActivarTerminal->Visible = false; + + if ( ! CtrlPPal->ServerHook ) + { + // Activamos el terminal + TbElementosCFG ->Edit(); + TbElementosCFG ->FieldByName( "Activo" )->AsBoolean = true; + Comienzo = TDateTime::CurrentTime(); + pTiempo = EncodeTime( HorasP, MinutP, 0, 0 ); + TbElementosCFG ->Post(); + } + ltime2Click( 0 ); + + int idtc; + switch ( TipoConexion->ItemIndex ) + { + // Internet + case 0: idtc = 0; break; + // Juegos + case 1: idtc = 1; break; + // Otros + case 2: idtc = 3; break; + // Otros + case 3: idtc = 2; break; + default: idtc = 2; break; + } + + //////// ACTIVAMOS REALMENTE EL TERMINAL /////////////////////////////////// + Currency PrecioConexion; + if ( idCliente > 0 && ClienteUsaBono ) + PrecioConexion = -1; + else + PrecioConexion = TbPrecios->FieldByName("Precio")->AsCurrency; + CtrlPPal->SetActiveTimeElement( Elemento, pTiempo, idCliente, idtc, PrecioConexion ); + PrecioAcumulado += PrecioConexion; + Close(); +} +//--------------------------------------------------------------------------- +void __fastcall TStatus::TiempoPedidoChange(TObject *Sender) +{ + TDateTime TiempoPedido; +/* + if ( TiempoPedido->Time > EncodeTime( 5, 0, 0, 0 ) ) + TiempoPedido->Time = EncodeTime( 5, 0, 0, 0 ); +*/ + try { + if ( Edit1->Text.ToInt() < 0 || Edit1->Text.ToInt() > 5 ) Edit1->Text = "0"; + } catch(...) { Edit1->Text = "0"; + Edit1->SelStart= 0; + Edit1->SelLength= 1; + } + try { + if ( Edit2->Text.ToInt() < 0 || Edit2->Text.ToInt() >59 ) Edit2->Text = "0"; + } catch(...) { Edit2->Text = "0"; + Edit2->SelStart= 0; + Edit2->SelLength= 1; + } + TiempoPedido = EncodeTime( Edit1->Text.ToInt(), Edit2->Text.ToInt(), 0, 0 ); + + // Buscamos en la tabla de precios, al 1º que tenga un tiempo superior o igual + // al que nos pide el cliente... + TbPrecios->First(); + while( !TbPrecios->Eof && TbPrecios->FieldByName("Tiempo")->AsDateTime < TiempoPedido )//->Time ) + TbPrecios->Next(); + + // Actualizamos el precio + int Number = (TbPrecios->FieldByName("Precio")->AsCurrency)*100; + Precio->Value = Number / 100; + PrecioDec->Value = Number % 100; + + +} +//--------------------------------------------------------------------------- + + +void __fastcall TStatus::TbPreciosBeforeOpen(TDataSet *DataSet) +{ + // Si la tabla no existe, la creamos + if ( access( (TbPrecios -> TableName).c_str(), 0 ) != 0 ) + { + // Usamos la propiedad FielDefs para definir + // las columnas que contendrá la tabla + TbPrecios -> FieldDefs -> Clear(); + + TbPrecios -> FieldDefs -> Add("Tiempo", ftTime, 0, false ); + TbPrecios -> FieldDefs -> Add("Precio", ftCurrency, 0, false ); + + TbPrecios -> IndexDefs -> Clear(); + TbPrecios -> IndexDefs -> Add("Primary", "Tiempo", TIndexOptions() << ixPrimary << ixUnique ); + + // Creamos la base... + TbPrecios -> CreateTable(); + } +} +//--------------------------------------------------------------------------- +void __fastcall TStatus::SetClienteClick(TObject *Sender) +{ + TFClientes *Ficha; + ClienteUsaBono = false; + + Ficha = new TFClientes(this); + if ( Ficha -> ShowModal() == mrOk ) + { + idCliente = CtrlPPal->TbPersonas->FieldByName("CodCliente1")->AsInteger; + TBonoH = CtrlPPal->TbPersonas->FieldByName("TiempoH")->AsInteger; + TBonoM = CtrlPPal->TbPersonas->FieldByName("TiempoM")->AsInteger; + Label3->Caption = CtrlPPal->TbPersonas->FieldByName("Nombre")->AsString + " " + CtrlPPal->TbPersonas->FieldByName("Apellidos")->AsString; + ClienteUsaBono =((TBonoH > 0) || (TBonoM > 0)); + } else { + idCliente = 0; + Label3->Caption = "Anonimo"; + } + delete Ficha; + + if ( ClienteUsaBono ) + { + Precio->Visible = false; + PrecioDec->Visible = false; + + UBono1->Visible = true; + UBono2->Caption = AnsiString(TBonoH) + " : " + AnsiString(TBonoM); + UBono2->Visible = true; + } else { + Precio->Visible = true; + PrecioDec->Visible = true; + + UBono1->Visible = false; + UBono2->Visible = false; + } +} +//--------------------------------------------------------------------------- + +void __fastcall TStatus::Button1Click(TObject *Sender) +{ + ModalResult = mrCancel; +} +//--------------------------------------------------------------------------- + +void __fastcall TStatus::MasTiempoClick(TObject *Sender) +{ + MasTiempo->Visible = false; + + ActivarTerminal->Visible = true; + ActivarTerminal->Enabled = true; + TipoConexion->Enabled = true; + Label2->Caption = "&Tiempo que añade:"; + Edit1->Enabled = true; + Edit2->Enabled = true; + SetCliente->Enabled = true; + TbElementosCFG->Edit(); + Comienzo = TDateTime::CurrentTime(); + TbElementosCFG->Post(); // +} +//--------------------------------------------------------------------------- + diff --git a/src/TStatus.dfm b/src/TStatus.dfm new file mode 100644 index 0000000..cb8e15b Binary files /dev/null and b/src/TStatus.dfm differ diff --git a/src/TStatus.h b/src/TStatus.h new file mode 100644 index 0000000..f35484d --- /dev/null +++ b/src/TStatus.h @@ -0,0 +1,90 @@ +//--------------------------------------------------------------------------- +#ifndef TStatusH +#define TStatusH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "CoolForm.hpp" +#include "DigitNum.h" +#include +#include +#include +#include +#include +#include +#include "CtrlElemento.h" +#include +#include "FormularioREUSABLE.h" + +//--------------------------------------------------------------------------- +class TStatus : public TFormREUSABLE +{ +__published: // IDE-managed Components + TDigitNum *Dig2; + TShape *Shape1; + TShape *Shape2; + TShape *Time1; + TShape *Time2; + TShape *Time3; + TLabel *ltime1; + TLabel *ltime2; + TLabel *ltime3; + TDataSource *TDs; + TLabel *Terminal; + TLabel *Label1; + TLabel *Label3; + TLabel *Label2; + TDigitNum *Precio; + TButton *ActivarTerminal; + TLabel *Label4; + TLabel *Label5; + TTable *TbPrecios; + TSpeedButton *SetCliente; + TTable *TbElementosCFG; + TDigitNum *Dig1; + TComboBox *TipoConexion; + TTable *TbHistorial; + TDigitNum *PrecioDec; + TShape *Shape3; + TShape *Shape4; + TComboBox *Edit1; + TComboBox *Edit2; + TLabel *UBono1; + TLabel *UBono2; + TButton *MasTiempo; + void __fastcall Time1MouseUp(TObject *Sender, TMouseButton Button, + TShiftState Shift, int X, int Y); + void __fastcall Time2MouseUp(TObject *Sender, TMouseButton Button, + TShiftState Shift, int X, int Y); + void __fastcall Time3MouseUp(TObject *Sender, TMouseButton Button, + TShiftState Shift, int X, int Y); + + void __fastcall ltime1Click(TObject *Sender); + void __fastcall ltime2Click(TObject *Sender); + void __fastcall ltime3Click(TObject *Sender); + + void __fastcall ActivarTerminalClick(TObject *Sender); + void __fastcall TiempoPedidoChange(TObject *Sender); + void __fastcall TbPreciosBeforeOpen(TDataSet *DataSet); + void __fastcall SetClienteClick(TObject *Sender); + void __fastcall Button1Click(TObject *Sender); + void __fastcall MasTiempoClick(TObject *Sender); + + +private: // User declarations + TElemento *Elemento; + int idCliente; + Currency PrecioAcumulado; + int TBonoH, TBonoM; + bool ClienteUsaBono; +public: // User declarations + void __fastcall SetElement( TElemento *Elto ); + + __fastcall TStatus(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TStatus *Status; +//--------------------------------------------------------------------------- +#endif diff --git a/src/Unit2.cpp b/src/Unit2.cpp new file mode 100644 index 0000000..6650164 --- /dev/null +++ b/src/Unit2.cpp @@ -0,0 +1,49 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop + +#include "Unit2.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TForm2 *Form2; +//--------------------------------------------------------------------------- +__fastcall TForm2::TForm2(TComponent* Owner) + : TForm(Owner) +{ + TbPrecios->Active = true; + TbHistorial ->Active = true; + Timer1->Enabled = true; +} +//--------------------------------------------------------------------------- + +void __fastcall TForm2::Timer1Timer(TObject *Sender) +{ + Close(); +} +//--------------------------------------------------------------------------- + +void __fastcall TForm2::TbHistorialAfterOpen(TDataSet *DataSet) +{ + TbHistorial->First(); + while ( !TbHistorial->Eof ) + { + + if ( TbHistorial->FieldByName("idtc")->AsInteger < 900 ) + { + // Buscamos en la tabla de precios, al 1º que tenga un tiempo superior o igual + // al que nos pide el cliente... + TbPrecios->First(); + while( !TbPrecios->Eof && (double)TbPrecios->FieldByName("Tiempo")->AsDateTime < (double)TbHistorial->FieldByName("Tiempo")->AsDateTime )//->Time ) + TbPrecios->Next(); + + TbHistorial->Edit(); + TbHistorial->FieldByName("Precio")->AsCurrency = TbPrecios->FieldByName("Precio")->AsCurrency; + TbHistorial->Post(); + } + + TbHistorial->Next(); + } +} +//--------------------------------------------------------------------------- diff --git a/src/Unit2.dfm b/src/Unit2.dfm new file mode 100644 index 0000000..3813fd2 --- /dev/null +++ b/src/Unit2.dfm @@ -0,0 +1,57 @@ +object Form2: TForm2 + Left = 192 + Top = 126 + Width = 313 + Height = 130 + Caption = 'Form2' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + PixelsPerInch = 96 + TextHeight = 13 + object Label1: TLabel + Left = 8 + Top = 16 + Width = 289 + Height = 73 + Caption = 'Reajustando tiempos. Por favor, espere...' + Font.Charset = ANSI_CHARSET + Font.Color = clWindowText + Font.Height = -24 + Font.Name = 'Arial Black' + Font.Style = [] + ParentFont = False + WordWrap = True + end + object Timer1: TTimer + Enabled = False + OnTimer = Timer1Timer + Left = 176 + Top = 24 + end + object TbPrecios: TTable + FieldDefs = < + item + Name = 'Tiempo' + DataType = ftTime + end + item + Name = 'Precio' + DataType = ftInteger + end> + StoreDefs = True + TableName = 'datos\PreciosConexion.DB' + Left = 16 + Top = 24 + end + object TbHistorial: TTable + AfterOpen = TbHistorialAfterOpen + TableName = 'datos\HistorialElementos.db' + Left = 128 + Top = 24 + end +end diff --git a/src/Unit2.h b/src/Unit2.h new file mode 100644 index 0000000..3309314 --- /dev/null +++ b/src/Unit2.h @@ -0,0 +1,30 @@ +//--------------------------------------------------------------------------- + +#ifndef Unit2H +#define Unit2H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TForm2 : public TForm +{ +__published: // IDE-managed Components + TTimer *Timer1; + TTable *TbPrecios; + TTable *TbHistorial; + TLabel *Label1; + void __fastcall Timer1Timer(TObject *Sender); + void __fastcall TbHistorialAfterOpen(TDataSet *DataSet); +private: // User declarations +public: // User declarations + __fastcall TForm2(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TForm2 *Form2; +//--------------------------------------------------------------------------- +#endif diff --git a/src/res/-Elemento.bmp b/src/res/-Elemento.bmp new file mode 100644 index 0000000..96b6e2b Binary files /dev/null and b/src/res/-Elemento.bmp differ diff --git a/src/res/-cerrar-8b.bmp b/src/res/-cerrar-8b.bmp new file mode 100644 index 0000000..d71babf Binary files /dev/null and b/src/res/-cerrar-8b.bmp differ diff --git a/src/res/-cfg-8b.bmp b/src/res/-cfg-8b.bmp new file mode 100644 index 0000000..70a448c Binary files /dev/null and b/src/res/-cfg-8b.bmp differ diff --git a/src/res/-min-8b.bmp b/src/res/-min-8b.bmp new file mode 100644 index 0000000..63232a1 Binary files /dev/null and b/src/res/-min-8b.bmp differ diff --git a/src/res/-pos-24b.bmp b/src/res/-pos-24b.bmp new file mode 100644 index 0000000..504237d Binary files /dev/null and b/src/res/-pos-24b.bmp differ diff --git a/src/res/-pos.bmp b/src/res/-pos.bmp new file mode 100644 index 0000000..422d2a8 Binary files /dev/null and b/src/res/-pos.bmp differ diff --git a/src/res/0Elemento.bmp b/src/res/0Elemento.bmp new file mode 100644 index 0000000..7b7af79 Binary files /dev/null and b/src/res/0Elemento.bmp differ diff --git a/src/res/0JDsoft.bmp b/src/res/0JDsoft.bmp new file mode 100644 index 0000000..b491e9e Binary files /dev/null and b/src/res/0JDsoft.bmp differ diff --git a/src/res/0cerrar-8b.bmp b/src/res/0cerrar-8b.bmp new file mode 100644 index 0000000..521b0b3 Binary files /dev/null and b/src/res/0cerrar-8b.bmp differ diff --git a/src/res/0cfg-8b.bmp b/src/res/0cfg-8b.bmp new file mode 100644 index 0000000..b69c320 Binary files /dev/null and b/src/res/0cfg-8b.bmp differ diff --git a/src/res/0min-8b.bmp b/src/res/0min-8b.bmp new file mode 100644 index 0000000..c77d0c3 Binary files /dev/null and b/src/res/0min-8b.bmp differ diff --git a/src/res/0pos-24b.bmp b/src/res/0pos-24b.bmp new file mode 100644 index 0000000..fb60b99 Binary files /dev/null and b/src/res/0pos-24b.bmp differ diff --git a/src/res/0pos-8b.bmp b/src/res/0pos-8b.bmp new file mode 100644 index 0000000..e6eba14 Binary files /dev/null and b/src/res/0pos-8b.bmp differ diff --git a/src/res/1JDsoft.bmp b/src/res/1JDsoft.bmp new file mode 100644 index 0000000..d476bb9 Binary files /dev/null and b/src/res/1JDsoft.bmp differ diff --git a/src/res/1cerrar-8b.bmp b/src/res/1cerrar-8b.bmp new file mode 100644 index 0000000..94334bb Binary files /dev/null and b/src/res/1cerrar-8b.bmp differ diff --git a/src/res/1min-8b.bmp b/src/res/1min-8b.bmp new file mode 100644 index 0000000..0cf67d9 Binary files /dev/null and b/src/res/1min-8b.bmp differ diff --git a/src/res/1pos-24b.bmp b/src/res/1pos-24b.bmp new file mode 100644 index 0000000..9491e29 Binary files /dev/null and b/src/res/1pos-24b.bmp differ diff --git a/src/res/1pos-8b.bmp b/src/res/1pos-8b.bmp new file mode 100644 index 0000000..b332b54 Binary files /dev/null and b/src/res/1pos-8b.bmp differ diff --git a/src/res/3Elemento-8b.bmp b/src/res/3Elemento-8b.bmp new file mode 100644 index 0000000..5376fcd Binary files /dev/null and b/src/res/3Elemento-8b.bmp differ diff --git a/src/res/4Elemento-8b.bmp b/src/res/4Elemento-8b.bmp new file mode 100644 index 0000000..7a26cda Binary files /dev/null and b/src/res/4Elemento-8b.bmp differ diff --git a/src/res/5Elemento.bmp b/src/res/5Elemento.bmp new file mode 100644 index 0000000..7469040 Binary files /dev/null and b/src/res/5Elemento.bmp differ diff --git a/src/res/App-8b.bmp b/src/res/App-8b.bmp new file mode 100644 index 0000000..226f1d4 Binary files /dev/null and b/src/res/App-8b.bmp differ diff --git a/src/res/Status.bmp b/src/res/Status.bmp new file mode 100644 index 0000000..c854663 Binary files /dev/null and b/src/res/Status.bmp differ diff --git a/src/res/disco.bmp b/src/res/disco.bmp new file mode 100644 index 0000000..1e24c5c Binary files /dev/null and b/src/res/disco.bmp differ diff --git a/src/res/fred.bmp b/src/res/fred.bmp new file mode 100644 index 0000000..ab06763 Binary files /dev/null and b/src/res/fred.bmp differ diff --git a/src/res/remote-back.bmp b/src/res/remote-back.bmp new file mode 100644 index 0000000..11b25d7 Binary files /dev/null and b/src/res/remote-back.bmp differ diff --git a/src/res/remote-close-.bmp b/src/res/remote-close-.bmp new file mode 100644 index 0000000..c0fd14a Binary files /dev/null and b/src/res/remote-close-.bmp differ diff --git a/src/res/remote-close.bmp b/src/res/remote-close.bmp new file mode 100644 index 0000000..4a1da4c Binary files /dev/null and b/src/res/remote-close.bmp differ diff --git a/src/res/remote-start-.bmp b/src/res/remote-start-.bmp new file mode 100644 index 0000000..10660d5 Binary files /dev/null and b/src/res/remote-start-.bmp differ diff --git a/src/res/remote-start.bmp b/src/res/remote-start.bmp new file mode 100644 index 0000000..df49e72 Binary files /dev/null and b/src/res/remote-start.bmp differ