unit Labs;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Menus, VirtualTrees, DTDBTreeView, DTADOTree, ExtCtrls, sPanel,
  OleCtrls, SHDocVw, sSplitter, sSkinManager;

type
  TLabs = class(TForm)
    WebBrowser1: TWebBrowser;
    MainMenu1: TMainMenu;
    N1: TMenuItem;
    sPanel1: TsPanel;
    sPanel2: TsPanel;
    DTADOTree2: TDTADOTree;
    sSplitter1: TsSplitter;
    sSkinManager1: TsSkinManager;
    procedure Webput(b:Byte);
    procedure DTADOTree2Change(Sender: TBaseVirtualTree;
      Node: PVirtualNode);
    procedure DTADOTree2MouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Labs: TLabs;
  s:String;
  Lek:Boolean=True;
  lab:Boolean;

implementation

uses Datam;

{$R *.dfm}

procedure TLabs.DTADOTree2Change(Sender: TBaseVirtualTree;
  Node: PVirtualNode);
begin
 if Lek=True then
   Webput(1)
 else
 if lab=True then
   Webput(2);
end;

procedure TLabs.DTADOTree2MouseMove(Sender: TObject; Shift: TShiftState;
  X, Y: Integer);
begin
if Lek=True then
DTADOTree2.Hint:=DataModule2.ADOQuery1.FieldValues[DTADOTree2.DBTreeFields.ListFieldName];
if lab=True then
DTADOTree2.Hint:=DataModule2.ADOQuery2.FieldValues[DTADOTree2.DBTreeFields.ListFieldName];
end;

procedure TLabs.Webput(b:Byte);
var
lek_s:String;
lab_s:String;
begin
case b of
1 : if DataModule2.ADOQuery1.FieldByName('put').AsString<>'' then
 begin
  lek_s:=ExtractFilePath(Application.ExeName);
  WebBrowser1.Navigate(lek_s+'html\'+DataModule2.ADOQuery1.FieldValues['Put']+'.htm');
 end;
2 :  if DataModule2.ADOQuery2.FieldByName('put').AsString<>'' then
 begin
  lab_s:=ExtractFilePath(Application.ExeName);
  WebBrowser1.Navigate(lab_s+'html\'+DataModule2.ADOQuery2.FieldValues['Put']+'.htm');
 end;
end;
end;

end.
