setupdiag.pas
来自「是一个手机功能的模拟程序」· PAS 代码 · 共 54 行
PAS
54 行
unit setupdiag;
interface
uses
Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
Buttons, ExtCtrls, Mask, phonebook,com;
type
TForm_setup = class(TForm)
CancelBtn: TButton;
OKBtn: TButton;
Label1: TLabel;
Label2: TLabel;
ComboBox_COM: TComboBox;
ComboBox_baudrate: TComboBox;
Bevel1: TBevel;
procedure FormActivate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form_setup: TForm_setup;
implementation
{$R *.dfm}
procedure TForm_setup.FormActivate(Sender: TObject);
begin
if comm='COM1' then
ComboBox_COM.ItemIndex:=0
else
ComboBox_COM.ItemIndex:=1;
if baudrate='115200' then
ComboBox_baudrate.itemindex:=0;
if baudrate='38400' then
ComboBox_baudrate.itemindex:=1;
if baudrate='19200' then
ComboBox_baudrate.itemindex:=2;
if baudrate='9600' then
ComboBox_baudrate.itemindex:=3;
if baudrate='4800' then
ComboBox_baudrate.itemindex:=4;
if baudrate='2400' then
ComboBox_baudrate.itemindex:=5;
if baudrate='1200' then
ComboBox_baudrate.itemindex:=6;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?