Click here to Skip to main content
15,894,277 members
Home / Discussions / C#
   

C#

 
QuestionAnd operator in c#? Pin
CopperCircle10-Aug-08 11:17
CopperCircle10-Aug-08 11:17 
AnswerRe: And operator in c#? Pin
Guffa10-Aug-08 11:29
Guffa10-Aug-08 11:29 
AnswerRe: And operator in c#? Pin
nelsonpaixao10-Aug-08 14:15
nelsonpaixao10-Aug-08 14:15 
GeneralRe: And operator in c#? Pin
Dave Doknjas10-Aug-08 14:38
Dave Doknjas10-Aug-08 14:38 
Questionfinal release help [modified] Pin
bfis10813710-Aug-08 10:09
bfis10813710-Aug-08 10:09 
AnswerRe: final release help Pin
Guffa10-Aug-08 11:33
Guffa10-Aug-08 11:33 
QuestionLarge amount of images - ideas needed Pin
Dewald10-Aug-08 8:23
Dewald10-Aug-08 8:23 
AnswerRe: Large amount of images - ideas needed Pin
User 665810-Aug-08 8:49
User 665810-Aug-08 8:49 
Especially considering that you don't want the files to be accessible by the end user and want to add/remove images at any time I'd go for the database solution.

You could create a thin image access layer and create several implementations that can be switched easily. Something like this:

interface ImageAccess
{
   Image[] GetImagesForSpecies(string species);
   AddImage(string name);
   RemoveImage(string name);
   AddSpecies(string name);
   RemoveSpecies(string name);
}


On top of this you could create implementations based on file systems, a local database (like SQLite[^]) or a remote database (Oracle, MySQL, PostgreSQL, whatever) where you would have to specify the connection string.

The last solution would make the data changes transparent to the user, the client app wouldn't have to update itself. But the client needs to be connected to the internet.

The filesystem/local-DB solution would require some sort of update mechanism by the client application, but no internet connection would be necessary once all the data is loaded.

I would go for a DB solution (either local or remote) saving the species names and images in relations like this:

Relation species
ID | Name (varchar)
---------
 1 | Species1
 2 | Species2
 3 | Species3


Relation images
ID | Image (BLOB) | Species (FK)
--------------------------------
 1 | ...          | 1
 2 | ...          | 1
 3 | ...          | 1
 4 | ...          | 2
 5 | ...          | 2
 6 | ...          | 3
 7 | ...          | 3


A nice side effect of using a local database like SQLite is that everything will be stored in a single file, not directly accessible by the user. (Although it would still be possible to extract the images using the SQLite command line tool)

hope this helps,

regards

modified 12-Sep-18 21:01pm.

AnswerRe: Large amount of images - ideas needed Pin
nelsonpaixao10-Aug-08 14:19
nelsonpaixao10-Aug-08 14:19 
Questiondetect if application is opened on start-up or via user? Pin
DragenGimp10-Aug-08 7:43
DragenGimp10-Aug-08 7:43 
AnswerRe: detect if application is opened on start-up or via user? Pin
teejayem10-Aug-08 9:37
teejayem10-Aug-08 9:37 
GeneralRe: detect if application is opened on start-up or via user? Pin
DragenGimp10-Aug-08 10:23
DragenGimp10-Aug-08 10:23 
GeneralRe: detect if application is opened on start-up or via user? Pin
DragenGimp10-Aug-08 11:06
DragenGimp10-Aug-08 11:06 
GeneralRe: detect if application is opened on start-up or via user? Pin
teejayem10-Aug-08 12:31
teejayem10-Aug-08 12:31 
GeneralRe: detect if application is opened on start-up or via user? Pin
DragenGimp10-Aug-08 13:01
DragenGimp10-Aug-08 13:01 
GeneralRe: detect if application is opened on start-up or via user? Pin
teejayem10-Aug-08 14:53
teejayem10-Aug-08 14:53 
GeneralRe: detect if application is opened on start-up or via user? Pin
DragenGimp16-Aug-08 5:50
DragenGimp16-Aug-08 5:50 
QuestionWEIRD problem with CPU 40%-50% in an application. Pin
Green Fuze10-Aug-08 5:23
Green Fuze10-Aug-08 5:23 
QuestionDynamic Instantiation of Classes. Pin
dudedotnet10-Aug-08 5:06
dudedotnet10-Aug-08 5:06 
AnswerRe: Dynamic Instantiation of Classes. Pin
User 665810-Aug-08 5:13
User 665810-Aug-08 5:13 
AnswerRe: Dynamic Instantiation of Classes. Pin
Guffa10-Aug-08 6:35
Guffa10-Aug-08 6:35 
AnswerRe: Dynamic Instantiation of Classes. Pin
PIEBALDconsult10-Aug-08 7:03
mvePIEBALDconsult10-Aug-08 7:03 
QuestionGraphics.DrawImage Problem Pin
#realJSOP10-Aug-08 4:57
mve#realJSOP10-Aug-08 4:57 
AnswerRe: Graphics.DrawImage Problem Pin
Guffa10-Aug-08 5:21
Guffa10-Aug-08 5:21 
GeneralRe: Graphics.DrawImage Problem Pin
#realJSOP10-Aug-08 5:39
mve#realJSOP10-Aug-08 5:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.