root / UFRapportMat.pas
Historique | Voir | Annoter | Télécharger (3,327 ko)
1 |
unit UFRapportMat;
|
---|---|
2 |
|
3 |
interface
|
4 |
|
5 |
uses
|
6 |
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, |
7 |
Dialogs, StdCtrls, Buttons, ExtCtrls, QuickRpt, UVariables, gnugettext; |
8 |
|
9 |
type
|
10 |
TFRapportMat = class(TForm)
|
11 |
SBRapMatElem: TSpeedButton; |
12 |
SBRapMatAA: TSpeedButton; |
13 |
SBRapMatAG: TSpeedButton; |
14 |
SBRapMatMin: TSpeedButton; |
15 |
ChkRapMatElem: TCheckBox; |
16 |
ChkRapMatAA: TCheckBox; |
17 |
ChkRapMatAG: TCheckBox; |
18 |
CHKRapMatMin: TCheckBox; |
19 |
BBPrint: TBitBtn; |
20 |
PD: TPrintDialog; |
21 |
BBClose: TBitBtn; |
22 |
procedure SBRapMatElemClick(Sender: TObject);
|
23 |
procedure SBRapMatAAClick(Sender: TObject);
|
24 |
procedure SBRapMatAGClick(Sender: TObject);
|
25 |
procedure SBRapMatMinClick(Sender: TObject);
|
26 |
procedure BBPrintClick(Sender: TObject);
|
27 |
procedure ChkRapMatClick(Sender: TObject);
|
28 |
procedure FormCreate(Sender: TObject);
|
29 |
private
|
30 |
{ D?clarations priv?es }
|
31 |
public
|
32 |
{ D?clarations publiques }
|
33 |
end;
|
34 |
|
35 |
var
|
36 |
FRapportMat: TFRapportMat; |
37 |
|
38 |
implementation
|
39 |
|
40 |
uses
|
41 |
Printers, UUtil, UFRapMatElem, UFRapMatAA, UFRapMatAG, UFRapMatMin; |
42 |
|
43 |
{$R *.dfm}
|
44 |
|
45 |
{ TFRapportMat }
|
46 |
|
47 |
procedure TFRapportMat.FormCreate(Sender: TObject);
|
48 |
begin
|
49 |
if Screen.Fonts.IndexOf('Arial Unicode MS') <> -1 |
50 |
then
|
51 |
Font.Name := 'Arial Unicode MS';
|
52 |
TranslateComponent(Self); |
53 |
end;
|
54 |
|
55 |
procedure TFRapportMat.ChkRapMatClick(Sender: TObject);
|
56 |
begin
|
57 |
BBPrint.Enabled := (IsComplete or IsEducation)
|
58 |
and (ChkRapMatElem.Checked or ChkRapMatAA.Checked or ChkRapMatAG.Checked or ChkRapMatMin.Checked); |
59 |
end;
|
60 |
|
61 |
procedure TFRapportMat.SBRapMatElemClick(Sender: TObject);
|
62 |
begin
|
63 |
FRapMatElem := TFRapMatElem.Create(Self); |
64 |
FRapMatElem.QRRapport.PreviewModal; |
65 |
FRapMatElem.Release; |
66 |
end;
|
67 |
|
68 |
procedure TFRapportMat.SBRapMatAAClick(Sender: TObject);
|
69 |
begin
|
70 |
FRapMatAA := TFRapMatAA.Create(Self); |
71 |
FRapMatAA.QRRapport.PreviewModal; |
72 |
FRapMatAA.Release; |
73 |
end;
|
74 |
|
75 |
procedure TFRapportMat.SBRapMatAGClick(Sender: TObject);
|
76 |
begin
|
77 |
FRapMatAG := TFRapMatAG.Create(Self); |
78 |
FRapMatAG.QRRapport.PreviewModal; |
79 |
FRapMatAG.Release; |
80 |
end;
|
81 |
|
82 |
procedure TFRapportMat.SBRapMatMinClick(Sender: TObject);
|
83 |
begin
|
84 |
FRapMatMin := TFRapMatMin.Create(Self); |
85 |
FRapMatMin.QRRapport.PreviewModal; |
86 |
FRapMatMin.Release; |
87 |
end;
|
88 |
|
89 |
procedure TFRapportMat.BBPrintClick(Sender: TObject);
|
90 |
begin
|
91 |
if PD.Execute
|
92 |
then
|
93 |
begin
|
94 |
if ChkRapMatElem.Checked
|
95 |
then
|
96 |
begin
|
97 |
FRapMatElem := TFRapMatElem.Create(Self); |
98 |
FRapMatElem.QRRapport.PrinterSettings.PrinterIndex := Printer.PrinterIndex; |
99 |
FRapMatElem.QRRapport.Print; |
100 |
FRapMatElem.Release; |
101 |
end ;
|
102 |
if ChkRapMatAA.Checked
|
103 |
then
|
104 |
begin
|
105 |
FRapMatAA := TFRapMatAA.Create(Self); |
106 |
FRapMatAA.QRRapport.PrinterSettings.PrinterIndex := Printer.PrinterIndex; |
107 |
FRapMatAA.QRRapport.Print; |
108 |
FRapMatAA.Release; |
109 |
end ;
|
110 |
if ChkRapMatAG.Checked
|
111 |
then
|
112 |
begin
|
113 |
FRapMatAG := TFRapMatAG.Create(Self); |
114 |
FRapMatAG.QRRapport.PrinterSettings.PrinterIndex := Printer.PrinterIndex; |
115 |
FRapMatAG.QRRapport.Print; |
116 |
FRapMatAG.Release; |
117 |
end ;
|
118 |
if ChkRapMatMin.Checked
|
119 |
then
|
120 |
begin
|
121 |
FRapMatMin := TFRapMatMin.Create(Self); |
122 |
FRapMatMin.QRRapport.PrinterSettings.PrinterIndex := Printer.PrinterIndex; |
123 |
FRapMatMin.QRRapport.Print; |
124 |
FRapMatMin.Release; |
125 |
end ;
|
126 |
Close; |
127 |
end;
|
128 |
end;
|
129 |
|
130 |
end.
|