// AddRevisionEntry.dg Use Dfclient.pkg Use cTextEdit.pkg Object oAddRevisionEntryPanel is a dbModalPanel Set pbSizeToClientArea to False Property String psRevisionText "" Property String psIssue "" //@ RRS Property String psUserName "" //@ RRS Property Integer piMaskIssueLen 0 //@ RRS Property Integer piMaskUserLen 0 //@ RRS Set label to "Enter text for the Revision entry" Set Size to 216 250 Set piMinSize to 200 250 On_Key Key_F2 Send Done Object GrpIssue is a Group Set Location to 4 5 Set Size to 35 230 Set peAnchors to anTopLeftRight Object frmUser is a Form Set Label to "Username" Set Size to 13 84 Set Location to 17 4 Set Label_Col_Offset to 0 Set Label_Justification_Mode to JMode_Top Set peAnchors to anNone End_Object // frmUser Object frmIssue is a Form Set Label to "Issue# (optional)" Set Size to 13 124 Set Location to 17 101 Set Label_Col_Offset to 0 Set Label_Justification_Mode to JMode_Top Set peAnchors to anTopLeftRight End_Object // frmUser End_Object Object oEdit is a cTextEdit Set Location to 43 5 Set Size to 131 230 Set peAnchors to anAll On_Key key_f2 Send Done On_Key KCANCEL Send Close_Panel End_Object Object oSaveBtn is a Button Set Location to 178 185 Set Size to 14 50 Set Label to "F2 Ok" Set peAnchors to anBottomRight Set Default_State to True Procedure OnClick Send Done End_Procedure End_Object //@ RRS Added new button to clear oEdit Object oClearBtn is a Button Set Location to 178 5 Set Size to 14 50 Set Label to C_$Clear Set peAnchors to anBottomLeft Procedure OnClick Send Delete_Data to (oEdit(Self)) End_Procedure End_Object Procedure popup_group Integer iMaskIssueLen iMaskUserLen //@ RRS Get piMaskIssueLen to iMaskIssueLen //@ RRS If (iMaskIssueLen <= 0) Move 100 to iMaskIssueLen //@ RRS Set Form_Margin of frmIssue to iMaskIssueLen //@ RRS // Get piMaskUserLen to iMaskUserLen //@ RRS If (iMaskUserLen <= 0) Move 100 to iMaskUserLen //@ RRS Set Form_Margin of frmUser to iMaskUserLen //@ RRS // Set psRevisionText to "#CANCEL" Set psIssue to (replaces(" ",Pad("",iMaskIssueLen),"x")) //@ RRS If (psUserName(Self)="") Begin //@ RRS Set psUserName to gsUserName //@ RRS Set Value of frmUser to (Left(psUserName(Self),iMaskUserLen)) //@ RRS End //@ RRS //@ Retain for next file //@ RRS Send Delete_Data To (oEdit(Self)) Forward Send popup_group End_Procedure Procedure Done Returns Integer String sCR sRet Append sCR (Character(13)) (Character(10)) Move (EditWindowText(Desktop,(oEdit(Self)))) to sRet Move (Replaces(sCR,sRet,"\n")) to sRet Set psRevisionText to sRet Set psIssue to (Value(frmIssue(Self),0)) //@ RRS Set psUserName to (Value(frmUser(Self),0)) //@ RRS Send Close_Panel End_Procedure #IFDEF TH_TRANSLATION Procedure Translate Set label to gILanguage[923] Set Label of frmUser to gILanguage[166] Set Label of frmIssue to gILanguage[924] Set Label of oSaveBtn to gILanguage[925] End_Procedure #ENDIF Procedure Activating Forward Send Activating #IFDEF TH_TRANSLATION Send Translate #ENDIF End_Procedure End_Object