Use Windows.pkg Use cConnection.pkg Use Tools\TH3Workspace.pkg Object oLoginConnectDialog is a ModalPanel Set Size to 101 191 Set Label to "Login Credentials" Set piMinSize to 86 191 Set Location to 2 2 Move (Self) to ghoLoginConnectDialog Object oLoginGroup is a Group Set Size to 69 178 Set Location to 8 6 Set Label to "Connection Id" Set peAnchors to anAll Object oFrmUserName is a Form Set Size to 13 100 Set Location to 13 60 Set Label to "Login ID:" Set Label_Col_Offset to 40 End_Object Object oFrmPassword is a Form Set Size to 13 100 Set Location to 28 60 Set Label to "Password:" Set Label_Col_Offset to 40 Set Password_State to True End_Object Object oChkTrusted is a CheckBox Set Size to 10 50 Set Location to 43 62 Set Label to 'Use Windows Authentication' // Fires whenever the value of the control is changed Procedure OnChange Boolean bChecked Get Checked_State to bChecked Set Enabled_State of oFrmPassword to (not(bChecked)) Set Enabled_State of oFrmUserName to (not(bChecked)) End_Procedure End_Object Object oChkStorePword is a CheckBox Set Size to 10 50 Set Location to 54 62 Set Label to 'Store Password' // Fires whenever the value of the control is changed Procedure OnChange Boolean bChecked Get Checked_State to bChecked End_Procedure End_Object End_Object Object oOK_Btn is a Button Set Label to "&OK" Set Location to 83 83 Set peAnchors to anBottomRight Set Default_State to True Procedure OnClick Set pbCancel to False Send Close_Panel End_Procedure End_Object Object oCancel_Btn is a Button Set Label to "&Cancel" Set Location to 83 137 Set peAnchors to anBottomRight Procedure OnClick Send Close_Panel End_Procedure End_Object Property Boolean pbCancel True Function LoginConnectIdDialog String sConnId Returns Boolean Boolean bCancel bOK bSuccess Boolean bTrust bStorePword Integer iErr String sUser sPwd sLabel tConnection Connect //Move (_T("Connnection Id: %1",1708)) To sLabel // Does not compile on DF19 ? Get _T "Connnection Id: %1" 1708 To sLabel Set Label of oLoginGroup to (sformat(sLabel,Trim(sConnId))) Set pbCancel to True Get ConnectionIdInfo of ghoConnection sConnId to Connect Set Value of oFrmUserName to Connect.sUID Send Popup_Modal Get pbCancel to bCancel If (not(bCancel)) Begin Get Checked_State of oChkStorePword to bStorePword Get Checked_State of oChkTrusted to bTrust If (not(bTrust)) Begin Get Value of oFrmUserName to sUser Get value of oFrmPassword to sPwd End Get LoginConnectIdNewCredentials of ghoConnection sConnId sUser sPwd bTrust to iErr If (not(iErr)) Begin Move True to bOK If (bStorePword) Begin Get StoreConnectionIdCredentials of ghoConnection sConnId sUser sPwd bTrust to bSuccess End End End Function_Return bOk End_Function On_Key Key_Alt+Key_O Send KeyAction of oOK_Btn On_Key Key_Alt+Key_C Send KeyAction Of oCancel_Btn #IFDEF TH_TRANSLATION Procedure Translate // Set Label To gILanguage[1700] //"Login Credentials" Set Label Of oLoginGroup To gILanguage[1701] // "Connection Id" Set Label Of oFrmUserName To gILanguage[1702] // "Login ID:" Set Label Of oFrmPassword To gILanguage[1703] // "Password:" Set Label Of oChkTrusted To gILanguage[1704] // 'Use Windows Authentication' Set Label Of oChkStorePword To gILanguage[1705] // 'Store Password' Set Label of oOK_Btn To gILanguage[1706] // "&OK" Set Label of oCancel_Btn To gILanguage[1707] // "&Cancel" // End_Procedure #ENDIF Procedure Activating Forward Send Activating #IFDEF TH_TRANSLATION Send Translate #ENDIF End_Procedure End_Object