Quote:
Originally Posted by Birdie
A tileset previewer should be added to J2O
|
I agree
(download Section)
Slow ?
Code:
public bool Excist(string name)
{
//database stuff. Discover if the filename is allready in the DB.
return result;
}
public string GetUrl(string tilename)
{
//Get url from database.
return url;
}
public string GenerateUrl(string tilename)
{
string url = "";
if(Excist(tilename))
{
//generate image
//database stuff...
//Set string.
}
else{
GetUrl(string tilename)
}
return url;
}
Sorry for the C# code. This will perform a check, if the name given up is not in the database, the (slow) funtion will do his work, set the url in database. and return the string to the function. or else.. the file will just seach up in the database and find the location of the ( allready ) renderd image!
Last edited by Marijn; Apr 5, 2006 at 05:51 AM.
|