unit Nature;

interface

uses
  SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  Forms, Dialogs, StdCtrls, ExtCtrls, SetPlace, Buttons, inputdat,construc;

type
  TNatura = class(TForm)
    GroupBox1: TGroupBox;
    Site: TComboBox;
    Label1: TLabel;
    BitBtn1: TBitBtn;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    Label11: TLabel;
    Label12: TLabel;
    Label13: TLabel;
    Label14: TLabel;
    Label15: TLabel;
    Label16: TLabel;
    Label17: TLabel;
    Label18: TLabel;
    Label19: TLabel;
    Label2: TLabel;
    Label20: TLabel;
    ComboBox1: TComboBox;
    ComboBox2: TComboBox;
    ComboBox3: TComboBox;
    ComboBox4: TComboBox;
    ComboBox5: TComboBox;
    ComboBox6: TComboBox;
    ComboBox7: TComboBox;
    ComboBox8: TComboBox;
    ComboBox9: TComboBox;
    ComboBox10: TComboBox;
    ComboBox11: TComboBox;
    ComboBox12: TComboBox;
    ComboBox13: TComboBox;
    ComboBox14: TComboBox;
    ComboBox15: TComboBox;
    ComboBox16: TComboBox;
    ComboBox17: TComboBox;
    ComboBox18: TComboBox;
    ComboBox19: TComboBox;
    Button1: TButton;
    Button2: TButton;
    procedure SiteChange(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure ComboBox2Change(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
    procedure ComboBox1Change(Sender: TObject);
    procedure ComboBox3Change(Sender: TObject);
    procedure ComboBox4Change(Sender: TObject);
    procedure ComboBox5Change(Sender: TObject);
    procedure ComboBox6Change(Sender: TObject);
    procedure ComboBox7Change(Sender: TObject);
    procedure ComboBox8Change(Sender: TObject);
    procedure ComboBox9Change(Sender: TObject);
    procedure ComboBox10Change(Sender: TObject);
    procedure ComboBox11Change(Sender: TObject);
    procedure ComboBox12Change(Sender: TObject);
    procedure ComboBox13Change(Sender: TObject);
    procedure ComboBox14Change(Sender: TObject);
    procedure ComboBox15Change(Sender: TObject);
    procedure ComboBox16Change(Sender: TObject);
    procedure ComboBox17Change(Sender: TObject);
    procedure ComboBox18Change(Sender: TObject);
    procedure ComboBox19Change(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure BHelpClick(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Natura: TNatura;

implementation

{$R *.DFM}

procedure TNatura.SiteChange(Sender: TObject);
var
 Idx:integer;
begin
    Idx:=Site.ItemIndex + 1;
    indexsite:=Site.ItemIndex;
   if EfecHuman[Idx].natura[1]=0 then
     ComboBox1.text:='No Selected'
    else
     ComboBox1.text:=ComboBox1.items[EfecHuman[Idx].natura[1]];
   if EfecHuman[Idx].natura[2]=0 then
     ComboBox2.text:='No Selected'
    else
     ComboBox2.text:=ComboBox2.items[EfecHuman[Idx].natura[2]];
   if EfecHuman[Idx].natura[3]=0 then
     ComboBox3.text:='No Selected'
    else
     ComboBox3.text:=ComboBox3.items[EfecHuman[Idx].natura[3]];
   if EfecHuman[Idx].natura[4]=0 then
     ComboBox4.text:='No Selected'
    else
     ComboBox4.text:=ComboBox4.items[EfecHuman[Idx].natura[4]];
   if EfecHuman[Idx].natura[5]=0 then
     ComboBox5.text:='No Selected'
    else
     ComboBox5.text:=ComboBox5.items[EfecHuman[Idx].natura[5]];
   if EfecHuman[Idx].natura[6]=0 then
     ComboBox6.text:='No Selected'
    else
     ComboBox6.text:=ComboBox6.items[EfecHuman[Idx].natura[6]];
   if EfecHuman[Idx].natura[7]=0 then
     ComboBox7.text:='No Selected'
    else
     ComboBox7.text:=ComboBox7.items[EfecHuman[Idx].natura[7]];
   if EfecHuman[Idx].natura[8]=0 then
     ComboBox8.text:='No Selected'
    else
     ComboBox8.text:=ComboBox8.items[EfecHuman[Idx].natura[8]];
   if EfecHuman[Idx].natura[9]=0 then
     ComboBox9.text:='No Selected'
    else
     ComboBox9.text:=ComboBox9.items[EfecHuman[Idx].natura[9]];
   if EfecHuman[Idx].natura[10]=0 then
     ComboBox10.text:='No Selected'
    else
     ComboBox10.text:=ComboBox10.items[EfecHuman[Idx].natura[10]];
   if EfecHuman[Idx].natura[11]=0 then
     ComboBox11.text:='No Selected'
    else
     ComboBox11.text:=ComboBox11.items[EfecHuman[Idx].natura[11]];
   if EfecHuman[Idx].natura[12]=0 then
     ComboBox12.text:='No Selected'
    else
     ComboBox12.text:=ComboBox12.items[EfecHuman[Idx].natura[12]];
   if EfecHuman[Idx].natura[13]=0 then
     ComboBox13.text:='No Selected'
    else
     ComboBox13.text:=ComboBox13.items[EfecHuman[Idx].natura[13]];
   if EfecHuman[Idx].natura[14]=0 then
     ComboBox14.text:='No Selected'
    else
     ComboBox14.text:=ComboBox14.items[EfecHuman[Idx].natura[14]];
   if EfecHuman[Idx].natura[15]=0 then
     ComboBox15.text:='No Selected'
    else
     ComboBox15.text:=ComboBox15.items[EfecHuman[Idx].natura[15]];
   if EfecHuman[Idx].natura[16]=0 then
     ComboBox16.text:='No Selected'
    else
     ComboBox16.text:=ComboBox16.items[EfecHuman[Idx].natura[16]];
   if EfecHuman[Idx].natura[17]=0 then
     ComboBox17.text:='No Selected'
    else
     ComboBox17.text:=ComboBox17.items[EfecHuman[Idx].natura[17]];
   if EfecHuman[Idx].natura[18]=0 then
     ComboBox18.text:='No Selected'
    else
     ComboBox18.text:=ComboBox18.items[EfecHuman[Idx].natura[18]];
   if EfecHuman[Idx].natura[19]=0 then
     ComboBox19.text:='No Selected'
    else
     ComboBox19.text:=ComboBox19.items[EfecHuman[Idx].natura[19]];

 end;

procedure TNatura.FormActivate(Sender: TObject);
var
 i:integer;
begin
if closewin then
begin
closewin:=false;
close;
end else
begin
Site.items.clear;
 for i:=1 to MaxSelSite do
   Site.items.add(SelSite[i].code);
 Site.ItemIndex := indexsite;
 Site.text:= SelSite[indexsite+1].code;
 SiteChange(Sender);
 Site.SetFocus;
 end;
end;

procedure TNatura.ComboBox2Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[2]:=Combobox2.itemindex;
end;

procedure TNatura.BitBtn1Click(Sender: TObject);
begin
   close;
end;


procedure TNatura.ComboBox1Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[1]:=Combobox1.itemindex;
end;

procedure TNatura.ComboBox3Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[3]:=Combobox3.itemindex;
end;

procedure TNatura.ComboBox4Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[4]:=Combobox4.itemindex;
end;

procedure TNatura.ComboBox5Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[5]:=Combobox5.itemindex;
end;

procedure TNatura.ComboBox6Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[6]:=Combobox6.itemindex;
end;

procedure TNatura.ComboBox7Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[7]:=Combobox7.itemindex;
end;

procedure TNatura.ComboBox8Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[8]:=Combobox8.itemindex;
end;

procedure TNatura.ComboBox9Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[9]:=Combobox9.itemindex;
end;

procedure TNatura.ComboBox10Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[10]:=Combobox10.itemindex;
end;

procedure TNatura.ComboBox11Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[11]:=Combobox11.itemindex;
end;

procedure TNatura.ComboBox12Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[12]:=Combobox12.itemindex;
end;

procedure TNatura.ComboBox13Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[13]:=Combobox13.itemindex;
end;

procedure TNatura.ComboBox14Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[14]:=Combobox14.itemindex;
end;

procedure TNatura.ComboBox15Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[15]:=Combobox15.itemindex;
end;

procedure TNatura.ComboBox16Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[16]:=Combobox16.itemindex;
end;

procedure TNatura.ComboBox17Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[17]:=Combobox17.itemindex;
end;

procedure TNatura.ComboBox18Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[18]:=Combobox18.itemindex;
end;

procedure TNatura.ComboBox19Change(Sender: TObject);
begin
  EfecHuman[Site.ItemIndex+1].natura[19]:=Combobox19.itemindex;
end;

procedure TNatura.FormCreate(Sender: TObject);
begin
left:=0;
Top:=0;
end;

procedure TNatura.BHelpClick(Sender: TObject);
begin
Application.HelpJump('Effect_nature');
end;

procedure TNatura.Button1Click(Sender: TObject);
begin
MultPageDlg.show;
end;

procedure TNatura.Button2Click(Sender: TObject);
begin
if  Site.ItemIndex<MaxSelSite-1 then
Site.ItemIndex:=Site.ItemIndex + 1 else
Site.ItemIndex:=0;
indexsite:=Site.ItemIndex;
close;
end;

end.
