随笔分类 -  csharp

code with c#
摘要:using System.IO; //导出到execl public void Excel(DataGridView dgv) { SaveFileDialog saveFileDialog = new SaveFileDialog(); saveFileDialog.Filter = "Execl files (*.xls)|*.xls"; saveFileDialog.FilterIndex = 0; saveFileDialog.RestoreDirecto... 阅读全文
posted @ 2012-08-26 13:34 一棍打出屁 阅读(1096) 评论(0) 推荐(0)
摘要:using System.Runtime.InteropServices; #region [操作ini文件] [DllImport("kernel32")] private static extern bool WritePrivateProfileString(string section, string key, string val, string filePath); //section:ini文件中的段落;key:ini文件中的关键字;val:ini文件中关键字的数值;filepath:ini文件的完整的路径和名称 ... 阅读全文
posted @ 2012-08-26 13:32 一棍打出屁 阅读(184) 评论(0) 推荐(0)
摘要:using System.Security.Cryptography; public class DESEncrypt { #region ========加密======== /// <summary> /// 加密 /// </summary> /// <param name="Text"></param> /// <returns></returns> public static string Encrypt... 阅读全文
posted @ 2012-08-26 13:30 一棍打出屁 阅读(268) 评论(0) 推荐(0)
摘要:using System.Reflection; bool exist = false; //实体对象 object myResult = null; int _index = path.IndexOf("Combine"); foreach (object obj in objList) { if ((obj as RdoObject).rosPath == path) { ... 阅读全文
posted @ 2012-08-26 13:28 一棍打出屁 阅读(241) 评论(0) 推荐(0)
摘要:string parmes = ""; Process w = new Process(); //指定 调用程序的路径 w.StartInfo.FileName = Application.StartupPath + @"\xmlpkg.exe"; w.StartInfo.UseShellExecu 阅读全文
posted @ 2012-08-26 13:02 一棍打出屁 阅读(1164) 评论(0) 推荐(0)