// ********************************************************************** // Use Wait.utl // Something to put on screen while batching. // // By Sture Andersen & Jakob Kruse // // Create: Sat 10-05-1997 - // Update: Fri 03-04-1998 - Top-most-thing added by Jakob Kruse // Wed 03-03-1999 - Procedure batch_on now initalizes all text areas // // *********************************************************************** Use ui Use statpnl Use Strings.nui // String manipulation for VDF Use OldStatPnl.pkg // load the old status panel. Status_Panel is now this old object Use buttons.utl #IF LNG_DEFAULT=LNG_DUTCH #REPLACE t.Wait.Question "Vraag" #REPLACE t.Wait.Cancel "Operatie afbreken?" #ENDIF #IF LNG_DEFAULT=LNG_SPANISH // 03/10/2002 25/01/2004 Pepe Guimares Moose Software pg@moose-software.com #REPLACE t.Wait.Question "Pregunta" #REPLACE t.Wait.Cancel "Cancelar Operacin?" #ENDIF #IF LNG_DEFAULT=LNG_ENGLISH #REPLACE t.Wait.Question "Question" #REPLACE t.Wait.Cancel "Cancel operation?" #ENDIF #IF LNG_DEFAULT=LNG_DANISH #REPLACE t.Wait.Question "Sprgsml" #REPLACE t.Wait.Cancel "nsker du at afbryde?" #ENDIF #IF LNG_DEFAULT=LNG_SWEDISH #REPLACE t.Wait.Question "Question" #REPLACE t.Wait.Cancel "Cancel operation?" #ENDIF #IF LNG_DEFAULT=LNG_NORWEGIAN // 22.04.1999 torkild.resheim@emmaedb.no #REPLACE t.Wait.Question "Sprsml" #REPLACE t.Wait.Cancel "Avbryt jobben?" #ENDIF #IF LNG_DEFAULT=LNG_GERMAN #REPLACE t.Wait.Question "Frage" #REPLACE t.Wait.Cancel "Verarbeitung abbrechen?" #ENDIF #IF LNG_DEFAULT=LNG_PORTUGUESE #REPLACE t.Wait.Question "Confirme" #REPLACE t.Wait.Cancel "Cancelar operao?" #ENDIF #If LNG_DEFAULT=LNG_FRENCH // by Arnaud Mallick (Fr) (Arnaud.mallick@wanadoo.fr) #Replace t.Wait.Question "Question" #Replace t.Wait.Cancel "Annuler opration?" #ENDIF #IF LNG_DEFAULT=LNG_ITALIAN // 16/10/2002 Paolo Zanni CO.AS.CO. #REPLACE t.Wait.Question "Conferma" #REPLACE t.Wait.Cancel "Annulla operazione?" #ENDIF class cBatchCompanion is an StatusPanel // in 12: class cBatchCompanion is a cProcessStatusPanel procedure construct_object forward send construct_object property string pCancelQuestionCaption public t.Wait.Question property string pCancelQuestion public t.Wait.Cancel set button_text to t.btn.cancel end_procedure // procedure Start_StatusPanel // handle hwnd# // integer swp# // string caption_text# // forward send Start_StatusPanel // get Caption_Text to Caption_Text# // move (StringOemToAnsi(Caption_Text#)) to Caption_Text# // // To make the status_panel stay-on-top, we first find it's window handle ... // move (FindWindow("DFDialogClass",Caption_Text#)) to hwnd# // // ... then we add the extended style WS_EX_TOPMOST to the window, but we use SetWindowPos // // to make sure the change takes effect immediately. // move (SetWindowPos(hwnd#, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE ior SWP_NOSIZE)) to swp# // // To manipulate this object further we could do // // get Object_From_Window hwnd# to realobj# // // and then work with the DFDialog object realobj# // end_procedure procedure batch_on string caption# set caption_text to caption# set title_text to "" set message_text to "" set action_text to "" send Start_StatusPanel end_procedure procedure batch_off send Stop_StatusPanel end_procedure procedure batch_update string str# Set Message_Text to str# end_procedure procedure batch_update2 string str# set Action_Text to str# end_procedure procedure batch_update3 string str# set title_text to str# end_procedure function batch_interrupt returns integer integer cancel# get Check_StatusPanel to cancel# if cancel# begin send stop_statuspanel move (yesno_box(pCancelQuestion(self),pCancelQuestionCaption(self),MB_DEFBUTTON2)) to cancel# move (cancel#=mbr_yes) to cancel# if cancel# function_return 1 send Start_StatusPanel end end_function end_class // cBatchCompanion procedure ScreenEndWait_On integer min# integer max# end_procedure procedure ScreenEndWait_Update integer pos# end_procedure procedure ScreenEndWait_SetText string str# end_procedure procedure ScreenEndWait_SetText2 string str# end_procedure procedure ScreenEndWait_Off end_procedure