随笔分类 -  c#高级

c# 朗读文字
摘要:添加引用 System.Speech try { SpeechRecognitionEngine recEngine = new SpeechRecognitionEngine(); SpeechSynthesizer speech = new SpeechSynthesizer(); speech 阅读全文

posted @ 2020-08-03 09:53 mol1995 阅读(571) 评论(0) 推荐(0)

外部sysListView32内容获取及设置选中状态
摘要:public void SetLisSelected(IntPtr listView,List<string> fcusers) { //该listview总行数 int rowcnt = API.SendMessage(listView, API.LVM_GETITEMCOUNT, 0, 0); 阅读全文

posted @ 2020-02-06 20:17 mol1995 阅读(3643) 评论(1) 推荐(0)

c#获取外部程序ListView的值或TreeView的值
摘要:https://blog.csdn.net/taotaohuoli/article/details/45913099 阅读全文

posted @ 2020-02-03 13:39 mol1995 阅读(241) 评论(0) 推荐(0)

自定义条件判断两对象相等Equals的方法
摘要:自定义两对象是否相等方法,必须用到GetHashCode方法,如 public class AirspaceCompareByUUID : IEqualityComparer<AIRSPACE_TS> { public bool Equals(AIRSPACE_TS x, AIRSPACE_TS y 阅读全文

posted @ 2018-06-09 19:07 mol1995 阅读(593) 评论(0) 推荐(0)

2016.10.17监控本程序占用内存情况
摘要:string ccs = string.Format("共用内存:{0}M", GC.GetTotalMemory(true) / 1024 / 1024); 阅读全文

posted @ 2016-10-17 15:32 mol1995 阅读(205) 评论(0) 推荐(0)

2013-10-5服务的启动和调试
摘要:服务的启动: cmd cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ installutil 路径.exe 服务的注销: installutil /u 路径.exe 调用服务程序目录,请用System.AppDomain.CurrentDomain 阅读全文

posted @ 2016-10-17 14:25 mol1995 阅读(154) 评论(0) 推荐(0)

2012-2-7列举及终止进程
摘要:1、匹配完整进程名: System.Diagnostics.Process[] ps = System.Diagnostics.Process.GetProcessesByName("MSACCESS"); while (ps.Length > 0) { ps[0].Kill(); System.T 阅读全文

posted @ 2016-10-15 18:49 mol1995 阅读(180) 评论(0) 推荐(0)

2014.2.27合并图像
摘要:public byte[] TransPIc(string picpath) //将图片统一大小并转为byte { Image imgPhoto = Image.FromFile(picpath); int oldx = imgPhoto.Width; int oldy = imgPhoto.Hei 阅读全文

posted @ 2016-10-15 18:35 mol1995 阅读(278) 评论(0) 推荐(0)

2014.3.3 图像旋转方法
摘要:方法一、利用命令行调用外部程序jpegr.exe 该方法效果最好,弊端是需要外带程序 Command Line JPEG Lossless Rotator allows you to use command line for image transformation. The command for 阅读全文

posted @ 2016-10-15 18:33 mol1995 阅读(352) 评论(0) 推荐(0)

2016.5.12 用PowerDesigner做数据库逆向工程及生成实体类
摘要:一、创建数据库物理模型 1、首先打开PowerDesigner—文件—逆向工程—数据库 2、在弹出窗口中选择数据库版本,最高10g选择,确定 3、创建数据源 4、点击SetUP...设置数据源 5、填写数据库实例名 6、填写用户名,密码点击connect 7、连接成功后点确定,即可生成物理模型。 二 阅读全文

posted @ 2016-10-15 18:10 mol1995 阅读(3271) 评论(0) 推荐(0)

2016.5.23 用反射技术为实体类变量赋值、取值
摘要:clobj是任意一个数据库表对应的实体类空白实例 TERMINAL_PRO clobj= new TERMINAL_PRO(); DataRow row = dtt.Rows[0]; Type t = clobj.GetType(); foreach (PropertyInfo pi in t.Ge 阅读全文

posted @ 2016-10-15 18:10 mol1995 阅读(1107) 评论(0) 推荐(0)

2016.2.24 利用用户控件和委托完美解决快速选择txbbox
摘要:1、首先将tet_box和一个datagridview控件打包成用户控件uC_QuickTxtBox 2、在用户控件中定义执行主窗口的委托函数 3、主窗体中添加用户控件的load事件,赋值 uC_QuickTxtBox1.qrytp = 1; //定义此实例将进行点、线或机场的哪种查询 uC_Qui 阅读全文

posted @ 2016-10-15 17:53 mol1995 阅读(340) 评论(0) 推荐(0)

导航