点击下载 AppMessage.rar

这个类是关于AppMessage的帮助类,主要是格式化返回字符串的
里面会有很多的提供字符的格式以及预设置内容,大家可以直接使用的
看下面代码吧

/// <summary>
/// 类说明:Assistant
/// 编 码 人:苏飞
/// 联系方式:361983679
/// 更新网站:[url=http://www.cckan.net/thread-655-1-1.html]http://www.cckan.net/thread-655-1-1.html[/url]
/// </summary> using System;
using System.Globalization; namespace DotNet.Utilities
{
/// <summary>
/// BUBaseAppMessage
/// </author>
/// </summary>
public class AppMessage
{
/// <summary>
/// 提示信息.
/// </summary>
public static string MSG0000 = "提示信息"; /// <summary>
/// 发生未知错误.
/// </summary>
public static string MSG0001 = "发生未知错误。"; /// <summary>
/// 数据库联接不正常.
/// </summary>
public static string MSG0002 = "数据库联接不正常。"; /// <summary>
/// WebService联接不正常.
/// </summary>
public static string MSG0003 = "WebService 联接不正常。"; /// <summary>
/// 任何数据未被修改.
/// </summary>
public static string MSG0004 = "任何数据未被修改。"; /// <summary>
/// 记录未找到,可能已被其他人删除.
/// </summary>
public static string MSG0005 = "记录未找到,可能已被其他人删除。"; /// <summary>
/// 数据已被其他人修改,请按F5键,重新刷新获得数据.
/// </summary>
public static string MSG0006 = "数据已被其他人修改,请按F5键,重新刷新获得数据。"; /// <summary>
/// '{O}'不允许为空,请输入.
/// </summary>
public static string MSG0007 = "{0} 不允许为空,请输入。"; /// <summary>
/// {0} 已存在,不可以重复.
/// </summary>
public static string MSG0008 = "{0} 已存在,不可以重复。"; /// <summary>
/// 新增成功.
/// </summary>
public static string MSG0009 = "新增成功。"; /// <summary>
/// 更新成功.
/// </summary>
public static string MSG0010 = "更新成功。"; /// <summary>
/// 保存成功.
/// </summary>
public static string MSG0011 = "保存成功。"; /// <summary>
/// 批量保存成功.
/// </summary>
public static string MSG0012 = "批量保存成功。"; /// <summary>
/// 删除成功.
/// </summary>
public static string MSG0013 = "删除成功。"; /// <summary>
/// 批量删除成功.
/// </summary>
public static string MSG0014 = "批量删除成功。"; /// <summary>
/// 您确认删除吗?
/// </summary>
public static string MSG0015 = "您确认删除吗?"; /// <summary>
/// 您确认删除 '{0}'吗?
/// </summary>
public static string MSG0016 = "您确认删除 {0} 吗?"; /// <summary>
/// 当前记录不允许被删除.
/// </summary>
public static string MSG0017 = "当前记录不允许被删除。"; /// <summary>
/// 当前记录 '{0}' 不允许被删除.
/// </summary>
public static string MSG0018 = "当前记录 {0} 不允许被删除。"; /// <summary>
/// 当前记录不允许被编辑,请按F5键,重新获取数据最新数据.
/// </summary>
public static string MSG0019 = "当前记录不允许被编辑,请按F5键,重新获取数据最新数据。"; /// <summary>
/// 当前记录 '{0}' 不允许被编辑,请按F5键,重新获取数据最新数据.
/// </summary>
public static string MSG0020 = "当前记录 {0} 不允许被编辑,请按F5键,重新获取数据最新数据。"; /// <summary>
/// 当前记录已是第一条记录.
/// </summary>
public static string MSG0021 = "当前记录已是第一条记录。"; /// <summary>
/// 当前记录已是最后一条记录.
/// </summary>
public static string MSG0022 = "当前记录已是最后一条记录。"; /// <summary>
/// 请至少选择一项.
/// </summary>
public static string MSG0023 = "请选择一条记录。"; /// <summary>
/// 请至少选择一项 '{0}'.
/// </summary>
public static string MSG0024 = "请至少选择一条记录。"; /// <summary>
/// '{0}'不能大于'{1}'.
/// </summary>
public static string MSG0025 = "{0} 不能大于{1}。"; /// <summary>
/// '{0}'不能小于'{1}'.
/// </summary>
public static string MSG0026 = "{0} 不能小于 {1}。"; /// <summary>
/// '{0}'不能等于'{1}'.
/// </summary>
public static string MSG0027 = "{0} 不能等于 {1}。"; /// <summary>
/// 输入的'{0}'不是有效的日期.
/// </summary>
public static string MSG0028 = "输入的 {0} 不是有效的日期。"; /// <summary>
/// 输入的'{0}'不是有效的字符.
/// </summary>
public static string MSG0029 = "输入的 {0} 不是有效的字符。"; /// <summary>
/// 输入的'{0}'不是有效的数字.
/// </summary>
public static string MSG0030 = "输入的 {0} 不是有效的数字。"; /// <summary>
/// 输入的'{0}'不是有效的金额.
/// </summary>
public static string MSG0031 = "输入的 {0} 不是有效的金额。"; /// <summary>
/// '{0}'名不能包含:\ / : * ? " < > |
/// </summary>
public static string MSG0032 = "{0} 名包含非法字符。"; /// <summary>
/// 数据已经被引用,有关联数据在
/// </summary>
public static string MSG0033 = "数据已经被引用,有关联数据在。"; /// <summary>
/// 数据已经被引用,有关联数据在.是否强制删除数据?
/// </summary>
public static string MSG0034 = "数据已经被引用,有关联数据在,是否强制删除数据?"; /// <summary>
/// {0} 有子节点不允许被删除.
/// </summary>
public static string MSG0035 = "{0} 有子节点不允许被删除,有子节点还未被删除。"; /// <summary>
/// {0} 不能移动到 {1}.
/// </summary>
public static string MSG0036 = "{0} 不能移动到 {1}。"; /// <summary>
/// {0} 下的子节点不能移动到 {1}.
/// </summary>
public static string MSG0037 = "{0} 下的子节点不能移动到 {1}。"; /// <summary>
/// 确认移动 {0} 到 {1} 吗?
/// </summary>
public static string MSG0038 = "确认移动 {0} 到 {1} 吗?"; /// <summary>
/// '{0}'不等于'{1}'.
/// </summary>
public static string MSG0039 = "{0} 不等于 {1}。"; /// <summary>
/// {0} 错误.
/// </summary>
public static string MSG0040 = "{0} 错误。"; /// <summary>
/// 确认审核通过吗?.
/// </summary>
public static string MSG0041 = "确认审核通过吗?"; /// <summary>
/// 确认驳回吗?.
/// </summary>
public static string MSG0042 = "确认审核驳回吗?"; /// <summary>
/// 成功锁定数据.
/// </summary>
public static string MSG0043 = "不能锁定数据。"; /// <summary>
/// 不能锁定数据.
/// </summary>
public static string MSG0044 = "成功锁定数据。"; /// <summary>
/// 数据被修改提示
/// </summary>
public static string MSG0045 = "数据已经改变,想保存数据吗?"; /// <summary>
/// 最近 {0} 次内密码不能重复。
/// </summary>
public static string MSG0046 = "最近 {0} 次内密码不能重复。"; /// <summary>
/// 密码已过期,账户被锁定,请联系系统管理员。
/// </summary>
public static string MSG0047 = "密码已过期,账户被锁定,请联系系统管理员。"; /// <summary>
/// 数据已经改变,不保存数据?
/// </summary>
public static string MSG0065 = "数据已经改变,不保存数据?"; public static string MSG0048 = "拒绝登录,用户已经在线上。";
public static string MSG0049 = "拒绝登录,网卡Mac地址不符限制条件。";
public static string MSG0050 = "拒绝登录,IP地址不符限制条件";
public static string MSG0051 = "已到在线用户最大数量限制。"; public static string MSG0060 = "请先创建该职员的登录系统的用户信息。"; /// <summary>
/// 您确认移除吗?
/// </summary>
public static string MSG0075 = "您确认移除吗?"; /// <summary>
/// 您确认移除 '{0}'吗?
/// </summary>
public static string MSG0076 = "您确认移除 {0} 吗?"; public static string MSG0700 = "已经成功连接到目标数据。"; public static string MSG9800 = "值";
public static string MSG9900 = "公司";
public static string MSG9901 = "部门";
public static string MSG9956 = "未找到满足条件的记录。";
public static string MSG9957 = "用户名";
public static string MSG9958 = "数据验证错误。";
public static string MSG9959 = "新密码";
public static string MSG9960 = "确认密码";
public static string MSG9961 = "原密码";
public static string MSG9962 = "修改 {0} 成功。";
public static string MSG9963 = "设置 {0} 成功。";
public static string MSG9964 = "密码";
public static string MSG9965 = "登录成功。";
public static string MSG9966 = "用户没有找到,请注意大小写。";
public static string MSG9967 = "密码错误,请注意大小写。";
public static string MSG9968 = "登录被拒绝,请与管理员联系。";
public static string MSG9969 = "基础编码";
public static string MSG9970 = "职员";
public static string MSG9971 = "组织机构";
public static string MSG9972 = "角色";
public static string MSG9973 = "模块";
public static string MSG9974 = "文件夹";
public static string MSG9975 = "权限";
public static string MSG9976 = "代码";
public static string MSG9977 = "编号";
public static string MSG9978 = "名称";
public static string MSG9979 = "父节点代码";
public static string MSG9980 = "父节点名称";
public static string MSG9981 = "功能分类代码";
public static string MSG9982 = "唯一识别代码";
public static string MSG9983 = "主题";
public static string MSG9984 = "内容";
public static string MSG9985 = "状态码";
public static string MSG9986 = "次数";
public static string MSG9987 = "有效";
public static string MSG9988 = "备注";
public static string MSG9989 = "排序码";
public static string MSG9990 = "创建者代码";
public static string MSG9991 = "创建时间";
public static string MSG9992 = "最后修改者代码";
public static string MSG9993 = "最后修改时间";
public static string MSG9994 = "排序";
public static string MSG9995 = "代码";
public static string MSG9996 = "索引";
public static string MSG9997 = "字段";
public static string MSG9998 = "表";
public static string MSG9999 = "数据库"; #region public static int GetLanguageResource() 从当前指定的语言包读取信息
/// <summary>
/// 从当前指定的语言包读取信息
/// </summary>
/// <returns></returns>
//public static int GetLanguageResource()
//{
// AppMessage AppMessage = new AppMessage();
// return BaseInterfaceLogic.GetLanguageResource(AppMessage);
//}
#endregion #region public static string Format(string value, params string[] messages) 格式化一个资源字符串
/// <summary>
/// 格式化一个资源字符串
/// </summary>
/// <param name="value">目标字符串</param>
/// <param name="messages">传入的信息</param>
/// <returns>字符串</returns>
public static string Format(string value, params string[] messages)
{
return String.Format(CultureInfo.CurrentCulture, value, messages);
}
#endregion #region public static string GetMessage(string id) 读取一个资源定义
/// <summary>
/// 读取一个资源定义
/// </summary>
/// <param name="id">资源代码</param>
/// <returns>字符串</returns>
public static string GetMessage(string id)
{
string returnValue = string.Empty;
returnValue = ResourceManagerWrapper.Instance.Get(id);
return returnValue;
}
#endregion #region public static string GetMessage(string id, params string[] messages)
/// <summary>
/// 读取一个资源定义
/// </summary>
/// <param name="id">资源代码</param>
/// <param name="messages">传入的信息</param>
/// <returns>字符串</returns>
public static string GetMessage(string id, params string[] messages)
{
string returnValue = string.Empty;
returnValue = ResourceManagerWrapper.Instance.Get(id);
returnValue = String.Format(CultureInfo.CurrentCulture, returnValue, messages);
return returnValue;
}
#endregion
}
}

[字符串] AppMessage--字符串返回帮助类 (转载)的更多相关文章

  1. c#实例化继承类,必须对被继承类的程序集做引用 .net core Redis分布式缓存客户端实现逻辑分析及示例demo 数据库笔记之索引和事务 centos 7下安装python 3.6笔记 你大波哥~ C#开源框架(转载) JSON C# Class Generator ---由json字符串生成C#实体类的工具

    c#实例化继承类,必须对被继承类的程序集做引用   0x00 问题 类型“Model.NewModel”在未被引用的程序集中定义.必须添加对程序集“Model, Version=1.0.0.0, Cu ...

  2. Android初级教程:对文件和字符串进行MD5加密工具类

    转载请注明出处:http://blog.csdn.net/qq_32059827/article/details/52200008   点击打开链接 之前写过一篇博文,是针对字符串进行md5加密的.今 ...

  3. Java对字符串加密并返回星号※

     If you don't look back, you'll never know I waiting for you behind you. Java对字符串加密并返回星号※ PasswordUt ...

  4. JSON字符串转C#实体Class类

    在项目开发过程中,经常需要和不同部门或者不同的组员一起协同工作,但对方写的json返回的结果集,我们需要用,那么如何来生成对应的类代码和实体对象呢?于是参考了网上的做法,做一个简单的字符串转实体类的功 ...

  5. Java中Date()类 日期转字符串、字符串转日期的问题(已解决)

    Java中Date()类 日期转字符串.字符串转日期的问题 今天在写东西的时候突然发现一个问题,就是先new 一个Date()然后将生成的值转为字符串, 然后再将转换后的字符串再次用new Date( ...

  6. Java中将字符串与unicode的相互转换工具类

    unicode编码规则 unicode码对每一个字符用4位16进制数表示.具体规则是:将一个字符(char)的高8位与低8位分别取出,转化为16进制数,如果转化的16进制数的长度不足2位,则在其后补0 ...

  7. 字串符相关 split() 字串符分隔 substring() 提取字符串 substr()提取指定数目的字符 parseInt() 函数可解析一个字符串,并返回一个整数。

    split() 方法将字符串分割为字符串数组,并返回此数组. stringObject.split(separator,limit) 我们将按照不同的方式来分割字符串: 使用指定符号分割字符串,代码如 ...

  8. 指定字符串 s,返回 s 所有可能的子串,每个子串必须是一个回文(指顺读和倒读都一样的字符串)

    Given a string s, partition s such that every substring of the partition is a palindrome Return all ...

  9. java 创建string对象机制 字符串缓冲池 字符串拼接机制 字符串中intern()方法

    字符串常量池:字符串常量池在方法区中 为了优化空间,为了减少在JVM中创建的字符串的数量,字符串类维护了一个字符串池,每当代码创建字符串常量时,JVM会首先检查字符串常量池.如果字符串已经存在池中,就 ...

  10. C++二进制字符串转Base64字符串 Base64字符串转二进制字符串

    封装成类的 . base64格式的字符串,只包含大小写字母.零到九,以及 + / //___base_64.h /*base_64.h文件*/ #ifndef BASE_64_H #define BA ...

随机推荐

  1. 《大数据Spark企业级实战 》

    基本信息 作者: Spark亚太研究院   王家林 丛书名:决胜大数据时代Spark全系列书籍 出版社:电子工业出版社 ISBN:9787121247446 上架时间:2015-1-6 出版日期:20 ...

  2. bzoj1055

    不难想到是一个布尔型dp, 不难想到用f[i,j,k]表示区间[i,j]能否变为字母k 不难想到对于f[i,j,k],拆[i,j]成两个区间,然后穷举k的每一个变换来判断 感觉记忆化搜索写的比较顺,就 ...

  3. WordPress RokIntroScroller插件‘thumb.php’多个安全漏洞

    漏洞名称: WordPress RokIntroScroller插件‘thumb.php’多个安全漏洞 CNNVD编号: CNNVD-201309-383 发布时间: 2013-09-24 更新时间: ...

  4. Unity3D常见技术点(持续更新)

    一:获取对象, 添加对象等 1:使用prefab生成对象 GameObject ballObj = GameObject.Instantiate(Resources.Load(, Quaternion ...

  5. 提升你的Java应用性能:改善数据处理

    许多应用程序在压力测试阶段或在生产环境中都会遇到性能问题.如果我们看一下性能问题背后的原因,会发现很多是由数据处理不当造成.数据处理在应用面对大数据量时是非常关键的.这里有一些实用的数据处理技巧可以帮 ...

  6. 【原】关于IPcamera几个问题的思考

    安全性: 1.RTSP连接的权限管理. 2.视频加密(一般采用选择性加密算法,如对运动矢量,量化参数等进行加密.) 3.数字水印技术(用于版权等认证) 稳定性: 1.mobileIP 是用来进行丢包模 ...

  7. 编程之美 两个叶子的节点之间 最大距离 变种 leecode

    提交地址: https://oj.leetcode.com/problems/binary-tree-maximum-path-sum/ 说一下思路http://www.cnblogs.com/mil ...

  8. JavaScript高级程序设计56.pdf

    选择选项 对于只允许选择一项的选择框,访问选中项最简单的方式是selectedIndex属性 var selectedOption=selectbox.options["selectbox. ...

  9. Qualcomm Android display架构分析

    Android display架构分析(一) http://blog.csdn.net/BonderWu/archive/2010/08/12/5805961.aspx http://hi.baidu ...

  10. Shell如何传递字符串

    Shell 在写函数的时候,有时候需要传递字符串,由于字符串中有空格,所以结果总是不对,下面写个小例子,解决这个问题: #!/bin/bash # value init TT="adb sh ...