task_win_Menu = res_menu(idr_task_menu)
task_win_Title = "Уголки"
task_win_Help = idh_contents
%END Task Window, CreateParms
CLAUSES
my_err_handler(_,_) :-dlg_Error ("Ошибка","Внутреняя ошибка приложения").
rect_Conv_Plus(rct(X,Y,_,_),XS,YS,rct(X1,Y1,X2,Y2)) :- X1=X+10, Y1=Y+25, X2=X1+XS, Y2=Y1+YS.
%BEGIN Task Window, e_Create
task_win_eh(_Win,e_Create(_),0):-!,
%BEGIN Task Window, InitControls, 18:04:24-7.9.2003, Code automatically updated!
%END Task Window, InitControls
%BEGIN Task Window, ToolbarCreate, 18:04:24-7.9.2003, Code automatically updated!
%END Task Window, ToolbarCreate
IFDEF use_message
msg_Create(100),
ENDDEF
Position=win_GetOuterRect(_Win), rect_Conv_Plus(Position,267,286,PositionNew), win_Move(_Win,PositionNew),
assert(game_Started(0),db),assert(fishka_Selected(0),db),
win_Invalidate(_Win),
!.
%END Task Window, e_Create
%MARK Task Window, new events
%BEGIN Task Window, id_file_new_game
task_win_eh(_Win,e_Menu(id_file_new_game,_ShiftCtlAlt),0) :game_Started(0),
retract(game_Started(0),db), assert(game_Started(1),db),
lets_Go(_Win),!.
task_win_eh(_Win,e_Menu(id_file_new_game,_ShiftCtlAlt),0):Answer=dlg_Ask("Уголки","Текущая игра не закончена\n\nНачать новую игру?", ["&Да","&Нет"]), Answer = 0,
retractall(data_Fishka(_,_,_,_),db),
retract(fishka_Selected(_),db),assert(fishka_Selected(0),db),
lets_Go(_Win),win_Invalidate(_Win),!.
%END Task Window, id_file_new_game
%BEGIN Task Window, e_MouseDown
task_win_eh(_Win,e_MouseDown(_PNT,_ShiftCtlAlt,mouse_button_left),0):-!,left_Button_Click(_Win,_PNT),!.
task_win_eh(_Win,e_MouseDown(_PNT,_ShiftCtlAlt,mouse_button_right),0):-!,right_Button_Click(_Win,_PNT),!.
%END Task Window, e_MouseDown
%BEGIN Task Window, e_Update
task_win_eh(_Win,e_Update(_UpdateRct),0) :- game_Started(1),draw_Field(_Win),draw_Fishka(_Win),!.
task_win_eh(_Win,e_Update(_UpdateRct),0) :win_SetForeColor(_Win,color_Black), FONT0=font_Create(ff_Fixed,[fs_Bold],10), win_SetFont(_Win,FONT0),
draw_Text(_Win,5,10,"Функциональное Программирование"),
win_SetForeColor(_Win,color_Black), FONT1=font_Create(ff_Times,[fs_Bold],10), win_SetFont(_Win,FONT1),
draw_Text(_Win,20,35,"Расчетно-графическое задание"),
draw_Text(_Win,125,250,"2007"),
draw_Text(_Win,60,150,"Выполнили студенты"),
draw_Text(_Win,90,170,"Группы 4ВС-1"),
draw_Text(_Win,3,190,"Шелестов И.А. Рогозин В.А."),
draw_Text(_Win,60,235,"Комсомольск-на-Амуре"),
win_SetForeColor(_Win,color_Red), FONT2=font_Create(ff_Helvetica,[fs_Underline],50), win_SetFont(_Win,FONT2),
draw_Text(_Win,25,100,"Уголки"),
!.
%END Task Window, e_Update
%BEGIN Task Window, id_help_help
task_win_eh(_Win,e_Menu(id_help_help,_ShiftCtlAlt),0):-!,
vpi_ShowHelp("rgz_hlp.hlp").
%dlg_help_dialog_Create(_Win),!.
%END Task Window, id_help_help
%BEGIN Task Window, id_help_about
% task_win_eh(Win,e_Menu(id_help_about,_ShiftCtlAlt),0):-!,
% dlg_about_dialog_Create(Win),!.
%END Task Window, id_help_about
%BEGIN Task Window, id_file_exit
task_win_eh(Win,e_Menu(id_file_exit,_ShiftCtlAlt),0):-!,
win_Destroy(Win),!.
%END Task Window, id_file_exit
%BEGIN Task Window, e_Size
task_win_eh(_Win,e_Size(_Width,_Height),0):-!,
IFDEF use_tbar
toolbar_Resize(_Win),
ENDDEF
IFDEF use_message
msg_Resize(_Win),
ENDDEF
!.
%END Task Window, e_Size
%END_WIN Task Window
/***************************************************************************
Main Goal
***************************************************************************/
GOAL
IFDEF use_mdi
vpi_SetAttrVal(attr_win_mdi,b_true),
ENDDEF
IFDEF ws_win
IFDEF use_3dctrl
vpi_SetAttrVal(attr_win_3dcontrols,b_true),
ENDDEF
ENDDEF
vpi_SetErrorHandler(my_err_handler),
vpi_Init(task_win_Flags,task_win_eh,task_win_Menu,"fields",task_win_Title).
%BEGIN_DLG About dialog
/**************************************************************************
Creation and event handling for dialog: About dialog
**************************************************************************/
CONSTANTS
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.