of_restoreapp


pfcapsrv.pbl   >   pfc_n_cst_apppreference   >   of_restoreapp   

Full name pfc_n_cst_apppreference.of_restoreapp
Access protected
Extend of integer
Return value integer
Prototype protected function integer of_restoreapp(boolean,string,string)

Name Datatype
No Data

Name Datatype
lb_microhelp boolean
lb_righttoleft boolean
lb_toolbarusercontrol boolean
li_ddetimeout integer
li_rc integer
lnv_conversion n_cst_conversion
lnv_string n_cst_string
ls_copyright string
ls_ddetimeout string
ls_displayname string
ls_dwmessagetitle string
ls_helpfile string
ls_logo string
ls_microhelp string
ls_microhelpdefault string
ls_righttoleft string
ls_toolbarframetitle string
ls_toolbarpopmenutext string
ls_toolbarsheettitle string
ls_toolbartext string
ls_toolbartips string
ls_toolbarusercontrol string
ls_userid string
ls_userinifile string
ls_userkey string
ls_version string

protected function integer of_restoreapp (boolean ab_useregistry, string as_keyorini, string as_inisection);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_RestoreApp
//
//	Access:  		protected
//
//	Arguments:	
//	ab_useregistry	Function behavior - use the registry or an .ini file.
//	as_keyorini		The KeyName for use with the Registry or the IniFile name
//						for use with an .Ini file.
//	as_inisection	The name of the .Ini section. 
//
//	Returns:  		Integer
//						1 if it succeeds and -1 if an error occurs.
//
//	Description:  	Restores the App preference information from either the Registry
//						or from an .INI file.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	6.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1997 Sybase, Inc. and its subsidiaries.  All rights reserved.
//	Any distribution of the PowerBuilder Foundation Classes (PFC)
//	source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////

boolean		lb_microhelp, lb_righttoleft, lb_toolbarusercontrol
integer		li_ddetimeout
integer		li_rc
string		ls_userinifile, ls_userkey, ls_microhelp, ls_helpfile
string		ls_version, ls_logo, ls_copyright 
string		ls_ddetimeout, ls_displayname, ls_dwmessagetitle
string		ls_microhelpdefault, ls_righttoleft, ls_toolbarframetitle
string		ls_toolbarpopmenutext, ls_toolbarsheettitle, ls_toolbarusercontrol
string		ls_toolbartext, ls_toolbartips, ls_userid
n_cst_string		lnv_string
n_cst_conversion	lnv_conversion

//Parameter checking done in calling function

//Restore application information -- Default Information is current info
li_rc = of_Restore (ab_useregistry, as_keyorini, as_inisection, 'userinifile', ls_userinifile, & 
	inv_appmanager.of_GetUserinifile() )
li_rc = of_Restore (ab_useregistry, as_keyorini, as_inisection, 'userkey', ls_userkey, &
	inv_appmanager.of_GetUserkey() )
li_rc = of_Restore (ab_useregistry, as_keyorini, as_inisection, 'microhelp', ls_microhelp, &
	lnv_conversion.of_string(inv_appmanager.of_GetMicrohelp() ) )
li_rc = of_Restore (ab_useregistry, as_keyorini, as_inisection, 'helpfile', ls_helpfile, &
	inv_appmanager.of_GetHelpfile() )
li_rc = of_Restore (ab_useregistry, as_keyorini, as_inisection, 'version', ls_version, &
	inv_appmanager.of_GetVersion() )
li_rc = of_Restore (ab_useregistry, as_keyorini, as_inisection, 'logo', ls_logo, &
	inv_appmanager.of_GetLogo() )
li_rc = of_Restore (ab_useregistry, as_keyorini, as_inisection, 'copyright', ls_copyright, &
	inv_appmanager.of_GetCopyright() )
li_rc = of_Restore (ab_useregistry, as_keyorini, as_inisection, 'userid', ls_userid, &
	inv_appmanager.of_GetUserid() )
		
li_rc = of_Restore (ab_useregistry, as_keyorini, as_inisection, 'ddetimeout',  ls_ddetimeout, &
	string(inv_appmanager.iapp_object.ddetimeout))
li_rc = of_Restore (ab_useregistry, as_keyorini, as_inisection, 'displayname', ls_displayname, &
	inv_appmanager.iapp_object.displayname)
li_rc = of_Restore (ab_useregistry, as_keyorini, as_inisection, 'dwmessagetitle',   ls_dwmessagetitle, &
	inv_appmanager.iapp_object.dwmessagetitle)
li_rc = of_Restore (ab_useregistry, as_keyorini, as_inisection, 'microhelpdefault', ls_microhelpdefault, &
	inv_appmanager.iapp_object.microhelpdefault)
li_rc = of_Restore (ab_useregistry, as_keyorini, as_inisection, 'righttoleft', ls_righttoleft, &
	lnv_conversion.of_string(inv_appmanager.iapp_object.righttoleft))
li_rc = of_Restore (ab_useregistry, as_keyorini, as_inisection, 'toolbarframetitle', ls_toolbarframetitle, &
	inv_appmanager.iapp_object.toolbarframetitle)
li_rc = of_Restore (ab_useregistry, as_keyorini, as_inisection, 'toolbarpopmenutext', ls_toolbarpopmenutext, &
	inv_appmanager.iapp_object.toolbarpopmenutext)
li_rc = of_Restore (ab_useregistry, as_keyorini, as_inisection, 'toolbarsheettitle', ls_toolbarsheettitle, &
	inv_appmanager.iapp_object.toolbarsheettitle)
li_rc = of_Restore (ab_useregistry, as_keyorini, as_inisection, 'toolbarusercontrol', ls_toolbarusercontrol, &
	lnv_conversion.of_string(inv_appmanager.iapp_object.toolbarusercontrol))

//Convert to the appropriate data types
lb_microhelp = lnv_conversion.of_Boolean(ls_microhelp)
lb_righttoleft = lnv_conversion.of_Boolean(ls_righttoleft)
lb_toolbarusercontrol = lnv_conversion.of_Boolean(ls_toolbarusercontrol)
If isnumber(ls_ddetimeout) then 
	li_ddetimeout = integer(ls_ddetimeout)
else
	li_ddetimeout = 0
end if

// Important values so validate them.
if isnull(lb_microhelp) then lb_microhelp = false
if isnull(lb_righttoleft) then lb_righttoleft = false
if isnull(lb_toolbarusercontrol) then lb_toolbarusercontrol = true

// pfc appmanager properties - if value is blank then we don't want to change the current setting
if ls_userkey <> ""     then inv_appmanager.of_SetUserkey(ls_userkey)
if ls_userinifile <> "" then inv_appmanager.of_SetUserinifile(ls_userinifile)
if ls_helpfile <> ""    then inv_appmanager.of_SetHelpfile(ls_helpfile)
if ls_version <> ""     then inv_appmanager.of_SetVersion(ls_version)
if ls_logo <> ""        then inv_appmanager.of_SetLogo(ls_logo)
if ls_copyright <> ""   then inv_appmanager.of_SetCopyright(ls_copyright)
if ls_userid <> ""      then inv_appmanager.of_SetUserid(ls_userid)
inv_appmanager.of_SetMicrohelp(lb_microhelp)

// application object properties - if value is blank then we don't want to change the current setting
inv_appmanager.iapp_object.ddetimeout = li_DDEtimeOut
if ls_DisplayName <> ""        then inv_appmanager.iapp_object.displayname = ls_DisplayName
if ls_dwMessageTitle <> ""     then inv_appmanager.iapp_object.dwmessagetitle = ls_dwMessageTitle
if ls_MicroHelpDefault <> ""   then inv_appmanager.iapp_object.microhelpdefault = ls_MicroHelpDefault
if ls_ToolbarFrameTitle <> ""  then inv_appmanager.iapp_object.toolbarframetitle = ls_ToolbarFrameTitle
if ls_ToolbarPopmenuText <> "" then inv_appmanager.iapp_object.toolbarpopmenutext = ls_ToolbarPopmenuText
if ls_ToolbarSheetTitle <> ""  then inv_appmanager.iapp_object.toolbarsheettitle = ls_ToolbarSheetTitle
inv_appmanager.iapp_object.righttoleft = lb_RightToLeft
inv_appmanager.iapp_object.toolbarusercontrol = lb_ToolbarUserControl

return li_rc
end function

     
Name Owner
pfc_n_cst_apppreference.of_restore pfc_n_cst_apppreference

     
Name Owner
systemfunctions.integer systemfunctions
systemfunctions.isnull systemfunctions
systemfunctions.isnumber systemfunctions
systemfunctions.string systemfunctions
pfc_n_cst_conversion.of_boolean pfc_n_cst_conversion
pfc_n_cst_conversion.of_string pfc_n_cst_conversion
pfc_n_cst_apppreference.of_restore pfc_n_cst_apppreference
pfc_n_cst_appmanager.of_getuserid pfc_n_cst_appmanager
pfc_n_cst_appmanager.of_getcopyright pfc_n_cst_appmanager
pfc_n_cst_appmanager.of_getversion pfc_n_cst_appmanager
pfc_n_cst_appmanager.of_gethelpfile pfc_n_cst_appmanager
pfc_n_cst_appmanager.of_getuserinifile pfc_n_cst_appmanager
pfc_n_cst_appmanager.of_getlogo pfc_n_cst_appmanager
pfc_n_cst_appmanager.of_setmicrohelp pfc_n_cst_appmanager
pfc_n_cst_appmanager.of_getmicrohelp pfc_n_cst_appmanager
pfc_n_cst_appmanager.of_setcopyright pfc_n_cst_appmanager
pfc_n_cst_appmanager.of_setversion pfc_n_cst_appmanager
pfc_n_cst_appmanager.of_setuserinifile pfc_n_cst_appmanager
pfc_n_cst_appmanager.of_setuserid pfc_n_cst_appmanager
pfc_n_cst_appmanager.of_setlogo pfc_n_cst_appmanager
pfc_n_cst_appmanager.of_sethelpfile pfc_n_cst_appmanager
pfc_n_cst_appmanager.of_setuserkey pfc_n_cst_appmanager
pfc_n_cst_appmanager.of_getuserkey pfc_n_cst_appmanager

     
Full name
No Data

     
Name Scope
No Data