如何使用resourcemanager更新资源? [英] How to update a resource using resourcemanager?

查看:263
本文介绍了如何使用resourcemanager更新资源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我已经成功加载了资源管理器.但是我没有找到合适的方法来向Resource.designer.cs文件添加,更新或删除资源.例如,下面是下面的代码

Hello there I am have successfully loaded the resource manager. But I am not getting suitable ways to add, update or remove resource to the Resource.designer.cs file. For example, here is the code below

ResourceManager rm = ElectronicNapkinCam.Properties.Resources.ResourceManager;
            CultureInfo ci = ElectronicNapkinCam.Properties.Resources.Culture;
            //getting the current value of the resource
            MessageBox.Show(rm.GetString("FilePictureSaveFilter",ci));



在messagebx中,我可以看到"FilePictureSaveFilter"的值,但是如果我想更新或删除该键以及值,该怎么做?任何代码示例都将不胜感激.



Here in the messagebx I can see the value of ''FilePictureSaveFilter'', But if I want to update or delete that key as well as value, how to do that? Any code example will be appreciated.

推荐答案

ResourceManager是只读对象,没有修改值的方法.

您可以使用应用程序设置
修改一些值
在Code Project和Internet上搜索此处的文章.有一些不错的博客/文章.
ResourceManager is a read-only object, it has no methods to modify values.

You may be able to amend some values by using Application Settings

Search the Articles here on Code Project and on the internet. There are some good blogs/articles on this.


这篇关于如何使用resourcemanager更新资源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆