?? options.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 + -