📄 connectcentersrc.pas
字号:
unit ConnectCenterSrc;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TFormConnectCenter = class(TForm)
Label1: TLabel;
Button1: TButton;
Button2: TButton;
procedure ButtonOKClick(Sender: TObject);
procedure ButtonCancelClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FormConnectCenter: TFormConnectCenter;
implementation
uses
HardwareInterfaceSrc;
{$R *.dfm}
procedure TFormConnectCenter.ButtonOKClick(Sender: TObject);
begin
//先关闭串口, 然后再打开串口,避免对端口的操作错误
FormHardwareInterface.ListenComm.StopComm;
//开启串口
FormHardwareInterface.ListenComm.StartComm;
Close;
end;
procedure TFormConnectCenter.ButtonCancelClick(Sender: TObject);
begin
//关闭串口
FormHardwareInterface.ListenComm.StopComm;
Close;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -