root / UFPrevGraph.pas
Historique | Voir | Annoter | Télécharger (1,575 ko)
1 |
unit UFPrevGraph;
|
---|---|
2 |
|
3 |
interface
|
4 |
|
5 |
uses
|
6 |
Windows, Forms, Classes, Controls, Messages, StdCtrls, Buttons, ExtCtrls, |
7 |
TeeProcs, TeePreviewPanel; |
8 |
|
9 |
type
|
10 |
TFPrevGraph = class(TForm)
|
11 |
LBas: TPanel; |
12 |
BBPrint: TBitBtn; |
13 |
TPPGraph: TTeePreviewPanel; |
14 |
LPrinter: TLabel; |
15 |
CBPrinter: TComboBox; |
16 |
procedure FormShow(Sender: TObject);
|
17 |
procedure BBPrintClick(Sender: TObject);
|
18 |
procedure CBPrinterChange(Sender: TObject);
|
19 |
procedure FormCreate(Sender: TObject);
|
20 |
procedure WMSysCommand(var Mess: TWMSysCommand); message WM_SYSCOMMAND; |
21 |
private
|
22 |
{ D?clarations priv?es }
|
23 |
public
|
24 |
{ D?clarations publiques }
|
25 |
end;
|
26 |
|
27 |
var
|
28 |
FPrevGraph: TFPrevGraph; |
29 |
|
30 |
implementation
|
31 |
|
32 |
uses
|
33 |
Printers, SysUtils, gnugettext, UUtil; |
34 |
|
35 |
{$R *.dfm}
|
36 |
|
37 |
procedure TFPrevGraph.FormCreate(Sender: TObject);
|
38 |
begin
|
39 |
if Screen.Fonts.IndexOf('Arial Unicode MS') <> -1 |
40 |
then
|
41 |
Font.Name := 'Arial Unicode MS';
|
42 |
TranslateComponent(Self); |
43 |
end;
|
44 |
|
45 |
procedure TFPrevGraph.FormShow(Sender: TObject);
|
46 |
begin
|
47 |
BBPrint.Enabled := IsComplete or IsEducation ;
|
48 |
BBPrint.Enabled := IsComplete or IsEducation ;
|
49 |
CBPrinter.Items.Assign(Printer.Printers); |
50 |
CBPrinter.ItemIndex := Printer.PrinterIndex; |
51 |
end;
|
52 |
|
53 |
procedure TFPrevGraph.BBPrintClick(Sender: TObject);
|
54 |
begin
|
55 |
TPPGraph.Print; |
56 |
end;
|
57 |
|
58 |
procedure TFPrevGraph.CBPrinterChange(Sender: TObject);
|
59 |
begin
|
60 |
Printer.PrinterIndex := CBPrinter.ItemIndex; |
61 |
end;
|
62 |
|
63 |
procedure TFPrevGraph.WMSysCommand(var Mess: TWMSysCommand); |
64 |
begin
|
65 |
if Mess.CmdType = SC_MINIMIZE
|
66 |
then
|
67 |
Application.Minimize |
68 |
else
|
69 |
inherited;
|
70 |
end;
|
71 |
|
72 |
end.
|