M
MikeY
I'm having trouble extaction my image from my resource file using
DictionaryEnumerator & ResourceReader. String extractions are good.
I've been trying to look online for exact info on this, but alas, I can't
find any and I am not sure if this is possilbe. My code sample below and any
and all help is appreciated.
//This part works just fine
private void Save_Click(object sender, System.EventArgs e)
{
try
{
ResourceWriter rw = new ResourceWriter(@"C:\HOST_BACHEND.resources");
//
rw.AddResource("LOGO", this.pBox_Logo.Image);
rw.AddResource("HEADER_1", "HEADER TEST");
//
rw.Generate();
rw.Close();
}
catch(Exception myException)
{
MessageBox.Show(myException.Message);
}
}
----------------------------------------
//Extraction is the problem for just the image
try
{
IResourceReader reader = new ResourceReader(@"C:\HOST_BACHEND.resources");
IDictionaryEnumerator en = reader.GetEnumerator();
//
while (en.MoveNext())
{
MessageBox.Show(en.Key.ToString() +"\n" + en.Value.ToString()
+"\n" + en.Current.ToString() +"\n" + en.Entry.ToString());
if(en.Key.ToString() == "LOGO")
{
??????
}
if(en.Key.ToString() == "HEADER_1")
{
MessageBox.Show(en.Value.ToString());
}
}
}
catch(Exception myException)
{
MessageBox.Show(myException.Message);
}
Thanks
MikeY
DictionaryEnumerator & ResourceReader. String extractions are good.
I've been trying to look online for exact info on this, but alas, I can't
find any and I am not sure if this is possilbe. My code sample below and any
and all help is appreciated.
//This part works just fine
private void Save_Click(object sender, System.EventArgs e)
{
try
{
ResourceWriter rw = new ResourceWriter(@"C:\HOST_BACHEND.resources");
//
rw.AddResource("LOGO", this.pBox_Logo.Image);
rw.AddResource("HEADER_1", "HEADER TEST");
//
rw.Generate();
rw.Close();
}
catch(Exception myException)
{
MessageBox.Show(myException.Message);
}
}
----------------------------------------
//Extraction is the problem for just the image
try
{
IResourceReader reader = new ResourceReader(@"C:\HOST_BACHEND.resources");
IDictionaryEnumerator en = reader.GetEnumerator();
//
while (en.MoveNext())
{
MessageBox.Show(en.Key.ToString() +"\n" + en.Value.ToString()
+"\n" + en.Current.ToString() +"\n" + en.Entry.ToString());
if(en.Key.ToString() == "LOGO")
{
??????
}
if(en.Key.ToString() == "HEADER_1")
{
MessageBox.Show(en.Value.ToString());
}
}
}
catch(Exception myException)
{
MessageBox.Show(myException.Message);
}
Thanks
MikeY