⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 options.pas

📁 该源代码是有关modem 拨号
💻 PAS
字号:
unit Options;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ExtCtrls, TAPILine;

type
  TformOptions = class(TForm)
    SelectedLine: TComboBox;
    Label1: TLabel;
    DevDirectAccess: TCheckBox;
    Script: TMemo;
    Button1: TButton;
    Button2: TButton;
    WaitForC: TCheckBox;
    Image1: TImage;
    eRings: TEdit;
    rgCallType: TRadioGroup;
    Label3: TLabel;
    CallClock: TCheckBox;
    ShowDialDialog: TCheckBox;
    procedure DevDirectAccessClick(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure SelectedLineChange(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  formOptions: TformOptions;

implementation

uses Main;

{$R *.DFM}

procedure TformOptions.DevDirectAccessClick(Sender: TObject);
begin
   Script.Enabled := DevDirectAccess.Checked;
end;

procedure TformOptions.Button2Click(Sender: TObject);
begin
   with formMain.TAPILine1 do
   Begin
      DevIDToInitialize := SelectedLine.ItemIndex;
      Options := [];
      if DevDirectAccess.Checked then
         Options := Options + [tloDirectAccess];
      if WaitForC.Checked then
         Options := Options + [tloCallAnswering];
      if CallClock.Checked then
         Options := Options + [tloUseClock];
      if ShowDialDialog.Checked then
         Options := Options + [tloShowDialDialog];

      PassRingsCount := StrToInt (eRings.Text);
      if rgCallType.ItemIndex = 0 then
         MediaModes := [lmmInteractiveVoice, lmmAutomatedVoice]
      else
         MediaModes := [lmmDataModem];

      DirectAccessScript.Clear;
      DirectAccessScript.Assign (Script.Lines);
   End;
end;

procedure TformOptions.FormActivate(Sender: TObject);
begin
   with formMain.TAPILine1 do
   Begin
      SelectedLine.ItemIndex := DevIDToInitialize;
      DevDirectAccess.Checked := tloDirectAccess in Options;
      WaitForC.Checked := tloCallAnswering in Options;
      CallClock.Checked := tloUseClock in Options;
      ShowDialDialog.Checked := tloShowDialDialog in Options;

      eRings.Text := IntToStr(PassRingsCount);
      if lmmInteractiveVoice in MediaModes then
         rgCallType.ItemIndex := 0
      else
         rgCallType.ItemIndex := 1;

      Script.Clear;
      Script.Lines.Assign (formMain.TAPILine1.DirectAccessScript);

      if formMain.TAPILine1.DevIDToInitialize <> -1 Then
         Image1.Picture.Icon.handle := formMain.TAPILine1.GetIcon (formMain.TAPILine1.DevIDToInitialize);
   end;
end;

procedure TformOptions.FormCreate(Sender: TObject);
begin
    formMain.TAPILine1.FillTAPILine (SelectedLine.Items);
end;

procedure TformOptions.SelectedLineChange(Sender: TObject);
begin
   if SelectedLine.ItemIndex <> -1 Then
      try
         Image1.Picture.Icon.handle := formMain.TAPILine1.GetIcon (SelectedLine.ItemIndex);
      except
      end;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -