так примерно
Код:
procedure TForm1.Button3Click(Sender: TObject);
var nomerRecepta:integer;
begin
memo1.Clear;
nomerRecepta:=0;
if (pos('Водка',ListBox2.Items.Text)>0 )
and (pos('Пиво',ListBox2.Items.Text)>0 )
then nomerRecepta:=1 ;
if (pos('Водка',ListBox2.Items.Text)>0 )
and (pos('Шампанское',ListBox2.Items.Text)>0 )
then nomerRecepta:=2 ;
case nomerRecepta of
1:form2.show;
2:form3.show;
else showMessage('Не хватает ингредиентов или нет такого блюда');
end;
end;
__________________
Последний раз редактировалось Admin, Сегодня в 10:32.
|