Нечеткое ранжирование. Реализация методов отношения предпочтений., страница 4

            Sves=lbox_GetAll(Hves),

            Salter1=lbox_GetAll(Halter1),

            Salter2=lbox_GetAll(Halter2),

            SporogI=win_GetText(HporogI),

            SporogP=win_GetText(HporogP),

            SporogV=win_GetText(HporogV),

            NN=lbox_CountAll(Hves),

            slist_rlist(Sves,Ives),

            slist_rlist(Salter1,Ialter1),

            slist_rlist(Salter2,Ialter2),

            str_real(SporogI,RporogI),

            str_real(SporogP,RporogP),

            str_real(SporogV,RporogV),

            c(Ialter2,Ialter1,Ives,RporogI,RporogP,0,Ckl_1),

            d(Ialter2,Ialter1,RporogP,RporogV,Ckl_1,0,Dtemp_1),

            c(Ialter1,Ialter2,Ives,RporogI,RporogP,0,Ckl_2),

            d(Ialter1,Ialter2,RporogP,RporogV,Ckl_2,0,Dtemp_2),

            Dtemp_2<>-200,

            Dtemp_1<>-200,

            Dkl_1=Dtemp_1/NN,

            Sd_1=Dkl_1*Ckl_1,

            Dkl_2=Dtemp_2/NN,

            Sd_2=Dkl_2*Ckl_2,

            compare(Sd_1,Sd_2,S),

            str_real(SS1,Sd_1),

            str_real(SS2,Sd_2),

            H1=win_GetCtlHandle(_Win,alt1),

            H2=win_GetCtlHandle(_Win,alt2),

            H3=win_GetCtlHandle(_Win,result),

            win_SetText(H1,SS1),

            win_SetText(H2,SS2),

            win_SetText(H3,S),

            !.

task_win_eh(_Win,e_Control(counting,_CtrlType,_CtrlWin,_CtlInfo),0):dlg_error("Ощибка при счете!!!").

%END Task Window, counting _CtlInfo

%BEGIN Task Window, insert_alter_2 _CtlInfo

%*************Добавление значимости весов для второй альтернативы ************* 

task_win_eh(_Win,e_Control(insert_alter_2,_CtrlType,_CtrlWin,_CtlInfo),0):            HE=win_GetCtlHandle(_Win,ins_alter_2),

            HL=win_GetCtlHandle(_Win,alter_2),

            S=win_GetText(HE),

            lbox_Add(HL,S),

            !.

task_win_eh(_Win,e_Control(insert_alter_2,_CtrlType,_CtrlWin,_CtlInfo),0):-          

dlg_error("Ошибка"),!.

%END Task Window, insert_alter_2 _CtlInfo

%BEGIN Task Window, insert_alter_1 _CtlInfo

%*************Добавление значимости весов для первой альтернативы *************

task_win_eh(_Win,e_Control(insert_alter_1,_CtrlType,_CtrlWin,_CtlInfo),0):-

            HE=win_GetCtlHandle(_Win,ins_alter_1),

            HL=win_GetCtlHandle(_Win,alter_1),

            S=win_GetText(HE),

            lbox_Add(HL,S),

            !.

task_win_eh(_Win,e_Control(insert_alter_1,_CtrlType,_CtrlWin,_CtlInfo),0):dlg_error("Ошибка"),!.

%END Task Window, insert_alter_1 _CtlInfo

%BEGIN Task Window, insert_ves _CtlInfo

%*********************Добавление значений весов***************************

  task_win_eh(_Win,e_Control(insert_ves,_CtrlType,_CtrlWin,_CtlInfo),0):-

            HE=win_GetCtlHandle(_Win,ins_ves),

            HL=win_GetCtlHandle(_Win,vesa),

            S=win_GetText(HE),

            lbox_Add(HL,S),

            !.

task_win_eh(_Win,e_Control(insert_ves,_CtrlType,_CtrlWin,_CtlInfo),0):dlg_error("Ошибка"),!.

%END Task Window, insert_ves _CtlInfo

%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

/***************************************************************************

Invoking on-line Help

***************************************************************************/