User
caution
This functionality is not available is standard netDecor build. It's enabled on client's demand and its paramaters may vary between customized netDecor builds.
caution
App DOES NOT HAVE any kind of user accounts nor login/logout feature.
App DOES HAVE possibility to show login/logout state of user of web page program is embeded.
On login event
NetDecor.Events.RegisterEventHandler(„Login”, function(){});
Event is executed when user clicks "Login" button.
On logout event
NetDecor.Events.RegisterEventHandler(„Logout”,function(){});
Event is executed when user clicks "Logout" button.
On show projects event
NetDecor.Events.RegisterEventHandler(„ShowProjects”,function(){})
Event is executed when user clicks 'My Projects’ button in user panel OR 'Open” from 'File’ tab.
Set user state
NetDecor.Login.SetLoginState(loginState: string)
Login state is a JSON string with following parameters:
state: boolean - true – user is logged in, false – logged out
name: string - set the visible user name in app (not required when state is false)
Example
loginState = {
"state":true,
"name":"userName"
};
NetDecor.Events.RegisterEventHandler("Login",function(){NetDecor.Login.SetLoginState(JSON.stringify(loginState))});