Introduction
Looking at the .resx file that VS.NET uses to store resources such as images, I thought wouldn't it be cool to have a XML file where you can store images and other info for you app and at startup your app gets the look and feel from the XML file dynamically. You can then change the look and feel by changing the XML file, maybe over the internet! A little investigation showed that .NET namespace System.XML
has 2 great classes XMLTextWriter
and XMLTextReader
which does all the hard work for you with their Read/WriteBase64
methods.
m_XMLWriter.WriteStartElement("",NodeName,"");</P>
<P><code>m_XMLWriter.WriteBase64(ImageBinaryBuffer,0,ImageBinaryBuffer.Length);
m_XMLWriter.WriteEndElement();
So here is my quick and dirty app, which uses 2 classes CLookXMLReader
and CLookXMLWriter
to do the putting in the binary and getting the binary out to bitmap or an icon. You basically use the Writer
to put the images into the XML, then the reader can be used at a separate app to get the images out from the XML. Made the code a bit messy when reading the binary out from the XML, there must be a better way to it, please let me know! I hope you dont judge coding skills by just looking at this app only (I am usually much better!) :)
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.