// DEPRECATED !!!

unit CtrlPanelZdvc;

interface

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

type
  TCtrlPanelZdvcForm = class(TForm)
    Panel1: TPanel;
    Timer: TTimer;
    ZdvcCtrlFrame: TZdvcCtrlFrame;
    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
  CtrlPanelZdvcForm: TCtrlPanelZdvcForm;

implementation
uses TagStorage;

{$R *.DFM}

procedure TCtrlPanelZdvcForm.FormActivate(Sender: TObject);
begin
  ZdvcCtrlFrame.TagName := TagName;
  ZdvcCtrlFrame.TagPath := TagPath;
  ZdvcCtrlFrame.DeviceName := DeviceName;
  ZdvcCtrlFrame.Init;

  Timer.Enabled := true;
end;

procedure TCtrlPanelZdvcForm.TimerTimer(Sender: TObject);
begin
  ZdvcCtrlFrame.Process;
end;

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


end.
