METHOD PRIVATE VOID setAsChild (INPUT oChildForm AS Progress.Windows.Form, INPUT pcTitle AS character):
oChildForm:MdiParent = THIS-OBJECT. oChildForm:Text = pcTitle. /*+ " [" + string(childFormNumber) + "]".*/ oChildForm:FormClosed:SUBSCRIBE(Form_Closed). oChildForm:Show( ). END METHOD. METHOD PROTECTED VOID showCustomerForm (sender AS System.Object, e AS System.EventArgs): DEF VAR oCBF AS openedge.tutorial.ui.customerForm. oCBF = NEW openedge.tutorial.ui.customerForm(). childFormNumber = childFormNumber + 1. setAsChild(oCBF, 'Customer'). DELETE OBJECT e. END METHOD. /*showCustomerForm*/ METHOD PROTECTED VOID showDepartmentForm (sender AS System.Object, e AS System.EventArgs): DEF VAR oDT AS openedge.tutorial.ui.departmentForm. oDT = NEW openedge.tutorial.ui.departmentForm(). childFormNumber = childFormNumber + 1. setAsChild(oDT, 'Department'). DELETE OBJECT e. END METHOD. /* showDepartmentForm */ METHOD PROTECTED VOID showPurchOrderForm (sender AS System.Object, e AS System.EventArgs): DEF VAR oPO AS openedge.tutorial.ui.purchaseOrderForm. oPO = NEW openedge.tutorial.ui.purchaseOrderForm(). childFormNumber = childFormNumber + 1. setAsChild(oPO, 'Purchase Order'). DELETE OBJECT e. END METHOD. METHOD PRIVATE VOID ultraExplorerBar1_ItemClick ( sender AS System.Object, e AS Infragistics.Win.UltraWinExplorerBar.ItemEventArgs ): DEF VAR cTag AS character NO-UNDO. cTag = STRING(e:Item:Tag). SESSION:set-wait-state('general'). CASE cTag: WHEN 'CustMaint' THEN showCustomerForm(sender, e). WHEN 'Department' THEN showDepartmentForm(sender, e). WHEN 'PurchOrder' THEN showPurchOrderForm(sender, e). END CASE. SESSION:set-wait-state(''). END METHOD. /* event handler */ |