diff --git a/CM2010.dfm b/CM2010.dfm index 744ed91..9764b43 100644 --- a/CM2010.dfm +++ b/CM2010.dfm @@ -1,6 +1,6 @@ object Form1: TForm1 - Left = 197 - Top = 176 + Left = 195 + Top = 109 Width = 721 Height = 477 Caption = @@ -498,6 +498,13 @@ object Form1: TForm1 FlowControl.ControlRTS = rtsDisable FlowControl.XonXoffOut = False FlowControl.XonXoffIn = False + OnAfterOpen = ComPortAfterOpen + OnAfterClose = ComPortAfterClose + OnRxChar = ComPortRxChar + OnCTSChange = ComPortCTSChange + OnDSRChange = ComPortDSRChange + OnRLSDChange = ComPortRLSDChange + OnRxFlag = ComPortRxFlag Left = 160 Top = 120 end diff --git a/CM2010.pas b/CM2010.pas index fd7b9dc..3f4bf5f 100644 --- a/CM2010.pas +++ b/CM2010.pas @@ -59,8 +59,8 @@ type ComPort: TComPort; procedure COMSettingsClick(Sender: TObject); procedure MultiButtClick(Sender: TObject); - procedure ComPortOpen(Sender: TObject); - procedure ComPortClose(Sender: TObject); + procedure ComPortAfterOpen(Sender: TObject); + procedure ComPortAfterClose(Sender: TObject); procedure ComPortRxChar(Sender: TObject; Count: Integer); procedure ComPortCTSChange(Sender: TObject; OnOff: Boolean); procedure ComPortDSRChange(Sender: TObject; OnOff: Boolean); @@ -123,12 +123,12 @@ begin ComPort.Open; end; -procedure TForm1.ComPortOpen(Sender: TObject); +procedure TForm1.ComPortAfterOpen(Sender: TObject); begin MultiButt.Caption := 'Stop capturing'; end; -procedure TForm1.ComPortClose(Sender: TObject); +procedure TForm1.ComPortAfterClose(Sender: TObject); var i: integer; begin InSync := true;