unit uCrExam1;  { Borland Pascal/Delphi32 }

        {==============================================================}
        {                                                              }
        { TheKing - Borland Pascal/Delphi32       V1.0  20.03.2002     }
        {                                                              }
        { Creator TheKing - konkretni definice pro App TheKing         }
        {                                                              }
        { (C) 2002, SofCon s.r.o., Radomir Bukovsky                    }
        {==============================================================}

{$I SETS.INC }

interface

uses {$IFDEF VER7}
      NumToStr
     {$ENDIF}
     {$IFDEF WIN32}
      Cf_StrNu
     {$ENDIF}
     ,XTKing_1 { Spolecny systemovy soubor s programem TKingCon.exe }
     ,XTheKing { Interface na creator Cr_TheKing.exe }
     ,CrBPFile { prostredky pro definici OnLine parametru do souboru CSV }
     {--------------------------------------------------------------}
     ,xCrExam1; { Definice parametru konkretni aplikace TheKing   }

procedure CrAppOpen(const ADestFN:string);
procedure CrAppExecute;
procedure CrAppClose;

{#######################################################################################}
implementation


const  et_Boolean         ='Boolean.et';
       et_OnOff           ='OnOff.et';
       et_DemoEnum1       ='DemoEnum1.et';
       et_DemoEnum2       ='DemoEnum2.et';



procedure CrAppOpen(const ADestFN:string);
begin
  writeln(output,'CrAppOpen');
  WrOnLineFileOpen(ADestFN);
end;

function fRCP(ALev:byte):word;
begin
  if ALev=LeReadOnly
  then fRCP:=rcp_PeriodicWatch
  else fRCP:=rcp_PeriodicWatch or rcp_Store or rcp_Load or rcp_Transmit;
end;

procedure CrAppExecute;
var ACreator,ADEArr:byte;
begin
  { Definice konkretnich parametru aplikace TheKing, parametry z XD6King.pas }
  writeln(output,'CrAppExecute');
  ACreator:=0;
  ADEArr  :=0;

  InsRealpPar(ACreator,ADEArr, LA_VersionGlb_Ver,NA_VersionGlb_Ver,'[u]'{AUNI},
                Le_VersionGlb_Ver,10{ARfsPer},fRCP(Le_VersionGlb_Ver),dscr_None,
                Dm_VersionGlb_Ver{Adec},Im_VersionGlb_Ver{AImp_Val},
                Lo_VersionGlb_Ver,Hi_VersionGlb_Ver);

  { byte zobrazeny dekadicky }
  InsBytePar(ACreator,ADEArr,LA_DemoByte1,NA_DemoByte1,'[u1]'{AUNI},
                Le_DemoByte1,5{ARfsPer},fRCP(Le_DemoByte1),dscr_None,
                Im_DemoByte1,Lo_DemoByte1,Hi_DemoByte1);

  { byte zobrazeny hexadecimalne }
  InsBytePar(ACreator,ADEArr,LA_DemoByte2,NA_DemoByte2,'[u2]'{AUNI},
                Le_DemoByte2,5{ARfsPer},fRCP(Le_DemoByte2),dscr_ShwHex,
                Im_DemoByte2,Lo_DemoByte2,Hi_DemoByte2);

  { enumerated zadavany pomoci ComboBox }
  InsEnumPar(ACreator,ADEArr,LA_DemoEnum1,NA_DemoEnum1,'[e1]'{AUNI},
                Le_DemoEnum1,5{ARfsPer},fRCP(Le_DemoEnum1),dscr_None,
                Im_DemoEnum1,Lo_DemoEnum1,Hi_DemoEnum1,
                et_DemoEnum1,false{AListBoxDlg});

  { enumerated zadavany pomoci ListBox }
  InsEnumPar(ACreator,ADEArr,LA_DemoEnum2,NA_DemoEnum2,'[e2]'{AUNI},
                Le_DemoEnum2,5{ARfsPer},fRCP(Le_DemoEnum2),dscr_None,
                Im_DemoEnum2,Lo_DemoEnum2,Hi_DemoEnum2,
                et_DemoEnum2,true{AListBoxDlg});

  { word zobrazeny dekadicky }
  InsWordPar(ACreator,ADEArr,LA_DemoWord1,NA_DemoWord1,'[w1]'{AUNI},
                Le_DemoWord1,5{ARfsPer},fRCP(Le_DemoWord1),dscr_None,
                Im_DemoWord1,Lo_DemoWord1,Hi_DemoWord1);

  { SmallInt zobrazeny dekadicky }
  InsSmallIntPar(ACreator,ADEArr,LA_DemoSmallInt1,NA_DemoSmallInt1,'[i1]'{AUNI},
                Le_DemoSmallInt1,5{ARfsPer},fRCP(Le_DemoSmallInt1),dscr_None,
                Im_DemoSmallInt1,Lo_DemoSmallInt1,Hi_DemoSmallInt1);

  { Integer zobrazeny dekadicky }
  InsIntegerPar(ACreator,ADEArr,LA_DemoInteger1,NA_DemoInteger1,'[I1]'{AUNI},
                Le_DemoInteger1,5{ARfsPer},fRCP(Le_DemoInteger1),dscr_None,
                Im_DemoInteger1,Lo_DemoInteger1,Hi_DemoInteger1);

  { Longint zobrazeny dekadicky }
  InsLongintPar(ACreator,ADEArr,LA_DemoLongint1,NA_DemoLongint1,'[I1]'{AUNI},
                Le_DemoLongint1,5{ARfsPer},fRCP(Le_DemoLongint1),dscr_None,
                Im_DemoLongint1,Lo_DemoLongint1,Hi_DemoLongint1);

  { Longword zobrazeny dekadicky }
  InsLongwordPar(ACreator,ADEArr,LA_DemoLongword1,NA_DemoLongword1,'[W1]'{AUNI},
                Le_DemoLongword1,5{ARfsPer},fRCP(Le_DemoLongword1),dscr_None,
                Im_DemoLongword1,Lo_DemoLongword1,Hi_DemoLongword1);

  { real zobrazeny dekadicky }
  InsRealpPar(ACreator,ADEArr, LA_DemoRealp1,NA_DemoRealp1,'[r1]'{AUNI},
                Le_DemoRealp1,10{ARfsPer},fRCP(Le_DemoRealp1),dscr_None,
                Dm_DemoRealp1{Adec},Im_DemoRealp1{AImp_Val},
                Lo_DemoRealp1,Hi_DemoRealp1);

  { real zobrazeny s plovouci des. teckou }
  InsRealpPar(ACreator,ADEArr, LA_DemoRealp2,NA_DemoRealp2,'[r2]'{AUNI},
                Le_DemoRealp2,10{ARfsPer},fRCP(Le_DemoRealp2),dscr_dmWdFloat,
                Dm_DemoRealp2{Adec},Im_DemoRealp2{AImp_Val},
                Lo_DemoRealp2,Hi_DemoRealp2);

  { real zobrazeny scient }
  InsRealpPar(ACreator,ADEArr, LA_DemoRealp3,NA_DemoRealp3,'[r3]'{AUNI},
                Le_DemoRealp3,10{ARfsPer},fRCP(Le_DemoRealp3),dscr_Scient,
                Dm_DemoRealp3{Adec},Im_DemoRealp3{AImp_Val},
                Lo_DemoRealp3,Hi_DemoRealp3);

  InsStringPar(ACreator,ADEArr, LA_DemoString1,NA_DemoString1,'[]'{AUNI},
                Le_DemoString1,5{RfsPer},fRCP(Le_DemoString1),dscr_None,
                10{ASize},Im_DemoString1,[' '..#$FF]);

  { specword - zadani doby v hh:mm:ss }
  InsSpecWordPar(ACreator,ADEArr,LA_DemoSpecWord1,NA_DemoSpecWord1,'[sw1]'{AUNI},
                Le_DemoSpecWord1,5{ARfsPer},fRCP(Le_DemoSpecWord1),dscr_None,
                Im_DemoSpecWord1,Lo_DemoSpecWord1,Hi_DemoSpecWord1,
                tswf_OrdTimeSec);

  { specword - real ulozeny ve wordu v 1/10 }
  InsSpecWordPar(ACreator,ADEArr,LA_DemoSpecWord2,NA_DemoSpecWord2,'[sw2]'{AUNI},
                Le_DemoSpecWord2,5{ARfsPer},fRCP(Le_DemoSpecWord2),dscr_None,
                Im_DemoSpecWord2,Lo_DemoSpecWord2,Hi_DemoSpecWord2,
                tswf_RValDiv10);

  { specialni typ s rozlisovaci polozkou °C/°F }              
  InsUTemperaturePar(ACreator,ADEArr,LA_CFTemperature1,NA_CFTemperature1,'[°C]|[°F]'{AUNI},
                     Le_CFTemperature1,11{ARfsPer},fRCP(Le_CFTemperature1),dscr_None,
                     1{Adec},Im_CFTemperature1,Lo_CFTemperature1,Hi_CFTemperature1);

  InsUTemperaturePar(ACreator,ADEArr,LA_CFTemperature2,NA_CFTemperature2,'°C|°F'{AUNI},
                     Le_CFTemperature2,14{ARfsPer},fRCP(Le_CFTemperature2),dscr_None,
                     1{Adec},Im_CFTemperature2,Lo_CFTemperature2,Hi_CFTemperature2);

end;

procedure CrAppClose;
begin
  writeln(output,'CrAppClose');
  WrOnLineFileClose;
end;

end.