// DEPRECATED !!!

unit CtrlPanelZdvr;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ZdvrCtrl, ExtCtrls, StdCtrls, Buttons;

type
  TCtrlPanelZdvrForm = class(TForm)
    Panel1: TPanel;
    Timer: TTimer;
    ZdvrCtrlFrame: TZdvrCtrlFrame;
    procedure FormActivate(Sender: TObject);
    procedure TimerTimer(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
  public
    TagName: string;
    TagPath: string;
    DeviceName: string;
    ChnlNumber: integer;
  end;

var
  CtrlPanelZdvrForm: TCtrlPanelZdvrForm;

implementation
uses TagStorage;

{$R *.DFM}

procedure TCtrlPanelZdvrForm.FormActivate(Sender: TObject);
begin
  ZdvrCtrlFrame.TagName := TagName;
  ZdvrCtrlFrame.TagPath := TagPath;
  ZdvrCtrlFrame.DeviceName := DeviceName;
  ZdvrCtrlFrame.ChnlNumber := ChnlNumber;
  ZdvrCtrlFrame.Init;

  Timer.Enabled := true;
end;

procedure TCtrlPanelZdvrForm.TimerTimer(Sender: TObject);
begin
  ZdvrCtrlFrame.Process;
end;

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


end.
