unit MI1201AGM_Voltmeter_Form; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, Grids, StdCtrls, ExtCtrls, CheckLst, xStringGrig, MI1201AGM_Emulator_Notificator, MI1201AGM_Emulator_XForm, MI1201AGM_Voltmeter_Emulator; type TFVoltmeter = class(TFormX) gbParameters: TGroupBox; sgParameters: TStringGrid; gbPorts: TGroupBox; StringGrid1: TStringGrid; procedure FormCreate(Sender: TObject); private { Private declarations } protected function Notify(Sender:TObject; var Event:tEvent):boolean; override; public { Public declarations } end; var FVoltmeter: TFVoltmeter; implementation uses MI1201AGM_PortIO_Emulator, MI1201AGM_Controller_Emulator, MI1201AGM_Emulator_FormMain; {$R *.DFM} function TFVoltmeter.Notify(Sender:TObject; var Event:tEvent):boolean; begin Result:=SenderValid(Sender); if not Result then Exit; if TryLockDef then begin (* if Inherited Notify(Sender,Event) then // событие обработано else if Event.Base.SubID<0 then begin // ошибка end else if Event.Base.ID=evController then begin case tBaseEvent(Event.Base.SubID) of evCustom: begin case tRollEvent(Event.Base.CustomID) of evRollNothing,evRollLastEvent:; evRollSetAutotuning: begin ProcessAutotuning; end; evRollOperational: begin ProcessOperational; end; evRollFlags: begin ProcessFlags; end; evRollStartCount: begin end; evRollStopCount: begin ProcessCounter; end; else begin Result:=FALSE; end; end; end; evPortRead, evPortWrite: begin ProcessPortIO; end; else begin Result:=FALSE; end; end; end;*) end else begin Result:=FALSE; end; Unlock; end; procedure TFVoltmeter.FormCreate(Sender: TObject); begin Lock; FMain.AssignProperties(Self); RegistryReadForm; if Assigned(Mi1201AGM) then begin // Controller:=Mi1201AGM.Voltmeter; // Mi1201AGM.Roll.NotifyEvent:=Self.Notify; end; // FillParametersHeaders; // FillPortsHeaders; // ProcessAll; // RegistryReadGridColsWidth(sgPorts); // RegistryReadGridColsWidth(sgParameters); // sgParameters.OnEditQuery:=GetEditableParameters; Unlock; end; end.