seahna
asked on
Display image
I have created two separate applications on is a setup tool that an admin will use to create all the configuration information for the users application. This configuration information is going to be stored inside an XML file. The user application will then read the XML file and apply all settings with in that XML file.
Part of those setting is displaying map images of a building in thumbnail format. Now I am unsure which way will be the easier of the two ideas I have. My first idea is to have the application read a directory destination from the XML file and display the images in that directory in thumbnail format. Then the user can click on the thumbnail and the image will be displayed in full size in a second window. In the second window the user should be able to zoom and pan the image.
However the problem with idea one is I also need the icon image to be displayed over top the map images representing specific security device like a locked door, intercom station, video camera, and so on. So I thought the user application could read the image file name from the XML file and display that and it would also have the icon image location stated there as well. Grant I would still have to tell it what directory the image was in but the second idea might be easier since I need the icon image as well.
The XML schema I have is something like this:
<Setup>
<Options>
<Maps>
<MapDirectory>C:\Projects\ AV4.1\Imag es</MapDir ectory>
<Map>
<FileName>Testing image.bmp</FileName>
<Icons>
<Icon>
<FileName>icon idle.bmp</FileName>
<Location>250,175</Locatio n>
</Icon>
<Icon>
<FileName>icon idle.bmp</FileName>
<Location>270,175</Locatio n>
</Icon>
<Icon>
<FileName>icon idle.bmp</FileName>
<Location>230,175</Locatio n>
</Icon>
</Icons>
</Map>
</Maps>
</Options>
</Setup>
The code I am using for my two forms is attached below.
I want to know which way is better to read my information from the XML and how to go about doing it?
Part of those setting is displaying map images of a building in thumbnail format. Now I am unsure which way will be the easier of the two ideas I have. My first idea is to have the application read a directory destination from the XML file and display the images in that directory in thumbnail format. Then the user can click on the thumbnail and the image will be displayed in full size in a second window. In the second window the user should be able to zoom and pan the image.
However the problem with idea one is I also need the icon image to be displayed over top the map images representing specific security device like a locked door, intercom station, video camera, and so on. So I thought the user application could read the image file name from the XML file and display that and it would also have the icon image location stated there as well. Grant I would still have to tell it what directory the image was in but the second idea might be easier since I need the icon image as well.
The XML schema I have is something like this:
<Setup>
<Options>
<Maps>
<MapDirectory>C:\Projects\
<Map>
<FileName>Testing image.bmp</FileName>
<Icons>
<Icon>
<FileName>icon idle.bmp</FileName>
<Location>250,175</Locatio
</Icon>
<Icon>
<FileName>icon idle.bmp</FileName>
<Location>270,175</Locatio
</Icon>
<Icon>
<FileName>icon idle.bmp</FileName>
<Location>230,175</Locatio
</Icon>
</Icons>
</Map>
</Maps>
</Options>
</Setup>
The code I am using for my two forms is attached below.
I want to know which way is better to read my information from the XML and how to go about doing it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The program usage is for security. The number of icon kind of depends on the companies security decives they have installed. There are two application the admin one that controls the setup of the other application.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok thank you very muchfor you help I finally got it figured out and you did provide me some food for thought on how to do thing. I will keep what you say in mind as I move forward.
ASKER
Open in new window