resources

Best way to share data between classes in C#

I am trying to write a windows form application. I have some buttons and I need to change the image of the buttons according to the state of a variable. I put the images in the Resources folder and I’m trying to reach them like this: Image im = Properties.Resources.green; How can I reach this im value from all classes in my project jus...

Compiling non-source files in Xcode

I've got several file pairs: mydata.json, mydata.raw other.json, other.raw etc... A custom tool builds these files into data files to be consumed by my app, like so: mydata.dat, other.dat, etc... What is the correct way for me to set up Xcode to build these resource files? Either one could change, so I can't just set up a custom bui...

How to force WPF to use resource URIs that use assembly strong name? Argh!

O.k, this is really irritating, I had noticed previously that the code generated by WPF for loading XAML resources did not appear to use strong names and therefore may be problematic for scenarios where you need to support side by side versions of WPF assemblies. This has turned out to be the case, and it's now causing me problems - I h...

Find text files in Jar

I have an app which has to read from a text file (using FileInputStream). The text file is in the directory structure relative to the class file (eg. "../textdir/text.txt"). When I run it normally (ie specifying the /bin folder containing the .class file in the cp) everything works fine. However, I somehow need to package everything into...

Compiling VB.NET project at runtime with resources

My app bundles a set of VBScripts (UTF8 text files) into a VB.NET assembly. I used to embed the script code into the classes as String members, but this is proving to be a poor design. I want to include them as resources instead. What's the best way to add resources to the CompilerParams? What I've got so far (excluding all the error ch...

Loading a dds in C#

I am translating code from tutorial 7 in MS DirectX SDK to C#. I reached this line of code: // Load the Texture hr = D3DX10CreateShaderResourceViewFromFile( g_pd3dDevice, L"seafloor.dds", NULL, NULL, &g_pTextureRV, NULL ); if( FAILED( hr ) ) return hr; Can someone please help tell which SlimDX wrapper is equivalent to the functio...

iPhone SDK - Adding zipped content in resources and then unzipping into Documents folder

Hi, I have some resources (zipped) that needs to be shipped with my iphone application. When the app launches for the first time, this zipped file needs to be moved/copied to the Documents folder and unzip it there. User can then add more files to this path from the application. Can someone please suggest how can I achieve this? Thanks...

Do you employ any tools for managing technical debt?

The site I work with on a day-to-day basis has its share of shortcomings and we often make design decisions to "get us by right now" with the intention of fixing those up later. I've found that making the time to actually go back and fix them, let alone remembering what the full list of to-do items is can be challenging at best. Can yo...

flex3:How to override function set label of a button

Hi, Flex 3 question: I trying here to avoid having to bind resources to all my components labels ( ie a button) and find a way to have this automated. Problem: It corrupts the layout in design mode to bind directly in the mxml label="{resourceManager.getString('myResources', 'submit')}" and makes the design view useless. but when dec...

How to put linebreaks in asp.net resource files

Hi, I've a label in an asp.net page that gets its text from a global resource file somthing like this: <asp:Label ID="Label1" runat="server" Text="<%$ Resources:MyResource, MyString %>" /> The resource string for MyString contains text with a linebreak like: line1 line2 When the label is rendered I get the following html <span i...

Nested Resource at Root Level of Path

I'm trying to create a nested resource with a url scheme along the lines of: "http://example.com/username/...". What I currently have is this: ActionController::Routing::Routes.draw do |map| map.home '/', :controller => 'home' map.resource :session map.resources :users, :has_many => :nodes #map.user '/:id', :co...

java.util.MissingResourceException when running a jar

Hi All, In order to internationalise my code, I use a property file called MessagesBundle_en_UK.properties which is located in a resource folder called config so that I the following structure: +---src \---com \---proj \---messages Messages.java +---config \-...

Wpf: Listing all control Names in an application

I need a way to list out all named controls in a wpf application. In C++ we could use the resources file to see a list of all the controls on a form(or so I'm told). I need a similar way to see the a list of controls in a wpf application. The names will be used in a database, so it doesn't matter how I get them, I just need to automate...

Resources To Learn AppleScript For Mac System 7.5.5

Hello, I'm back here is SO, i was a time out because i get sad with some persons that dislike me only because i was noob in C/C++ and now i'm very nice on it and my OS is started!. But the thing is that now i'm emulating Mac System 7.5.5 68k, just for fun and for development too(AppleScript), but i was searching in the internet about t...

Adding and Using Resources in a Windows Driver

Is it possible for a windows driver to have resources? If so how could I add them and more importantly access them? ...

Using html inside resource files

I am developing a standard small ASP.Net MVC website which will be made multilingual using ASP.Net resource files. My question is about the resource files. See if you have a block of text which should be shown in paragraphes, is it appropriate to add <p> tags inside your resource file text? If not, what would be the best way to deal wi...

Format32bppPArgb images in .NET project resources

Is there a way to store images in the project resources as Format32bppPArgb pixelformat? I'm adding png images at the moment and they end up as Format32bppArgb format in the resources. (Visual Studio 2008, VB.NET, DotNET 2.0) Much obliged, David ...

For C# resources, why is Properties is undefined?

When I try try to access a string property in one of my C# project resources, I get the following error: 'ORG.PRJ.MOD.MyClass2' does not contain a definition for 'Properties' The code that produces the error is: string s = MyClass2.Properties.Resources.TestString2; The really bizarre thing is that another project in my solution (...

How do I remove unnecessary resources from my project?

I am working with a very big project (a solution that contains 16 projects and each project contains about 100 files). It is written in C++/C# with Visual Studio 2005. One of the projects has around 2000 resources out of which only 400 are actually used. How do I remove those unused resources? I tried to accomplish the task by searc...

How can I find out where a ResourceBundle came from?

Given a ResourceBundle object, is there a way to get a URL or other indicator as to where it was found when it was looked up? The ResourceBundle is being created with: ResourceBundle rb = ResourceBundle.getBundle("filename"); And it is being loaded from a file subdir/filename.properties, in most cases. I'd like to be able to program...