自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(3)
  • 资源 (2)
  • 收藏
  • 关注

转载 VS 2010 推式设动态置数据源

问题描述: 未能加载文件或程序集“file:///C:/Program Files/SAP BusinessObjects/Crystal Reports for .NET Framework 4.0/Common/SAP BusinessObjects Enterprise XI 4.0/win32_x86/dotnet1/crdb_adoplus.dll”或它的某一个依赖项。系统找不到指定的

2012-05-17 11:55:25 229

原创 枚举类型的初始化工具

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Ssystem.Public.Common.Util {     ///     /// 枚举对象工具类     ///     [Serializable]     publ

2012-05-08 16:17:28 305

转载 vs2005的快捷键(珍藏版)

vs2005的快捷键(珍藏版)2007/11/09 11:49 Shift+Alt+Enter: 切换全屏编辑 Ctrl+B,T / Ctrl+K,K: 切换书签开关Ctrl+B,N / Ctrl+K,N: 移动到下一书签Ctrl+B,P: 移动到上一

2007-11-22 22:16:00 238

十六进制和RGB颜色互转

颜色的十六进制和RGB格式进行相互转化 public class ColorConvert { #region [颜色:16进制转成RGB] /// /// [颜色:16进制转成RGB] /// /// 设置16进制颜色 [返回RGB] /// public static System.Drawing.Color colorHx16toRGB(string strHxColor) { try { if (strHxColor.Length == 0) {//如果为空 return System.Drawing.Color.FromArgb(0, 0, 0);//设为黑色 } else {//转换颜色 return System.Drawing.Color.FromArgb(System.Int32.Parse(strHxColor.Substring(1, 2), System.Globalization.NumberStyles.AllowHexSpecifier), System.Int32.Parse(strHxColor.Substring(3, 2), System.Globalization.NumberStyles.AllowHexSpecifier), System.Int32.Parse(strHxColor.Substring(5, 2), System.Globalization.NumberStyles.AllowHexSpecifier)); } } catch {//设为黑色 return System.Drawing.Color.FromArgb(0, 0, 0); } } public static System.Drawing.Color GetColor(string val) { val = val.Trim(); if (val.Substring(0, 1) == "#") return colorHx16toRGB(val); else return Color.FromName(val); } #endregion #region [颜色:RGB转成16进制] /// /// [颜色:RGB转成16进制] /// /// 红 int /// 绿 int /// 蓝 int /// public static string colorRGBtoHx16(int R, int G, int B) { return System.Drawing.ColorTranslator.ToHtml(System.Drawing.Color.FromArgb(R, G, B)); } #endregion }

2012-05-08

LINQ XML控制类

一个非常方便控制XML的操作类,应用了LINQ 包括XML的读写,节点的读写和添加删除等基本操作。 public class XmlOperator { #region 属性 private string _strPath = ""; /// <summary> /// 文件路径 /// Open时或者Saveas时改变 /// </summary> public string Path { get { return _strPath; } } private XmlDocument _xmlDocumentdoc = null; /// <summary> /// 获取xml对象 /// </summary> public XmlDocument xmlDocument { get { return this._xmlDocumentdoc; } } #endregion public XmlOperator() { } public XmlOperator(string strPath) { _xmlDocumentdoc = OpenXml(strPath); } #region 方法 /// <summary> /// 打开文件 /// </summary> /// <param name="strPath"></param> public void XmlOpen(string strPath) { XmlDocument xdtdoc = new XmlDocument(); xdtdoc = OpenXml(strPath); if (xdtdoc == null) throw new Exception("打开文件失败,请检查文件路径"); this._xmlDocumentdoc = xdtdoc; } public void XmlSave() { if (this._strPath == "") throw new Exception("文件路径为空或者不存在"); SaveXml(this._xmlDocumentdoc, this._strPath); } public void XmlSaveAs(string strPath) { SaveXml(this._xmlDocumentdoc, strPath); } /// <summary> /// 将xml对象转化成DataTable /// </summary> /// <returns></returns> public DataTable CoverToTable() { if (this._xmlDocumentdoc != null) { DataSet dsxml = null; using (XmlReader reader = new XmlNodeReader(this._xmlDocumentdoc.DocumentElement)) { dsxml = new DataSet(); dsxml.ReadXml(reader); reader.Close(); } if (dsxml != null) return dsxml.Tables[0]; } return null; }

2012-05-08

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除