procedure TForm1.FormCreate(Sender: TObject);
var
rez : integer;
captions : array[0..10] of string;
i : integer;
begin
ib := 0;
captions[0] := 'Аналізується "Агресія"'; captions[1] := 'Аналізується "Алкоголь"'; captions[2] := 'Аналізується "Шеф"';
captions[3] := 'Аналізується "Депресія"'; captions[4] := 'Аналізується "Борги"'; captions[5] := 'Аналізується "Зарплата"';
captions[6] := 'Аналізується "Інформація"'; captions[7] := 'Аналізується "Лідер"'; captions[8] := 'Аналізується "Статус"';
captions[9] := 'Аналізується "Наркотики"'; captions[10] := 'Аналізується "Звільнення"';
Timer1.Enabled := true;
GetDir(0, sPath);
sIniFile := TIniFile.Create(sPath +'\loin.ini');
// Ініціалізація масиву результатів...
rez := sIniFile.ReadInteger('Результати', 'Агресія', 0); // Агресія входить до тесту
if rez = 1 then
begin
rez := sIniFile.ReadInteger('Результати', 'Агресія 15', 0);
if rez = 1 then
agres := 15;
rez := sIniFile.ReadInteger('Результати', 'Агресія 30', 0);
if rez = 1 then
agres := 30;
rez := sIniFile.ReadInteger('Результати', 'Агресія 45', 0);
if rez = 1 then
agres := 45;
rez := sIniFile.ReadInteger('Результати', 'Агресія 60', 0);
if rez = 1 then
agres := 60;
rez := sIniFile.ReadInteger('Результати', 'Агресія 75', 0);
if rez = 1 then
agres := 75;
rez := sIniFile.ReadInteger('Результати', 'Агресія 85', 0);
if rez = 1 then
agres := 85;
rez := sIniFile.ReadInteger('Результати', 'Агресія 100', 0);
if rez = 1 then
agres := 100;
end;
rez := sIniFile.ReadInteger('Результати', 'Алкоголь', 0); // Алкоголь входить до тесту
if rez = 1 then
begin
rez := sIniFile.ReadInteger('Результати', 'Алкоголь 15', 0);
if rez = 1 then
alcohol := 15;
rez := sIniFile.ReadInteger('Результати', 'Алкоголь 30', 0);
if rez = 1 then
alcohol := 30;
rez := sIniFile.ReadInteger('Результати', 'Алкоголь 45', 0);
if rez = 1 then
alcohol := 45;
rez := sIniFile.ReadInteger('Результати', 'Алкоголь 60', 0);
if rez = 1 then
alcohol := 60;
rez := sIniFile.ReadInteger('Результати', 'Алкоголь 75', 0);
if rez = 1 then
alcohol := 75;
rez := sIniFile.ReadInteger('Результати', 'Алкоголь 85', 0);
if rez = 1 then
alcohol := 85;
rez := sIniFile.ReadInteger('Результати', 'Алкоголь 100', 0);
if rez = 1 then
alcohol := 100;
end;
rez := sIniFile.ReadInteger('Результати', 'Бос', 0); // Бос входить до тесту
if rez = 1 then
begin
rez := sIniFile.ReadInteger('Результати', 'Бос 15', 0);
if rez = 1 then
boss := 15;
rez := sIniFile.ReadInteger('Результати', 'Бос 30', 0);
if rez = 1 then
boss := 30;
rez := sIniFile.ReadInteger('Результати', 'Бос 45', 0);
if rez = 1 then
boss := 45;
rez := sIniFile.ReadInteger('Результати', 'Бос 60', 0);
if rez = 1 then
boss := 60;
rez := sIniFile.ReadInteger('Результати', 'Бос 75', 0);
if rez = 1 then
boss := 75;
rez := sIniFile.ReadInteger('Результати', 'Бос 85', 0);
if rez = 1 then
boss := 85;
rez := sIniFile.ReadInteger('Результати', 'Бос 100', 0);
if rez = 1 then
boss := 100;
end; // depression
rez := sIniFile.ReadInteger('Результати', 'Депресія', 0); // Депресія входить до тесту
if rez = 1 then
begin
rez := sIniFile.ReadInteger('Результати', 'Депресія 15', 0);
if rez = 1 then
depression := 15;
rez := sIniFile.ReadInteger('Результати', 'Депресія 30', 0);
if rez = 1 then
depression := 30;
rez := sIniFile.ReadInteger('Результати', 'Депресія 45', 0);
if rez = 1 then
depression := 45;
rez := sIniFile.ReadInteger('Результати', 'Депресія 60', 0);
if rez = 1 then
depression := 60;
rez := sIniFile.ReadInteger('Результати', 'Депресія 75', 0);
if rez = 1 then
depression := 75;
rez := sIniFile.ReadInteger('Результати', 'Депресія 85', 0);
if rez = 1 then
depression := 85;
rez := sIniFile.ReadInteger('Результати', 'Депресія 100', 0);
if rez = 1 then
depression := 100;
end;
rez := sIniFile.ReadInteger('Результати', 'Борги', 0); // Борги входить до тесту
if rez = 1 then
begin
rez := sIniFile.ReadInteger('Результати', 'Борги 15', 0);
if rez = 1 then
debts := 15;
rez := sIniFile.ReadInteger('Результати', 'Борги 30', 0);
if rez = 1 then
debts := 30;
rez := sIniFile.ReadInteger('Результати', 'Борги 45', 0);
if rez = 1 then
debts := 45;
rez := sIniFile.ReadInteger('Результати', 'Борги 60', 0);
if rez = 1 then
debts := 60;
rez := sIniFile.ReadInteger('Результати', 'Борги 75', 0);
if rez = 1 then
debts := 75;
rez := sIniFile.ReadInteger('Результати', 'Борги 85', 0);
if rez = 1 then
debts := 85;
rez := sIniFile.ReadInteger('Результати', 'Борги 100', 0);
if rez = 1 then
debts := 100;
end;
rez := sIniFile.ReadInteger('Результати', 'Зарплата', 0); // Зарплата входить до тесту
if rez = 1 then
begin
rez := sIniFile.ReadInteger('Результати', 'Зарплата 15', 0);
if rez = 1 then
salary := 15;
rez := sIniFile.ReadInteger('Результати', 'Зарплата 30', 0);
if rez = 1 then
salary := 30;
rez := sIniFile.ReadInteger('Результати', 'Зарплата 45', 0);
if rez = 1 then
salary := 45;
rez := sIniFile.ReadInteger('Результати', 'Зарплата 60', 0);
if rez = 1 then
salary := 60;
rez := sIniFile.ReadInteger('Результати', 'Зарплата 75', 0);
if rez = 1 then
salary := 75;
rez := sIniFile.ReadInteger('Результати', 'Зарплата 85', 0);
if rez = 1 then
salary := 85;
rez := sIniFile.ReadInteger('Результати', 'Зарплата 100', 0);
if rez = 1 then
salary := 100;
end;
rez := sIniFile.ReadInteger('Результати', 'Інформація', 0); // Інформація входить до тесту
if rez = 1 then
begin
rez := sIniFile.ReadInteger('Результати', 'Інформація 15', 0);
if rez = 1 then
information := 15;
rez := sIniFile.ReadInteger('Результати', 'Інформація 30', 0);
if rez = 1 then
information := 30;
rez := sIniFile.ReadInteger('Результати', 'Інформація 45', 0);
if rez = 1 then
information := 45;
rez := sIniFile.ReadInteger('Результати', 'Інформація 60', 0);
if rez = 1 then
information := 60;
rez := sIniFile.ReadInteger('Результати', 'Інформація 75', 0);
if rez = 1 then
information := 75;
rez := sIniFile.ReadInteger('Результати', 'Інформація 85', 0);
if rez = 1 then
information := 85;
rez := sIniFile.ReadInteger('Результати', 'Інформація 100', 0);
if rez = 1 then
information := 100;
end;
rez := sIniFile.ReadInteger('Результати', 'Лідер', 0); // Лідер входить до тесту
if rez = 1 then
begin
rez := sIniFile.ReadInteger('Результати', 'Лідер 15', 0);
if rez = 1 then
leader := 15;
rez := sIniFile.ReadInteger('Результати', 'Лідер 30', 0);
if rez = 1 then
leader := 30;
rez := sIniFile.ReadInteger('Результати', 'Лідер 45', 0);
if rez = 1 then
leader := 45;
rez := sIniFile.ReadInteger('Результати', 'Лідер 60', 0);
if rez = 1 then
leader := 60;
rez := sIniFile.ReadInteger('Результати', 'Лідер 75', 0);
if rez = 1 then
leader := 75;
rez := sIniFile.ReadInteger('Результати', 'Лідер 85', 0);
if rez = 1 then
leader := 85;
rez := sIniFile.ReadInteger('Результати', 'Лідер 100', 0);
if rez = 1 then
leader := 100;
end;
rez := sIniFile.ReadInteger('Результати', 'Статус', 0); // Статус входить до тесту
if rez = 1 then
begin
rez := sIniFile.ReadInteger('Результати', 'Статус 15', 0);
if rez = 1 then
status := 15;
rez := sIniFile.ReadInteger('Результати', 'Статус 30', 0);
if rez = 1 then
status := 30;
rez := sIniFile.ReadInteger('Результати', 'Статус 45', 0);
if rez = 1 then
status := 45;
rez := sIniFile.ReadInteger('Результати', 'Статус 60', 0);
if rez = 1 then
status := 60;
rez := sIniFile.ReadInteger('Результати', 'Статус 75', 0);
if rez = 1 then
status := 75;
rez := sIniFile.ReadInteger('Результати', 'Статус 85', 0);
if rez = 1 then
status := 85;
rez := sIniFile.ReadInteger('Результати', 'Статус 100', 0);
if rez = 1 then
status := 100;
end;