home *** CD-ROM | disk | FTP | other *** search
/ Delphi Developer's Kit 1996 / Delphi Developer's Kit 1996.iso / power / source9 / scratch / mscomm / config.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-12-22  |  2.0 KB  |  95 lines

  1. unit Config;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls;
  8.  
  9. type
  10.   TfrmSettings = class(TForm)
  11.     Label1: TLabel;
  12.     Label2: TLabel;
  13.     Label3: TLabel;
  14.     Label4: TLabel;
  15.     cboPort: TComboBox;
  16.     cboBaud: TComboBox;
  17.     cboParity: TComboBox;
  18.     cboStop: TComboBox;
  19.     cboData: TComboBox;
  20.     Label5: TLabel;
  21.     btnOK: TButton;
  22.     Label6: TLabel;
  23.     cboFlow: TComboBox;
  24.     procedure btnOKClick(Sender: TObject);
  25.     procedure FormCreate(Sender: TObject);
  26.   private
  27.     { Private declarations }
  28.   public
  29.     { Public declarations }
  30.   end;
  31.  
  32. var
  33.   frmSettings: TfrmSettings;
  34.  
  35. implementation
  36.  
  37. {$R *.DFM}
  38.  
  39. procedure TfrmSettings.btnOKClick(Sender: TObject);
  40. begin
  41.  Close;
  42. end;
  43.  
  44. procedure TfrmSettings.FormCreate(Sender: TObject);
  45. begin
  46.  
  47.   cboPort.Items.Add('(none)');
  48.   cboPort.Items.Add('1');
  49.   cboPort.Items.Add('2');
  50.   cboPort.Items.Add('3');
  51.   cboPort.Items.Add('4');
  52.   cboPort.Items.Add('5');
  53.   cboPort.Items.Add('6');
  54.   cboPort.Items.Add('7');
  55.   cboPort.Items.Add('8');
  56.   cboPort.Items.Add('9');
  57.  
  58.   cboBaud.Items.Add('110');
  59.   cboBaud.Items.Add('300');
  60.   cboBaud.Items.Add('600');
  61.   cboBaud.Items.Add('1200');
  62.   cboBaud.Items.Add('2400');
  63.   cboBaud.Items.Add('4800');
  64.   cboBaud.Items.Add('9600');
  65.   cboBaud.Items.Add('14400');
  66.   cboBaud.Items.Add('19200');
  67.   cboBaud.Items.Add('38400');
  68.   cboBaud.Items.Add('56000');
  69.   cboBaud.Items.Add('128000');
  70.   cboBaud.Items.Add('256000');
  71.  
  72.   cboData.Items.Add('4');
  73.   cboData.Items.Add('5');
  74.   cboData.Items.Add('6');
  75.   cboData.Items.Add('7');
  76.   cboData.Items.Add('8');
  77.  
  78.   cboParity.Items.Add('None');
  79.   cboParity.Items.Add('Odd');
  80.   cboParity.Items.Add('Even');
  81.   cboParity.Items.Add('Mark');
  82.   cboParity.Items.Add('Space');
  83.  
  84.   cboStop.Items.Add('1');
  85.   cboStop.Items.Add('1.5');
  86.   cboStop.Items.Add('2');
  87.  
  88.   cboFlow.Items.Add('None');
  89.   cboFlow.Items.Add('RTS/CTS');
  90.   cboFlow.Items.Add('XON/XOFF');
  91.  
  92. end;
  93.  
  94. end.
  95.