function OnMaintUIBefore() STRING svResult,szCaption; NUMBER nResult; begin // TO DO: if you want to enable background, window title, and caption bar title // SetTitle( @TITLE_MAIN, 24, WHITE ); // SetTitle( @TITLE_CAPTIONBAR, 0, BACKGROUNDCAPTION ); // SetColor(BACKGROUND,RGB (0, 128, 128)); // Enable( FULLWINDOWMODE ); // Enable( BACKGROUND );
//Maintenance Mode CloseSoftware(); svResult = SdLoadString(IFX_MAINTUI_MSG); szCaption = SdLoadString(IFX_ONMAINTUI_CAPTION); nResult = SprintfBox(MB_OKCANCEL,szCaption,"%s",svResult); if (nResult = IDCANCEL) then exit; elseif(nResult = IDOK) then // setup default status SetStatusWindow(0, ""); Enable(STATUSEX); StatusUpdate(ON, 100); //-->Remove all components ComponentRemoveAll(); endif; DeleteDir(TARGETDIR,ALLCONTENTS); DeleteDir(TARGETDIR,ONLYDIR); return 0; end;CloseSoftware()就是自己编写的函数
function OnMaintUIBefore()我这里没有啊
在onmaintainuibefore中调用这段代码: if (LaunchAppAndWait (PROGRAM, "", nWait) < 0) then MessageBox ("Unable to launch "+ PROGRAM +".",SEVERE); endif;
STRING svResult,szCaption;
NUMBER nResult;
begin
// TO DO: if you want to enable background, window title, and caption bar title
// SetTitle( @TITLE_MAIN, 24, WHITE );
// SetTitle( @TITLE_CAPTIONBAR, 0, BACKGROUNDCAPTION );
// SetColor(BACKGROUND,RGB (0, 128, 128));
// Enable( FULLWINDOWMODE );
// Enable( BACKGROUND );
//Maintenance Mode
CloseSoftware();
svResult = SdLoadString(IFX_MAINTUI_MSG);
szCaption = SdLoadString(IFX_ONMAINTUI_CAPTION);
nResult = SprintfBox(MB_OKCANCEL,szCaption,"%s",svResult);
if (nResult = IDCANCEL) then
exit;
elseif(nResult = IDOK) then
// setup default status
SetStatusWindow(0, "");
Enable(STATUSEX);
StatusUpdate(ON, 100); //-->Remove all components
ComponentRemoveAll();
endif;
DeleteDir(TARGETDIR,ALLCONTENTS);
DeleteDir(TARGETDIR,ONLYDIR);
return 0;
end;CloseSoftware()就是自己编写的函数
if (LaunchAppAndWait (PROGRAM, "", nWait) < 0) then MessageBox ("Unable to launch "+ PROGRAM +".",SEVERE); endif;