473,320 Members | 2,054 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

ResourceManager

Hi,

I am messing about using resource file.

I have the following code:

Assembly assembly = Assembly.GetExecutingAssembly();
rm = new ResourceManager("ResourceDemo.demo", assembly);
txtBoxTitle.Text = rm.getString("Title");

This works no problem, but what i would like to do is make a resource
editor, where any resource file can be loaded. the problem is the names of
any of the resources wont be known. (The hardcoded "Title" for example.

Is there a way of of getting the values from the resource file ?

If I have a file with the following:

UserName = "Steven"

I want to load this value without having to do this:

txtBoxTitle.Text = rm.getString("UserName");

Hopefully something like, rm.GET_ITEM(i) or something like that.

Hope that makes sense

Steven
www.stevenblair.com


Nov 15 '05 #1
1 2628
Hi Steven,
I am messing about using resource file.

I have the following code:

Assembly assembly = Assembly.GetExecutingAssembly();
rm = new ResourceManager("ResourceDemo.demo", assembly);
txtBoxTitle.Text = rm.getString("Title");

This works no problem, but what i would like to do is make a resource
editor, where any resource file can be loaded. the problem is the names of
any of the resources wont be known. (The hardcoded "Title" for example.

Is there a way of of getting the values from the resource file ?

If I have a file with the following:

UserName = "Steven"

I want to load this value without having to do this:

txtBoxTitle.Text = rm.getString("UserName");

Hopefully something like, rm.GET_ITEM(i) or something like that.

Hope that makes sense


Well, the resource-files (resx) are XML-Files, so you can easily read
anything using XmlTextReader ...

Regards,

--
Frank Eller [.NET MVP]
www.frankeller.de
..NET Developers Group Munich- www.munichdot.net
Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Techfan | last post by:
Is there a way to determine which resource file the resourcemanager GetString method utilizes in a fallback situation?
3
by: Nils Erik Asmundvaag | last post by:
Hello I hope someone is able to help me with this frustrating problem. I have a C# web project in Visual Studio .NET 2003. I want to support Swedish and Norwegian texts and have put the texts...
3
by: Craig | last post by:
Hi I'm creating a web control whereby I use a resource file to store strings for property descriptions and so forth. The namespace for the control is: Unsd.Web.WebControls all classes in the...
0
by: the_medeiros | last post by:
How i can use resources files to show display messages ??? I try use: private static ResourceManager resourceManager = new ResourceManager(typeof(ExceptionManager).Namespace +...
0
by: Weenie the Pooh | last post by:
We are writing an ASP.Net C# application (VS 2003) and plan to use embedded resources files for french, german and english UI. I created resx files named _todo.resx and _todo.fr-CH.resx Here...
7
by: Dennis | last post by:
I have a .resx (xml) file that contains resources. I am trying to follow the example in MSDN for creating the resource Manager as follows: Dim myAssembly As System.Reflection.Assembly...
1
by: Franz | last post by:
I know how to use ResourceManager, but I think I don't use it wisely. I have a web user control. Inside the control, I need to call ResourceManager.GetString. However, I also need to call...
0
by: ad | last post by:
We can get the string in Resource with ResourceManager like: ResourceManager rm = new ResourceManager(this.GetType().NameSpace+".Properties.Resources", this.GetType().Assembly); string...
2
by: ngrover | last post by:
When accessing strings from a french language utf-8 .txt file (that has been resgen'ed into a .resources file) via ResourceManager.GetString() method, I am encountering a problem. All the special...
1
by: nelsonbrodyk | last post by:
Hey All, Here is some background of what I want to do. The problem is, I don't know if it's even possible. I want to have default translation file, built into the source code, via .resx files. ...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.