Form S_185FMF - Main Form

LANSA

Form S_185FMF - Main Form
*===================================================================;
*;
* Component : S_185FMF;
* Type : Form;
* Ancestor : PRIM_FORM (Primitive Form);
*;
* Description : Display Message Queue;
*;
* Disclaimer : The following material is supplied as sample material;
* only. No warranty concerning this material or its use;
* in any way whatsoever is expressed or implied.;
*;
* ===================================================================;
;
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM HEIGHT(392) LAYOUTMANAGER(#ATLM_1) LEFT(487) MENUBAR(#MBAR_1) TOP(78) WIDTH(432);
DEFINE_COM CLASS(#PRIM_MBAR) NAME(#MBAR_1) PARENT(#COM_OWNER);
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_1) CAPTION('Server') DISPLAYPOSITION(1) PARENT(#MBAR_1);
DEFINE_COM CLASS(#PRIM_SMNU) NAME(#SMNU_1) PARENT(#MITM_1);
DEFINE_COM CLASS(#PRIM_MITM) NAME(#CONNECT_ITEM) CAPTION('Connect') DISPLAYPOSITION(1) PARENT(#SMNU_1);
DEFINE_COM CLASS(#PRIM_MITM) NAME(#DISCONNECT_ITEM) CAPTION('Disconnect') DISPLAYPOSITION(2) ENABLED(False) PARENT(#SMNU_1);
;
DEFINE_COM CLASS(#VL_SAM003) NAME(#SERVER);
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_2) CAPTION('Queue') DISPLAYPOSITION(2) PARENT(#MBAR_1);
DEFINE_COM CLASS(#PRIM_SMNU) NAME(#SMNU_2) PARENT(#MITM_2);
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MONITOR_ITEM) CAPTION('Monitor a Queue ') DISPLAYPOSITION(1) ENABLED(False) PARENT(#SMNU_2);
;
;
DEFINE_COM CLASS(#PRIM_KCOL) NAME(#QUEUE) COLLECTS(#S_185RMQ) KEYEDBY(#STD_NUM);
DEFINE_COM CLASS(#PRIM_KCOL) NAME(#FLOWITEM) COLLECTS(#PRIM_FWLI) KEYEDBY(#STD_NUM);
;
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1);
DEFINE_COM CLASS(#PRIM_STBR) NAME(#STBR_1) DISPLAYPOSITION(1) HEIGHT(22) LEFT(0) MESSAGEPOSITION(1) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(324) WIDTH(424);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Bottom) MANAGE(#STBR_1) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#MAIN_PANEL) DISPLAYPOSITION(2) HEIGHT(324) LAYOUTMANAGER(#FWLM_1) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(2) TABSTOP(False) TOP(0) WIDTH(424);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_2) ATTACHMENT(Center) MANAGE(#MAIN_PANEL) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_FWLM) NAME(#FWLM_1) DIRECTION(TopToBottom) FLOWOPERATION(Center) FLOWOPERATIONVER(Spread) SPACING(2) SPACINGITEMS(2);
;
Define #QueCount RefFld(#Std_Num);
;
EVTROUTINE handling(#com_owner.Initialize);
SET #com_owner caption(*component_desc);
ENDROUTINE;
;
EVTROUTINE HANDLING(#CONNECT_ITEM.Click);
Invoke #Server.uConnectModal;
ENDROUTINE;
;
EVTROUTINE HANDLING(#Disconnect_item.Click #Com_Owner.Closing);
Invoke #Queue<>.uClose;
Invoke #Server.uDisconnect;
ENDROUTINE;
;
EVTROUTINE HANDLING(#Monitor_ITEM.Click);
;
Change #QueCount '#QueCount + 1';
;
Set #queue<#QueCount> Parent(#Main_Panel) Visible(False) ;
;
Invoke #queue<#QueCount>.Realize;
;
Set #FlowItem<#QueCount> PARENT(#FWLM_1) Manage(#queue<#QueCount>) ;
;
Set #queue<#QueCount> ServerSSN(#Server.uUsingSSN);
;
Invoke #queue<#QueCount>.uOpen;
;
ENDROUTINE;
;
EVTROUTINE HANDLING(#SERVER.uConnectionCreated);
Set #Connect_Item Enabled(False);
Set (#DisConnect_Item #Monitor_Item) Enabled(True);
ENDROUTINE;
;
EVTROUTINE HANDLING(#SERVER.uConnectionDestroyed);
Set #Connect_Item Enabled(True);
Set (#DisConnect_Item #Monitor_Item) Enabled(False);
ENDROUTINE;
;
END_COM