home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / AddOns / Components / TEECHART / Delphi1_And_Delphi2 / EXAMPLES / TEEALL.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1998-10-24  |  4.1 KB  |  168 lines

  1. {****************************************}
  2. {    TeeChart. TChart Component          }
  3. { Copyright (c) 1995-98 by David Berneda }
  4. {    All Rights Reserved                 }
  5. {****************************************}
  6. {$I Teedefs.inc}
  7. unit Teeall;
  8.  
  9. interface
  10.  
  11. uses
  12.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  13.   Forms, Dialogs, StdCtrls, Buttons, ExtCtrls;
  14.  
  15. type
  16.   TAllExamplesForm = class(TForm)
  17.     BStdSeriesDemo: TBitBtn;
  18.     BClose: TBitBtn;
  19.     BStdSeries: TBitBtn;
  20.     BDatabase: TBitBtn;
  21.     BTClock: TBitBtn;
  22.     BPacMan: TBitBtn;
  23.     BSpecs: TBitBtn;
  24.     BStdFeatures: TBitBtn;
  25.     BExtFeatures: TBitBtn;
  26.     BExtSeries: TBitBtn;
  27.     BAbout: TBitBtn;
  28.     BNew4: TBitBtn;
  29.     Image1: TImage;
  30.     Image2: TImage;
  31.     Shape1: TShape;
  32.     Shape2: TShape;
  33.     Shape3: TShape;
  34.     Shape4: TShape;
  35.     procedure BStdSeriesDemoClick(Sender: TObject);
  36.     procedure BStdSeriesClick(Sender: TObject);
  37.     procedure BDatabaseClick(Sender: TObject);
  38.     procedure BTClockClick(Sender: TObject);
  39.     procedure BPacManClick(Sender: TObject);
  40.     procedure BSpecsClick(Sender: TObject);
  41.     procedure BStdFeaturesClick(Sender: TObject);
  42.     procedure BExtFeaturesClick(Sender: TObject);
  43.     procedure BExtSeriesClick(Sender: TObject);
  44.     procedure BCloseClick(Sender: TObject);
  45.     procedure BAboutClick(Sender: TObject);
  46.     procedure BNew4Click(Sender: TObject);
  47.     procedure FormPaint(Sender: TObject);
  48.     procedure FormShow(Sender: TObject);
  49.   private
  50.     { Private declarations }
  51.   public
  52.     { Public declarations }
  53.   end;
  54.  
  55. var
  56.   AllExamplesForm: TAllExamplesForm;
  57.  
  58. implementation
  59.  
  60. {$R *.DFM}
  61. Uses TeeMain,Features,UDemoCha,TeeLoper
  62.      {$IFNDEF NOUSE_BDE}
  63.      ,UTeeDB
  64.      {$ENDIF}
  65.      ,Clock1,UPacMan,Specs,UExtFeat,MenuPro,NewPro4,TeeAbout,
  66.      TeCanvas;
  67.  
  68. procedure TAllExamplesForm.BStdSeriesDemoClick(Sender: TObject);
  69. begin
  70.   ShowForm(TTeeMainForm);
  71. end;
  72.  
  73. procedure TAllExamplesForm.BStdSeriesClick(Sender: TObject);
  74. begin
  75.   ShowForm(TBasicSeriesForm);
  76. end;
  77.  
  78. procedure TAllExamplesForm.BDatabaseClick(Sender: TObject);
  79. begin
  80.   {$IFDEF NOUSE_BDE}
  81.   ShowMessage('The Database Examples are not included in this'+#13+
  82.               'demo executable to avoid requiring the BDE (Borland'+#13+
  83.               'Database Engine).'+#13+
  84.               'Visit http://www.teemach.com to download the TeeChart'+#13+
  85.               'Database Demo.');
  86.   {$ELSE}
  87.   ShowForm(TDatabaseExamples)
  88.   {$ENDIF}
  89. end;
  90.  
  91. procedure TAllExamplesForm.BTClockClick(Sender: TObject);
  92. begin
  93.   ShowForm(TClockDemoForm);
  94. end;
  95.  
  96. procedure TAllExamplesForm.BPacManClick(Sender: TObject);
  97. begin
  98.   ShowForm(TTeePacForm)
  99. end;
  100.  
  101. procedure TAllExamplesForm.BSpecsClick(Sender: TObject);
  102. begin
  103.   ShowForm(TChartSpecs)
  104. end;
  105.  
  106. procedure TAllExamplesForm.BStdFeaturesClick(Sender: TObject);
  107. begin
  108.   ShowForm(TFeaturesForm)
  109. end;
  110.  
  111. procedure TAllExamplesForm.BExtFeaturesClick(Sender: TObject);
  112. begin
  113.   ShowForm(TExtendedFeaturesForm);
  114. end;
  115.  
  116. procedure TAllExamplesForm.BExtSeriesClick(Sender: TObject);
  117. begin
  118.   ShowForm(TExtendedSeriesForm)
  119. end;
  120.  
  121. procedure TAllExamplesForm.BCloseClick(Sender: TObject);
  122. begin
  123.   Close;
  124. end;
  125.  
  126. procedure TAllExamplesForm.BAboutClick(Sender: TObject);
  127. begin
  128.   TeeShowAboutBox(True);
  129. end;
  130.  
  131. procedure TAllExamplesForm.BNew4Click(Sender: TObject);
  132. begin
  133.   ShowForm(TMenuExtended);
  134. end;
  135.  
  136. procedure TAllExamplesForm.FormPaint(Sender: TObject);
  137. Var tmp:TTeeCanvas3D;
  138.     t:Integer;
  139.     tmpR:TRect;
  140. begin
  141.   With Canvas do
  142.   if (GetDeviceCaps(Handle,BITSPIXEL)*GetDeviceCaps(Handle,PLANES)>=15) then
  143.   begin
  144.     tmp:=TTeeCanvas3D.Create;
  145.     tmp.UseBuffer:=False;
  146.     tmp.ReferenceCanvas:=Canvas;
  147.     tmp.GradientFill(ClientRect,clWhite,clSilver, gdFromTopLeft);
  148.     for t:=0 to ControlCount-1 do
  149.     if Controls[t] is TBitBtn then
  150.     begin
  151.       tmpR:=Controls[t].BoundsRect;
  152.       OffsetRect(tmpR,7,7);
  153.       tmp.GradientFill(tmpR,clSilver,clGray,gdLeftRight);
  154.     end;
  155.     tmp.Free;
  156.   end;
  157. end;
  158.  
  159. procedure TAllExamplesForm.FormShow(Sender: TObject);
  160. begin
  161.   {$IFDEF D3}
  162.   Image1.Transparent:=True;
  163.   Image2.Transparent:=True;
  164.   {$ENDIF}
  165. end;
  166.  
  167. end.
  168.