|
From: Peter T. <pe...@us...> - 2003-08-24 01:53:24
|
Update of /cvsroot/jvcl/dev/JVCL3/examples/RaLib/RaInterpreter/samples/project1
In directory sc8-pr-cvs1:/tmp/cvs-serv5637/JVCL3/examples/RaLib/RaInterpreter/samples/project1
Added Files:
SampleProject1.dof SampleProject1.dpr Unit2.dfm Unit2.pas
Unit3.dfm Unit3.pas Unit4.dfm Unit4.dti Unit4.pas project1.dof
project1.dpr project1.pas
Log Message:
- Copied jvcl/devtools and jvcl/examples dev/JVCL3
- Copied JVCLConvert *.dat files to dev/JVCL3/converter
--- NEW FILE: SampleProject1.dof ---
[Directories]
OutputDir=..\..\Bin
UnitOutputDir=..\..\Dcu
SearchPath=..\..\Source;..\..\Common
--- NEW FILE: SampleProject1.dpr ---
program SampelProject1;
uses
Unit2 in 'Unit2.pas' {Form2},
Unit3 in 'Unit3.pas' {Form3},
Unit4 in 'Unit4.pas' {DataModule1: TDataModule};
function main: string;
begin
DataModule1 := TDataModule1.Create(nil);
Form2 := TForm2.Create(nil);
Form2.ShowModal;
Form2.Free;
DataModule1.Free;
end;
end.
--- NEW FILE: Unit2.dfm ---
object Form2: TForm2
Left = 198
Top = 264
Width = 442
Height = 381
Caption = 'Form2'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object GroupBox2: TGroupBox
Left = 8
Top = 152
Width = 417
Height = 193
Caption = ' Database '
TabOrder = 0
object Label3: TLabel
Left = 129
Top = 20
Width = 251
Height = 13
Caption = 'Click button "Show Form3 after dataset was opened"'
end
object CheckBox2: TCheckBox
Left = 16
Top = 18
Width = 97
Height = 17
Caption = 'Open dataset'
TabOrder = 0
OnClick = CheckBox2Click
end
object Button2: TButton
Left = 14
Top = 161
Width = 75
Height = 23
Caption = 'AddRecord'
TabOrder = 1
OnClick = Button2Click
end
object DBGrid1: TDBGrid
Left = 8
Top = 43
Width = 401
Height = 110
DataSource = DataModule1.DataSource1
TabOrder = 2
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -11
TitleFont.Name = 'MS Sans Serif'
TitleFont.Style = []
end
object pnlStatus: TPanel
Left = 104
Top = 162
Width = 305
Height = 22
BevelOuter = bvLowered
Caption = 'pnlStatus'
TabOrder = 3
end
end
object Button3: TButton
Left = 8
Top = 9
Width = 113
Height = 25
Caption = 'Show Form3'
TabOrder = 1
OnClick = Button3Click
end
object RegAuto1: TJvRegAuto
RegPath = 'Software\JVCL\JvInterpreterTest'
IniFile = '$HOME/.NONAME'
SaveWindowPlace = True
Left = 240
Top = 224
end
object Table1: TTable
Left = 192
Top = 40
end
end
--- NEW FILE: Unit2.pas ---
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, JvRegAuto, Grids, DBGrids, Db, DBTables;
type
TForm2 = class(TForm)
RegAuto1: TJvRegAuto;
GroupBox2: TGroupBox;
CheckBox2: TCheckBox;
Button2: TButton;
DBGrid1: TDBGrid;
pnlStatus: TPanel;
Button3: TButton;
Label3: TLabel;
Table1: TTable;
procedure FormCreate(Sender: TObject);
procedure Table1ActiveChanged(DataSet: TDataSet);
procedure CheckBox2Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
uses Unit3, Unit4;
{$R *.DFM}
procedure TForm2.FormCreate(Sender: TObject);
begin
Caption := Name;
end;
procedure TForm2.Table1ActiveChanged(DataSet: TDataSet);
begin
if Table1.Active then
pnlStatus.Caption := 'Open'
else
pnlStatus.Caption := 'Close'
end;
procedure TForm2.CheckBox2Click(Sender: TObject);
begin
if TCheckBox(Sender).Checked then
// if Sender.Checked then
DataModule1.Table1.Open
else
DataModule1.Table1.Close
end;
procedure TForm2.Button2Click(Sender: TObject);
begin
DataModule1.Table1.AppendRecord([1000, 'Hello']);
end;
procedure TForm2.Button3Click(Sender: TObject);
var
Form3: TForm;
begin
Form3 := TForm3.Create(Application);
Form3.ShowModal;
Form3.Free;
end;
end.
--- NEW FILE: Unit3.dfm ---
object Form3: TForm3
Left = 230
Top = 104
Width = 274
Height = 270
Caption = 'Form3'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 24
Top = 16
Width = 172
Height = 13
Caption = 'This form has been called from Unit2'
end
object Label2: TLabel
Left = 24
Top = 48
Width = 228
Height = 13
Caption = 'Grid is linked with TTable from datamodule Unit4'
end
object Button1: TButton
Left = 96
Top = 200
Width = 75
Height = 25
Caption = 'Close'
TabOrder = 0
OnClick = Button1Click
end
object DBGrid1: TDBGrid
Left = 16
Top = 72
Width = 233
Height = 113
DataSource = DataModule1.DataSource1
TabOrder = 1
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -11
TitleFont.Name = 'MS Sans Serif'
TitleFont.Style = []
end
end
--- NEW FILE: Unit3.pas ---
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Grids, DBGrids;
type
TForm3 = class(TForm)
Label1: TLabel;
Button1: TButton;
DBGrid1: TDBGrid;
Label2: TLabel;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form3: TForm3;
implementation
uses Unit4;
{$R *.DFM}
procedure TForm3.Button1Click(Sender: TObject);
begin
Close;
end;
procedure TForm3.FormCreate(Sender: TObject);
begin
Caption := Name;
end;
end.
--- NEW FILE: Unit4.dfm ---
object DataModule1: TDataModule1
OldCreateOrder = False
Left = 130
Top = 269
Height = 203
Width = 185
object Table1: TTable
DatabaseName = 'DBDemos'
TableName = 'EMPLOYEE.DB'
Left = 24
Top = 24
end
object DataSource1: TDataSource
DataSet = Table1
Left = 24
Top = 80
end
end
--- NEW FILE: Unit4.dti ---
[Designer]
Version=1
Left=31
Top=79
Width=544
Height=375
Splitter=185
SelectedTab=Components
[Components]
Version=1
Left=0
Top=0
[TreeView]
Version=1
PrintHeader=1
PrintToSingle=1
PrintToFile=0
PrintBorders=1
PrintSelected=0
PrintVisible=0
ExpandedItems=DataModule1\<DefaultSession>\<ImpliedDatabase>.DBDemos\Table1
[DataDiagrams]
Version=1
PrintHeader=1
PrintToSingle=1
PrintToFile=0
PrintBorders=1
Left=0
Top=0
ModeSelected=SelectionMode
Count=1
[DataDiagrams.Diagram.0]
Islands=
Comments=
Bridges=
Alludes=
--- NEW FILE: Unit4.pas ---
unit Unit4;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Db, DBTables;
type
TDataModule1 = class(TDataModule)
Table1: TTable;
DataSource1: TDataSource;
private
{ Private declarations }
public
{ Public declarations }
end;
var
DataModule1: TDataModule1;
implementation
{$R *.DFM}
end.
--- NEW FILE: project1.dof ---
[Directories]
OutputDir=..\..\Bin
UnitOutputDir=..\..\Dcu
SearchPath=..\..\Source;..\..\Common
--- NEW FILE: project1.dpr ---
unit project1;
uses
Unit2 in 'Unit2.pas' {Form2},
Unit3 in 'Unit3.pas' {Form3},
Unit4 in 'Unit4.pas' {DataModule1: TDataModule};
function main: string;
begin
DataModule1 := TDataModule1.Create(nil);
Form2 := TForm2.Create(nil);
Form2.ShowModal;
Form2.Free;
DataModule1.Free;
end;
end.
--- NEW FILE: project1.pas ---
unit project1;
uses
Unit2 {Form2},
Unit4 {DataModule1};
function main: string;
begin
DataModule1 := TDataModule1.Create(nil);
Form2 := TForm2.Create(nil);
Form2.ShowModal;
Form2.Free;
DataModule1.Free;
end;
end.
|