Configuring the Preload profiles
Configuring the preload profiles consists of code instructions to open session for a user for each profile to preload and instructions to discard each preloaded environments.
1. From the App_Code folder, open the preload.cs file.
2. Modify the Preload method according to the following model:
static public bool PreLoad(MEGAWebAccessLib.MegaWebAccess pMWA , settings pSettings , int nLevel, bool bDiscarding)
{
bool bPreloading = true;
if (bDiscarding && (nLevel == 1))
{
pMWA.Discard(1, "<environment_1 path>");
…
pMWA.Discard(1, "<environment_n path>");
}
string[] sDiagramArray = new string[<nd - number of diagram type to preload>];
----
sDiagramArray[0] = "<hexaidabs of a diagram for the first diagram type>";
…
sDiagramArray[<nd-1>] = "<hexaidabs of a diagram for the last diagram type>";
switch (nLevel)
{
case 1:
PreLoadProfil(pMWA, pSettings,
"<LANGID>",
"<Environment Path with double backslash ie: C:\\Users\\Public\\Documents\\MEGA 2009 SP4\\Demonstration>",
"<Base Name>",
"<APPID>",
"<DESKID>",
"<PERSONID>",
"<LOGINID>",
"<PROFILID>",
sDiagramArray);
…
case <n>:
PreLoadProfil(pMWA, pSettings,
"<LANGID>",
"<Environment Path with double backslash ie: C:\\Users\\Public\\Documents\\MEGA 2009 SP4\\Demonstration>",
"<Base Name>",
"<APPID>",
"<DESKID>",
"<PERSONID>",
"<LOGINID>",
"<PROFILID>",
sDiagramArray);
break;
default:
bPreloading = false;
break;
}
return bPreloading;
}