LazReport, continue work on dialogs and some fixes, for details see issue #22141

git-svn-id: trunk@37448 -
This commit is contained in:
jesus 2012-05-29 04:42:31 +00:00
parent 974b7ca2a6
commit f1c82d9a6d
45 changed files with 3076 additions and 9164 deletions

7
.gitattributes vendored
View File

@ -1625,6 +1625,8 @@ components/lazreport/samples/userds/unit2.pas svneol=native#text/pascal
components/lazreport/samples/userds/usuario.lrf svneol=native#text/xml
components/lazreport/source/addons/DialogControls/lr_dialogdesign.lpk svneol=native#text/plain
components/lazreport/source/addons/DialogControls/lr_dialogdesign.pas svneol=native#text/plain
components/lazreport/source/addons/DialogControls/lrdbdialogcontrols.pas svneol=native#text/plain
components/lazreport/source/addons/DialogControls/lrdbdialogcontrols_img.inc svneol=native#text/plain
components/lazreport/source/addons/DialogControls/lrdialogcontrols.pas svneol=native#text/plain
components/lazreport/source/addons/DialogControls/lrdialogcontrols_img.inc svneol=native#text/plain
components/lazreport/source/addons/SqlDB/lr_ibconnection.pas svneol=native#text/plain
@ -1637,12 +1639,17 @@ components/lazreport/source/addons/TDbfDB/lr_tdbf.lpk svneol=native#text/plain
components/lazreport/source/addons/TDbfDB/lr_tdbf.pas svneol=native#text/plain
components/lazreport/source/addons/TDbfDB/lrtdbfdata.pas svneol=native#text/plain
components/lazreport/source/addons/TDbfDB/lrtdbfdata_img.inc svneol=native#text/plain
components/lazreport/source/addons/ZeosDB/languages/lrdbzeosconst.po svneol=native#text/plain
components/lazreport/source/addons/ZeosDB/languages/lrdbzeosconst.ru.po svneol=native#text/plain
components/lazreport/source/addons/ZeosDB/lr_db_zeos.pas svneol=native#text/plain
components/lazreport/source/addons/ZeosDB/lr_editparams.lfm svneol=native#text/plain
components/lazreport/source/addons/ZeosDB/lr_editparams.pas svneol=native#text/plain
components/lazreport/source/addons/ZeosDB/lr_editvariables.lfm svneol=native#text/plain
components/lazreport/source/addons/ZeosDB/lr_editvariables.pas svneol=native#text/plain
components/lazreport/source/addons/ZeosDB/lr_zeos_img.inc svneol=native#text/plain
components/lazreport/source/addons/ZeosDB/lr_zeosdb.lpk svneol=native#text/plain
components/lazreport/source/addons/ZeosDB/lr_zeosdb.pas svneol=native#text/plain
components/lazreport/source/addons/ZeosDB/lrdbzeosconst.pas svneol=native#text/plain
components/lazreport/source/addons/addfunction/addfunction.lrs svneol=native#text/pascal
components/lazreport/source/addons/addfunction/doc/HISTORY.RUS svneol=native#text/plain
components/lazreport/source/addons/addfunction/doc/README.RUS svneol=native#text/plain

View File

@ -2,6 +2,7 @@
<CONFIG>
<Package Version="4">
<Name Value="lr_DialogDesign"/>
<Author Value="Lazarus, Lagunov A.A."/>
<CompilerOptions>
<Version Value="11"/>
<SearchPaths>
@ -14,7 +15,10 @@
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Files Count="2">
<License Value="modified LGPL-2
"/>
<Version Minor="2" Release="2"/>
<Files Count="4">
<Item1>
<Filename Value="lrdialogcontrols.pas"/>
<HasRegisterProc Value="True"/>
@ -24,6 +28,14 @@
<Filename Value="lrdialogcontrols_img.inc"/>
<Type Value="Include"/>
</Item2>
<Item3>
<Filename Value="lrdbdialogcontrols.pas"/>
<UnitName Value="lrDBDialogControls"/>
</Item3>
<Item4>
<Filename Value="lrdbdialogcontrols_img.inc"/>
<Type Value="Include"/>
</Item4>
</Files>
<Type Value="RunAndDesignTime"/>
<RequiredPkgs Count="2">

View File

@ -7,7 +7,7 @@ unit lr_DialogDesign;
interface
uses
LRDialogControls, LazarusPackageIntf;
LRDialogControls, lrDBDialogControls, LazarusPackageIntf;
implementation

View File

@ -0,0 +1,237 @@
unit lrDBDialogControls;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, LRDialogControls, Graphics, LR_Class,
Controls, DbCtrls, StdCtrls, DB;
type
{ TlrDBLookupComboBox }
TlrDBLookupComboBox = class(TlrVisualControl)
private
FKeyField:string;
FListField:string;
FListSource:string;
function GetKeyField: string;
function GetListField: string;
function GetListSource: string;
function GetText: Variant;
procedure SetKeyField(AValue: string);
procedure SetListField(AValue: string);
procedure SetListSource(AValue: string);
procedure DBLookupComboBox1CloseUp(Sender: TObject);
procedure SetText(AValue: Variant);
protected
procedure PaintDesignControl; override;
function CreateControl:TControl;override;
procedure AfterLoad;override;
public
constructor Create(AOwnerPage:TfrPage); override;
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
published
property KeyField:string read GetKeyField write SetKeyField;
property ListField:string read GetListField write SetListField;
property ListSource:string read GetListSource write SetListSource;
property Color;
property Enabled;
property Text:Variant read GetText write SetText;
property OnClick;
end;
implementation
uses lclintf, Themes, LCLType, DBPropEdits, PropEdits, LR_Utils, LR_DBRel;
var
lrBMP_LRDBLookupComboBox:TBitmap = nil;
procedure InitLRComp;
begin
DoRegsiterControl(lrBMP_LRDBLookupComboBox, TlrDBLookupComboBox);
end;
{ TlrDBLookupComboBox }
function TlrDBLookupComboBox.GetKeyField: string;
begin
Result:=FKeyField;
end;
function TlrDBLookupComboBox.GetListField: string;
begin
Result:=FListField;
end;
function TlrDBLookupComboBox.GetListSource: string;
begin
Result:=FListSource;
end;
function TlrDBLookupComboBox.GetText: Variant;
begin
Result:=TDBLookupComboBox(FControl).KeyValue;
end;
procedure TlrDBLookupComboBox.SetKeyField(AValue: string);
begin
if FKeyField=AValue then Exit;
FKeyField:=AValue;
TDBLookupComboBox(FControl).KeyField:=AValue;
end;
procedure TlrDBLookupComboBox.SetListField(AValue: string);
begin
if FListField=AValue then Exit;
FListField:=AValue;
TDBLookupComboBox(FControl).ListField:=AValue;
end;
procedure TlrDBLookupComboBox.SetListSource(AValue: string);
var
D:TDataSet;
begin
if FListSource=AValue then Exit;
FListSource:=AValue;
D:=frFindComponent(nil, AValue) as TDataSet;
if Assigned(D) then
begin
TDBLookupComboBox(FControl).ListSource:=frGetDataSource(OwnerForm, D);
end;
end;
procedure TlrDBLookupComboBox.DBLookupComboBox1CloseUp(Sender: TObject);
begin
if Assigned(TDBLookupComboBox(FControl).ListSource) and Assigned(TDBLookupComboBox(FControl).ListSource.DataSet) then
TDBLookupComboBox(FControl).ListSource.DataSet.Locate(TDBLookupComboBox(FControl).KeyField, TDBLookupComboBox(FControl).KeyValue, []);
end;
procedure TlrDBLookupComboBox.SetText(AValue: Variant);
begin
TDBLookupComboBox(FControl).KeyValue:=AValue;
end;
procedure TlrDBLookupComboBox.PaintDesignControl;
var
AY, aH:integer;
R1:TRect;
begin
AY:=(DRect.Top + DRect.Bottom) div 2;
aH:=Canvas.TextHeight(Name) div 2;
Canvas.Frame3d(DRect, 1, bvLowered);
Canvas.Brush.Color := FControl.Color;
Canvas.FillRect(DRect);
Canvas.Font:=FControl.Font;
Canvas.TextRect(DRect, DRect.Left + 3, AY - aH, Name);
R1:=DRect;
R1.Left:=R1.Right - 16;
DrawFrameControl(Canvas.Handle, R1, DFC_BUTTON, DFCS_BUTTONPUSH);
end;
function TlrDBLookupComboBox.CreateControl: TControl;
begin
Result:=TDBLookupComboBox.Create(OwnerForm);
TDBLookupComboBox(Result).Style:=csDropDownList;
TDBLookupComboBox(Result).OnCloseUp:=@DBLookupComboBox1CloseUp;
end;
procedure TlrDBLookupComboBox.AfterLoad;
var
D:TDataSet;
begin
inherited AfterLoad;
D:=frFindComponent(nil, FListSource) as TDataSet;
if Assigned(D) then
begin
try
TDBLookupComboBox(FControl).ListSource:=frGetDataSource(OwnerForm, D);
finally
end;
end;
end;
constructor TlrDBLookupComboBox.Create(AOwnerPage: TfrPage);
begin
inherited Create(AOwnerPage);
BaseName:='lrDBLookupComboBox';
end;
procedure TlrDBLookupComboBox.LoadFromXML(XML: TLrXMLConfig; const Path: String
);
begin
inherited LoadFromXML(XML, Path);
KeyField:=XML.GetValue(Path+'KeyField/Value'{%H-}, '');
ListField:=XML.GetValue(Path+'ListField/Value'{%H-}, '');
FListSource:=XML.GetValue(Path+'ListSource/Value'{%H-}, '');
end;
procedure TlrDBLookupComboBox.SaveToXML(XML: TLrXMLConfig; const Path: String);
begin
inherited SaveToXML(XML, Path);
XML.SetValue(Path+'KeyField/Value'{%H-}, FKeyField);
XML.SetValue(Path+'ListField/Value'{%H-}, FListField);
XML.SetValue(Path+'ListSource/Value'{%H-}, FListSource);
end;
type
{ TlrDBLookupComboBoxListSourceProperty }
TlrDBLookupComboBoxListSourceProperty = class(TFieldProperty)
public
procedure FillValues(const Values: TStringList); override;
end;
{ TlrDBLookupComboBoxFiledsProperty }
TlrDBLookupComboBoxFiledsProperty = class(TFieldProperty)
public
procedure FillValues(const Values: TStringList); override;
end;
{ TlrDBLookupComboBoxFiledsProperty }
procedure TlrDBLookupComboBoxFiledsProperty.FillValues(const Values: TStringList
);
var
L:TlrDBLookupComboBox;
DS:TDataSet;
i:integer;
begin
if (GetComponent(0) is TlrDBLookupComboBox) then
begin
L:=GetComponent(0) as TlrDBLookupComboBox;
if Assigned(TDBLookupComboBox(L.Control).ListSource) then
frGetFieldNames(TfrTDataSet(TDBLookupComboBox(L.Control).ListSource.DataSet) , Values);
end;
end;
{ TlrDBLookupComboBoxListSourceProperty }
procedure TlrDBLookupComboBoxListSourceProperty.FillValues(
const Values: TStringList);
begin
if (GetComponent(0) is TlrDBLookupComboBox) then
frGetComponents(nil, TDataSet, Values, nil);
end;
initialization
{$I lrdbdialogcontrols_img.inc}
InitLRComp;
RegisterPropertyEditor(TypeInfo(string), TlrDBLookupComboBox, 'ListSource', TlrDBLookupComboBoxListSourceProperty);
RegisterPropertyEditor(TypeInfo(string), TlrDBLookupComboBox, 'KeyField', TlrDBLookupComboBoxFiledsProperty);
RegisterPropertyEditor(TypeInfo(string), TlrDBLookupComboBox, 'ListField', TlrDBLookupComboBoxFiledsProperty);
finalization
if Assigned(lrBMP_LRDBLookupComboBox) then
FreeAndNil(lrBMP_LRDBLookupComboBox);
end.

View File

@ -0,0 +1,112 @@
LazarusResources.Add('tlrdblookupcombobox','BMP',[
'BM'#138#9#0#0#0#0#0#0#138#0#0#0'|'#0#0#0#24#0#0#0#24#0#0#0#1#0' '#0#3#0#0#0#0
+#9#0#0#19#11#0#0#19#11#0#0#0#0#0#0#0#0#0#0#0#0#255#0#0#255#0#0#255#0#0#0#0#0
+#0#255#1#0#0#0#0#0#0#0#0#0#0#0'T'#184#30#252#0#0#0#0#0#0#0#0'fff'#252#0#0#0#0
+#0#0#0#0#196#245'('#255#0#0#0#0#0#0#0#0#0#0#0#0#4#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#237#239#239'?'#183#174#174#255#183#174#174#255
+#183#174#174#255#183#176#175#255#183#176#175#255#183#176#175#255#183#176#175
+#255#183#176#175#255#183#176#175#255#183#176#175#255#183#176#175#255#183#176
+#175#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#146
+'ww'#255#146'ww'#255#146'ww'#255#146'ww'#255#146'ww'#255#146'ww'#255#146'ww'
+#255#146'ww'#255#146'ww'#255#146'ww'#255#146'ww'#255#146'ww'#255#146'ww'#255
+#183#176#175#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#146'ww'#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#146'ww'#255#183#176#175#255#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#146'ww'#255
+#255#255#255#255'311'#255'311'#255'311'#255'311'#255'311'#255'311'#255'311'
+#255'311'#255'311'#255#255#255#255#255#146'ww'#255#183#176#175#255#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#146'ww'#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#146'ww'#255#183#176#175#255#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#146'ww'#255#188#187#189#255#188#187#189
+#255#188#187#189#255#188#187#189#255#188#187#189#255#188#187#189#255#188#187
+#189#255#188#187#189#255#188#187#189#255#188#187#189#255#188#187#189#255#146
+'ww'#255#183#176#175#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#146'ww'#255#188#187#189#255'311'#255'311'#255'311'#255'311'
+#255'311'#255'311'#255'311'#255'311'#255'311'#255#188#187#189#255#146'ww'#255
+#183#176#175#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#254#253#252#0#254#253#252#0#254#253#252#0#254#253#252#0#254#253
+#252#0#146'ww'#255#188#187#189#255#188#187#189#255#188#187#189#255#188#187
+#189#255#188#187#189#255#188#187#189#255#188#187#189#255#188#187#189#255#188
+#187#189#255#188#187#189#255#188#187#189#255#146'ww'#255#183#176#175#255#255
+#255#255#0#255#255#255#0#254#253#252#0#254#253#252#0#230#194#167#255#196'vB'
+#255#196'vB'#255#196'vB'#255#196'vB'#255#196'vB'#255#146'ww'#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#146'ww'#255#183#176#175#255#255#255#255#0#255#255#255#0#230#194
+#167#255#197'xE'#255#196'vB'#255#236#209#189#255#255#255#255#255#243#225#211
+#255#236#209#189#255#230#194#167#255#146'ww'#255#255#255#255#255'311'#255'31'
+'1'#255'311'#255'311'#255'311'#255'311'#255'311'#255'311'#255'311'#255#255
+#255#255#255#146'ww'#255#183#176#175#255#255#255#255#0#255#255#255#0#197'xE'
+#255#217#163'{'#255#223#178#145#255#236#209#189#255#255#255#255#255#243#225
+#211#255#236#209#189#255#230#194#167#255#146'ww'#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#146'ww'#255#183#176#175#255#255#255#255#0#255#255#255#0#210#147'd'#255#217
+#163'{'#255#223#178#145#255#196'vB'#255#196'vB'#255#146'ww'#255#146'ww'#255
+#146'ww'#255#129'yy'#255'zzz'#255'zzz'#255'zzz'#255'zzz'#255'zzz'#255'zzz'
+#255'zzz'#255#136'xx'#255#146'ww'#255#146'ww'#255#146'ww'#255#146'ww'#255#183
+#176#175#255#255#255#255#0#255#255#255#0#210#147'd'#255#197'xE'#255#196'vB'
+#255#236#209#189#255#255#255#255#255#146'ww'#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
,#255#255#255#255#255#255#255#255#255#255#255#255#255#255#146'ww'#255#227#231
+#231#255#227#231#231#255#227#231#231#255#146'ww'#255#183#176#175#255#255#255
+#255#0#255#255#255#0#197'xE'#255#217#163'{'#255#223#178#145#255#236#209#189
+#255#255#255#255#255#146'ww'#255#255#255#255#255'311'#255'311'#255'311'#255
+'311'#255'311'#255'311'#255'311'#255'311'#255#255#255#255#255#146'ww'#255#227
+#231#231#255'>??'#255#227#231#231#255#146'ww'#255#183#176#175#255#255#255#255
+#0#255#255#255#0#210#147'd'#255#217#163'{'#255#223#178#145#255#196'vB'#255
+#196'vB'#255#146'ww'#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#146'ww'#255#227#231#231#255#227#231#231#255
+#227#231#231#255#146'ww'#255#237#239#239'?'#255#255#255#0#255#255#255#0#210
+#147'd'#255#197'xE'#255#196'vB'#255#236#209#189#255#255#255#255#255#146'ww'
+#255#146'ww'#255#146'ww'#255#146'ww'#255#146'ww'#255#146'ww'#255#146'ww'#255
+#146'ww'#255#146'ww'#255#146'ww'#255#146'ww'#255#146'ww'#255#146'ww'#255#146
+'ww'#255#146'ww'#255#237#239#239'?'#255#255#255#0#255#255#255#0#255#255#255#0
+#197'xE'#255#217#163'{'#255#223#178#145#255#236#209#189#255#255#255#255#255
+#243#225#211#255#236#209#189#255#230#194#167#255#223#178#145#255#217#163'{'
+#255#214#155'p'#255#196'vB'#255#254#253#252#0#254#253#252#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#210#147'd'#255#217#163'{'
+#255#223#178#145#255#196'vB'#255#196'vB'#255#196'vB'#255#196'vB'#255#196'vB'
+#255#196'vB'#255#217#163'{'#255#214#155'p'#255#210#147'd'#255#254#253#252#0
+#254#253#252#0#0#0#0#255#0#0#0#255#255#255#255#0#255#255#255#0#0#0#0#255#0#0
+#0#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#210#147'd'#255
+#196'vB'#255#196'vB'#255#230#194#167#255#236#209#189#255#230#194#167#255#223
+#178#145#255#217#163'{'#255#214#155'p'#255#196'vB'#255#196'vB'#255#210#147'd'
+#255#254#253#252#0#254#253#252#0#0#0#0#255#0#0#0#255#255#255#255#0#255#255
+#255#0#0#0#0#255#0#0#0#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#196'vB'#255#214#155'p'#255#223#178#145#255#236#209#189#255#243#225#211
+#255#236#209#189#255#230#194#167#255#223#178#145#255#217#163'{'#255#214#155
+'p'#255#210#147'd'#255#196'vB'#255#254#253#252#0#254#253#252#0#255#255#255#0
+#255#255#255#0#0#0#0#255#0#0#0#255#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#230#194#167#255#196'vB'#255#196'v'
+'B'#255#243#225#211#255#255#255#255#255#243#225#211#255#236#209#189#255#230
+#194#167#255#223#178#145#255#196'vB'#255#196'vB'#255#230#194#167#255#254#253
+#252#0#254#253#252#0'ffw'#255#0#0#0#255#255#255#255#0#255#255#255#0#0#0#0#255
+'ffw'#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#254#253#252
+#0#254#253#252#0#230#194#167#255#196'vB'#255#196'vB'#255#196'vB'#255#196'vB'
+#255#196'vB'#255#196'vB'#255#230#194#167#255#254#253#252#0#254#253#252#0#255
+#255#255#0#255#255#255#0'ffw'#255#0#0#0#255#255#255#255#0#255#255#255#0#0#0#0
+#255'ffw'#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0
]);

View File

@ -54,133 +54,8 @@ end;
initialization
InitLRComp;
// RegisterPropertyEditor(TypeInfo(string), TLRZQuery, 'Database', TLRZQueryDataBaseProperty);
// RegisterPropertyEditor(TypeInfo(string), TLRIBConnection, 'Protocol', TLRZConnectionProtocolProperty);
finalization
if Assigned(lrBMP_IBConnection) then
FreeAndNil(lrBMP_IBConnection);
end.
unit LR_IBConnection;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Graphics, LR_Class, LR_DBComponent, sqldb,
IBConnection, lr_SQLQuery;
type
TLR_IBConnection = class(TComponent)
end;
{ TIBPQConnection }
TLRIBConnection = class(TLRSQLConnection)
public
constructor Create(AOwnerPage:TfrPage); override;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('LazReport',[TLR_IBConnection]);
end;
var
lrBMP_IBConnection:TBitmap = nil;
procedure InitLRComp;
begin
if not assigned(lrBMP_IBConnection) then
begin
lrBMP_IBConnection := TbitMap.Create;
lrBMP_IBConnection.LoadFromLazarusResource('TLRIBConnection');
frRegisterObject(TLRIBConnection, lrBMP_IBConnection, 'TLRIBConnection', nil, otlUIControl, nil);
end;
end;
{ TLRIBConnection }
constructor TLRIBConnection.Create(AOwnerPage: TfrPage);
begin
inherited Create(AOwnerPage);
BaseName := 'LRIBConnection';
FConnection:=TIBConnection.Create(OwnerForm);
FConnection.Transaction:=FSQLTransaction;
end;
initialization
InitLRComp;
// RegisterPropertyEditor(TypeInfo(string), TLRZQuery, 'Database', TLRZQueryDataBaseProperty);
// RegisterPropertyEditor(TypeInfo(string), TLRIBConnection, 'Protocol', TLRZConnectionProtocolProperty);
finalization
if Assigned(lrBMP_IBConnection) then
FreeAndNil(lrBMP_IBConnection);
end.
unit LR_IBConnection;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Graphics, LR_Class, LR_DBComponent, sqldb,
IBConnection, lr_SQLQuery;
type
TLR_IBConnection = class(TComponent)
end;
{ TIBPQConnection }
TLRIBConnection = class(TLRSQLConnection)
public
constructor Create(AOwnerPage:TfrPage); override;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('LazReport',[TLR_IBConnection]);
end;
var
lrBMP_IBConnection:TBitmap = nil;
procedure InitLRComp;
begin
if not assigned(lrBMP_IBConnection) then
begin
lrBMP_IBConnection := TbitMap.Create;
lrBMP_IBConnection.LoadFromLazarusResource('TLRIBConnection');
frRegisterObject(TLRIBConnection, lrBMP_IBConnection, 'TLRIBConnection', nil, otlUIControl, nil);
end;
end;
{ TLRIBConnection }
constructor TLRIBConnection.Create(AOwnerPage: TfrPage);
begin
inherited Create(AOwnerPage);
BaseName := 'LRIBConnection';
FConnection:=TIBConnection.Create(OwnerForm);
FConnection.Transaction:=FSQLTransaction;
end;
initialization
InitLRComp;
// RegisterPropertyEditor(TypeInfo(string), TLRZQuery, 'Database', TLRZQueryDataBaseProperty);
// RegisterPropertyEditor(TypeInfo(string), TLRIBConnection, 'Protocol', TLRZConnectionProtocolProperty);
finalization
if Assigned(lrBMP_IBConnection) then
FreeAndNil(lrBMP_IBConnection);
end.

View File

@ -53,131 +53,8 @@ end;
initialization
InitLRComp;
// RegisterPropertyEditor(TypeInfo(string), TLRZQuery, 'Database', TLRZQueryDataBaseProperty);
// RegisterPropertyEditor(TypeInfo(string), TLRPQConnection, 'Protocol', TLRZConnectionProtocolProperty);
finalization
if Assigned(lrBMP_PQConnection) then
FreeAndNil(lrBMP_PQConnection);
end.
unit LR_PQConnection;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Graphics, LR_Class, LR_DBComponent, sqldb,
pqconnection, lr_SQLQuery;
type
TLR_PQConnection = class(TComponent)
end;
{ TLRPQConnection }
TLRPQConnection = class(TLRSQLConnection)
public
constructor Create(AOwnerPage:TfrPage); override;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('LazReport',[TLR_PQConnection]);
end;
var
lrBMP_PQConnection:TBitmap = nil;
procedure InitLRComp;
begin
if not assigned(lrBMP_PQConnection) then
begin
lrBMP_PQConnection := TbitMap.Create;
lrBMP_PQConnection.LoadFromLazarusResource('TLRPQConnection');
frRegisterObject(TLRPQConnection, lrBMP_PQConnection, 'TLRPQConnection', nil, otlUIControl, nil);
end;
end;
{ TLRPQConnection }
constructor TLRPQConnection.Create(AOwnerPage: TfrPage);
begin
inherited Create(AOwnerPage);
BaseName := 'LRPQConnection';
FConnection:=TPQConnection.Create(OwnerForm);
FConnection.Transaction:=FSQLTransaction;
end;
initialization
InitLRComp;
// RegisterPropertyEditor(TypeInfo(string), TLRZQuery, 'Database', TLRZQueryDataBaseProperty);
// RegisterPropertyEditor(TypeInfo(string), TLRPQConnection, 'Protocol', TLRZConnectionProtocolProperty);
finalization
if Assigned(lrBMP_PQConnection) then
FreeAndNil(lrBMP_PQConnection);
end.
unit LR_PQConnection;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Graphics, LR_Class, LR_DBComponent, sqldb,
pqconnection, lr_SQLQuery;
type
TLR_PQConnection = class(TComponent)
end;
{ TLRPQConnection }
TLRPQConnection = class(TLRSQLConnection)
public
constructor Create(AOwnerPage:TfrPage); override;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('LazReport',[TLR_PQConnection]);
end;
var
lrBMP_PQConnection:TBitmap = nil;
procedure InitLRComp;
begin
if not assigned(lrBMP_PQConnection) then
begin
lrBMP_PQConnection := TbitMap.Create;
lrBMP_PQConnection.LoadFromLazarusResource('TLRPQConnection');
frRegisterObject(TLRPQConnection, lrBMP_PQConnection, 'TLRPQConnection', nil, otlUIControl, nil);
end;
end;
{ TLRPQConnection }
constructor TLRPQConnection.Create(AOwnerPage: TfrPage);
begin
inherited Create(AOwnerPage);
BaseName := 'LRPQConnection';
FConnection:=TPQConnection.Create(OwnerForm);
FConnection.Transaction:=FSQLTransaction;
end;
initialization
InitLRComp;
// RegisterPropertyEditor(TypeInfo(string), TLRZQuery, 'Database', TLRZQueryDataBaseProperty);
// RegisterPropertyEditor(TypeInfo(string), TLRPQConnection, 'Protocol', TLRZConnectionProtocolProperty);
finalization
if Assigned(lrBMP_PQConnection) then
FreeAndNil(lrBMP_PQConnection);
end.

View File

@ -2,6 +2,7 @@
<CONFIG>
<Package Version="4">
<Name Value="LR_SqlDB"/>
<Author Value="Lazarus, Lagunov A.A."/>
<CompilerOptions>
<Version Value="11"/>
<SearchPaths>
@ -14,7 +15,10 @@
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Files Count="3">
<License Value="modified LGPL-2
"/>
<Version Minor="2" Release="2"/>
<Files Count="4">
<Item1>
<Filename Value="lr_pqconnection.pas"/>
<HasRegisterProc Value="True"/>
@ -22,13 +26,17 @@
</Item1>
<Item2>
<Filename Value="lr_sqlquery.pas"/>
<UnitName Value="lr_sqlquery"/>
<UnitName Value="lr_SQLQuery"/>
</Item2>
<Item3>
<Filename Value="lr_ibconnection.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="LR_IBConnection"/>
</Item3>
<Item4>
<Filename Value="lrsqldb_img.inc"/>
<Type Value="Include"/>
</Item4>
</Files>
<Type Value="RunAndDesignTime"/>
<RequiredPkgs Count="3">

View File

@ -71,7 +71,7 @@ type
implementation
uses LR_Utils;
uses LR_Utils, DBPropEdits, PropEdits;
var
lrBMP_SQLQuery:TBitmap = nil;
@ -271,570 +271,28 @@ begin
XML.SetValue(Path+'Database/Value', FDatabase);
end;
initialization
{$I lrsqldb_img.inc}
InitLRComp;
// RegisterPropertyEditor(TypeInfo(string), TLRZQuery, 'Database', TLRZQueryDataBaseProperty);
finalization
if Assigned(lrBMP_SQLQuery) then
FreeAndNil(lrBMP_SQLQuery);
end.
unit lr_SQLQuery;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Graphics, LR_Class, LR_DBComponent, sqldb;
type
{ TLRSQLQuery }
{ TLRZConnectionProtocolProperty }
TLRSQLQuery = class(TLRDataSetControl)
private
FDatabase: string;
procedure SetDatabase(AValue: string);
protected
function GetSQL: TStringList;virtual;
procedure SetSQL(AValue: TStringList);virtual;
procedure AfterLoad;override;
TLRSQLConnectionProtocolProperty = class(TFieldProperty)
public
constructor Create(AOwnerPage:TfrPage); override;
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
published
property SQL:TStringList read GetSQL write SetSQL;
property Database:string read FDatabase write SetDatabase;
procedure FillValues(const Values: TStringList); override;
end;
{ TLRSQLConnection }
{ TLRZConnectionProtocolProperty }
TLRSQLConnection = class(TfrNonVisualControl)
private
FConnected:boolean;
function GetCharSet: string;
function GetConnected: Boolean;
function GetDatabase: string;
function GetHostName: string;
function GetLoginPrompt: Boolean;
function GetPassword: string;
function GetUserName: string;
procedure SetCharSet(AValue: string);
procedure SetConnected(AValue: Boolean);
procedure SetDatabase(AValue: string);
procedure SetHostName(AValue: string);
procedure SetLoginPrompt(AValue: Boolean);
procedure SetPassword(AValue: string);
procedure SetUserName(AValue: string);
protected
FConnection: TSQLConnection;
FSQLTransaction:TSQLTransaction;
procedure SetName(const AValue: string); override;
procedure AfterLoad;override;
public
constructor Create(AOwnerPage:TfrPage); override;
destructor Destroy; override;
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
published
property CharSet: string read GetCharSet write SetCharSet;
property Connected: Boolean read GetConnected write SetConnected;
property LoginPrompt: Boolean read GetLoginPrompt write SetLoginPrompt;
property HostName: string read GetHostName write SetHostName;
property DatabaseName: string read GetDatabase write SetDatabase;
property UserName: string read GetUserName write SetUserName;
property Password: string read GetPassword write SetPassword;
end;
implementation
uses LR_Utils;
var
lrBMP_SQLQuery:TBitmap = nil;
procedure InitLRComp;
procedure TLRSQLConnectionProtocolProperty.FillValues(const Values: TStringList);
begin
if not assigned(lrBMP_SQLQuery) then
begin
lrBMP_SQLQuery := TbitMap.Create;
lrBMP_SQLQuery.LoadFromLazarusResource('TLRSQLQuery');
frRegisterObject(TLRSQLQuery, lrBMP_SQLQuery, 'TLRSQLQuery', nil, otlUIControl, nil);
end;
end;
{ TLRSQLConnection }
function TLRSQLConnection.GetCharSet: string;
begin
Result:=FConnection.CharSet;
end;
function TLRSQLConnection.GetConnected: Boolean;
begin
Result:=FConnection.Connected;
end;
function TLRSQLConnection.GetDatabase: string;
begin
Result:=FConnection.DatabaseName;
end;
function TLRSQLConnection.GetHostName: string;
begin
Result:=FConnection.HostName;
end;
function TLRSQLConnection.GetLoginPrompt: Boolean;
begin
Result:=FConnection.LoginPrompt;
end;
function TLRSQLConnection.GetPassword: string;
begin
Result:=FConnection.Password;
end;
function TLRSQLConnection.GetUserName: string;
begin
Result:=FConnection.UserName;
end;
procedure TLRSQLConnection.SetCharSet(AValue: string);
begin
FConnection.CharSet:=AValue;
end;
procedure TLRSQLConnection.SetConnected(AValue: Boolean);
begin
FConnection.Connected:=AValue;
end;
procedure TLRSQLConnection.SetDatabase(AValue: string);
begin
FConnection.DatabaseName:=AValue;
end;
procedure TLRSQLConnection.SetHostName(AValue: string);
begin
FConnection.HostName:=AValue;
end;
procedure TLRSQLConnection.SetLoginPrompt(AValue: Boolean);
begin
FConnection.LoginPrompt:=AValue;
end;
procedure TLRSQLConnection.SetPassword(AValue: string);
begin
FConnection.Password:=AValue;
end;
procedure TLRSQLConnection.SetUserName(AValue: string);
begin
FConnection.UserName:=AValue;
end;
procedure TLRSQLConnection.SetName(const AValue: string);
begin
inherited SetName(AValue);
FConnection.Name:=Name;
end;
procedure TLRSQLConnection.AfterLoad;
begin
inherited AfterLoad;
FConnection.Connected:=FConnected;
end;
constructor TLRSQLConnection.Create(AOwnerPage: TfrPage);
begin
inherited Create(AOwnerPage);
FSQLTransaction:=TSQLTransaction.Create(OwnerForm);
end;
destructor TLRSQLConnection.Destroy;
begin
if not (Assigned(OwnerPage) and (OwnerPage is TfrPageDialog)) then
begin
FreeAndNil(FSQLTransaction);
FreeAndNil(FConnection);
end;
inherited Destroy;
end;
procedure TLRSQLConnection.LoadFromXML(XML: TLrXMLConfig; const Path: String);
begin
inherited LoadFromXML(XML, Path);
FConnection.LoginPrompt:=XML.GetValue(Path + 'LoginPrompt/Value'{%H-}, false);
FConnection.CharSet:=XML.GetValue(Path + 'CharSet/Value'{%H-}, '');
FConnection.HostName:=XML.GetValue(Path + 'HostName/Value'{%H-}, '');
FConnection.DatabaseName:=XML.GetValue(Path + 'Database/Value'{%H-}, '');
FConnection.UserName:=XML.GetValue(Path + 'User/Value'{%H-}, '');
FConnection.Password:=XML.GetValue(Path + 'Password/Value'{%H-}, '');
FConnected:=XML.GetValue(Path + 'Connected/Value'{%H-}, false);
end;
procedure TLRSQLConnection.SaveToXML(XML: TLrXMLConfig; const Path: String);
begin
inherited SaveToXML(XML, Path);
XML.SetValue(Path + 'LoginPrompt/Value'{%H-}, FConnection.LoginPrompt);
XML.SetValue(Path + 'CharSet/Value'{%H-}, FConnection.CharSet);
XML.SetValue(Path + 'HostName/Value'{%H-}, FConnection.HostName);
XML.SetValue(Path + 'Database/Value'{%H-}, FConnection.DatabaseName);
XML.SetValue(Path + 'User/Value'{%H-}, FConnection.UserName);
XML.SetValue(Path + 'Password/Value'{%H-}, FConnection.Password);
XML.SetValue(Path + 'Connected/Value'{%H-}, FConnection.Connected);
end;
{ TLRSQLQuery }
procedure TLRSQLQuery.SetDatabase(AValue: string);
var
D:TComponent;
begin
if FDatabase=AValue then Exit;
FDatabase:=AValue;
DataSet.Active:=false;
D:=frFindComponent(TSQLQuery(DataSet).Owner, FDatabase);
if Assigned(D) and (D is TSQLConnection)then
TSQLQuery(DataSet).DataBase:=TSQLConnection(D);
end;
function TLRSQLQuery.GetSQL: TStringList;
begin
Result:=TSQLQuery(DataSet).SQL;
end;
procedure TLRSQLQuery.SetSQL(AValue: TStringList);
begin
TSQLQuery(DataSet).SQL.Assign(AValue);
end;
procedure TLRSQLQuery.AfterLoad;
var
D:TComponent;
begin
D:=frFindComponent(DataSet.Owner, FDatabase);
if Assigned(D) and (D is TSQLConnection)then
begin
TSQLQuery(DataSet).DataBase:=TSQLConnection(D);
DataSet.Active:=FActive;
end;
end;
constructor TLRSQLQuery.Create(AOwnerPage: TfrPage);
begin
inherited Create(AOwnerPage);
BaseName := 'lrSQLQuery';
DataSet:=TSQLQuery.Create(OwnerForm);
end;
procedure TLRSQLQuery.LoadFromXML(XML: TLrXMLConfig; const Path: String);
begin
inherited LoadFromXML(XML, Path);
SQL.Text := XML.GetValue(Path+'SQL/Value'{%H-}, '');
FDatabase:= XML.GetValue(Path+'Database/Value'{%H-}, '');
end;
procedure TLRSQLQuery.SaveToXML(XML: TLrXMLConfig; const Path: String);
begin
inherited SaveToXML(XML, Path);
XML.SetValue(Path+'SQL/Value', SQL.Text);
XML.SetValue(Path+'Database/Value', FDatabase);
if (GetComponent(0) is TLRSQLQuery) then
frGetComponents(nil, TSQLConnection, Values, nil);
end;
initialization
{$I lrsqldb_img.inc}
InitLRComp;
// RegisterPropertyEditor(TypeInfo(string), TLRZQuery, 'Database', TLRZQueryDataBaseProperty);
finalization
if Assigned(lrBMP_SQLQuery) then
FreeAndNil(lrBMP_SQLQuery);
end.
unit lr_SQLQuery;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Graphics, LR_Class, LR_DBComponent, sqldb;
type
{ TLRSQLQuery }
TLRSQLQuery = class(TLRDataSetControl)
private
FDatabase: string;
procedure SetDatabase(AValue: string);
protected
function GetSQL: TStringList;virtual;
procedure SetSQL(AValue: TStringList);virtual;
procedure AfterLoad;override;
public
constructor Create(AOwnerPage:TfrPage); override;
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
published
property SQL:TStringList read GetSQL write SetSQL;
property Database:string read FDatabase write SetDatabase;
end;
{ TLRSQLConnection }
TLRSQLConnection = class(TfrNonVisualControl)
private
FConnected:boolean;
function GetCharSet: string;
function GetConnected: Boolean;
function GetDatabase: string;
function GetHostName: string;
function GetLoginPrompt: Boolean;
function GetPassword: string;
function GetUserName: string;
procedure SetCharSet(AValue: string);
procedure SetConnected(AValue: Boolean);
procedure SetDatabase(AValue: string);
procedure SetHostName(AValue: string);
procedure SetLoginPrompt(AValue: Boolean);
procedure SetPassword(AValue: string);
procedure SetUserName(AValue: string);
protected
FConnection: TSQLConnection;
FSQLTransaction:TSQLTransaction;
procedure SetName(const AValue: string); override;
procedure AfterLoad;override;
public
constructor Create(AOwnerPage:TfrPage); override;
destructor Destroy; override;
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
published
property CharSet: string read GetCharSet write SetCharSet;
property Connected: Boolean read GetConnected write SetConnected;
property LoginPrompt: Boolean read GetLoginPrompt write SetLoginPrompt;
property HostName: string read GetHostName write SetHostName;
property DatabaseName: string read GetDatabase write SetDatabase;
property UserName: string read GetUserName write SetUserName;
property Password: string read GetPassword write SetPassword;
end;
implementation
uses LR_Utils;
var
lrBMP_SQLQuery:TBitmap = nil;
procedure InitLRComp;
begin
if not assigned(lrBMP_SQLQuery) then
begin
lrBMP_SQLQuery := TbitMap.Create;
lrBMP_SQLQuery.LoadFromLazarusResource('TLRSQLQuery');
frRegisterObject(TLRSQLQuery, lrBMP_SQLQuery, 'TLRSQLQuery', nil, otlUIControl, nil);
end;
end;
{ TLRSQLConnection }
function TLRSQLConnection.GetCharSet: string;
begin
Result:=FConnection.CharSet;
end;
function TLRSQLConnection.GetConnected: Boolean;
begin
Result:=FConnection.Connected;
end;
function TLRSQLConnection.GetDatabase: string;
begin
Result:=FConnection.DatabaseName;
end;
function TLRSQLConnection.GetHostName: string;
begin
Result:=FConnection.HostName;
end;
function TLRSQLConnection.GetLoginPrompt: Boolean;
begin
Result:=FConnection.LoginPrompt;
end;
function TLRSQLConnection.GetPassword: string;
begin
Result:=FConnection.Password;
end;
function TLRSQLConnection.GetUserName: string;
begin
Result:=FConnection.UserName;
end;
procedure TLRSQLConnection.SetCharSet(AValue: string);
begin
FConnection.CharSet:=AValue;
end;
procedure TLRSQLConnection.SetConnected(AValue: Boolean);
begin
FConnection.Connected:=AValue;
end;
procedure TLRSQLConnection.SetDatabase(AValue: string);
begin
FConnection.DatabaseName:=AValue;
end;
procedure TLRSQLConnection.SetHostName(AValue: string);
begin
FConnection.HostName:=AValue;
end;
procedure TLRSQLConnection.SetLoginPrompt(AValue: Boolean);
begin
FConnection.LoginPrompt:=AValue;
end;
procedure TLRSQLConnection.SetPassword(AValue: string);
begin
FConnection.Password:=AValue;
end;
procedure TLRSQLConnection.SetUserName(AValue: string);
begin
FConnection.UserName:=AValue;
end;
procedure TLRSQLConnection.SetName(const AValue: string);
begin
inherited SetName(AValue);
FConnection.Name:=Name;
end;
procedure TLRSQLConnection.AfterLoad;
begin
inherited AfterLoad;
FConnection.Connected:=FConnected;
end;
constructor TLRSQLConnection.Create(AOwnerPage: TfrPage);
begin
inherited Create(AOwnerPage);
FSQLTransaction:=TSQLTransaction.Create(OwnerForm);
end;
destructor TLRSQLConnection.Destroy;
begin
if not (Assigned(OwnerPage) and (OwnerPage is TfrPageDialog)) then
begin
FreeAndNil(FSQLTransaction);
FreeAndNil(FConnection);
end;
inherited Destroy;
end;
procedure TLRSQLConnection.LoadFromXML(XML: TLrXMLConfig; const Path: String);
begin
inherited LoadFromXML(XML, Path);
FConnection.LoginPrompt:=XML.GetValue(Path + 'LoginPrompt/Value'{%H-}, false);
FConnection.CharSet:=XML.GetValue(Path + 'CharSet/Value'{%H-}, '');
FConnection.HostName:=XML.GetValue(Path + 'HostName/Value'{%H-}, '');
FConnection.DatabaseName:=XML.GetValue(Path + 'Database/Value'{%H-}, '');
FConnection.UserName:=XML.GetValue(Path + 'User/Value'{%H-}, '');
FConnection.Password:=XML.GetValue(Path + 'Password/Value'{%H-}, '');
FConnected:=XML.GetValue(Path + 'Connected/Value'{%H-}, false);
end;
procedure TLRSQLConnection.SaveToXML(XML: TLrXMLConfig; const Path: String);
begin
inherited SaveToXML(XML, Path);
XML.SetValue(Path + 'LoginPrompt/Value'{%H-}, FConnection.LoginPrompt);
XML.SetValue(Path + 'CharSet/Value'{%H-}, FConnection.CharSet);
XML.SetValue(Path + 'HostName/Value'{%H-}, FConnection.HostName);
XML.SetValue(Path + 'Database/Value'{%H-}, FConnection.DatabaseName);
XML.SetValue(Path + 'User/Value'{%H-}, FConnection.UserName);
XML.SetValue(Path + 'Password/Value'{%H-}, FConnection.Password);
XML.SetValue(Path + 'Connected/Value'{%H-}, FConnection.Connected);
end;
{ TLRSQLQuery }
procedure TLRSQLQuery.SetDatabase(AValue: string);
var
D:TComponent;
begin
if FDatabase=AValue then Exit;
FDatabase:=AValue;
DataSet.Active:=false;
D:=frFindComponent(TSQLQuery(DataSet).Owner, FDatabase);
if Assigned(D) and (D is TSQLConnection)then
TSQLQuery(FDataSet).DataBase:=TSQLConnection(D);
end;
function TLRSQLQuery.GetSQL: TStringList;
begin
Result:=TSQLQuery(DataSet).SQL;
end;
procedure TLRSQLQuery.SetSQL(AValue: TStringList);
begin
TSQLQuery(DataSet).SQL.Assign(AValue);
end;
procedure TLRSQLQuery.AfterLoad;
begin
inherited AfterLoad;
end;
constructor TLRSQLQuery.Create(AOwnerPage: TfrPage);
begin
inherited Create(AOwnerPage);
BaseName := 'lrSQLQuery';
DataSet:=TSQLQuery.Create(OwnerForm);
end;
procedure TLRSQLQuery.LoadFromXML(XML: TLrXMLConfig; const Path: String);
begin
inherited LoadFromXML(XML, Path);
SQL.Text := XML.GetValue(Path+'SQL/Value'{%H-}, '');
FDatabase:= XML.GetValue(Path+'Database/Value'{%H-}, '');
end;
procedure TLRSQLQuery.SaveToXML(XML: TLrXMLConfig; const Path: String);
begin
inherited SaveToXML(XML, Path);
XML.SetValue(Path+'SQL/Value', SQL.Text);
XML.SetValue(Path+'Database/Value', FDatabase);
end;
initialization
{$I lrsqldb_img.inc}
InitLRComp;
// RegisterPropertyEditor(TypeInfo(string), TLRZQuery, 'Database', TLRZQueryDataBaseProperty);
RegisterPropertyEditor(TypeInfo(string), TLRSQLQuery, 'Database', TLRSQLConnectionProtocolProperty);
finalization
if Assigned(lrBMP_SQLQuery) then
FreeAndNil(lrBMP_SQLQuery);

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,7 @@
<CONFIG>
<Package Version="4">
<Name Value="LR_TDbf"/>
<Author Value="Lazarus, Lagunov A.A."/>
<CompilerOptions>
<Version Value="11"/>
<SearchPaths>
@ -14,6 +15,9 @@
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<License Value="modified LGPL-2
"/>
<Version Minor="1" Release="1"/>
<Files Count="2">
<Item1>
<Filename Value="lrtdbfdata.pas"/>

View File

@ -148,303 +148,4 @@ finalization
if Assigned(lrBMP_TDbf) then
FreeAndNil(lrBMP_TDbf);
end.
unit lrTDbfData;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Graphics, LR_Class, LR_DBComponent, dbf;
type
TlrTDbfData = class(TComponent)
end;
type
{ TLRDbf }
TLRDbf = class(TLRDataSetControl)
private
function GetFilePath: string;
function GetIndexName: string;
function GetShowDeleted: Boolean;
function GetTableName: string;
procedure SetFilePath(AValue: string);
procedure SetIndexName(AValue: string);
procedure SetShowDeleted(AValue: Boolean);
procedure SetTableName(AValue: string);
protected
procedure AfterLoad;override;
public
constructor Create(AOwnerPage:TfrPage); override;
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
published
property ShowDeleted: Boolean read GetShowDeleted write SetShowDeleted;
property TableName: string read GetTableName write SetTableName;
property IndexName: string read GetIndexName write SetIndexName;
property FilePath: string read GetFilePath write SetFilePath;
end;
procedure Register;
implementation
var
lrBMP_TDbf:TBitmap = nil;
procedure InitLRComp;
begin
if not assigned(lrBMP_TDbf) then
begin
lrBMP_TDbf := TbitMap.Create;
lrBMP_TDbf.LoadFromLazarusResource('TLRDbf');
frRegisterObject(TLRDbf, lrBMP_TDbf, 'TLRDbf', nil, otlUIControl, nil);
end;
end;
procedure Register;
begin
RegisterComponents('LazReport',[TlrTDbfData]);
end;
{ TLRDbf }
procedure TLRDbf.SetIndexName(AValue: string);
begin
TDbf(DataSet).IndexName:=AValue
end;
function TLRDbf.GetFilePath: string;
begin
Result:=TDbf(DataSet).FilePath;
end;
function TLRDbf.GetIndexName: string;
begin
Result:=TDbf(DataSet).IndexName;
end;
function TLRDbf.GetShowDeleted: Boolean;
begin
Result:=TDbf(DataSet).ShowDeleted;
end;
function TLRDbf.GetTableName: string;
begin
Result:=TDbf(DataSet).TableName;
end;
procedure TLRDbf.SetFilePath(AValue: string);
begin
TDbf(DataSet).FilePath:=AValue
end;
procedure TLRDbf.SetShowDeleted(AValue: Boolean);
begin
TDbf(DataSet).ShowDeleted:=AValue
end;
procedure TLRDbf.SetTableName(AValue: string);
begin
TDbf(DataSet).TableName:=AValue
end;
procedure TLRDbf.AfterLoad;
begin
try
if FileExists(TDbf(DataSet).FilePathFull + TDbf(DataSet).TableName) then
DataSet.Active:=FActive;
finally
end;
end;
constructor TLRDbf.Create(AOwnerPage: TfrPage);
begin
inherited Create(AOwnerPage);
BaseName := 'lrDbf';
DataSet:=TDbf.Create(OwnerForm);
end;
procedure TLRDbf.LoadFromXML(XML: TLrXMLConfig; const Path: String);
begin
inherited LoadFromXML(XML, Path);
TableName := XML.GetValue(Path+'TableName/Value'{%H-}, '');
IndexName := XML.GetValue(Path+'IndexName/Value'{%H-}, '');
ShowDeleted:= XML.GetValue(Path+'ShowDeleted/Value'{%H-}, false);
FilePath:= XML.GetValue(Path+'FilePath/Value'{%H-}, '');
end;
procedure TLRDbf.SaveToXML(XML: TLrXMLConfig; const Path: String);
begin
inherited SaveToXML(XML, Path);
XML.SetValue(Path+'TableName/Value'{%H-}, TableName);
XML.SetValue(Path+'IndexName/Value'{%H-}, IndexName);
XML.SetValue(Path+'ShowDeleted/Value'{%H-}, ShowDeleted);
XML.SetValue(Path+'FilePath/Value'{%H-}, FilePath);
end;
initialization
{$I lrtdbfdata_img.inc}
InitLRComp;
{ RegisterPropertyEditor(TypeInfo(string), TLRZQuery, 'Database', TLRZQueryDataBaseProperty);
RegisterPropertyEditor(TypeInfo(string), TLRZConnection, 'Protocol', TLRZConnectionProtocolProperty);
}
finalization
if Assigned(lrBMP_TDbf) then
FreeAndNil(lrBMP_TDbf);
end.
unit lrTDbfData;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Graphics, LR_Class, LR_DBComponent, dbf;
type
TlrTDbfData = class(TComponent)
end;
type
{ TLRDbf }
TLRDbf = class(TLRDataSetControl)
private
function GetFilePath: string;
function GetIndexName: string;
function GetShowDeleted: Boolean;
function GetTableName: string;
procedure SetFilePath(AValue: string);
procedure SetIndexName(AValue: string);
procedure SetShowDeleted(AValue: Boolean);
procedure SetTableName(AValue: string);
protected
procedure AfterLoad;override;
public
constructor Create(AOwnerPage:TfrPage); override;
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
published
property ShowDeleted: Boolean read GetShowDeleted write SetShowDeleted;
property TableName: string read GetTableName write SetTableName;
property IndexName: string read GetIndexName write SetIndexName;
property FilePath: string read GetFilePath write SetFilePath;
end;
procedure Register;
implementation
var
lrBMP_TDbf:TBitmap = nil;
procedure InitLRComp;
begin
if not assigned(lrBMP_TDbf) then
begin
lrBMP_TDbf := TbitMap.Create;
lrBMP_TDbf.LoadFromLazarusResource('TLRDbf');
frRegisterObject(TLRDbf, lrBMP_TDbf, 'TLRDbf', nil, otlUIControl, nil);
end;
end;
procedure Register;
begin
RegisterComponents('LazReport',[TlrTDbfData]);
end;
{ TLRDbf }
procedure TLRDbf.SetIndexName(AValue: string);
begin
TDbf(DataSet).IndexName:=AValue
end;
function TLRDbf.GetFilePath: string;
begin
Result:=TDbf(DataSet).FilePath;
end;
function TLRDbf.GetIndexName: string;
begin
Result:=TDbf(DataSet).IndexName;
end;
function TLRDbf.GetShowDeleted: Boolean;
begin
Result:=TDbf(DataSet).ShowDeleted;
end;
function TLRDbf.GetTableName: string;
begin
Result:=TDbf(DataSet).TableName;
end;
procedure TLRDbf.SetFilePath(AValue: string);
begin
TDbf(DataSet).FilePath:=AValue
end;
procedure TLRDbf.SetShowDeleted(AValue: Boolean);
begin
TDbf(DataSet).ShowDeleted:=AValue
end;
procedure TLRDbf.SetTableName(AValue: string);
begin
TDbf(DataSet).TableName:=AValue
end;
procedure TLRDbf.AfterLoad;
begin
try
if FileExists(TDbf(DataSet).FilePathFull + TDbf(DataSet).TableName) then
DataSet.Active:=FActive;
finally
end;
end;
constructor TLRDbf.Create(AOwnerPage: TfrPage);
begin
inherited Create(AOwnerPage);
BaseName := 'lrDbf';
DataSet:=TDbf.Create(OwnerForm);
end;
procedure TLRDbf.LoadFromXML(XML: TLrXMLConfig; const Path: String);
begin
inherited LoadFromXML(XML, Path);
TableName := XML.GetValue(Path+'TableName/Value'{%H-}, '');
IndexName := XML.GetValue(Path+'IndexName/Value'{%H-}, '');
ShowDeleted:= XML.GetValue(Path+'ShowDeleted/Value'{%H-}, false);
FilePath:= XML.GetValue(Path+'FilePath/Value'{%H-}, '');
end;
procedure TLRDbf.SaveToXML(XML: TLrXMLConfig; const Path: String);
begin
inherited SaveToXML(XML, Path);
XML.SetValue(Path+'TableName/Value'{%H-}, TableName);
XML.SetValue(Path+'IndexName/Value'{%H-}, IndexName);
XML.SetValue(Path+'ShowDeleted/Value'{%H-}, ShowDeleted);
XML.SetValue(Path+'FilePath/Value'{%H-}, FilePath);
end;
initialization
{$I lrtdbfdata_img.inc}
InitLRComp;
{ RegisterPropertyEditor(TypeInfo(string), TLRZQuery, 'Database', TLRZQueryDataBaseProperty);
RegisterPropertyEditor(TypeInfo(string), TLRZConnection, 'Protocol', TLRZConnectionProtocolProperty);
}
finalization
if Assigned(lrBMP_TDbf) then
FreeAndNil(lrBMP_TDbf);
end.

View File

@ -83,173 +83,4 @@ LazarusResources.Add('TLRDbf','BMP',[
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255
]);
LazarusResources.Add('TLRDbf','BMP',[
'BM'#246#6#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#24#0#0#0#0#0
+#192#6#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255'l? '#173#219#255
+#11'?h'#11'?h'#11'?h'#11'?h'#11'?h'#11'?h'#11'?h'#11'?h'#11'?h'#11'?h'#11'?h'
+#11'?h'#11'?h'#11'?h'#11'?h'#11'?hl? '#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#238#204#183#173#219#255#0#144#255#0#144#255#0#144
+#255#0#144#255#0#144#255#0#144#255#0#144#255#0#144#255#0#144#255#0#144#255#0
+#144#255#0#144#255#0#144#255#0#144#255#0#144#255#11'?hl? '#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#238#204#183#173#219#255#0#144
+#255#255#255#255#255#255#255#224#224#224#0#144#255#0#144#255#255#255#255#255
+#255#255#224#224#224#0#144#255#0#144#255#255#255#255#0#144#255#0#144#255#0
+#144#255#11'?hl? '#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#238#204#183#173#219#255#0#144#255#255#255#255','#163#255','#163#255#255
+#255#255#0#144#255#255#255#255','#163#255','#163#255#255#255#255#0#144#255
+#255#255#255#0#144#255#0#144#255#0#144#255#11'?hl? '#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#238#204#183#173#219#255#0#144#255#255
+#255#255','#163#255','#163#255#255#255#255#0#144#255#255#255#255#255#255#255
+#224#224#224#0#144#255#0#144#255#255#255#255#255#255#255#255#255#255#0#144
+#255#11'?hl? '#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#238#204#183#173#219#255#0#144#255#255#255#255','#163#255','#163#255#255#255
+#255#0#144#255#255#255#255','#163#255','#163#255#255#255#255#0#144#255#255
+#255#255#0#144#255#0#144#255#0#144#255#11'?hl? '#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#238#204#183#173#219#255#0#144#255#255#255
+#255#255#255#255#224#224#224#0#144#255#0#144#255#255#255#255#255#255#255#224
+#224#224#0#144#255#0#144#255#255#255#255#255#255#255#255#255#255#0#144#255#11
+'?hl? '#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#230#194
+#167#173#219#255#0#144#255#0#144#255#0#144#255#0#144#255#0#144#255#0#144#255
+#0#144#255#0#144#255#0#144#255#0#144#255#0#144#255#0#144#255#0#144#255#0#144
+#255#0#144#255#11'?hl? '#255#255#255#255#255#255#255#255#255#230#194#167#197
+'xE'#197'xE'#173#219#255#173#219#255#173#219#255#173#219#255#173#219#255#173
+#219#255#173#219#255#173#219#255#173#219#255#173#219#255#173#219#255#173#219
+#255#173#219#255#173#219#255#173#219#255#173#219#255#173#219#255'l? '#255#255
+#255#255#255#255#255#255#255#197'xE'#217#163'{'#223#178#145#236#209#189#255
+#255#255#243#225#211#236#209#189#230#194#167#223#178#145#217#163'{'#214#155
+'p'#196'vB'#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#210#147'd'#217#163'{'#223#178#145#196'vB'#196'vB'#196'vB'#196'vB'#196'v'
+'B'#196'vB'#217#163'{'#215#158't4~'#25#0'w'#0#0'w'#0#0#168#0#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#210#147'd'#197'xE'#196'vB'#236#209#189#255#255#255#243#225
+#211#236#209#189#230#194#167#223#178#145#196'vB'#196'vB'#0'w'#0#0#196#0#0#168
+#0#0'w'#0#0#168#0#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#196'vB'#217#163'{'#223#178#145#236#209
+#189#255#255#255#243#225#211#236#209#189#230#194#167#223#178#145#217#163'{'
+#218#164'}'#0'w'#0#0#196#0#0#196#0#0#168#0#0'w'#0#0#168#0#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#210#147'd'
+#217#163'{'#223#178#145#196'vB'#196'vB'#196'vB'#196'vB'#196'vB'#196'vB'#217
+#163'{'#218#164'}'#0'w'#0#0#196#0#0#196#0#0#196#0#0#168#0#0'w'#0#0#168#0#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#210#147
+'d'#197'xE'#196'vB'#236#209#189#255#255#255#243#225#211#236#209#189#230#194
+#167#223#178#145#196'vB'#196'vB'#0'w'#0#0#196#0#0#196#0#0#196#0#0#196#0#0#168
+#0#0'w'#0#0#168#0#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#196'vB'#217#163'{'#223#178#145#236#209#189#255#255#255#243#225#211#236#209
+#189#230#194#167#223#178#145#217#163'{'#215#159'v'#0'w'#0#0#196#0#0#196#0#0
+#196#0#0#168#0#0'w'#0#0#168#0#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#210#147'd'#217#163'{'#223#178#145#196'vB'#196'vB'
+#196'vB'#196'vB'#196'vB'#196'vB'#217#163'{'#214#155'p'#23'z'#10#0#196#0#0#196
,#0#0#168#0#0'w'#0#0#168#0#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#210#147'd'#196'vB'#196'vB'#230#194#167#236
+#209#189#230#194#167#223#178#145#217#163'{'#214#155'p'#196'vB'#196'vB'#16'y'
+#7#0#196#0#0#168#0#0'w'#0#0#168#0#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#196'vB'#214#155'p'#223
+#178#145#236#209#189#243#225#211#236#209#189#230#194#167#223#178#145#217#163
+'{'#214#155'p'#210#147'd'#0'w'#0#0'w'#0#0'w'#0#0#168#0#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#230#194#167#196'vB'#196'vB'#243#225#211#255#255#255#243#225#211
+#236#209#189#230#194#167#223#178#145#196'vB'#196'vB'#230#194#167#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#230#194#167#196'vB'#196'vB'#196'vB'#196'vB'#196'vB'#196'vB'#230#194#167
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255
]);
LazarusResources.Add('TLRDbf','BMP',[
'BM'#246#6#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#24#0#0#0#0#0
+#192#6#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255'l? '#173#219#255
+#11'?h'#11'?h'#11'?h'#11'?h'#11'?h'#11'?h'#11'?h'#11'?h'#11'?h'#11'?h'#11'?h'
+#11'?h'#11'?h'#11'?h'#11'?h'#11'?hl? '#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#238#204#183#173#219#255#0#144#255#0#144#255#0#144
+#255#0#144#255#0#144#255#0#144#255#0#144#255#0#144#255#0#144#255#0#144#255#0
+#144#255#0#144#255#0#144#255#0#144#255#0#144#255#11'?hl? '#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#238#204#183#173#219#255#0#144
+#255#255#255#255#255#255#255#224#224#224#0#144#255#0#144#255#255#255#255#255
+#255#255#224#224#224#0#144#255#0#144#255#255#255#255#0#144#255#0#144#255#0
+#144#255#11'?hl? '#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#238#204#183#173#219#255#0#144#255#255#255#255','#163#255','#163#255#255
+#255#255#0#144#255#255#255#255','#163#255','#163#255#255#255#255#0#144#255
+#255#255#255#0#144#255#0#144#255#0#144#255#11'?hl? '#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#238#204#183#173#219#255#0#144#255#255
+#255#255','#163#255','#163#255#255#255#255#0#144#255#255#255#255#255#255#255
+#224#224#224#0#144#255#0#144#255#255#255#255#255#255#255#255#255#255#0#144
+#255#11'?hl? '#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#238#204#183#173#219#255#0#144#255#255#255#255','#163#255','#163#255#255#255
+#255#0#144#255#255#255#255','#163#255','#163#255#255#255#255#0#144#255#255
+#255#255#0#144#255#0#144#255#0#144#255#11'?hl? '#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#238#204#183#173#219#255#0#144#255#255#255
+#255#255#255#255#224#224#224#0#144#255#0#144#255#255#255#255#255#255#255#224
+#224#224#0#144#255#0#144#255#255#255#255#255#255#255#255#255#255#0#144#255#11
+'?hl? '#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#230#194
+#167#173#219#255#0#144#255#0#144#255#0#144#255#0#144#255#0#144#255#0#144#255
+#0#144#255#0#144#255#0#144#255#0#144#255#0#144#255#0#144#255#0#144#255#0#144
+#255#0#144#255#11'?hl? '#255#255#255#255#255#255#255#255#255#230#194#167#197
+'xE'#197'xE'#173#219#255#173#219#255#173#219#255#173#219#255#173#219#255#173
+#219#255#173#219#255#173#219#255#173#219#255#173#219#255#173#219#255#173#219
+#255#173#219#255#173#219#255#173#219#255#173#219#255#173#219#255'l? '#255#255
+#255#255#255#255#255#255#255#197'xE'#217#163'{'#223#178#145#236#209#189#255
+#255#255#243#225#211#236#209#189#230#194#167#223#178#145#217#163'{'#214#155
+'p'#196'vB'#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#210#147'd'#217#163'{'#223#178#145#196'vB'#196'vB'#196'vB'#196'vB'#196'v'
+'B'#196'vB'#217#163'{'#215#158't4~'#25#0'w'#0#0'w'#0#0#168#0#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#210#147'd'#197'xE'#196'vB'#236#209#189#255#255#255#243#225
+#211#236#209#189#230#194#167#223#178#145#196'vB'#196'vB'#0'w'#0#0#196#0#0#168
+#0#0'w'#0#0#168#0#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#196'vB'#217#163'{'#223#178#145#236#209
+#189#255#255#255#243#225#211#236#209#189#230#194#167#223#178#145#217#163'{'
+#218#164'}'#0'w'#0#0#196#0#0#196#0#0#168#0#0'w'#0#0#168#0#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#210#147'd'
+#217#163'{'#223#178#145#196'vB'#196'vB'#196'vB'#196'vB'#196'vB'#196'vB'#217
+#163'{'#218#164'}'#0'w'#0#0#196#0#0#196#0#0#196#0#0#168#0#0'w'#0#0#168#0#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#210#147
+'d'#197'xE'#196'vB'#236#209#189#255#255#255#243#225#211#236#209#189#230#194
+#167#223#178#145#196'vB'#196'vB'#0'w'#0#0#196#0#0#196#0#0#196#0#0#196#0#0#168
+#0#0'w'#0#0#168#0#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#196'vB'#217#163'{'#223#178#145#236#209#189#255#255#255#243#225#211#236#209
+#189#230#194#167#223#178#145#217#163'{'#215#159'v'#0'w'#0#0#196#0#0#196#0#0
+#196#0#0#168#0#0'w'#0#0#168#0#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#210#147'd'#217#163'{'#223#178#145#196'vB'#196'vB'
+#196'vB'#196'vB'#196'vB'#196'vB'#217#163'{'#214#155'p'#23'z'#10#0#196#0#0#196
,#0#0#168#0#0'w'#0#0#168#0#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#210#147'd'#196'vB'#196'vB'#230#194#167#236
+#209#189#230#194#167#223#178#145#217#163'{'#214#155'p'#196'vB'#196'vB'#16'y'
+#7#0#196#0#0#168#0#0'w'#0#0#168#0#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#196'vB'#214#155'p'#223
+#178#145#236#209#189#243#225#211#236#209#189#230#194#167#223#178#145#217#163
+'{'#214#155'p'#210#147'd'#0'w'#0#0'w'#0#0'w'#0#0#168#0#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#230#194#167#196'vB'#196'vB'#243#225#211#255#255#255#243#225#211
+#236#209#189#230#194#167#223#178#145#196'vB'#196'vB'#230#194#167#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#230#194#167#196'vB'#196'vB'#196'vB'#196'vB'#196'vB'#196'vB'#230#194#167
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255
]);

View File

@ -0,0 +1,23 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
#: lrdbzeosconst.slreditparamsform_caption
msgid "Edit query param list"
msgstr ""
#: lrdbzeosconst.slreditparamsform_paramslist
msgid "Params list"
msgstr ""
#: lrdbzeosconst.slreditparamsform_paramtype
msgid "Param type"
msgstr ""
#: lrdbzeosconst.slreditparamsform_paramvalue
msgid "Param value"
msgstr ""
#: lrdbzeosconst.slreditparamsform_selectexpresion
msgid "Select expresion"
msgstr ""

View File

@ -0,0 +1,23 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
#: lrdbzeosconst.slreditparamsform_caption
msgid "Edit query param list"
msgstr "Изменить список параметров"
#: lrdbzeosconst.slreditparamsform_paramslist
msgid "Params list"
msgstr "Список параметров"
#: lrdbzeosconst.slreditparamsform_paramtype
msgid "Param type"
msgstr "Тип параметра"
#: lrdbzeosconst.slreditparamsform_paramvalue
msgid "Param value"
msgstr "Значение параметра"
#: lrdbzeosconst.slreditparamsform_selectexpresion
msgid "Select expresion"
msgstr "Выбрать выражение"

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,150 @@
object lrEditParamsForm: TlrEditParamsForm
Left = 572
Height = 313
Top = 247
Width = 515
Caption = 'Edit query param list'
ClientHeight = 313
ClientWidth = 515
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
OnDestroy = FormDestroy
LCLVersion = '1.1'
object ButtonPanel1: TButtonPanel
Left = 6
Height = 42
Top = 265
Width = 503
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
HelpButton.Name = 'HelpButton'
HelpButton.DefaultCaption = True
CloseButton.Name = 'CloseButton'
CloseButton.DefaultCaption = True
CancelButton.Name = 'CancelButton'
CancelButton.DefaultCaption = True
TabOrder = 0
ShowButtons = [pbOK, pbCancel, pbHelp]
end
object GroupBox1: TGroupBox
Left = 0
Height = 259
Top = 0
Width = 239
Align = alLeft
Caption = 'Param values'
ClientHeight = 242
ClientWidth = 235
TabOrder = 1
object ListBox1: TListBox
Left = 0
Height = 242
Top = 0
Width = 235
Align = alClient
ItemHeight = 0
OnClick = ListBox1Click
ScrollWidth = 233
TabOrder = 0
TopIndex = -1
end
end
object GroupBox2: TGroupBox
Left = 244
Height = 259
Top = 0
Width = 271
Align = alClient
Caption = 'Param value'
ClientHeight = 242
ClientWidth = 267
TabOrder = 2
object Label1: TLabel
AnchorSideLeft.Control = GroupBox2
AnchorSideTop.Control = GroupBox2
Left = 6
Height = 16
Top = 6
Width = 75
BorderSpacing.Around = 6
Caption = 'Param type'
ParentColor = False
end
object ComboBox1: TComboBox
AnchorSideLeft.Control = Label1
AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = GroupBox2
AnchorSideRight.Side = asrBottom
Left = 12
Height = 25
Top = 28
Width = 249
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
ItemHeight = 0
ItemIndex = 0
Items.Strings = (
'String'
'Integer'
'Float'
'DateTime'
)
Style = csDropDownList
TabOrder = 0
Text = 'String'
end
object Label2: TLabel
AnchorSideLeft.Control = GroupBox2
AnchorSideTop.Control = ComboBox1
AnchorSideTop.Side = asrBottom
Left = 6
Height = 16
Top = 59
Width = 82
BorderSpacing.Around = 6
Caption = 'Param value'
ParentColor = False
end
object Memo1: TMemo
AnchorSideLeft.Control = Label2
AnchorSideTop.Control = Label2
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = GroupBox2
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = BitBtn1
Left = 12
Height = 122
Top = 81
Width = 249
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6
Lines.Strings = (
'Memo1'
)
TabOrder = 1
end
object BitBtn1: TBitBtn
AnchorSideRight.Control = GroupBox2
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = GroupBox2
AnchorSideBottom.Side = asrBottom
Left = 141
Height = 27
Top = 209
Width = 120
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Select expresion'
OnClick = BitBtn1Click
TabOrder = 2
end
end
object Splitter1: TSplitter
Left = 239
Height = 259
Top = 0
Width = 5
end
end

View File

@ -0,0 +1,153 @@
unit lr_EditParams;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ButtonPanel,
StdCtrls, ExtCtrls, Buttons, LR_DB_Zeos, DB;
type
{ TlrEditParamsForm }
TlrEditParamsForm = class(TForm)
BitBtn1: TBitBtn;
ButtonPanel1: TButtonPanel;
ComboBox1: TComboBox;
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
Label1: TLabel;
Label2: TLabel;
ListBox1: TListBox;
Memo1: TMemo;
Splitter1: TSplitter;
procedure BitBtn1Click(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure ListBox1Click(Sender: TObject);
private
FParams:TQueryParamList;
EditItem:integer;
public
procedure LoadParamList(AParams:TQueryParamList);
procedure SaveParamList(AParams:TQueryParamList);
end;
var
lrEditParamsForm: TlrEditParamsForm;
implementation
uses lrDBZeosConst, lr_expres;
{$R *.lfm}
{ TlrEditParamsForm }
procedure TlrEditParamsForm.FormCreate(Sender: TObject);
begin
Caption:=slrEditParamsForm_Caption;
GroupBox1.Caption:=slrEditParamsForm_ParamsList;
GroupBox2.Caption:=slrEditParamsForm_ParamValue;
Label1.Caption:=slrEditParamsForm_ParamType;
Label2.Caption:=slrEditParamsForm_ParamValue;
BitBtn1.Caption:=slrEditParamsForm_SelectExpresion;
//
FParams:=TQueryParamList.Create;
end;
procedure TlrEditParamsForm.FormCloseQuery(Sender: TObject;
var CanClose: boolean);
begin
if ModalResult = mrOk then
ListBox1Click(nil);
end;
procedure TlrEditParamsForm.BitBtn1Click(Sender: TObject);
var
EF:TlrExpresionEditorForm;
begin
EF:=TlrExpresionEditorForm.Create(Application);
if EF.ShowModal = mrOk then
Memo1.Text:=EF.ResultExpresion;
EF.Free;
end;
procedure TlrEditParamsForm.FormDestroy(Sender: TObject);
begin
FreeAndNil(FParams);
end;
procedure TlrEditParamsForm.ListBox1Click(Sender: TObject);
var
P:TQueryParam;
begin
if (ListBox1.Items.Count>0) and (ListBox1.ItemIndex > -1) and (ListBox1.ItemIndex<ListBox1.Items.Count) then
begin
if EditItem>-1 then
begin
P:=TQueryParam(FParams[EditItem]);
case ComboBox1.ItemIndex of
0:P.ParamType:=ftString; //String
1:P.ParamType:=ftInteger; //Integer
2:P.ParamType:=ftFloat; //Float
3:P.ParamType:=ftDateTime; //DateTime
else
P.ParamType:=ftUnknown;
end;
P.ParamValue:=Memo1.Text;
end;
EditItem:=ListBox1.ItemIndex;
P:=TQueryParam(FParams[EditItem]);
case P.ParamType of
ftString:ComboBox1.ItemIndex:=0; //String
ftInteger:ComboBox1.ItemIndex:=1; //Integer
ftFloat:ComboBox1.ItemIndex:=2; //Float
ftDateTime:ComboBox1.ItemIndex:=3; //DateTime
else
ComboBox1.ItemIndex:=-1;
end;
Memo1.Text:=P.ParamValue;
end;
end;
procedure TlrEditParamsForm.LoadParamList(AParams: TQueryParamList);
var
i:integer;
P:TQueryParam;
begin
FParams.Clear;
ListBox1.Items.Clear;
for i:=0 to AParams.Count - 1 do
begin
P:=TQueryParam(AParams[i]);
FParams.Add(P.ParamType, P.ParamName, P.ParamValue);
ListBox1.Items.Add(P.ParamName);
end;
EditItem:=-1;
if ListBox1.Items.Count > 0 then
begin
ListBox1.ItemIndex:=0;
ListBox1Click(nil);
end;
end;
procedure TlrEditParamsForm.SaveParamList(AParams: TQueryParamList);
var
i:integer;
P, P1:TQueryParam;
begin
for i:=0 to FParams.Count - 1 do
begin
P:=TQueryParam(FParams[i]);
P1:=TQueryParam(AParams[i]);
P1.ParamType:=P.ParamType;
P1.ParamName:=P.ParamName;
P1.ParamValue:=P.ParamValue;
end;
end;
end.

View File

@ -3,7 +3,7 @@ object lrEditVariablesForm: TlrEditVariablesForm
Height = 348
Top = 229
Width = 497
Caption = 'Edit params'
Caption = 'Edit variables'
ClientHeight = 348
ClientWidth = 497
OnCreate = FormCreate
@ -64,9 +64,9 @@ object lrEditVariablesForm: TlrEditVariablesForm
Left = 8
Height = 16
Top = 4
Width = 73
Width = 85
BorderSpacing.Around = 6
Caption = 'Params list'
Caption = 'Variables list'
ParentColor = False
end
object Label2: TLabel
@ -75,233 +75,9 @@ object lrEditVariablesForm: TlrEditVariablesForm
Left = 254
Height = 16
Top = 6
Width = 82
Width = 94
BorderSpacing.Around = 6
Caption = 'Param value'
ParentColor = False
end
object ListBox1: TListBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Label3
AnchorSideBottom.Control = ButtonPanel1
Left = 6
Height = 268
Top = 26
Width = 236
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6
ItemHeight = 0
OnClick = ListBox1Click
ScrollWidth = 234
TabOrder = 3
TopIndex = -1
end
object Label3: TLabel
AnchorSideLeft.Control = Owner
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Owner
Left = 248
Height = 1
Top = 6
Width = 1
BorderSpacing.Around = 6
ParentColor = False
end
end
object lrEditVariablesForm: TlrEditVariablesForm
Left = 477
Height = 348
Top = 229
Width = 497
Caption = 'Edit params'
ClientHeight = 348
ClientWidth = 497
OnCreate = FormCreate
OnDestroy = FormDestroy
LCLVersion = '1.1'
object Memo2: TMemo
AnchorSideLeft.Control = Label3
AnchorSideTop.Control = Label2
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 254
Height = 230
Top = 28
Width = 237
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
Lines.Strings = (
'Memo2'
)
TabOrder = 0
end
object BitBtn1: TBitBtn
AnchorSideTop.Control = ListBox1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ButtonPanel1
Left = 371
Height = 27
Top = 267
Width = 120
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Select expresion'
OnClick = BitBtn1Click
TabOrder = 1
end
object ButtonPanel1: TButtonPanel
Left = 6
Height = 42
Top = 300
Width = 485
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
HelpButton.Name = 'HelpButton'
HelpButton.DefaultCaption = True
CloseButton.Name = 'CloseButton'
CloseButton.DefaultCaption = True
CancelButton.Name = 'CancelButton'
CancelButton.DefaultCaption = True
TabOrder = 2
ShowButtons = [pbOK, pbCancel, pbHelp]
end
object Label1: TLabel
AnchorSideTop.Side = asrBottom
Left = 8
Height = 16
Top = 4
Width = 73
BorderSpacing.Around = 6
Caption = 'Params list'
ParentColor = False
end
object Label2: TLabel
AnchorSideLeft.Control = Label3
AnchorSideTop.Control = Owner
Left = 254
Height = 16
Top = 6
Width = 82
BorderSpacing.Around = 6
Caption = 'Param value'
ParentColor = False
end
object ListBox1: TListBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Label3
AnchorSideBottom.Control = ButtonPanel1
Left = 6
Height = 268
Top = 26
Width = 236
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6
ItemHeight = 0
OnClick = ListBox1Click
ScrollWidth = 234
TabOrder = 3
TopIndex = -1
end
object Label3: TLabel
AnchorSideLeft.Control = Owner
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Owner
Left = 248
Height = 1
Top = 6
Width = 1
BorderSpacing.Around = 6
ParentColor = False
end
end
object lrEditVariablesForm: TlrEditVariablesForm
Left = 477
Height = 348
Top = 229
Width = 497
Caption = 'Edit params'
ClientHeight = 348
ClientWidth = 497
OnCreate = FormCreate
OnDestroy = FormDestroy
LCLVersion = '1.1'
object Memo2: TMemo
AnchorSideLeft.Control = Label3
AnchorSideTop.Control = Label2
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 254
Height = 230
Top = 28
Width = 237
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
Lines.Strings = (
'Memo2'
)
TabOrder = 0
end
object BitBtn1: TBitBtn
AnchorSideTop.Control = ListBox1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ButtonPanel1
Left = 371
Height = 27
Top = 267
Width = 120
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Select expresion'
OnClick = BitBtn1Click
TabOrder = 1
end
object ButtonPanel1: TButtonPanel
Left = 6
Height = 42
Top = 300
Width = 485
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
HelpButton.Name = 'HelpButton'
HelpButton.DefaultCaption = True
CloseButton.Name = 'CloseButton'
CloseButton.DefaultCaption = True
CancelButton.Name = 'CancelButton'
CancelButton.DefaultCaption = True
TabOrder = 2
ShowButtons = [pbOK, pbCancel, pbHelp]
end
object Label1: TLabel
AnchorSideTop.Side = asrBottom
Left = 8
Height = 16
Top = 4
Width = 73
BorderSpacing.Around = 6
Caption = 'Params list'
ParentColor = False
end
object Label2: TLabel
AnchorSideLeft.Control = Label3
AnchorSideTop.Control = Owner
Left = 254
Height = 16
Top = 6
Width = 82
BorderSpacing.Around = 6
Caption = 'Param value'
Caption = 'Variable value'
ParentColor = False
end
object ListBox1: TListBox

View File

@ -107,221 +107,3 @@ end;
end.
unit LR_EditVariables;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
Buttons, ButtonPanel, LR_Intrp;
type
{ TlrEditVariablesForm }
TlrEditVariablesForm = class(TForm)
BitBtn1: TBitBtn;
ButtonPanel1: TButtonPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
ListBox1: TListBox;
Memo2: TMemo;
procedure BitBtn1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure ListBox1Click(Sender: TObject);
private
EditItem:integer;
ValList:TStringList;
public
procedure LoadParamList(AVars:TfrVariables);
procedure SaveParamList(AVars:TfrVariables);
end;
var
lrEditVariablesForm: TlrEditVariablesForm;
implementation
uses lr_expres;
{$R *.lfm}
{ TlrEditVariablesForm }
procedure TlrEditVariablesForm.ListBox1Click(Sender: TObject);
begin
if (ListBox1.Items.Count>0) and (ListBox1.ItemIndex > -1) and (ListBox1.ItemIndex<ListBox1.Items.Count) then
begin
if EditItem>-1 then
ValList.Values[ListBox1.Items[EditItem]]:=Memo2.Text;
EditItem:=ListBox1.ItemIndex;
Memo2.Text:=ValList.Values[ListBox1.Items[EditItem]];
end;
end;
procedure TlrEditVariablesForm.FormCreate(Sender: TObject);
begin
ValList:=TStringList.Create;
Memo2.Text:='';
end;
procedure TlrEditVariablesForm.BitBtn1Click(Sender: TObject);
var
EF:TlrExpresionEditorForm;
begin
EF:=TlrExpresionEditorForm.Create(Application);
if EF.ShowModal = mrOk then
Memo2.Text:=EF.ResultExpresion;
EF.Free;
end;
procedure TlrEditVariablesForm.FormDestroy(Sender: TObject);
begin
FreeAndNil(ValList);
end;
procedure TlrEditVariablesForm.LoadParamList(AVars: TfrVariables);
var
i:integer;
begin
ListBox1.Items.Clear;
for i:=0 to AVars.Count - 1 do
begin
ListBox1.Items.Add(AVars.Name[i]);
ValList.Values[AVars.Name[i]]:=AVars.Value[i];
end;
EditItem:=-1;
Memo2.Enabled:=ListBox1.Items.Count>0;
ListBox1.Enabled:=ListBox1.Items.Count>0;
if ListBox1.Items.Count>0 then
begin
ListBox1.ItemIndex:=0;
ListBox1Click(nil);
end;
end;
procedure TlrEditVariablesForm.SaveParamList(AVars: TfrVariables);
var
i:integer;
begin
ListBox1Click(nil);
AVars.Clear;
for i:=0 to ListBox1.Items.Count - 1 do
AVars[ListBox1.Items[i]]:=ValList.Values[ListBox1.Items[i]];
end;
end.
unit LR_EditVariables;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
Buttons, ButtonPanel, LR_Intrp;
type
{ TlrEditVariablesForm }
TlrEditVariablesForm = class(TForm)
BitBtn1: TBitBtn;
ButtonPanel1: TButtonPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
ListBox1: TListBox;
Memo2: TMemo;
procedure BitBtn1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure ListBox1Click(Sender: TObject);
private
EditItem:integer;
ValList:TStringList;
public
procedure LoadParamList(AVars:TfrVariables);
procedure SaveParamList(AVars:TfrVariables);
end;
var
lrEditVariablesForm: TlrEditVariablesForm;
implementation
uses lr_expres;
{$R *.lfm}
{ TlrEditVariablesForm }
procedure TlrEditVariablesForm.ListBox1Click(Sender: TObject);
begin
if (ListBox1.Items.Count>0) and (ListBox1.ItemIndex > -1) and (ListBox1.ItemIndex<ListBox1.Items.Count) then
begin
if EditItem>-1 then
ValList.Values[ListBox1.Items[EditItem]]:=Memo2.Text;
EditItem:=ListBox1.ItemIndex;
Memo2.Text:=ValList.Values[ListBox1.Items[EditItem]];
end;
end;
procedure TlrEditVariablesForm.FormCreate(Sender: TObject);
begin
ValList:=TStringList.Create;
Memo2.Text:='';
end;
procedure TlrEditVariablesForm.BitBtn1Click(Sender: TObject);
var
EF:TlrExpresionEditorForm;
begin
EF:=TlrExpresionEditorForm.Create(Application);
if EF.ShowModal = mrOk then
Memo2.Text:=EF.ResultExpresion;
EF.Free;
end;
procedure TlrEditVariablesForm.FormDestroy(Sender: TObject);
begin
FreeAndNil(ValList);
end;
procedure TlrEditVariablesForm.LoadParamList(AVars: TfrVariables);
var
i:integer;
begin
ListBox1.Items.Clear;
for i:=0 to AVars.Count - 1 do
begin
ListBox1.Items.Add(AVars.Name[i]);
ValList.Values[AVars.Name[i]]:=AVars.Value[i];
end;
EditItem:=-1;
Memo2.Enabled:=ListBox1.Items.Count>0;
ListBox1.Enabled:=ListBox1.Items.Count>0;
if ListBox1.Items.Count>0 then
begin
ListBox1.ItemIndex:=0;
ListBox1Click(nil);
end;
end;
procedure TlrEditVariablesForm.SaveParamList(AVars: TfrVariables);
var
i:integer;
begin
ListBox1Click(nil);
AVars.Clear;
for i:=0 to ListBox1.Items.Count - 1 do
AVars[ListBox1.Items[i]]:=ValList.Values[ListBox1.Items[i]];
end;
end.

View File

@ -219,445 +219,4 @@ LazarusResources.Add('TLRZConnection','BMP',[
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
]);
LazarusResources.Add('TLRZQuery','BMP',[
'BM6'#9#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0' '#0#0#0#0#0#0#9#0
+#0#215#13#0#0#215#13#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#239#232#232#255#190#156#156#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#187#152#152#255
+'p%%'#255'['#6#6#255'h'#25#25#255#148'\\'#255#237#229#229#255#255#255#255#255
+#255#255#255#255#228#214#214#255#137'KK'#255'g'#24#24#255'd'#19#19#255#131'C'
+'C'#255'^'#10#10#255#131'BB'#255#255#255#255#255'X'#0#0#255'X'#0#0#255'X'#0#0
+#255'X'#0#0#255'X'#0#0#255'y33'#255#255#255#255#255#207#183#183#255'X'#0#0
+#255'}99'#255#183#146#146#255#150'__'#255'X'#0#0#255#131'CC'#255#255#255#255
+#255#235#225#225#255'_'#11#11#255'c'#18#18#255#171#128#128#255'o$$'#255'X'#0
+#0#255'X'#1#1#255#226#211#211#255#255#255#255#255'X'#0#0#255'h'#25#25#255#199
+#171#171#255#199#171#171#255#199#171#171#255#211#188#188#255#255#255#255#255
+#187#152#152#255'|88'#255#239#231#231#255#255#255#255#255#249#247#247#255'^'
+#10#10#255'a'#15#15#255#255#255#255#255#156'ii'#255'X'#0#0#255#201#173#173
+#255#243#238#238#255#156'ii'#255#207#182#182#255'X'#0#0#255#137'KK'#255#255
+#255#255#255'X'#0#0#255'q'''''#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#253#252#252#255#155
+#133#133#255'~KK'#255'b'#21#21#255'X'#0#0#255'w>>'#255#179#179#179#255'l(('
+#255'X'#0#0#255#173#167#167#255#179#179#179#255#179#179#179#255#179#178#178
+#255'_'#15#15#255'_'#14#14#255#179#179#179#255'X'#0#0#255'e'#27#27#255#179
+#179#179#255#179#179#179#255#179#179#179#255#179#179#179#255#179#179#179#255
+#253#253#253#255#131'BB'#255'X'#0#0#255'X'#0#0#255'z44'#255#175#134#134#255
+#250#248#248#255#255#255#255#255'}::'#255'X'#0#0#255#245#240#240#255#179#179
+#179#255#255#255#255#255#255#255#255#255'g'#23#23#255'd'#19#19#255#255#255
+#255#255'X'#0#0#255'q'''''#255#254#254#254#255#254#254#254#255#254#254#254
+#255#254#254#254#255#179#179#179#255#213#192#192#255'X'#0#0#255#128'OO'#255
+#236#227#227#255#242#236#236#255#187#152#152#255#196#165#165#255#255#255#255
+#255#156'hh'#255'X'#0#0#255#198#169#169#255#179#179#179#255#255#255#255#255
+#224#209#209#255'X'#0#0#255#129'@@'#255#255#255#255#255'X'#0#0#255'q'''''#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#179#179#179
+#255#219#201#201#255'X'#0#0#255'u::'#255#144'oo'#255'q22'#255'X'#0#0#255'm**'
+#255#179#179#179#255#168#157#157#255'['#7#7#255'\'#9#9#255#134'[['#255#138'b'
+'b'#255'a'#19#19#255'X'#0#0#255#157#136#136#255#180#180#180#255'X'#0#0#255'e'
+#27#27#255#180#180#180#255#180#180#180#255#180#180#180#255#180#180#180#255
+#179#179#179#255#255#255#255#255#184#148#148#255'd'#24#24#255'['#6#6#255'i'
+#26#26#255#151'aa'#255#239#231#231#255#255#255#255#255#255#255#255#255#228
+#215#215#255#139'NN'#255'`'#16#16#255'b'#16#16#255#129'??'#255#214#193#193
+#255#255#255#255#255#255#255#255#255'X'#0#0#255'q'''''#255#254#254#254#255
+#254#254#254#255#254#254#254#255#254#254#254#255#179#179#179#255#255#255#255
+#255#255#255#255#255#179#179#179#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#179#179#179#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#179#179#179#255#255#255
+#255#255#255#255#255#255#179#179#179#255#180#180#180#255#180#180#180#255#180
+#180#180#255#180#180#180#255#180#180#180#255#180#180#180#255#180#180#180#255
+#180#180#180#255#179#179#179#255#180#180#180#255#180#180#180#255#180#180#180
+#255#180#180#180#255#180#180#180#255#180#180#180#255#180#180#180#255#180#180
+#180#255#180#180#180#255#180#180#180#255#180#180#180#255#179#179#179#255#255
+#255#255#255#255#255#255#255#179#179#179#255#254#254#254#255#254#254#254#255
+#254#254#254#255#254#254#254#255#254#254#254#255#254#254#254#255#254#254#254
+#255#255#255#255#255#179#179#179#255#254#254#254#255#254#254#254#255#254#254
+#254#255#254#254#254#255#254#254#254#255#254#254#254#255#254#254#254#255#254
+#254#254#255#254#254#254#255#254#254#254#255#254#254#254#255#179#179#179#255
+#255#255#255#255#255#255#255#255#179#179#179#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#179#179#179#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#179#179#179
+#255#255#255#255#255#255#255#255#255#179#179#179#255#179#179#179#255#179#179
+#179#255#179#179#179#255#179#179#179#255#179#179#179#255#179#179#179#255#179
,#179#179#255#179#179#179#255#179#179#179#255#180#180#180#255#180#180#180#255
+#180#180#180#255#179#179#179#255#179#179#179#255#179#179#179#255#179#179#179
+#255#179#179#179#255#179#179#179#255#179#179#179#255#179#179#179#255#179#179
+#179#255'X'#0#0#255'X'#0#0#255'Y'#2#2#255'['#6#6#255'['#6#6#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#179#179#179#255#254#254#254#255#254#254#254#255#254#254#254#255#253
+#253#253#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#179#179#179#255'|88'#255'X'
+#0#0#255#159#139#139#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#179#179#179#255#255#255#255#255#255#255#255#255#255#255#255#255#254#254#254
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#179#179#179#255#186#151#151#255'X'#0
+#0#255'w=='#255#179#179#179#255#179#179#179#255#179#179#179#255#179#179#179
+#255#179#179#179#255#179#179#179#255#179#179#179#255#179#179#179#255#179#179
+#179#255#180#180#180#255#180#180#180#255#180#180#180#255#179#179#179#255#179
+#179#179#255#179#179#179#255#179#179#179#255#179#179#179#255#179#179#179#255
+#179#179#179#255#179#179#179#255#179#179#179#255#239#232#232#255'^'#10#10#255
+'\'#9#9#255#244#239#239#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#179#179#179
+#255#254#254#254#255#254#254#254#255#254#254#254#255#253#253#253#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#179#179#179#255#255#255#255#255#137'KK'#255'X'#0
+#0#255#194#163#163#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#179#179#179#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#179#179#179#255#255#255#255#255#200#172#172#255'X'#0
+#0#255'q'#16#23#255#190'E^'#255#192'I`'#255#196'Mc'#255#197'Qe'#255#200'Ug'
+#255#202'Zj'#255#204']l'#255#207'bn'#255#209'eq'#255#211'js'#255#214'nu'#255
+#216'sw'#255#219'wz'#255#221'{|'#255#223#127#127#255#226#131#128#255#228#136
+#131#255#231#139#133#255#233#144#135#255#235#148#137#255#255#255#255#255#247
+#244#244#255'^'#4#6#255'Z'#1#2#255#178'=S'#255#193'Ia'#255#195'Mc'#255#197'Q'
+'f'#255#199'Ug'#255#203'Yj'#255#205']l'#255#207'bo'#255#210'eq'#255#211'js'
+#255#214'nu'#255#216'rx'#255#219'wz'#255#221'{|'#255#223#127'~'#255#226#131
+#129#255#228#135#131#255#231#140#133#255#233#143#135#255#236#148#137#255#255
+#255#255#255#255#255#255#255'}'#22'"'#255'X'#0#0#255#144'&4'#255#193'Ia'#255
+#196'Lc'#255#198'Qe'#255#200'Ug'#255#202'Yj'#255#204'^l'#255#207'bn'#255#209
+'fq'#255#212'js'#255#214'nu'#255#216'rx'#255#219'vy'#255#222'z|'#255#224#127
+'~'#255#226#131#129#255#228#136#130#255#230#139#133#255#233#144#135#255#235
+#148#138#255#255#255#255#255#255#255#255#255#218#200#200#255'X'#0#0#255'v//'
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255'n##'#255'X'#0#0#255'X'#0#0#255'X'#0#0#255'X'#0#0#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255
]);
LazarusResources.Add('TLRZConnection','BMP',[
'BM6'#9#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0' '#0#0#0#0#0#0#9#0
+#0#215#13#0#0#215#13#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#249#252#249#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#253#254#253#255#179#209#179#255#132#184#132#255'a'#168'a'
+#255'='#153'='#255#26#140#26#255#0#135#0#255#13#147#13#255'0'#168'0'#255'T'
+#189'T'#255'x'#205'x'#255#156#222#156#255#237#249#237#255#255#255#255#255#234
+#184#184#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#222#233#222
+#255'*w*'#255#0'd'#0#255#0'k'#0#255#0'r'#0#255#0'y'#0#255#0#128#0#255#0#135#0
+#255#0#142#0#255#0#149#0#255#0#156#0#255#0#163#0#255#0#170#0#255#12#180#12
+#255#158#207#142#255#190#23#23#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255'j'#156'j'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'#0#255#0'y'#0
+#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255#0#163#0#255
+#0#170#0#255#1#176#0#255#136'4'#3#255#184#0#0#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255'_'#148'_'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'
+#0#255#0'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255
+#0#163#0#255#0#170#0#255'T`'#0#255#184#0#0#255#184#0#0#255#245#223#223#255
+#245#223#223#255#245#223#223#255#245#223#223#255#245#223#223#255#255#255#255
+#255#255#255#255#255#255#255#255#255'_'#148'_'#255#0']'#0#255#0'd'#0#255#0'k'
+#0#255#0'r'#0#255#0'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255
+#0#156#0#255#0#163#0#255'&'#135#0#255#180#3#0#255#184#0#0#255#184#0#0#255#184
+#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#255#255#255#255#255
+#255#255#255#255#255#255#255'_'#148'_'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0
+'r'#0#255#0'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0
+#255#9#155#0#255#158#24#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255
+#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#255#255#255#255#255#255#255
+#255#255#255#255#255'_'#148'_'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'#0
+#255#0'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255
+'u;'#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0
+#0#255#184#0#0#255#184#0#0#255#184#0#0#255#255#255#255#255#255#255#255#255
+#255#255#255#255'_'#148'_'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'#0#255#0
+'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255'u;'#0
+#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255
+#184#0#0#255#184#0#0#255#184#0#0#255#255#255#255#255#255#255#255#255#255#255
+#255#255'_'#148'_'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'#0#255#0'y'#0#255
+#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255#9#155#0#255#158
+#24#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0
+#255#184#0#0#255#184#0#0#255#255#255#255#255#255#255#255#255#255#255#255#255
+'_'#148'_'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'#0#255#0'y'#0#255#0#128#0
+#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255#0#163#0#255'&'#135#0#255
+#180#3#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184
+#0#0#255#184#0#0#255#255#255#255#255#255#255#255#255#255#255#255#255'_'#148
+'_'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'#0#255#0'y'#0#255#0#128#0#255#0
+#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255#0#163#0#255#0#170#0#255'T`'#0
+#255#184#0#0#255#184#0#0#255#245#223#223#255#245#223#223#255#245#223#223#255
+#245#223#223#255#245#223#223#255#255#255#255#255#255#255#255#255#255#255#255
+#255'_'#148'_'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'#0#255#0'y'#0#255#0
+#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255#0#163#0#255#0#170
+#0#255#1#176#0#255#133'3'#0#255#184#0#0#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255'_'#148'_'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'#0
+#255#0'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255#0
+#163#0#255#0#170#0#255#0#177#0#255#17#167#0#255#190#23#23#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255'X'#0#0#255'X'#0#0#255'X'#1#1#255'U'#2#0#255'U'#2#0#255#0'k'#0#255#0'r'#0
+#255#0'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255#0
+#163#0#255#0#170#0#255#0#177#0#255#0#184#0#255#234#184#184#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
,#255#255'|88'#255'X'#0#0#255']sJ'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'#0
+#255#0'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255#0
+#163#0#255#0#170#0#255#0#177#0#255#0#184#0#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#186#151#151#255'X'#0#0#255'Z2 '#255#0']'#0#255#0'd'#0#255#0'k'#0#255
+#0'r'#0#255#0'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156
+#0#255#0#163#0#255#0#170#0#255#0#177#0#255#0#184#0#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#239#232#232#255'^'#10#10#255'X'#7#4#255#5'W'#0#255#0'd'#0
+#255#0'k'#0#255#0'r'#0#255#0'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0
+#149#0#255#0#156#0#255#0#163#0#255#0#170#0#255#0#177#0#255#0#184#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#137'KK'#255'X'#0#0#255#31';'
+#0#255#0'j'#0#255#0's'#0#255#0'y'#0#255#0'}'#0#255#0#127#0#255#0#128#0#255#0
+#129#0#255#0#133#0#255#0#139#0#255#0#146#0#255#0#156#0#255#0#175#0#255#0#184
+#0#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#200#172#172#255
+'X'#0#0#255'A'#31#0#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127
+#0#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0
+#255#0#131#0#255#0#165#0#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#247#244#244#255'X'#11#6#255'U'#3#0#255#10'p'#0#255#0#127#0#255#0#127#0
+#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255
+#0#127#0#255#0#127#0#255#0#127#0#255#20#140#20#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#144']Y'#255'X'#0#0#255'''F'#0
+#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255
+#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255'%'#146'%'#255#185#220#185
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#218
+#200#200#255'X'#0#0#255'o+('#255#172#213#172#255#137#196#137#255'e'#178'e'
+#255'B'#160'B'#255'"'#144'"'#255'4'#153'4'#255'X'#171'X'#255'|'#189'|'#255
+#160#206#160#255#196#224#196#255#252#253#252#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255'n##'#255'X'#0#0#255'X'#0#0#255'X'#0#0#255'X'#0#0#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
]);
LazarusResources.Add('TLRZQuery','BMP',[
'BM6'#9#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0' '#0#0#0#0#0#0#9#0
+#0#215#13#0#0#215#13#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#239#232#232#255#190#156#156#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#187#152#152#255
+'p%%'#255'['#6#6#255'h'#25#25#255#148'\\'#255#237#229#229#255#255#255#255#255
+#255#255#255#255#228#214#214#255#137'KK'#255'g'#24#24#255'd'#19#19#255#131'C'
+'C'#255'^'#10#10#255#131'BB'#255#255#255#255#255'X'#0#0#255'X'#0#0#255'X'#0#0
+#255'X'#0#0#255'X'#0#0#255'y33'#255#255#255#255#255#207#183#183#255'X'#0#0
+#255'}99'#255#183#146#146#255#150'__'#255'X'#0#0#255#131'CC'#255#255#255#255
+#255#235#225#225#255'_'#11#11#255'c'#18#18#255#171#128#128#255'o$$'#255'X'#0
+#0#255'X'#1#1#255#226#211#211#255#255#255#255#255'X'#0#0#255'h'#25#25#255#199
+#171#171#255#199#171#171#255#199#171#171#255#211#188#188#255#255#255#255#255
+#187#152#152#255'|88'#255#239#231#231#255#255#255#255#255#249#247#247#255'^'
+#10#10#255'a'#15#15#255#255#255#255#255#156'ii'#255'X'#0#0#255#201#173#173
+#255#243#238#238#255#156'ii'#255#207#182#182#255'X'#0#0#255#137'KK'#255#255
+#255#255#255'X'#0#0#255'q'''''#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#253#252#252#255#155
+#133#133#255'~KK'#255'b'#21#21#255'X'#0#0#255'w>>'#255#179#179#179#255'l(('
+#255'X'#0#0#255#173#167#167#255#179#179#179#255#179#179#179#255#179#178#178
+#255'_'#15#15#255'_'#14#14#255#179#179#179#255'X'#0#0#255'e'#27#27#255#179
+#179#179#255#179#179#179#255#179#179#179#255#179#179#179#255#179#179#179#255
+#253#253#253#255#131'BB'#255'X'#0#0#255'X'#0#0#255'z44'#255#175#134#134#255
+#250#248#248#255#255#255#255#255'}::'#255'X'#0#0#255#245#240#240#255#179#179
+#179#255#255#255#255#255#255#255#255#255'g'#23#23#255'd'#19#19#255#255#255
+#255#255'X'#0#0#255'q'''''#255#254#254#254#255#254#254#254#255#254#254#254
+#255#254#254#254#255#179#179#179#255#213#192#192#255'X'#0#0#255#128'OO'#255
+#236#227#227#255#242#236#236#255#187#152#152#255#196#165#165#255#255#255#255
+#255#156'hh'#255'X'#0#0#255#198#169#169#255#179#179#179#255#255#255#255#255
+#224#209#209#255'X'#0#0#255#129'@@'#255#255#255#255#255'X'#0#0#255'q'''''#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#179#179#179
+#255#219#201#201#255'X'#0#0#255'u::'#255#144'oo'#255'q22'#255'X'#0#0#255'm**'
+#255#179#179#179#255#168#157#157#255'['#7#7#255'\'#9#9#255#134'[['#255#138'b'
+'b'#255'a'#19#19#255'X'#0#0#255#157#136#136#255#180#180#180#255'X'#0#0#255'e'
+#27#27#255#180#180#180#255#180#180#180#255#180#180#180#255#180#180#180#255
+#179#179#179#255#255#255#255#255#184#148#148#255'd'#24#24#255'['#6#6#255'i'
+#26#26#255#151'aa'#255#239#231#231#255#255#255#255#255#255#255#255#255#228
+#215#215#255#139'NN'#255'`'#16#16#255'b'#16#16#255#129'??'#255#214#193#193
+#255#255#255#255#255#255#255#255#255'X'#0#0#255'q'''''#255#254#254#254#255
+#254#254#254#255#254#254#254#255#254#254#254#255#179#179#179#255#255#255#255
+#255#255#255#255#255#179#179#179#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#179#179#179#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#179#179#179#255#255#255
+#255#255#255#255#255#255#179#179#179#255#180#180#180#255#180#180#180#255#180
+#180#180#255#180#180#180#255#180#180#180#255#180#180#180#255#180#180#180#255
+#180#180#180#255#179#179#179#255#180#180#180#255#180#180#180#255#180#180#180
+#255#180#180#180#255#180#180#180#255#180#180#180#255#180#180#180#255#180#180
+#180#255#180#180#180#255#180#180#180#255#180#180#180#255#179#179#179#255#255
+#255#255#255#255#255#255#255#179#179#179#255#254#254#254#255#254#254#254#255
+#254#254#254#255#254#254#254#255#254#254#254#255#254#254#254#255#254#254#254
+#255#255#255#255#255#179#179#179#255#254#254#254#255#254#254#254#255#254#254
+#254#255#254#254#254#255#254#254#254#255#254#254#254#255#254#254#254#255#254
+#254#254#255#254#254#254#255#254#254#254#255#254#254#254#255#179#179#179#255
+#255#255#255#255#255#255#255#255#179#179#179#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#179#179#179#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#179#179#179
+#255#255#255#255#255#255#255#255#255#179#179#179#255#179#179#179#255#179#179
+#179#255#179#179#179#255#179#179#179#255#179#179#179#255#179#179#179#255#179
,#179#179#255#179#179#179#255#179#179#179#255#180#180#180#255#180#180#180#255
+#180#180#180#255#179#179#179#255#179#179#179#255#179#179#179#255#179#179#179
+#255#179#179#179#255#179#179#179#255#179#179#179#255#179#179#179#255#179#179
+#179#255'X'#0#0#255'X'#0#0#255'Y'#2#2#255'['#6#6#255'['#6#6#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#179#179#179#255#254#254#254#255#254#254#254#255#254#254#254#255#253
+#253#253#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#179#179#179#255'|88'#255'X'
+#0#0#255#159#139#139#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#179#179#179#255#255#255#255#255#255#255#255#255#255#255#255#255#254#254#254
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#179#179#179#255#186#151#151#255'X'#0
+#0#255'w=='#255#179#179#179#255#179#179#179#255#179#179#179#255#179#179#179
+#255#179#179#179#255#179#179#179#255#179#179#179#255#179#179#179#255#179#179
+#179#255#180#180#180#255#180#180#180#255#180#180#180#255#179#179#179#255#179
+#179#179#255#179#179#179#255#179#179#179#255#179#179#179#255#179#179#179#255
+#179#179#179#255#179#179#179#255#179#179#179#255#239#232#232#255'^'#10#10#255
+'\'#9#9#255#244#239#239#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#179#179#179
+#255#254#254#254#255#254#254#254#255#254#254#254#255#253#253#253#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#179#179#179#255#255#255#255#255#137'KK'#255'X'#0
+#0#255#194#163#163#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#179#179#179#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#179#179#179#255#255#255#255#255#200#172#172#255'X'#0
+#0#255'q'#16#23#255#190'E^'#255#192'I`'#255#196'Mc'#255#197'Qe'#255#200'Ug'
+#255#202'Zj'#255#204']l'#255#207'bn'#255#209'eq'#255#211'js'#255#214'nu'#255
+#216'sw'#255#219'wz'#255#221'{|'#255#223#127#127#255#226#131#128#255#228#136
+#131#255#231#139#133#255#233#144#135#255#235#148#137#255#255#255#255#255#247
+#244#244#255'^'#4#6#255'Z'#1#2#255#178'=S'#255#193'Ia'#255#195'Mc'#255#197'Q'
+'f'#255#199'Ug'#255#203'Yj'#255#205']l'#255#207'bo'#255#210'eq'#255#211'js'
+#255#214'nu'#255#216'rx'#255#219'wz'#255#221'{|'#255#223#127'~'#255#226#131
+#129#255#228#135#131#255#231#140#133#255#233#143#135#255#236#148#137#255#255
+#255#255#255#255#255#255#255'}'#22'"'#255'X'#0#0#255#144'&4'#255#193'Ia'#255
+#196'Lc'#255#198'Qe'#255#200'Ug'#255#202'Yj'#255#204'^l'#255#207'bn'#255#209
+'fq'#255#212'js'#255#214'nu'#255#216'rx'#255#219'vy'#255#222'z|'#255#224#127
+'~'#255#226#131#129#255#228#136#130#255#230#139#133#255#233#144#135#255#235
+#148#138#255#255#255#255#255#255#255#255#255#218#200#200#255'X'#0#0#255'v//'
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255'n##'#255'X'#0#0#255'X'#0#0#255'X'#0#0#255'X'#0#0#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255
]);
LazarusResources.Add('TLRZConnection','BMP',[
'BM6'#9#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0' '#0#0#0#0#0#0#9#0
+#0#215#13#0#0#215#13#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#249#252#249#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#253#254#253#255#179#209#179#255#132#184#132#255'a'#168'a'
+#255'='#153'='#255#26#140#26#255#0#135#0#255#13#147#13#255'0'#168'0'#255'T'
+#189'T'#255'x'#205'x'#255#156#222#156#255#237#249#237#255#255#255#255#255#234
+#184#184#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#222#233#222
+#255'*w*'#255#0'd'#0#255#0'k'#0#255#0'r'#0#255#0'y'#0#255#0#128#0#255#0#135#0
+#255#0#142#0#255#0#149#0#255#0#156#0#255#0#163#0#255#0#170#0#255#12#180#12
+#255#158#207#142#255#190#23#23#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255'j'#156'j'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'#0#255#0'y'#0
+#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255#0#163#0#255
+#0#170#0#255#1#176#0#255#136'4'#3#255#184#0#0#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255'_'#148'_'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'
+#0#255#0'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255
+#0#163#0#255#0#170#0#255'T`'#0#255#184#0#0#255#184#0#0#255#245#223#223#255
+#245#223#223#255#245#223#223#255#245#223#223#255#245#223#223#255#255#255#255
+#255#255#255#255#255#255#255#255#255'_'#148'_'#255#0']'#0#255#0'd'#0#255#0'k'
+#0#255#0'r'#0#255#0'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255
+#0#156#0#255#0#163#0#255'&'#135#0#255#180#3#0#255#184#0#0#255#184#0#0#255#184
+#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#255#255#255#255#255
+#255#255#255#255#255#255#255'_'#148'_'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0
+'r'#0#255#0'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0
+#255#9#155#0#255#158#24#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255
+#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#255#255#255#255#255#255#255
+#255#255#255#255#255'_'#148'_'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'#0
+#255#0'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255
+'u;'#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0
+#0#255#184#0#0#255#184#0#0#255#184#0#0#255#255#255#255#255#255#255#255#255
+#255#255#255#255'_'#148'_'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'#0#255#0
+'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255'u;'#0
+#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255
+#184#0#0#255#184#0#0#255#184#0#0#255#255#255#255#255#255#255#255#255#255#255
+#255#255'_'#148'_'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'#0#255#0'y'#0#255
+#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255#9#155#0#255#158
+#24#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0
+#255#184#0#0#255#184#0#0#255#255#255#255#255#255#255#255#255#255#255#255#255
+'_'#148'_'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'#0#255#0'y'#0#255#0#128#0
+#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255#0#163#0#255'&'#135#0#255
+#180#3#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184#0#0#255#184
+#0#0#255#184#0#0#255#255#255#255#255#255#255#255#255#255#255#255#255'_'#148
+'_'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'#0#255#0'y'#0#255#0#128#0#255#0
+#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255#0#163#0#255#0#170#0#255'T`'#0
+#255#184#0#0#255#184#0#0#255#245#223#223#255#245#223#223#255#245#223#223#255
+#245#223#223#255#245#223#223#255#255#255#255#255#255#255#255#255#255#255#255
+#255'_'#148'_'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'#0#255#0'y'#0#255#0
+#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255#0#163#0#255#0#170
+#0#255#1#176#0#255#133'3'#0#255#184#0#0#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255'_'#148'_'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'#0
+#255#0'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255#0
+#163#0#255#0#170#0#255#0#177#0#255#17#167#0#255#190#23#23#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255'X'#0#0#255'X'#0#0#255'X'#1#1#255'U'#2#0#255'U'#2#0#255#0'k'#0#255#0'r'#0
+#255#0'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255#0
+#163#0#255#0#170#0#255#0#177#0#255#0#184#0#255#234#184#184#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
,#255#255'|88'#255'X'#0#0#255']sJ'#255#0']'#0#255#0'd'#0#255#0'k'#0#255#0'r'#0
+#255#0'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156#0#255#0
+#163#0#255#0#170#0#255#0#177#0#255#0#184#0#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#186#151#151#255'X'#0#0#255'Z2 '#255#0']'#0#255#0'd'#0#255#0'k'#0#255
+#0'r'#0#255#0'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0#149#0#255#0#156
+#0#255#0#163#0#255#0#170#0#255#0#177#0#255#0#184#0#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#239#232#232#255'^'#10#10#255'X'#7#4#255#5'W'#0#255#0'd'#0
+#255#0'k'#0#255#0'r'#0#255#0'y'#0#255#0#128#0#255#0#135#0#255#0#142#0#255#0
+#149#0#255#0#156#0#255#0#163#0#255#0#170#0#255#0#177#0#255#0#184#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#137'KK'#255'X'#0#0#255#31';'
+#0#255#0'j'#0#255#0's'#0#255#0'y'#0#255#0'}'#0#255#0#127#0#255#0#128#0#255#0
+#129#0#255#0#133#0#255#0#139#0#255#0#146#0#255#0#156#0#255#0#175#0#255#0#184
+#0#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#200#172#172#255
+'X'#0#0#255'A'#31#0#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127
+#0#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0
+#255#0#131#0#255#0#165#0#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#247#244#244#255'X'#11#6#255'U'#3#0#255#10'p'#0#255#0#127#0#255#0#127#0
+#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255
+#0#127#0#255#0#127#0#255#0#127#0#255#20#140#20#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#144']Y'#255'X'#0#0#255'''F'#0
+#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255
+#0#127#0#255#0#127#0#255#0#127#0#255#0#127#0#255'%'#146'%'#255#185#220#185
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#218
+#200#200#255'X'#0#0#255'o+('#255#172#213#172#255#137#196#137#255'e'#178'e'
+#255'B'#160'B'#255'"'#144'"'#255'4'#153'4'#255'X'#171'X'#255'|'#189'|'#255
+#160#206#160#255#196#224#196#255#252#253#252#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255'n##'#255'X'#0#0#255'X'#0#0#255'X'#0#0#255'X'#0#0#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
]);

View File

@ -2,6 +2,7 @@
<CONFIG>
<Package Version="4">
<Name Value="LR_ZeosDB"/>
<Author Value="Lazarus, Lagunov A.A."/>
<CompilerOptions>
<Version Value="11"/>
<SearchPaths>
@ -14,7 +15,10 @@
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Files Count="3">
<License Value="modified LGPL-2
"/>
<Version Minor="2" Release="2"/>
<Files Count="5">
<Item1>
<Filename Value="lr_db_zeos.pas"/>
<HasRegisterProc Value="True"/>
@ -26,9 +30,21 @@
</Item2>
<Item3>
<Filename Value="lr_editvariables.pas"/>
<UnitName Value="lr_editvariables"/>
<UnitName Value="LR_EditVariables"/>
</Item3>
<Item4>
<Filename Value="lr_editparams.pas"/>
<UnitName Value="lr_EditParams"/>
</Item4>
<Item5>
<Filename Value="lrdbzeosconst.pas"/>
<UnitName Value="lrDBZeosConst"/>
</Item5>
</Files>
<i18n>
<EnableI18N Value="True"/>
<OutDir Value="languages"/>
</i18n>
<Type Value="RunAndDesignTime"/>
<RequiredPkgs Count="3">
<Item1>

View File

@ -7,49 +7,8 @@ unit LR_ZeosDB;
interface
uses
LR_DB_Zeos, LR_EditVariables, LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('LR_DB_Zeos', @LR_DB_Zeos.Register);
end;
initialization
RegisterPackage('LR_ZeosDB', @Register);
end.
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}
unit LR_ZeosDB;
interface
uses
LR_DB_Zeos, LR_EditVariables, LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('LR_DB_Zeos', @LR_DB_Zeos.Register);
end;
initialization
RegisterPackage('LR_ZeosDB', @Register);
end.
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}
unit LR_ZeosDB;
interface
uses
LR_DB_Zeos, LR_EditVariables, LazarusPackageIntf;
LR_DB_Zeos, LR_EditVariables, lr_EditParams, lrDBZeosConst,
LazarusPackageIntf;
implementation

View File

@ -0,0 +1,20 @@
unit lrDBZeosConst;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils;
resourcestring
slrEditParamsForm_Caption = 'Edit query param list';
slrEditParamsForm_ParamsList = 'Params list';
slrEditParamsForm_ParamValue = 'Param value';
slrEditParamsForm_ParamType = 'Param type';
slrEditParamsForm_SelectExpresion = 'Select expresion';
implementation
end.

View File

@ -247,22 +247,6 @@ msgstr "Bestätigen"
msgid "CSV File"
msgstr "CSV-Datei"
#: lr_const.sdateformat1
msgid "mm.dd.yy"
msgstr "tt.mm.jj"
#: lr_const.sdateformat2
msgid "mm.dd.yyyy"
msgstr "tt.mm.jjjj"
#: lr_const.sdateformat3
msgid "d mmm yyyy"
msgstr "t mmm jjjj"
#: lr_const.sdateformat4
msgid "d mmmm yyyy"
msgstr "t mmmm jjjj"
#: lr_const.sdatetimecategory
msgid "Date and time"
msgstr "Datum und Zeit"
@ -1156,6 +1140,10 @@ msgstr "Objekt&inspektor"
msgid "Line style"
msgstr "Linienstil"
#: lr_const.sfrdesignerform_modified
msgid "Modified"
msgstr ""
#: lr_const.sfrdesignerform_new
#| msgid "&New..."
msgid "&New ..."
@ -2324,22 +2312,6 @@ msgstr "Neuer Report"
msgid "ASCII Text file"
msgstr "ASCII-Textdatei"
#: lr_const.stimeformat1
msgid "hh:nn:ss"
msgstr "hh:mm:ss"
#: lr_const.stimeformat2
msgid "h:nn:ss"
msgstr "h:mm:ss"
#: lr_const.stimeformat3
msgid "hh:nn"
msgstr "hh:mm"
#: lr_const.stimeformat4
msgid "h:nn"
msgstr "h:mm"
#: lr_const.sto
msgid "to"
msgstr "bis"

View File

@ -236,22 +236,6 @@ msgstr "Confirmar"
msgid "CSV File"
msgstr "Archivo CSV"
#: lr_const.sdateformat1
msgid "mm.dd.yy"
msgstr ""
#: lr_const.sdateformat2
msgid "mm.dd.yyyy"
msgstr ""
#: lr_const.sdateformat3
msgid "d mmm yyyy"
msgstr "d-mmm-yyyy"
#: lr_const.sdateformat4
msgid "d mmmm yyyy"
msgstr ""
#: lr_const.sdatetimecategory
msgid "Date and time"
msgstr "Fecha y hora"
@ -1148,6 +1132,10 @@ msgstr "&Inspector de objetos"
msgid "Line style"
msgstr "Estilo de línea"
#: lr_const.sfrdesignerform_modified
msgid "Modified"
msgstr ""
#: lr_const.sfrdesignerform_new
#, fuzzy
#| msgid "&New..."
@ -2323,22 +2311,6 @@ msgstr "Nuevo reporte"
msgid "ASCII Text file"
msgstr "Archivo de texto ASCII"
#: lr_const.stimeformat1
msgid "hh:nn:ss"
msgstr ""
#: lr_const.stimeformat2
msgid "h:nn:ss"
msgstr ""
#: lr_const.stimeformat3
msgid "hh:nn"
msgstr ""
#: lr_const.stimeformat4
msgid "h:nn"
msgstr ""
#: lr_const.sto
msgid "to"
msgstr "hacia"

View File

@ -245,22 +245,6 @@ msgstr "Confirmer"
msgid "CSV File"
msgstr "Fichier CSV"
#: lr_const.sdateformat1
msgid "mm.dd.yy"
msgstr "dd.mm.yy"
#: lr_const.sdateformat2
msgid "mm.dd.yyyy"
msgstr "dd.mm.yyyy"
#: lr_const.sdateformat3
msgid "d mmm yyyy"
msgstr "d mmm yyyy"
#: lr_const.sdateformat4
msgid "d mmmm yyyy"
msgstr "d mmmm yyyy"
#: lr_const.sdatetimecategory
msgid "Date and time"
msgstr "Date et heure"
@ -1159,6 +1143,10 @@ msgstr "&Inspecteur d'objets"
msgid "Line style"
msgstr "Style de ligne"
#: lr_const.sfrdesignerform_modified
msgid "Modified"
msgstr ""
#: lr_const.sfrdesignerform_new
#, fuzzy
#| msgid "&New..."
@ -2338,22 +2326,6 @@ msgstr "Nouveau rapport"
msgid "ASCII Text file"
msgstr "Fichier de texte ASCII"
#: lr_const.stimeformat1
msgid "hh:nn:ss"
msgstr "hh:nn:ss"
#: lr_const.stimeformat2
msgid "h:nn:ss"
msgstr "h:nn:ss"
#: lr_const.stimeformat3
msgid "hh:nn"
msgstr "hh:nn"
#: lr_const.stimeformat4
msgid "h:nn"
msgstr "h:nn"
#: lr_const.sto
msgid "to"
msgstr "à"

View File

@ -236,22 +236,6 @@ msgstr "Konfirmasi"
msgid "CSV File"
msgstr "File CSV"
#: lr_const.sdateformat1
msgid "mm.dd.yy"
msgstr "mm.dd.yy"
#: lr_const.sdateformat2
msgid "mm.dd.yyyy"
msgstr "mm.dd.yyyy"
#: lr_const.sdateformat3
msgid "d mmm yyyy"
msgstr "d mmm yyyy"
#: lr_const.sdateformat4
msgid "d mmmm yyyy"
msgstr "d mmmm yyyy"
#: lr_const.sdatetimecategory
msgid "Date and time"
msgstr "Tanggal dan jam"
@ -1150,6 +1134,10 @@ msgstr "&Inspektor Obyek"
msgid "Line style"
msgstr "Gaya garis"
#: lr_const.sfrdesignerform_modified
msgid "Modified"
msgstr ""
#: lr_const.sfrdesignerform_new
#, fuzzy
#| msgid "&New..."
@ -2329,22 +2317,6 @@ msgstr "Laporan baru"
msgid "ASCII Text file"
msgstr "File Teks ASCII"
#: lr_const.stimeformat1
msgid "hh:nn:ss"
msgstr "hh:nn:ss"
#: lr_const.stimeformat2
msgid "h:nn:ss"
msgstr "h:nn:ss"
#: lr_const.stimeformat3
msgid "hh:nn"
msgstr "hh:nn"
#: lr_const.stimeformat4
msgid "h:nn"
msgstr "h:nn"
#: lr_const.sto
msgid "to"
msgstr "ke"

View File

@ -237,22 +237,6 @@ msgstr "Conferma"
msgid "CSV File"
msgstr "File CSV"
#: lr_const.sdateformat1
msgid "mm.dd.yy"
msgstr "mm.gg.aa"
#: lr_const.sdateformat2
msgid "mm.dd.yyyy"
msgstr "mm.gg.aaaa"
#: lr_const.sdateformat3
msgid "d mmm yyyy"
msgstr "g mmm aaaa"
#: lr_const.sdateformat4
msgid "d mmmm yyyy"
msgstr "g mmmm yyyy"
#: lr_const.sdatetimecategory
msgid "Date and time"
msgstr "Data e ora"
@ -1151,6 +1135,10 @@ msgstr "&Analizzatore oggetti"
msgid "Line style"
msgstr "Stile di linea"
#: lr_const.sfrdesignerform_modified
msgid "Modified"
msgstr ""
#: lr_const.sfrdesignerform_new
#, fuzzy
#| msgid "&New..."
@ -2330,22 +2318,6 @@ msgstr "Nuovo report"
msgid "ASCII Text file"
msgstr "File di testo ASCII"
#: lr_const.stimeformat1
msgid "hh:nn:ss"
msgstr ""
#: lr_const.stimeformat2
msgid "h:nn:ss"
msgstr ""
#: lr_const.stimeformat3
msgid "hh:nn"
msgstr ""
#: lr_const.stimeformat4
msgid "h:nn"
msgstr ""
#: lr_const.sto
msgid "to"
msgstr "a"

View File

@ -237,22 +237,6 @@ msgstr "Patvirtinimas"
msgid "CSV File"
msgstr "CSV failas"
#: lr_const.sdateformat1
msgid "mm.dd.yy"
msgstr "mm.dd.yy"
#: lr_const.sdateformat2
msgid "mm.dd.yyyy"
msgstr "mm.dd.yyyy"
#: lr_const.sdateformat3
msgid "d mmm yyyy"
msgstr "d mmm yyyy"
#: lr_const.sdateformat4
msgid "d mmmm yyyy"
msgstr "d mmmm yyyy"
#: lr_const.sdatetimecategory
msgid "Date and time"
msgstr "Data ir laikas"
@ -1151,6 +1135,10 @@ msgstr "Objektų &inspektorius"
msgid "Line style"
msgstr "Linijos stilius"
#: lr_const.sfrdesignerform_modified
msgid "Modified"
msgstr ""
#: lr_const.sfrdesignerform_new
#, fuzzy
#| msgid "&New..."
@ -2330,22 +2318,6 @@ msgstr "Naujas pranešimas"
msgid "ASCII Text file"
msgstr "ASCII teksto failas"
#: lr_const.stimeformat1
msgid "hh:nn:ss"
msgstr "hh:nn:ss"
#: lr_const.stimeformat2
msgid "h:nn:ss"
msgstr "h:nn:ss"
#: lr_const.stimeformat3
msgid "hh:nn"
msgstr "hh:nn"
#: lr_const.stimeformat4
msgid "h:nn"
msgstr "h:nn"
#: lr_const.sto
msgid "to"
msgstr "iki"

View File

@ -239,22 +239,6 @@ msgstr "Potwierdź"
msgid "CSV File"
msgstr "Plik CSV"
#: lr_const.sdateformat1
msgid "mm.dd.yy"
msgstr ""
#: lr_const.sdateformat2
msgid "mm.dd.yyyy"
msgstr ""
#: lr_const.sdateformat3
msgid "d mmm yyyy"
msgstr ""
#: lr_const.sdateformat4
msgid "d mmmm yyyy"
msgstr ""
#: lr_const.sdatetimecategory
msgid "Date and time"
msgstr "Data i czas"
@ -1153,6 +1137,10 @@ msgstr "&Inspektor obiektów"
msgid "Line style"
msgstr "Styl linii"
#: lr_const.sfrdesignerform_modified
msgid "Modified"
msgstr ""
#: lr_const.sfrdesignerform_new
#, fuzzy
#| msgid "&New..."
@ -2332,22 +2320,6 @@ msgstr "Nowy raport"
msgid "ASCII Text file"
msgstr "Plik tekstowy ASCII"
#: lr_const.stimeformat1
msgid "hh:nn:ss"
msgstr ""
#: lr_const.stimeformat2
msgid "h:nn:ss"
msgstr ""
#: lr_const.stimeformat3
msgid "hh:nn"
msgstr ""
#: lr_const.stimeformat4
msgid "h:nn"
msgstr ""
#: lr_const.sto
msgid "to"
msgstr "w"

View File

@ -231,22 +231,6 @@ msgstr ""
msgid "CSV File"
msgstr ""
#: lr_const.sdateformat1
msgid "mm.dd.yy"
msgstr ""
#: lr_const.sdateformat2
msgid "mm.dd.yyyy"
msgstr ""
#: lr_const.sdateformat3
msgid "d mmm yyyy"
msgstr ""
#: lr_const.sdateformat4
msgid "d mmmm yyyy"
msgstr ""
#: lr_const.sdatetimecategory
msgid "Date and time"
msgstr ""
@ -1135,6 +1119,10 @@ msgstr ""
msgid "Line style"
msgstr ""
#: lr_const.sfrdesignerform_modified
msgid "Modified"
msgstr ""
#: lr_const.sfrdesignerform_new
msgid "&New ..."
msgstr ""
@ -2292,22 +2280,6 @@ msgstr ""
msgid "ASCII Text file"
msgstr ""
#: lr_const.stimeformat1
msgid "hh:nn:ss"
msgstr ""
#: lr_const.stimeformat2
msgid "h:nn:ss"
msgstr ""
#: lr_const.stimeformat3
msgid "hh:nn"
msgstr ""
#: lr_const.stimeformat4
msgid "h:nn"
msgstr ""
#: lr_const.sto
msgid "to"
msgstr ""

View File

@ -236,22 +236,6 @@ msgstr "Confirmar"
msgid "CSV File"
msgstr "Arquivo CSV"
#: lr_const.sdateformat1
msgid "mm.dd.yy"
msgstr "mm.dd.yy"
#: lr_const.sdateformat2
msgid "mm.dd.yyyy"
msgstr "mm.dd.yyyy"
#: lr_const.sdateformat3
msgid "d mmm yyyy"
msgstr "d mmm yyyy"
#: lr_const.sdateformat4
msgid "d mmmm yyyy"
msgstr "d mmmm yyyy"
#: lr_const.sdatetimecategory
msgid "Date and time"
msgstr "Data e hora"
@ -1150,6 +1134,10 @@ msgstr "&Inspetor Objetos"
msgid "Line style"
msgstr "Estilo Linha"
#: lr_const.sfrdesignerform_modified
msgid "Modified"
msgstr ""
#: lr_const.sfrdesignerform_new
#, fuzzy
#| msgid "&New..."
@ -2329,22 +2317,6 @@ msgstr "Novo relatório"
msgid "ASCII Text file"
msgstr "Arquivo texto ASCII"
#: lr_const.stimeformat1
msgid "hh:nn:ss"
msgstr "hh:nn:ss"
#: lr_const.stimeformat2
msgid "h:nn:ss"
msgstr "h:nn:ss"
#: lr_const.stimeformat3
msgid "hh:nn"
msgstr "hh:nn"
#: lr_const.stimeformat4
msgid "h:nn"
msgstr "h:nn"
#: lr_const.sto
msgid "to"
msgstr "para"

View File

@ -236,22 +236,6 @@ msgstr "Confirmar"
msgid "CSV File"
msgstr "Arquivo CSV"
#: lr_const.sdateformat1
msgid "mm.dd.yy"
msgstr "mm.dd.yy"
#: lr_const.sdateformat2
msgid "mm.dd.yyyy"
msgstr "mm.dd.yyyy"
#: lr_const.sdateformat3
msgid "d mmm yyyy"
msgstr "d mmm yyyy"
#: lr_const.sdateformat4
msgid "d mmmm yyyy"
msgstr "d mmmm yyyy"
#: lr_const.sdatetimecategory
msgid "Date and time"
msgstr "Data e hora"
@ -1145,6 +1129,10 @@ msgstr "&Inspetor Objetos"
msgid "Line style"
msgstr "Estilo Linha"
#: lr_const.sfrdesignerform_modified
msgid "Modified"
msgstr ""
#: lr_const.sfrdesignerform_new
#| msgid "&New..."
msgid "&New ..."
@ -2313,22 +2301,6 @@ msgstr "Novo relatório"
msgid "ASCII Text file"
msgstr "Arquivo texto ASCII"
#: lr_const.stimeformat1
msgid "hh:nn:ss"
msgstr "hh:nn:ss"
#: lr_const.stimeformat2
msgid "h:nn:ss"
msgstr "h:nn:ss"
#: lr_const.stimeformat3
msgid "hh:nn"
msgstr "hh:nn"
#: lr_const.stimeformat4
msgid "h:nn"
msgstr "h:nn"
#: lr_const.sto
msgid "to"
msgstr "para"

View File

@ -236,22 +236,6 @@ msgstr "Подтвердить"
msgid "CSV File"
msgstr "Файл CSV"
#: lr_const.sdateformat1
msgid "mm.dd.yy"
msgstr "мм.дд.гг"
#: lr_const.sdateformat2
msgid "mm.dd.yyyy"
msgstr "мм.дд.гггг"
#: lr_const.sdateformat3
msgid "d mmm yyyy"
msgstr "д ммм гггг"
#: lr_const.sdateformat4
msgid "d mmmm yyyy"
msgstr "д мммм гггг"
#: lr_const.sdatetimecategory
msgid "Date and time"
msgstr "Дата и время"
@ -1145,6 +1129,10 @@ msgstr "Инспектор о&бъектов"
msgid "Line style"
msgstr "Стиль линии"
#: lr_const.sfrdesignerform_modified
msgid "Modified"
msgstr ""
#: lr_const.sfrdesignerform_new
#| msgid "&New..."
msgid "&New ..."
@ -2313,22 +2301,6 @@ msgstr "Новый отчёт"
msgid "ASCII Text file"
msgstr "Текстовый файл ASCII"
#: lr_const.stimeformat1
msgid "hh:nn:ss"
msgstr "чч:мм:сс"
#: lr_const.stimeformat2
msgid "h:nn:ss"
msgstr "ч:мм:сс"
#: lr_const.stimeformat3
msgid "hh:nn"
msgstr "чч:мм"
#: lr_const.stimeformat4
msgid "h:nn"
msgstr "ч:мм"
#: lr_const.sto
msgid "to"
msgstr "в"

View File

@ -239,22 +239,6 @@ msgstr "Піідтвердити"
msgid "CSV File"
msgstr "Файл CSV"
#: lr_const.sdateformat1
msgid "mm.dd.yy"
msgstr "мм.дд.рр"
#: lr_const.sdateformat2
msgid "mm.dd.yyyy"
msgstr "мм.дд.рррр"
#: lr_const.sdateformat3
msgid "d mmm yyyy"
msgstr "д ммм рррр"
#: lr_const.sdateformat4
msgid "d mmmm yyyy"
msgstr "д мммм рррр"
#: lr_const.sdatetimecategory
msgid "Date and time"
msgstr "Дата та час"
@ -1148,6 +1132,10 @@ msgstr "&Інспектор Об'єктів"
msgid "Line style"
msgstr "Стиль лінії"
#: lr_const.sfrdesignerform_modified
msgid "Modified"
msgstr ""
#: lr_const.sfrdesignerform_new
#| msgid "&New..."
msgid "&New ..."
@ -2316,22 +2304,6 @@ msgstr "Новий звіт"
msgid "ASCII Text file"
msgstr "Текстовий файл ASCII"
#: lr_const.stimeformat1
msgid "hh:nn:ss"
msgstr "гг:хх:сс"
#: lr_const.stimeformat2
msgid "h:nn:ss"
msgstr "г:хх:сс"
#: lr_const.stimeformat3
msgid "hh:nn"
msgstr "гг:хх"
#: lr_const.stimeformat4
msgid "h:nn"
msgstr "г:хх"
#: lr_const.sto
msgid "to"
msgstr "до"

View File

@ -17,7 +17,7 @@ interface
uses
SysUtils, {$IFDEF UNIX}CLocale,{$ENDIF} Classes, MaskUtils, Controls, FileUtil,
Forms, Dialogs, Menus, Variants, DB, Graphics, Printers, osPrinters,
DOM, XMLRead, XMLConf, LCLType, LCLIntf, TypInfo, LCLProc, LR_View, LR_Pars,
DOM, XMLWrite, XMLRead, XMLConf, LCLType, LCLIntf, TypInfo, LCLProc, LR_View, LR_Pars,
LR_Intrp, LR_DSet, LR_DBSet, LR_DBRel, LR_Const, LMessages;
const
@ -78,7 +78,7 @@ type
TfrFrameBorder = (frbLeft, frbTop, frbRight, frbBottom);
TfrFrameBorders = set of TfrFrameBorder;
TfrFrameStyle = (frsSolid,frsDash, frsDot, frsDashDot, frsDashDotDot,frsDouble);
TfrPageType = (ptReport, ptDialog);
TfrPageType = (ptReport, ptDialog); //todo: - remove this
TfrReportOption = (roIgnoreFieldNotFound, roIgnoreSymbolNotFound);
TfrReportOptions = set of TfrReportOption;
TfrObjectType = (otlReportView, otlUIControl);
@ -146,6 +146,7 @@ type
TLrXMLConfig = class (TXMLConfig)
public
procedure LoadFromStream(const Stream: TStream);
procedure SaveToStream(const Stream: TStream);
procedure SetValue(const APath: string; const AValue: string); overload;
function GetValue(const APath: string; const ADefault: string): string; overload;
end;
@ -703,7 +704,7 @@ type
LastBand : TfrBand;
ColPos : Integer;
CurPos : Integer;
PageType : TfrPageType;
PageType : TfrPageType; //todo: - remove this
fLayoutOrder : TLayoutOrder;
procedure DoAggregate(a: Array of TfrBandType);
procedure AddRecord(b: TfrBand; rt: TfrBandRecType);
@ -805,8 +806,9 @@ type
private
fHasVisibleControls : Boolean;
FForm : TfrDialogForm;
fCaption : String;
procedure EditFormDestroy(Sender: TObject);
function GetCaption: string;
procedure SetCaption(AValue: string);
procedure UpdateControlPosition;
protected
procedure SetName(const AValue: string); override;
@ -816,6 +818,7 @@ type
procedure SetTop(AValue: Integer);override;
procedure SetWidth(AValue: Integer);override;
procedure SetHeight(AValue: Integer);override;
procedure ExecScript;
public
constructor Create(AOwnerPage:TfrPage); override;
destructor Destroy; override;
@ -824,7 +827,7 @@ type
procedure SavetoXML(XML: TLrXMLConfig; const Path: String); override;
property Form:TfrDialogForm read FForm;
published
property Caption : string read fCaption write fCaption;
property Caption : string read GetCaption write SetCaption;
property Left;
property Top;
end;
@ -1045,6 +1048,7 @@ type
procedure SaveToFile(FName: String);
procedure SavetoXML(XML: TLrXMLConfig; const Path: String);
procedure SaveToXMLFile(const FName: String);
procedure SaveToXMLStream(const Stream: TStream);
procedure LoadFromDB(Table: TDataSet; DocN: Integer);
procedure SaveToDB(Table: TDataSet; DocN: Integer);
@ -1121,10 +1125,15 @@ type
destructor Destroy; override;
end;
{ TfrReportDesigner }
TfrReportDesigner = class(TForm)
private
FModified: Boolean;
protected
procedure SetModified(AValue: Boolean);virtual;
public
Page: TfrPage;
Modified: Boolean;
procedure {%H-}RegisterObject(ButtonBmp: TBitmap; const ButtonHint: String;
ButtonTag: Integer; ObjectType:TfrObjectType); virtual; abstract;
procedure {%H-}RegisterTool(const MenuCaption: String; ButtonBmp: TBitmap;
@ -1135,6 +1144,7 @@ type
//
function {%H-}PointsToUnits(x: Integer): Double; virtual; abstract;
function {%H-}UnitsToPoints(x: Double): Integer; virtual; abstract;
property Modified: Boolean read FModified write SetModified;
end;
TfrDataManager = class(TObject)
@ -1633,25 +1643,27 @@ function GetDefaultDataSet: TfrTDataSet;
var
FRDataset: TfrDataset;
begin
FRDataset := nil;
if CurBand <> nil then
Result := nil;
if Assigned(CurPage) and (CurPage is TfrPageReport) then
begin
case CurBand.Typ of
btMasterData, btReportSummary, btMasterFooter,
btGroupHeader, btGroupFooter:
FRDataset := CurPage.Bands[btMasterData].DataSet;
btDetailData, btDetailFooter:
FRDataset := CurPage.Bands[btDetailData].DataSet;
btSubDetailData, btSubDetailFooter:
FRDataset := CurPage.Bands[btSubDetailData].DataSet;
btCrossData, btCrossFooter:
FRDataset := CurPage.Bands[btCrossData].DataSet;
FRDataset := nil;
if CurBand <> nil then
begin
case CurBand.Typ of
btMasterData, btReportSummary, btMasterFooter,
btGroupHeader, btGroupFooter:
FRDataset := CurPage.Bands[btMasterData].DataSet;
btDetailData, btDetailFooter:
FRDataset := CurPage.Bands[btDetailData].DataSet;
btSubDetailData, btSubDetailFooter:
FRDataset := CurPage.Bands[btSubDetailData].DataSet;
btCrossData, btCrossFooter:
FRDataset := CurPage.Bands[btCrossData].DataSet;
end;
end;
if FRDataset is TfrDBDataset then
Result := TfrDBDataSet(FRDataset).GetDataSet
end;
if FRDataset is TfrDBDataset then
Result := TfrDBDataSet(FRDataset).GetDataSet
else
Result := nil;
end;
function ReadString(Stream: TStream): String;
@ -1726,6 +1738,14 @@ begin
result := copy(result, 3, Length(result));
end;
{ TfrReportDesigner }
procedure TfrReportDesigner.SetModified(AValue: Boolean);
begin
if FModified=AValue then Exit;
FModified:=AValue;
end;
{ TfrControl }
procedure TfrControl.UpdateControlPosition;
@ -2503,7 +2523,7 @@ end;
procedure TfrView.SetFrames(const AValue: TfrFrameBorders);
begin
if (aValue<>fFrames) and (fUpdate=0) then
if (aValue<>fFrames) then
begin
BeforeChange;
fFrames:=AValue;
@ -5944,7 +5964,7 @@ var
begin
Result := nil;
aName:=UpperCase(aName);
if UpperCase(Self.Name) = Name then
if UpperCase(Name) = aName then
Result:=Self
else
for i := 0 to Objects.Count - 1 do
@ -6412,13 +6432,15 @@ end;
constructor TfrPage.Create(AOwnerPage: TfrPage);
begin
inherited Create(AOwnerPage);
FillChar(Bands, 0, SizeOf(Bands));
fMargins:=TfrRect.Create;
BaseName:='Page';
List := TFpList.Create;
Objects := TFpList.Create;
RTObjects := TFpList.Create;
PageType:=ptReport;
PageType:=ptReport; //todo: - remove this
end;
procedure TfrPage.ShowBandByName(const s: String);
@ -7053,6 +7075,7 @@ var
s: String[6];
Bool : WordBool;
Rc : TRect;
APageType:TfrPageType; //todo: - remove this
begin
with Stream do
begin
@ -7073,8 +7096,10 @@ begin
UseMargins:=Bool;
Read(fColCount, 4);
Read(fColGap, 4);
if frVersion>23 then
Read(ord(PageType), SizeOf(TfrPageType));
{ if frVersion>23 then
Read(ord(PageType), SizeOf(TfrPageType));}
if frVersion>23 then //todo: - remove this
Read(ord(APageType), SizeOf(TfrPageType)); //todo: - remove this
Read(fLayoutOrder, 4);
end;
ChangePaper(pgSize, Width, Height, Orientation);
@ -7088,8 +7113,10 @@ begin
dx := XML.GetValue(Path+'Width/Value'{%H-}, 0); // TODO chk
dy := XML.GetValue(Path+'Height/Value'{%H-}, 0); // TODO chk
b := XML.GetValue(Path+'Height/PageType'{%H-}, ord(PageType));
PageType:=TfrPageType(b);
{ b := XML.GetValue(Path+'PageType/Value'{%H-}, ord(PageType));
PageType:=TfrPageType(b);}
Script.Text:=XML.GetValue(Path+'Script/Value'{%H-}, '');
end;
procedure TfrPage.SaveToStream(Stream: TStream);
@ -7113,7 +7140,7 @@ begin
Write(Bool, 2);
Write(ColCount, 4);
Write(ColGap, 4);
Write(ord(PageType), SizeOf(TfrPageType));
Write(ord(PageType), SizeOf(TfrPageType)); //todo: - remove this
Write(LayoutOrder, 4);
end;
end;
@ -7123,7 +7150,8 @@ begin
Inherited SavetoXML(XML,Path);
XML.SetValue(Path+'Width/Value'{%H-}, Width);
XML.SetValue(Path+'Height/Value'{%H-}, Height);
XML.SetValue(Path+'Height/PageType'{%H-}, ord(PageType));
// XML.SetValue(Path+'PageType/Value'{%H-}, ord(PageType));
XML.SetValue(Path+'Script/Value'{%H-}, Script.Text);
end;
{-----------------------------------------------------------------------}
@ -7297,7 +7325,10 @@ begin
clname:= XML.GetValue(aPath+'ClassName/Value', 'TFRPAGEREPORT');
add(clName);
Inc(Pages[i].fUpdate);
Pages[i].LoadFromXML(XML, aPath);
Dec(Pages[i].fUpdate);
oCount := XML.GetValue(aPath+'ObjectCount/Value'{%H-}, 0);
for j:=0 to oCount - 1 do
begin
@ -7314,7 +7345,9 @@ begin
addObject(Pages[i], gtAddin, clName)
end else
AddObject(Pages[i], aTyp, '');
Inc(t.fUpdate);
t.LoadFromXML(XML, aSubPath);
Dec(t.fUpdate);
end;
end;
Parent.FVal.ReadBinaryDataFromXML(XML, Path+'FVal/');
@ -8309,7 +8342,7 @@ begin
if Assigned(F.OnGetText) then
aValue:=F.DisplayText
else
aValue:=F.AsVariant;
aValue:=lrGetFieldValue(F);//F.AsVariant;
end;
vtFRVar : aValue := frParser.Calc(Field);
vtOther : begin
@ -8336,7 +8369,7 @@ begin
if Assigned(F.OnGetText) then
aValue:=F.DisplayText
else
aValue:=F.AsVariant
aValue:=lrGetFieldValue(F); ///F.AsVariant
end
else
if (D<>nil) and (roIgnoreFieldNotFound in FReportOptions) and
@ -8657,6 +8690,20 @@ begin
end;
end;
procedure TfrReport.SaveToXMLStream(const Stream: TStream);
var
XML: TLrXMLConfig;
begin
XML := TLrXMLConfig.Create(nil);
XML.StartEmpty := True;
try
SaveToXML(XML, 'LazReport/');
XML.SaveToStream(Stream);
finally
XML.Free;
end;
end;
procedure TfrReport.LoadFromDB(Table: TDataSet; DocN: Integer);
var
Stream: TMemoryStream;
@ -9095,28 +9142,34 @@ begin
Dataset.First;
end;
try
for i := 0 to Pages.Count - 1 do
Pages[i].Skip := False;
for i := 0 to Pages.Count - 1 do
if (DoublePass and not FinalPass) or (not DoublePass) then
begin
if Pages[i].PageType = ptDialog then
for i := 0 to Pages.Count - 1 do
Pages[i].Skip := False;
for i := 0 to Pages.Count - 1 do
begin
Pages[i].InitReport;
if Terminated then
break;
if Pages[i] is TfrPageDialog then
begin
Pages[i].InitReport;
if Terminated then
begin
FinalPass:=true;
break;
end;
end;
end;
end;
if not Terminated then
begin
for i := 0 to Pages.Count - 1 do
if Pages[i].PageType <> ptDialog then
if Pages[i] is TfrPageReport then
Pages[i].InitReport;
PrepareDataSets;
for i := 0 to Pages.Count - 1 do
if Pages[i].PageType = ptReport then
if Pages[i]is TfrPageReport then
Pages[i].PrepareObjects;
repeat
@ -9130,7 +9183,7 @@ begin
for i := 0 to Pages.Count - 1 do
begin
if Pages[i].PageType = ptReport then
if Pages[i] is TfrPageReport then
begin
FCurPage := Pages[i];
if FCurPage.Skip then
@ -9469,8 +9522,8 @@ function TfrReport.ChangePrinter(OldIndex, NewIndex: Integer): Boolean;
begin
for i := 0 to Pages.Count - 1 do
begin
with Pages[i] do
ChangePaper(pgSize, Width, Height, Orientation);
if Pages[i] is TfrPageReport then
Pages[i].ChangePaper(Pages[i].pgSize, Pages[i].Width, Pages[i].Height, Pages[i].Orientation);
end;
end;
@ -9577,6 +9630,7 @@ var
Pg:TfrPage;
begin
AName:=UpperCase(AName);
Result:=nil;
if (Pos('.', AName)>0) then
begin
APgName:=Copy2SymbDel(AName, '.');
@ -10626,6 +10680,8 @@ begin
DebugLn('Trying to find RT Object "',St,'"');
{$ENDIF}
t := CurPage.FindRTObject(St);
if not Assigned(t) then
t:=CurReport.FindObject(Copy(Name, 1, Pos('.', Name) - 1));
Prop := Copy(Name, Pos('.', Name) + 1, 255);
end;
{$IFDEF DebugLR}
@ -10995,6 +11051,7 @@ begin
Name:=XML.GetValue(Path+'Name/Value','');
if Name='' then
CreateUniqueName;
Visible:=XML.GetValue(Path+'Visible/Value'{%H-}, true);
end;
@ -11003,7 +11060,7 @@ begin
XML.SetValue(Path+'Name/Value', GetSaveProperty('Name'));
XML.SetValue(Path+'ClassName/Value', self.Classname);
XML.SetValue(Path+'Visible/Value', GetSaveProperty('Visible'));
XML.SetValue(Path+'Visible/Value', Visible);
end;
{ TfrRect }
@ -11078,6 +11135,16 @@ begin
fForm:=nil;
end;
function TfrPageDialog.GetCaption: string;
begin
Result:=FForm.Caption;
end;
procedure TfrPageDialog.SetCaption(AValue: string);
begin
FForm.Caption:=AValue;
end;
procedure TfrPageDialog.UpdateControlPosition;
begin
FForm.Left:=Left;
@ -11088,9 +11155,21 @@ begin
end;
procedure TfrPageDialog.SetName(const AValue: string);
var
S:string;
i:integer;
F:TComponent;
begin
inherited SetName(AValue);
fForm.Name:=Name;
S:=AValue;
F:=Application.FindComponent(S);
if Assigned(F) and (F<>FForm) then
begin
i:=1;
while Assigned(Application.FindComponent(AValue + IntToStr(i))) do inc(i);
S:=AValue + IntToStr(i);
end;
FForm.Name:=S;
end;
procedure TfrPageDialog.PrepareObjects;
@ -11103,7 +11182,6 @@ var
i:integer;
P:TfrControl;
begin
//inherited InitReport;
fHasVisibleControls:=False;
for i:=0 to Objects.Count - 1 do
begin
@ -11115,6 +11193,8 @@ begin
end;
end;
ExecScript;
if fHasVisibleControls then
begin
UpdateControlPosition;
@ -11147,6 +11227,34 @@ begin
FForm.Height:=AValue;
end;
procedure TfrPageDialog.ExecScript;
var
// FSaveView:TfrView;
FSavePage:TfrPage;
CmdList, ErrorList:TStringList;
begin
if DocMode = dmPrinting then
begin
// FSaveView:=CurView;
FSavePage:=CurPage;
CmdList:=TStringList.Create;
ErrorList:=TStringList.Create;
try
// CurView := Self;
CurPage:=Self;
frInterpretator.PrepareScript(Script, CmdList, ErrorList);
frInterpretator.DoScript(CmdList);
finally
CurPage:=FSavePage;
// CurView := FSaveView;
FreeAndNil(CmdList);
FreeAndNil(ErrorList);
end;
end;
end;
constructor TfrPageDialog.Create(AOwnerPage: TfrPage);
begin
inherited Create(AOwnerPage);
@ -11155,8 +11263,8 @@ begin
fForm.OnDestroy:=@EditFormDestroy;
BaseName:='Dialog';
Width :=200;
Height:=150;
Width :=400;
Height:=250;
PageType:=ptDialog;
end;
@ -11206,6 +11314,12 @@ begin
raise EXMLConfigError.Create(SWrongRootName);
end;
procedure TLrXMLConfig.SaveToStream(const Stream: TStream);
begin
WriteXMLFile(Doc, Stream);
Flush;
end;
procedure TLrXMLConfig.SetValue(const APath: string; const AValue: string);
begin
inherited SetValue(UTF8Decode(APath), UTF8Decode(AValue));

View File

@ -14,6 +14,7 @@ interface
{$I LR_vers.inc}
resourcestring
//--- ShapeForm resources
sShapeFormCaption='Shape';
@ -549,6 +550,7 @@ resourcestring
sFRDesignerForm_Help1 = '&Help contents';
sFRDesignerForm_Help2 = 'Help &tool';
sFRDesignerForm_Line = 'Line style';
sFRDesignerForm_Modified = 'Modified';
//--- InspForm resources ------------------------------------------------------
sObjectInspector ='Object inspector';
@ -597,7 +599,7 @@ resourcestring
sFormat53 = '_;x';
sFormat54 = 'False;True';
sFormat55 = 'Custom';
{
sDateFormat1 = 'mm.dd.yy';
sDateFormat2 = 'mm.dd.yyyy';
sDateFormat3 = 'd mmm yyyy';
@ -607,7 +609,7 @@ resourcestring
sTimeFormat2 = 'h:nn:ss';
sTimeFormat3 = 'hh:nn';
sTimeFormat4 = 'h:nn';
}
//--- PreviewSearchForm resources ---------------------------------------------
sFindTextCaption='Find text';
sFindTextText='Text to &find';
@ -784,6 +786,19 @@ const
SDatabase = frRes + 2341;
SInsRich2Object = frRes + 2343;
SFieldSizeError = frRes + 2346;
const
//Don't localize this consts!
sDateFormat1 = 'mm.dd.yy';
sDateFormat2 = 'mm.dd.yyyy';
sDateFormat3 = 'd mmm yyyy';
sDateFormat4 = 'd mmmm yyyy';
sTimeFormat1 = 'hh:nn:ss';
sTimeFormat2 = 'h:nn:ss';
sTimeFormat3 = 'hh:nn';
sTimeFormat4 = 'h:nn';
implementation
end.

View File

@ -14,6 +14,7 @@ type
private
FFilter: string;
FlrDBDataSet:TfrDBDataSet;
FlrDataSource:TDataSource;
FDS:TDataSet;
FDataSource: string;
function GetFieldCount: integer;
@ -90,6 +91,7 @@ begin
if FDS=AValue then Exit;
FDS:=AValue;
FlrDBDataSet.DataSet:=FDS;
FlrDataSource.DataSet:=FDS;
end;
procedure TLRDataSetControl.SetDataSource(AValue: string);
@ -109,6 +111,7 @@ begin
inherited SetName(AValue);
FDS.Name:=Name;
FlrDBDataSet.Name:='_'+Name;
FlrDataSource.Name:='ds'+Name;
end;
procedure TLRDataSetControl.AfterLoad;
@ -149,6 +152,7 @@ constructor TLRDataSetControl.Create(AOwnerPage: TfrPage);
begin
inherited Create(AOwnerPage);
FlrDBDataSet:=TfrDBDataSet.Create(OwnerForm);
FlrDataSource:=TDataSource.Create(OwnerForm);
end;
destructor TLRDataSetControl.Destroy;
@ -157,6 +161,7 @@ begin
begin
FreeAndNil(FDS);
FreeAndNil(FlrDBDataSet);
FreeAndNil(FlrDataSource);
end;
inherited Destroy;
end;
@ -175,357 +180,4 @@ end;
end.
unit LR_DBComponent;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, DB, LR_Class, LR_DBSet;
type
{ TLRDataSetControl }
TLRDataSetControl = class(TfrNonVisualControl)
private
FFilter: string;
FlrDBDataSet:TfrDBDataSet;
FDS:TDataSet;
FDataSource: string;
function GetFieldCount: integer;
function GetActive: boolean;
function GetEOF: boolean;
function GetRecordCount: integer;
procedure SetActive(AValue: boolean);
procedure SetDataSet(AValue: TDataSet);
procedure SetDataSource(AValue: string);
procedure SetFilter(AValue: string);
protected
FActive:boolean;
procedure SetName(const AValue: string); override;
procedure AfterLoad;override;
function ExecMetod(const AName: String; p1, p2, p3: Variant; var Val: Variant):boolean;override;
public
constructor Create(AOwnerPage:TfrPage); override;
destructor Destroy; override;
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
property DataSet:TDataSet read FDS write SetDataSet;
published
property Active:boolean read GetActive write SetActive;
property EOF:boolean read GetEOF;
property RecordCount:integer read GetRecordCount;
property FieldCount:integer read GetFieldCount;
property Filter:string read FFilter write SetFilter;
property DataSource:string read FDataSource write SetDataSource;
end;
implementation
{ TLRDataSetControl }
function TLRDataSetControl.GetFieldCount: integer;
begin
if FDS.Active then
Result:=FDS.RecordCount
else
Result:=0;
end;
function TLRDataSetControl.GetActive: boolean;
begin
Result:=FDS.Active
end;
function TLRDataSetControl.GetEOF: boolean;
begin
if FDS.Active then
Result:=FDS.EOF
else
Result:=true;
end;
function TLRDataSetControl.GetRecordCount: integer;
begin
if FDS.Active then
Result:=FDS.RecordCount
else
Result:=0;
end;
procedure TLRDataSetControl.SetActive(AValue: boolean);
begin
{ FActive:=AValue;
if Assigned(FDS.Connection) then}
FDS.Active:=AValue;
end;
procedure TLRDataSetControl.SetDataSet(AValue: TDataSet);
begin
if FDS=AValue then Exit;
FDS:=AValue;
FlrDBDataSet.DataSet:=FDS;
end;
procedure TLRDataSetControl.SetDataSource(AValue: string);
begin
if FDataSource=AValue then Exit;
FDataSource:=AValue;
end;
procedure TLRDataSetControl.SetFilter(AValue: string);
begin
if FFilter=AValue then Exit;
FFilter:=AValue;
end;
procedure TLRDataSetControl.SetName(const AValue: string);
begin
inherited SetName(AValue);
FDS.Name:=Name;
FlrDBDataSet.Name:='_'+Name;
end;
procedure TLRDataSetControl.AfterLoad;
begin
inherited AfterLoad;
DataSet.Active:=FActive;
end;
function TLRDataSetControl.ExecMetod(const AName: String; p1, p2, p3: Variant;
var Val: Variant): boolean;
begin
Result:=inherited ExecMetod(AName, p1, p2, p3, Val);
if Result then exit;
if AName = 'NEXT' then
FDS.Next
else
if AName = 'FIRST' then
FDS.First
else
if AName = 'LAST' then
FDS.Last
else
if AName = 'PRIOR' then
FDS.Prior
else
if AName = 'OPEN' then
FDS.Open
else
if AName = 'CLOSE' then
FDS.Close
else
exit;
Result:=true;
end;
constructor TLRDataSetControl.Create(AOwnerPage: TfrPage);
begin
inherited Create(AOwnerPage);
FlrDBDataSet:=TfrDBDataSet.Create(OwnerForm);
end;
destructor TLRDataSetControl.Destroy;
begin
if not (Assigned(OwnerPage) and (OwnerPage is TfrPageDialog)) then
begin
FreeAndNil(FDS);
FreeAndNil(FlrDBDataSet);
end;
inherited Destroy;
end;
procedure TLRDataSetControl.LoadFromXML(XML: TLrXMLConfig; const Path: String);
begin
inherited LoadFromXML(XML, Path);
FActive := XML.GetValue(Path + 'Active/Value'{%H-}, false);
end;
procedure TLRDataSetControl.SaveToXML(XML: TLrXMLConfig; const Path: String);
begin
inherited SaveToXML(XML, Path);
XML.SetValue(Path+'Active/Value', Active);
end;
end.
unit LR_DBComponent;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, DB, LR_Class, LR_DBSet;
type
{ TLRDataSetControl }
TLRDataSetControl = class(TfrNonVisualControl)
private
FFilter: string;
FlrDBDataSet:TfrDBDataSet;
FDS:TDataSet;
FDataSource: string;
function GetFieldCount: integer;
function GetActive: boolean;
function GetEOF: boolean;
function GetRecordCount: integer;
procedure SetActive(AValue: boolean);
procedure SetDataSet(AValue: TDataSet);
procedure SetDataSource(AValue: string);
procedure SetFilter(AValue: string);
protected
FActive:boolean;
procedure SetName(const AValue: string); override;
procedure AfterLoad;override;
function ExecMetod(const AName: String; p1, p2, p3: Variant; var Val: Variant):boolean;override;
public
constructor Create(AOwnerPage:TfrPage); override;
destructor Destroy; override;
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
property DataSet:TDataSet read FDS write SetDataSet;
published
property Active:boolean read GetActive write SetActive;
property EOF:boolean read GetEOF;
property RecordCount:integer read GetRecordCount;
property FieldCount:integer read GetFieldCount;
property Filter:string read FFilter write SetFilter;
property DataSource:string read FDataSource write SetDataSource;
end;
implementation
{ TLRDataSetControl }
function TLRDataSetControl.GetFieldCount: integer;
begin
if FDS.Active then
Result:=FDS.RecordCount
else
Result:=0;
end;
function TLRDataSetControl.GetActive: boolean;
begin
Result:=FDS.Active
end;
function TLRDataSetControl.GetEOF: boolean;
begin
if FDS.Active then
Result:=FDS.EOF
else
Result:=true;
end;
function TLRDataSetControl.GetRecordCount: integer;
begin
if FDS.Active then
Result:=FDS.RecordCount
else
Result:=0;
end;
procedure TLRDataSetControl.SetActive(AValue: boolean);
begin
{ FActive:=AValue;
if Assigned(FDS.Connection) then}
FDS.Active:=AValue;
end;
procedure TLRDataSetControl.SetDataSet(AValue: TDataSet);
begin
if FDS=AValue then Exit;
FDS:=AValue;
FlrDBDataSet.DataSet:=FDS;
end;
procedure TLRDataSetControl.SetDataSource(AValue: string);
begin
if FDataSource=AValue then Exit;
FDataSource:=AValue;
end;
procedure TLRDataSetControl.SetFilter(AValue: string);
begin
if FFilter=AValue then Exit;
FFilter:=AValue;
end;
procedure TLRDataSetControl.SetName(const AValue: string);
begin
inherited SetName(AValue);
FDS.Name:=Name;
FlrDBDataSet.Name:='_'+Name;
end;
procedure TLRDataSetControl.AfterLoad;
begin
inherited AfterLoad;
DataSet.Active:=FActive;
end;
function TLRDataSetControl.ExecMetod(const AName: String; p1, p2, p3: Variant;
var Val: Variant): boolean;
begin
Result:=inherited ExecMetod(AName, p1, p2, p3, Val);
if Result then exit;
if AName = 'NEXT' then
FDS.Next
else
if AName = 'FIRST' then
FDS.First
else
if AName = 'LAST' then
FDS.Last
else
if AName = 'PRIOR' then
FDS.Prior
else
if AName = 'OPEN' then
FDS.Open
else
if AName = 'CLOSE' then
FDS.Close
else
exit;
Result:=true;
end;
constructor TLRDataSetControl.Create(AOwnerPage: TfrPage);
begin
inherited Create(AOwnerPage);
FlrDBDataSet:=TfrDBDataSet.Create(OwnerForm);
end;
destructor TLRDataSetControl.Destroy;
begin
if not (Assigned(OwnerPage) and (OwnerPage is TfrPageDialog)) then
begin
FreeAndNil(FDS);
FreeAndNil(FlrDBDataSet);
end;
inherited Destroy;
end;
procedure TLRDataSetControl.LoadFromXML(XML: TLrXMLConfig; const Path: String);
begin
inherited LoadFromXML(XML, Path);
FActive := XML.GetValue(Path + 'Active/Value'{%H-}, false);
end;
procedure TLRDataSetControl.SaveToXML(XML: TLrXMLConfig; const Path: String);
begin
inherited SaveToXML(XML, Path);
XML.SetValue(Path+'Active/Value', Active);
end;
end.

View File

@ -35,9 +35,23 @@ procedure frGetFieldNames(DataSet: TfrTDataSet; List: TStrings);
function frGetBookmark(DataSet: TfrTDataSet): TfrBookmark;
procedure frFreeBookmark(DataSet: TfrTDataSet; Bookmark: TfrBookmark);
procedure frGotoBookmark(DataSet: TfrTDataSet; Bookmark: TfrBookmark);
function frGetDataSource(Owner: TComponent; d: TDataSet): TDataSource;
function lrGetFieldValue(F:TField):Variant;
const
TypeStringField = [ftString, ftMemo, ftFmtMemo, ftFixedChar, ftWideString,
ftFixedWideChar, ftWideMemo];
TypeNumericField = [ftFloat, ftCurrency, ftBCD, ftDate, ftTime, ftDateTime,
ftTimeStamp];
TypeIntegerField = [ftSmallint, ftInteger, ftWord, ftAutoInc, ftLargeint];
TypeBooleanField = [ftBoolean];
implementation
uses LR_Utils;
function frIsBlob(Field: TfrTField): Boolean;
begin
@ -46,6 +60,7 @@ end;
procedure frGetFieldNames(DataSet: TfrTDataSet; List: TStrings);
begin
if not Assigned(DataSet) then exit;
if DataSet.FieldCount > 0 then
DataSet.GetFieldNames(List)
else
@ -66,6 +81,51 @@ begin
DataSet.GotoBookmark(BookMark);
end;
function frGetDataSource(Owner: TComponent; d: TDataSet): TDataSource;
var
i: Integer;
sl: TStringList;
ds: TDataSource;
begin
sl := TStringList.Create;
Result := nil;
frGetComponents(Owner, TDataSource, sl, nil);
for i := 0 to sl.Count - 1 do
begin
ds := frFindComponent(Owner, sl[i]) as TDataSource;
if (ds <> nil) and (ds.DataSet = d) then
begin
Result := ds;
break;
end;
end;
sl.Free;
end;
function lrGetFieldValue(F: TField): Variant;
begin
if Assigned(F) then
begin
if F.IsNull then
begin
if F.DataType in TypeStringField then
Result:=''
else
if F.DataType in (TypeIntegerField + TypeNumericField) then
Result:=0
else
if F.DataType in TypeBooleanField then
Result:=false
else
Result:=null
end
else
Result:=F.Value;
end
else
Result:=null;
end;
procedure frFreeBookmark(DataSet: TfrTDataSet; Bookmark: TfrBookmark);
begin
DataSet.FreeBookmark(BookMark);

View File

@ -35,6 +35,9 @@ inherited frDesignerForm: TfrDesignerForm
item
Width = 230
end
item
Width = 100
end
item
Width = 50
end>
@ -160,6 +163,7 @@ inherited frDesignerForm: TfrDesignerForm
Height = 24
Top = 1
Width = 22
Action = FileSave
Align = alLeft
Flat = True
Glyph.Data = {
@ -199,7 +203,7 @@ inherited frDesignerForm: TfrDesignerForm
39FFBD6D39FFBD6D39FFBD6939FFBD7139FF0000000000000000
}
NumGlyphs = 0
OnClick = FileBtn3Click
ShowCaption = False
end
object FileBtn4: TSpeedButton
Tag = 43
@ -4801,13 +4805,10 @@ inherited frDesignerForm: TfrDesignerForm
OnClick = FileBtn2Click
end
object N20: TMenuItem
Caption = 'Save'
ShortCut = 16467
OnClick = FileBtn3Click
Action = FileSave
end
object N17: TMenuItem
Caption = 'Save as...'
OnClick = N20Click
Action = FileSaveAs
end
object N40: TMenuItem
Caption = '-'
@ -5172,6 +5173,7 @@ inherited frDesignerForm: TfrDesignerForm
}
end
object actList: TActionList[14]
Images = ActionsImageList
left = 560
top = 36
object acDuplicate: TAction
@ -5186,5 +5188,56 @@ inherited frDesignerForm: TfrDesignerForm
OnExecute = acToggleFramesExecute
ShortCut = 16454
end
object FileSave: TAction
Category = 'File'
Caption = 'Save'
ImageIndex = 0
OnExecute = FileSaveExecute
ShortCut = 16467
end
object FileSaveAs: TAction
Category = 'File'
Caption = 'Save as...'
OnExecute = FileSaveAsExecute
end
end
object ActionsImageList: TImageList[15]
left = 328
top = 156
Bitmap = {
4C6901000000100000001000000000000000BD6931FFBD6931FFBD6931FFBD69
31FFBD6931FFBD6931FFBD6931FFBD6931FFBD6D39FFBD6D39FFBD6D39FFBD69
39FFBD7139FF0000000000000000BD6931FFF7E7D6FFF7E7D6FFFFFFFFFFFFFF
F7FFFFFFF7FFFFF7F7FFFFF7EFFFFFF7EFFFFFFFF7FFFFFFF7FFFFF7EFFFFFEF
DEFFEFD7BDFFCE8E5AFF00000000BD6931FFF7DFD6FFEFAE84FFFFFFF7FFFFFF
F7FFCE8E63FFFFF7EFFFFFF7EFFFFFF7F7FFFFFFFFFFFFF7F7FFFFEFE7FFFFE7
DEFFEFD7BDFFEFD7BDFFBD7139FFBD6931FFF7DFD6FFEFAE7BFFFFF7F7FFFFF7
F7FFCE8E63FFFFF7EFFFFFF7EFFFFFFFF7FFFFFFF7FFFFF7EFFFFFEFDEFFF7E7
DEFFE7A67BFFEFD7C6FFB56931FFBD6931FFF7DFCEFFE7AE7BFFFFF7EFFFFFF7
EFFFCE8E63FFFFF7EFFFFFFFF7FFFFFFFFFFFFF7EFFFFFEFDEFFF7E7DEFFF7E7
DEFFE7A67BFFE7C7ADFFB56931FFBD6931FFF7DFCEFFE7A67BFFFFEFE7FFFFEF
E7FFFFEFE7FFFFF7EFFFFFFFF7FFFFF7F7FFFFEFE7FFF7E7DEFFF7E7DEFFF7E7
DEFFDEA673FFE7BEA5FFB56531FFBD6931FFF7DFC6FFE7A67BFFCE8E63FFCE8E
63FFCE8E63FFCE966BFFCE966BFFCE966BFFCE8E63FFCE8E63FFCE8E63FFCE8E
63FFDE9E73FFE7BE9CFFB56531FFBD6931FFF7DFC6FFE7A67BFFE7A67BFFE7A6
7BFFE7A67BFFE7A67BFFE7A67BFFE7A67BFFDEA673FFDE9E73FFDE9E73FFDE9E
73FFDE9E73FFDEB69CFFB56531FFBD6931FFF7D7C6FFE7A67BFFE7A67BFFE7A6
7BFFE7A67BFFE7A67BFFE7A67BFFE7A67BFFDEA673FFDE9E73FFDE9E73FFDE9E
73FFDE9E73FFDEB694FFAD6531FFBD6931FFF7D7BDFFE7A67BFFE7A67BFFE7A6
7BFFE7A67BFFE7A67BFFE7A67BFFDE9E73FFDE9E73FFDE9E73FFDE9E73FFDE9E
73FFD69E73FFD6AE8CFFAD6131FFBD6931FFEFD7BDFFE7A67BFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFD6966BFFD6A68CFFAD6131FFBD6939FFEFCFBDFFE7A67BFFFFFFF7FF63C7
8CFF63C78CFF63C78CFF63C78CFF63C78CFF63C78CFF63C78CFF63C78CFFFFFF
F7FFCE966BFFCEA684FFAD6131FFBD6D39FFEFCFB5FFE7A67BFFFFFFF7FFBDDF
C6FFBDDFC6FFBDDFC6FFBDDFC6FFBDDFC6FFBDDFC6FFBDDFC6FFBDDFC6FFFFFF
F7FFCE966BFFCE9E84FFAD6131FFBD6931FFEFCFB5FFE7A67BFFFFFFF7FF63C7
8CFF63C78CFF63C78CFF63C78CFF63C78CFF63C78CFF63C78CFF63C78CFFFFFF
F7FFCE8E63FFCE9E7BFFA56131FFBD6931FFEFC7ADFFEFC7ADFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFCE9E7BFFC69E7BFFA56131FFBD6931FFBD6931FFBD6931FFB56931FFB569
31FFB56531FFB56531FFB56531FFAD6531FFAD6131FFAD6131FFAD6131FFAD61
31FFA56131FFA56131FFAD6131FF
}
end
end

View File

@ -97,6 +97,7 @@ type
{ TfrObjectInspector }
TfrObjectInspector = Class({$IFDEF EXTOI}TForm{$ELSE}TPanel{$ENDIF})
private
FSelectedObject: TObject;
fPropertyGrid : TCustomPropertiesGrid;
{$IFNDEF EXTOI}
fcboxObjList : TComboBox;
@ -127,6 +128,7 @@ type
procedure cboxObjListOnChanged(Sender: TObject);
procedure SetModifiedEvent(AEvent: TNotifyEvent);
procedure Refresh;
property SelectedObject:TObject read FSelectedObject;
end;
{ TfrDesignerPage }
@ -183,6 +185,8 @@ type
TfrDesignerForm = class(TfrReportDesigner)
acDuplicate: TAction;
FileSaveAs: TAction;
FileSave: TAction;
acToggleFrames: TAction;
actList: TActionList;
frSpeedButton1: TSpeedButton;
@ -194,6 +198,7 @@ type
frTBSeparator16: TPanel;
Image1: TImage;
Image2: TImage;
ActionsImageList: TImageList;
ImgIndic: TImageList;
LinePanel: TPanel;
OB7: TSpeedButton;
@ -360,6 +365,8 @@ type
procedure acDuplicateExecute(Sender: TObject);
procedure acToggleFramesExecute(Sender: TObject);
procedure C2GetItems(Sender: TObject);
procedure FileSaveAsExecute(Sender: TObject);
procedure FileSaveExecute(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
@ -385,7 +392,7 @@ type
procedure GB2Click(Sender: TObject);
procedure FileBtn1Click(Sender: TObject);
procedure FileBtn2Click(Sender: TObject);
procedure FileBtn3Click(Sender: TObject);
//procedure FileBtn3Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormHide(Sender: TObject);
procedure N8Click(Sender: TObject);
@ -414,7 +421,7 @@ type
procedure GB3Click(Sender: TObject);
procedure UndoBClick(Sender: TObject);
procedure RedoBClick(Sender: TObject);
procedure N20Click(Sender: TObject);
//procedure N20Click(Sender: TObject);
procedure PBox1Paint(Sender: TObject);
procedure SB1Click(Sender: TObject);
procedure SB2Click(Sender: TObject);
@ -450,7 +457,7 @@ type
EditAfterInsert: Boolean;
FCurDocName, FCaption: String;
fCurDocFileType: Integer;
FileModified: Boolean;
//FileModified: Boolean;
ShapeMode: TfrShapeMode;
{$IFDEF StdOI}
@ -542,6 +549,8 @@ type
procedure ToggleFrames(View: TfrView; Data: PtrInt);
procedure DuplicateView(View: TfrView; Data: PtrInt);
procedure ResetDuplicateCount;
protected
procedure SetModified(AValue: Boolean);override;
public
constructor Create(aOwner : TComponent); override;
destructor Destroy; override;
@ -935,19 +944,16 @@ end;
procedure TfrDesignerPage.DrawDialog(N: Integer; AClipRgn: HRGN);
Var
Dlg : TfrPageDialog;
i,iy : Integer;
i : Integer;
t : TfrView;
R, R1 : HRGN;
Objects : TFpList;
begin
Dlg:=TfrPageDialog(FDesigner.Page);
with Canvas do
begin
Brush.Color := clGray;
FillRect(Rect(0,0,Width,Width));
FillRect(Rect(0,0, Width, Height + 20));
Brush.Color := clBtnFace;
Brush.Style := bsSolid;
@ -955,72 +961,17 @@ begin
Brush.Color := clBlue;
Rectangle(Rect(0,0,FDesigner.Page.Width-1,20));
Canvas.TextRect(Rect(0,0,FDesigner.Page.Width-1,20),1,5,Dlg.Caption);
Canvas.TextRect(Rect(0,0,FDesigner.Page.Width-1,20), 1, 5, Dlg.Caption);
end;
Objects := FDesigner.Page.Objects;
// R:=CreateRectRgn(0, 0, Width, Height);
for i:=Objects.Count-1 downto 0 do
begin
t := TfrView(Objects[i]);
t.draw(Canvas);
end;
{ begin
t := TfrView(Objects[i]);
{$IFDEF DebugLR}
DebugLn('Draw ',InttoStr(i),' ',t.Name);
{$ENDIF}
if i <= N then
begin
if t.selected then
t.draw(canvas)
else
// if ViewIsVisible(t) then
begin
R1 := CreateRectRgn(0, 0, 1, 1);
CombineRgn(R1, AClipRgn, R, RGN_AND);
SelectClipRgn(Canvas.Handle, R1);
DeleteObject(R1);
t.Draw(Canvas);
iy:=1;
//Show indicator if script it's not empty
if t.Script.Count>0 then
begin
FDesigner.ImgIndic.Draw(Canvas, t.x+1, t.y+iy, 0);
iy:=10;
end;
end;
end;
R1 := t.GetClipRgn(rtNormal);
CombineRgn(R, R, R1, RGN_DIFF);
DeleteObject(R1);
SelectClipRgn(Canvas.Handle, R);
end;
CombineRgn(R, R, AClipRgn, RGN_AND);
// DrawBackground;
DeleteObject(R);
DeleteObject(AClipRgn);
if AClipRgn=ClipRgn then
ClipRgn := 0;
SelectClipRgn(Canvas.Handle, 0);
}
// if not Down then
// DrawPage(dmSelection);
{$IFDEF DebugLR}
DebugLnExit('TfrDesignerPage.Draw DONE');
{$ENDIF}
end;
procedure TfrDesignerPage.Draw(N: Integer; AClipRgn: HRGN);
@ -1567,7 +1518,8 @@ begin
begin
if GetUnusedBand <> btNone then
CreateSection
else begin
else
begin
{$IFDEF DebugLR}
DebugLnExit('Inserting a new object DONE: GetUnusedBand=btNone');
DebugLnExit('TfrDesignerPage.MUp DONE: Inserting..');
@ -1702,7 +1654,7 @@ begin
if not ObjRepeat then
begin
if FDesigner.panForDlg.Visible then
if FDesigner.Page is TfrPageReport then
FDesigner.OB1.Down := True
else
FDesigner.OB7.Down := True
@ -2550,7 +2502,8 @@ begin
//Panel6.Caption := sFRDesignerFormTools;
FileBtn1.Hint := sFRDesignerFormNewRp;
FileBtn2.Hint := sFRDesignerFormOpenRp;
FileBtn3.Hint := sFRDesignerFormSaveRp;
//FileBtn3.Hint := sFRDesignerFormSaveRp;
FileSave.Hint:= sFRDesignerFormSaveRp;
FileBtn4.Hint := sFRDesignerFormPreview;
CutB.Hint := sFRDesignerFormCut;
CopyB.Hint := sFRDesignerFormCopy;
@ -2618,7 +2571,10 @@ begin
FileMenu.Caption := sFRDesignerForm_File;
N23.Caption := sFRDesignerForm_New;
N19.Caption := sFRDesignerForm_Open;
N20.Caption := sFRDesignerForm_Save;
//N20.Caption := sFRDesignerForm_Save;
//N17.Caption := sFRDesignerForm_SaveAs;
FileSaveAs.Caption:= sFRDesignerForm_Save;
FileSaveAs.Caption:= sFRDesignerForm_SaveAs;
N42.Caption := sFRDesignerForm_Var;
N8.Caption := sFRDesignerForm_RptOpt;
N25.Caption := sFRDesignerForm_PgOpt;
@ -2649,7 +2605,6 @@ begin
Pan6.Caption := sFRDesignerForm_AlignPalette;
Pan7.Caption := sFRDesignerForm_Tools3;
N34.Caption := sFRDesignerForm_About;
N17.Caption := sFRDesignerForm_SaveAs;
N22.Caption := sFRDesignerForm_Help1;
N35.Caption := sFRDesignerForm_Help2;
StB1.Hint := sFRDesignerForm_Line;
@ -2679,6 +2634,70 @@ begin
end;
end;
procedure TfrDesignerForm.FileSaveAsExecute(Sender: TObject);
var
s: String;
begin
WasOk := False;
with SaveDialog1 do
begin
Filter := sFormFile + ' (*.frf)|*.frf|' +
sTemplFile + ' (*.frt)|*.frt|' +
sLazFormFile + ' (*.lrf)|*.lrf' +
'';
InitialDir:=ExtractFilePath(ParamStrUTF8(0));
FileName := CurDocName;
FilterIndex := 3;
if Execute then
FCurDocFileType := FilterIndex;
case FCurDocFileType of
dtFastReportForm:
begin
s := ChangeFileExt(FileName, '.frf');
CurReport.SaveToFile(s);
CurDocName := s;
WasOk := True;
end;
dtFastReportTemplate:
begin
s := ExtractFileName(ChangeFileExt(FileName, '.frt'));
if frTemplateDir <> '' then
s := frTemplateDir + PathDelim + s;
frTemplNewForm := TfrTemplNewForm.Create(nil);
with frTemplNewForm do
if ShowModal = mrOk then
begin
CurReport.SaveTemplate(s, Memo1.Lines, Image1.Picture.Bitmap);
WasOk := True;
end;
frTemplNewForm.Free;
end;
dtLazReportForm: // lasreport form xml format
begin
s := ChangeFileExt(FileName, '.lrf');
CurReport.SaveToXMLFile(s);
CurDocName := s;
WasOk := True;
end;
end;
end;
end;
procedure TfrDesignerForm.FileSaveExecute(Sender: TObject);
begin
if CurDocName <> sUntitled then
begin
if FCurDocFileType=dtLazReportForm then
CurReport.SaveToXMLFile(curDocName)
else
CurReport.SaveToFile(CurDocName);
// FileModified := False;
Modified := False;
end
else
FileSaveAs.Execute;
end;
procedure TfrDesignerForm.acDuplicateExecute(Sender: TObject);
begin
DuplicateSelection;
@ -2709,7 +2728,7 @@ begin
ClearUndoBuffer;
ClearRedoBuffer;
Modified := False;
FileModified := False;
//FileModified := False;
Busy := True;
DocMode := dmDesigning;
@ -2967,7 +2986,8 @@ begin
if WasOk then
begin
Modified := True;
FileModified := True;
//FileModified := True;
Modified := True;
CurPage := CurReport.Pages.Count - 1
end
else
@ -3009,7 +3029,8 @@ begin
fInBuildPage:=True;
try
Modified := True;
FileModified := True;
//FileModified := True;
Modified := True;
with CurReport do
begin
if (n >= 0) and (n < Pages.Count) then
@ -3173,6 +3194,7 @@ end;
procedure TfrDesignerForm.OnModify(sender: TObject);
begin
Modified:=true;
SelectionChanged;
end;
@ -3807,7 +3829,8 @@ end;
function TfrDesignerForm.CheckFileModified: Integer;
begin
result := mrNo;
if FileModified then
// if FileModified then
if Modified then
begin
result:=MessageDlg(sSaveChanges + ' ' + sTo + ' ' +
ExtractFileName(CurDocName) + '?',mtConfirmation,
@ -3816,7 +3839,8 @@ begin
if result = mrCancel then Exit;
if result = mrYes then
begin
FileBtn3Click(nil);
FileSave.Execute;
// FileBtn3Click(nil);
if not WasOk then
result := mrCancel;
end;
@ -3914,6 +3938,16 @@ end;
{$endif}
procedure TfrDesignerForm.SetModified(AValue: Boolean);
begin
inherited SetModified(AValue);
if AValue then
StatusBar1.Panels[2].Text:=sFRDesignerForm_Modified
else
StatusBar1.Panels[2].Text:='';
FileSave.Enabled:=AValue;
end;
{$HINTS ON}
function TfrDesignerForm.RectTypEnabled: Boolean;
@ -4003,71 +4037,79 @@ begin
ColorSelector.Hide;
LinePanel.Hide;
EnableControls;
if SelNum = 1 then
if Page is TfrPageReport then
begin
t := TfrView(Objects[TopSelected]);
if t.Typ <> gtBand then
with t do
if SelNum = 1 then
begin
{$IFDEF DebugLR}
DebugLn('Not a band');
{$ENDIF}
FrB1.Down := (frbTop in Frames);
FrB2.Down := (frbLeft in Frames);
FrB3.Down := (frbBottom in Frames);
FrB4.Down := (frbRight in Frames);
E1.Text := FloatToStrF(FrameWidth, ffGeneral, 2, 2);
frSetGlyph(FillColor, ClB1, 1);
frSetGlyph(FrameColor, ClB3, 2);
if t is TfrMemoView then
with t as TfrMemoView do
t := TfrView(Objects[TopSelected]);
if t.Typ <> gtBand then
with t do
begin
frSetGlyph(Font.Color, ClB2, 0);
if C2.ItemIndex <> C2.Items.IndexOf(Font.Name) then
C2.ItemIndex := C2.Items.IndexOf(Font.Name);
if C3.Text <> IntToStr(Font.Size) then
C3.Text := IntToStr(Font.Size);
FnB1.Down := fsBold in Font.Style;
FnB2.Down := fsItalic in Font.Style;
FnB3.Down := fsUnderline in Font.Style;
AlB4.Down := (Adjust and $4) <> 0;
AlB5.Down := (Adjust and $18) = $8;
AlB6.Down := (Adjust and $18) = 0;
AlB7.Down := (Adjust and $18) = $10;
case (Adjust and $3) of
0: BDown(AlB1);
1: BDown(AlB2);
2: BDown(AlB3);
3: BDown(AlB8);
{$IFDEF DebugLR}
DebugLn('Not a band');
{$ENDIF}
FrB1.Down := (frbTop in Frames);
FrB2.Down := (frbLeft in Frames);
FrB3.Down := (frbBottom in Frames);
FrB4.Down := (frbRight in Frames);
E1.Text := FloatToStrF(FrameWidth, ffGeneral, 2, 2);
frSetGlyph(FillColor, ClB1, 1);
frSetGlyph(FrameColor, ClB3, 2);
if t is TfrMemoView then
with t as TfrMemoView do
begin
frSetGlyph(Font.Color, ClB2, 0);
if C2.ItemIndex <> C2.Items.IndexOf(Font.Name) then
C2.ItemIndex := C2.Items.IndexOf(Font.Name);
if C3.Text <> IntToStr(Font.Size) then
C3.Text := IntToStr(Font.Size);
FnB1.Down := fsBold in Font.Style;
FnB2.Down := fsItalic in Font.Style;
FnB3.Down := fsUnderline in Font.Style;
AlB4.Down := (Adjust and $4) <> 0;
AlB5.Down := (Adjust and $18) = $8;
AlB6.Down := (Adjust and $18) = 0;
AlB7.Down := (Adjust and $18) = $10;
case (Adjust and $3) of
0: BDown(AlB1);
1: BDown(AlB2);
2: BDown(AlB3);
3: BDown(AlB8);
end;
end;
end;
end
else if SelNum > 1 then
begin
{$IFDEF DebugLR}
DebugLn('Multiple selection');
{$ENDIF}
BUp(FrB1);
BUp(FrB2);
BUp(FrB3);
BUp(FrB4);
ColorLocked := True;
frSetGlyph(0, ClB1, 1);
ColorLocked := False;
E1.Text := '1';
C2.ItemIndex := -1;
C3.Text := '';
BUp(FnB1);
BUp(FnB2);
BUp(FnB3);
BDown(AlB1);
BUp(AlB4);
BUp(AlB5);
end;
end
else if SelNum > 1 then
else
begin
{$IFDEF DebugLR}
DebugLn('Multiple selection');
{$ENDIF}
BUp(FrB1);
BUp(FrB2);
BUp(FrB3);
BUp(FrB4);
ColorLocked := True;
frSetGlyph(0, ClB1, 1);
ColorLocked := False;
E1.Text := '1';
C2.ItemIndex := -1;
C3.Text := '';
BUp(FnB1);
BUp(FnB2);
BUp(FnB3);
BDown(AlB1);
BUp(AlB4);
BUp(AlB5);
if ObjInsp.SelectedObject = Page then
PageView.Invalidate;
end;
Busy := False;
ShowPosition;
@ -4102,7 +4144,7 @@ begin
else if t.Memo.Count > 0 then
s := s + ': ' + t.Memo[0];
end;
StatusBar1.Panels[2].Text := s;
StatusBar1.Panels[3].Text := s;
end;
procedure TfrDesignerForm.DoClick(Sender: TObject);
@ -4491,7 +4533,8 @@ begin
CurReport.Pages.Add;
CurPage := 0;
CurDocName := sUntitled;
FileModified := False;
//FileModified := False;
Modified := False;
FCurDocFileType := 3;
end;
@ -4905,7 +4948,7 @@ begin
RedoB.Enabled := True;
end;
Modified := True;
FileModified := True;
//FileModified := True;
end;
procedure TfrDesignerForm.AddUndoAction(a: TfrUndoAction);
@ -5195,12 +5238,13 @@ begin
else
raise Exception.Create('Unrecognized file format');
end;
FileModified := False;
//FileModified := False;
Modified := False;
CurPage := 0; // do all
end;
end;
end;
{
procedure TfrDesignerForm.N20Click(Sender: TObject); // save as
var
s: String;
@ -5258,18 +5302,40 @@ begin
CurReport.SaveToXMLFile(curDocName)
else
CurReport.SaveToFile(CurDocName);
FileModified := False;
// FileModified := False;
Modified := False;
end
else
N20Click(nil);
end;
}
procedure TfrDesignerForm.FileBtn4Click(Sender: TObject); // preview
var
v1, v2: Boolean;
TestRepStream:TMemoryStream;
Rep, SaveR:TfrReport;
procedure DoClearFormsName;
var
i:integer;
begin
for i:=0 to CurReport.Pages.Count - 1 do
if CurReport.Pages[i] is TfrPageDialog then
TfrPageDialog(CurReport.Pages[i]).Form.Name:='';
end;
procedure DoResoreFormsName;
var
i:integer;
begin
for i:=0 to CurReport.Pages.Count - 1 do
if CurReport.Pages[i] is TfrPageDialog then
TfrPageDialog(CurReport.Pages[i]).Form.Name:=TfrPageDialog(CurReport.Pages[i]).Name;
end;
begin
if CurReport is TfrCompositeReport then Exit;
v1 := ObjInsp.Visible;
{ v1 := ObjInsp.Visible;
v2 := CurReport.ModalPreview;
ObjInsp.Visible:=False;
Application.ProcessMessages;
@ -5282,7 +5348,33 @@ begin
SetFocus;
DisableDrawing := False;
CurPage := 0;
end;}
Application.ProcessMessages;
SaveR:=CurReport;
TestRepStream:=TMemoryStream.Create;
CurReport.SaveToXMLStream(TestRepStream);
TestRepStream.Position:=0;
DoClearFormsName;
CurReport:=nil;
Rep:=TfrReport.Create(nil);
try
Rep.LoadFromXMLStream(TestRepStream);
Rep.ShowReport;
FreeAndNil(Rep)
except
on E:Exception do
begin
ShowMessage(E.Message);
if Assigned(Rep) then
FreeAndNil(Rep)
end;
end;
TestRepStream.Free;
CurReport:=SaveR;
CurPage := 0;
DoResoreFormsName;
end;
procedure TfrDesignerForm.N42Click(Sender: TObject); // var editor
@ -5290,7 +5382,7 @@ begin
if ShowEvEditor(CurReport) then
begin
Modified := True;
FileModified := True;
// FileModified := True;
end;
end;
@ -5331,7 +5423,7 @@ begin
if ShowModal = mrOk then
begin
Modified := True;
FileModified := True;
// FileModified := True;
WasOk := True;
PrintToPrevPage := CB1.Checked;
UseMargins := not CB5.Checked;
@ -5407,7 +5499,7 @@ begin
CurReport.ReportVersionBuild:=edtBuild.Text;
CurReport.ReportAutor:=edAutor.Text;
Modified := True;
FileModified := True;
// FileModified := True;
end;
CurPage := CurPage;
Free;
@ -5648,7 +5740,8 @@ procedure TfrDesignerForm.frDesignerFormCloseQuery(Sender: TObject;
var
Res:integer;
begin
if FileModified and (CurReport<>nil) and
// if FileModified and (CurReport<>nil) and
if Modified and (CurReport<>nil) and
(not ((csDesigning in CurReport.ComponentState) and CurReport.StoreInDFM)) then
begin
Res:=Application.MessageBox(PChar(sSaveChanges + ' ' + sTo + ' ' + ExtractFileName(CurDocName) + '?'),
@ -5658,13 +5751,16 @@ begin
mrNo:
begin
CanClose := True;
FileModified := False; // no means don't want changes
// FileModified := False; // no means don't want changes
Modified := False; // no means don't want changes
ModalResult := mrCancel;
end;
mrYes:
begin
FileBtn3Click(nil);
CanClose := not FileModified;
FileSave.Execute;
// FileBtn3Click(nil);
// CanClose := not FileModified;
CanClose := not Modified;
end;
else
CanClose := False;
@ -5790,7 +5886,7 @@ begin
SetMenuItemBitmap(N23, FileBtn1);
SetMenuItemBitmap(N19, FileBtn2);
SetMenuItemBitmap(N20, FileBtn3);
// SetMenuItemBitmap(N20, FileBtn3);
SetMenuItemBitmap(N39, FileBtn4);
SetMenuItemBitmap(N10, ExitB);
@ -6925,12 +7021,17 @@ begin
if Objects.Count <> fcboxObjList.Items.Count then
begin
fcboxObjList.Clear;
fcboxObjList.AddItem(TfrObject(frDesigner.Page).Name, TObject(frDesigner.Page));
for i:=0 to Objects.Count-1 do
fcboxObjList.AddItem(TfrView(Objects[i]).Name, TObject(Objects[i]));
end;
FSelectedObject:=nil;
if (Obj=nil) or (Obj is TPersistent) then
begin
FSelectedObject:=Obj;
fPropertyGrid.TIObject := TPersistent(Obj);
if Obj <> nil then
fcboxObjList.ItemIndex := fcboxObjList.Items.IndexOfObject(Obj);

View File

@ -109,7 +109,7 @@ begin
j := i;
case s[i] of
'+':
nm[st - 2] := SumOrConcat(nm[st - 2], nm[st - 1]);
nm[st - 2] := nm[st - 2] + nm[st - 1]; //SumOrConcat(nm[st - 2], nm[st - 1]);
ttOr:
nm[st - 2] := nm[st - 2] or nm[st - 1];
'-':