473,396 Members | 2,036 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,396 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 2635
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. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.