随笔分类 - C#
摘要:demo
阅读全文
摘要:详情见dome
阅读全文
摘要:1.安装URL REWRITE2 "伪静态模块" 2.
阅读全文
摘要:1.解析密钥 2.导出私钥字符串格式 3.不可解密的方式加密 4.普通的加密方式 5.普通的解密方式
阅读全文
摘要:string responseStr = null; string boundary = "----------------------" + DateTime.Now.Ticks.ToString("x"); byte[] boundarybytes...
阅读全文
摘要:下载CLR Profiler:http://search.microsoft.com/en-us/DownloadResults.aspx?q=clr%20profiler转载来源:http://www.cnblogs.com/zhaoblogs/archive/2012/11/02/2752015.html
阅读全文
摘要:/// <summary> /// SFTP文件上传下载 /// </summary> public class SFtp { /// <summary> /// http://www.example-code.com/csharp/sftp_readDir.asp /// </summary> Chilkat.SFtp sftp = new Chilkat.SFtp(); /// <summary> /// 连接 /// </summary> /// <...
阅读全文
摘要:/// <summary> /// Excel导出写入 /// </summary> public class ExcelHelper { /// <summary> /// 当前行号【从0开始】 /// </summary> public int rowIndex = 0; /// <summary> /// Excel实例 /// </summary> private Workbook book = null; /// <summary>...
阅读全文
摘要:public class SharpZipHelper { /// <summary> /// 压缩率:0-9 /// </summary> private int compressionLevel = 5; private byte[] buffer = new byte[2048]; /// <summary> /// 压缩文件 /// </summary> /// <param name="fileToZip">要压缩的文件路径</param...
阅读全文
摘要://准备序化列对象 XmlSerializer xs = new XmlSerializer(obj.GetType()); MemoryStream ms = new MemoryStream(); //设置序序化XML格式 XmlWriterSettings xws = new XmlWriterSettings(); xws.Indent = true; xws.OmitXml...
阅读全文
摘要://写windows日志 if (!System.Diagnostics.EventLog.SourceExists("项目1")) { System.Diagnostics.EventLog.CreateEventSource("项目1", "mylog"); } System.Diagnostics.EventLog eventLog = new System....
阅读全文
摘要:1.新建类库,添加引用:System.EnterpriseServices;2.继承ServicedComponent/// <summary> /// Com+ 事件处理 /// </summary> [Transaction(TransactionOption.Required)] public class clsES:ServicedComponent { public void dbAccess(int pid,float nScore) { System.Data.SqlClient.SqlConnection conn; ...
阅读全文
摘要://需要添加引用 Microsoft.Office.Interop.Word public class WordHelp { Microsoft.Office.Interop.Word.Application oWordApp; Microsoft.Office.Interop.Word.Document oWordDoc; object oMissing = System.Reflection.Missing.Value; /// <summary> /// 加载文档 /// </summary> ...
阅读全文
摘要:private void gridView1_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e) { e.Appearance.TextOptions.HAlignment=DevExpress.Utils.HorzAlignment.Far; if (e.Info.IsRowIndicator) { ...
阅读全文
摘要://需要有调用窗体注册:KeyDown事件且属性:KeyPreview=true #region 条件处理 BarCodeHook barCodeHook = null; private void MIE_MainFrom_KeyDown(object sender, KeyEventArgs e) { if (barCodeHook == null) { barCodeHook = new BarCodeHook(); barCodeHook...
阅读全文
posted @ 2012-12-06 13:49
csdnbbs

浙公网安备 33010602011771号