home *** CD-ROM | disk | FTP | other *** search
/ Delphi Programming Unleashed / Delphi_Programming_Unleashed_SAMS_Publishing_1995.iso / misc / life / chsdlg.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-03-21  |  923 b   |  47 lines

  1. unit Chsdlg;
  2.  
  3. { Program copyright (c) 1995 by Charles Calvert }
  4. { Project Name: LIFE }
  5.  
  6. interface
  7.  
  8. uses
  9.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  10.   Forms, Dialogs, StdCtrls, ExtCtrls, Buttons;
  11.  
  12. type
  13.   TChooseDlg = class(TForm)
  14.     BCancel: TBitBtn;
  15.     bOk: TBitBtn;
  16.     Panel1: TPanel;
  17.     CompChoose: TRadioButton;
  18.     DiskLoad: TRadioButton;
  19.   private
  20.     { Private declarations }
  21.   public
  22.     { Public declarations }
  23.     function ShowYourSelf(var Choice: Char): Boolean;
  24.   end;
  25.  
  26. var
  27.   ChooseDlg: TChooseDlg;
  28.  
  29. implementation
  30.  
  31. {$R *.DFM}
  32.  
  33. function TChooseDlg.ShowYourself(var Choice: Char): Boolean;
  34. begin
  35.   ShowYourself := False;
  36.   if ShowModal = mrCancel then Exit;
  37.   if ChooseDlg.CompChoose.Checked then
  38.     Choice := '1'
  39.   else if ChooseDlg.DiskLoad.Checked then
  40.     Choice := '3'
  41.   else
  42.     Choice := '2';
  43.   ShowYourself := True;
  44. end;
  45.  
  46. end.
  47.