unit CtrlPanelzdvb;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  DevCtrl, DatCtrl, ExtCtrls, StdCtrls, Buttons, Viszdvb, zdvbCtrl;

type
  TCtrlPanelzdvbForm = class(TForm)
    Panel1: TPanel;
    Timer: TTimer;

    procedure FormActivate(Sender: TObject);
    procedure TimerTimer(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    frm: TzdvbCtrlFrame;
  public
    M: TViszdvb;
  end;

var
  CtrlPanelzdvbForm: TCtrlPanelzdvbForm;

implementation
uses numbers, TagStorage;

{$R *.DFM}

procedure TCtrlPanelzdvbForm.FormActivate(Sender: TObject);
//var
//  k,
//  i,l: integer;
begin
  Timer.Enabled := false;
  // Создание объектов панели управления
//  k:=0;

  if frm = nil then begin
    frm := TzdvbCtrlFrame.Create(self);
    frm.Parent := self;
    frm.Name := 'frm';
    frm.Left := 2;
    frm.Top :=  2;
    frm.Visible := true;
  end;

  frm.M := M;
  frm.Init;
  frm.Visible := true;

  Timer.Enabled := true;

end;

procedure TCtrlPanelzdvbForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Timer.Enabled := false;
end;


procedure TCtrlPanelzdvbForm.TimerTimer(Sender: TObject);
begin
  frm.Process;
end;




end.
