码迷,mamicode.com
首页 >  
搜索关键字:diagnostics    ( 547个结果
C# 使用WinRar命令压缩和解压缩(亲测通过)
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Diagnostics; using System.IO; public partial c...
分类:Windows程序   时间:2015-06-12 11:43:55    阅读次数:213
C#向并口设备发送指令以获取并口设备的状态
using System; using System.Diagnostics; using System.Runtime.InteropServices; using System.Text; using System.Windows.Forms; namespace PrinterMonitor { public partial class Form1 : Form { ...
分类:Windows程序   时间:2015-06-09 20:08:56    阅读次数:146
使用EventLog类写Windows事件日志
在程序中经常需要将指定的信息(包括异常信息和正常处理信息)写到日志中。在C#3.0中可以使用EventLog类将各种信息直接写入Windows日志。EventLog类在System.Diagnostics命名空间中。我们可以在“管理工具” > "事件查看器“中可以查看我们写入的Windows日志,如...
分类:Windows程序   时间:2015-06-04 19:15:17    阅读次数:155
c#记录代码运行的耗时。
System.Diagnostics.Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); // 开始监视代码运行时间 stopwatch.Stop(); // 停止监视 TimeSpan timespan = st...
分类:Windows程序   时间:2015-06-03 17:18:30    阅读次数:140
C# 通过Emgu CV 人脸检测
1、Emgu CV使用opencv人脸检测,C#使用代码(转载于Emgu CV Example):using System;using System.Collections.Generic;using System.Diagnostics;using System.Drawing;using Emg...
分类:Windows程序   时间:2015-05-31 12:20:24    阅读次数:352
总结C#获取当前路径的7种方法(转载)
总结C#获取当前路径的7种方法C#获取当前路径的方法如下:1. System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName-获取模块的完整路径。2. System.Environment.CurrentDirectory-获取...
分类:Windows程序   时间:2015-05-29 00:36:38    阅读次数:233
C#通过代码注册COM组件
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Diagnostics;using System.I...
分类:Windows程序   时间:2015-05-27 18:44:15    阅读次数:527
C# 操作电脑 关机 重启 注销 休止 休眠
// 关机 强制电脑10秒之内关机 //System.Diagnostics.Process.Start("shutdown", "-s -f -t 10");// 重启 强制电脑10秒之内关机//System.Diagnostics.Process.Start("s...
分类:Windows程序   时间:2015-05-26 12:23:30    阅读次数:230
[C#]只能运行程序的一个实例
C#实现只能运行程序的一个实例(添加在窗体的Load事件中)1.根据进行名限制只能运行程序的一个实例System.Diagnostics.Processprocess=System.Diagnostics.Process.GetCurrentProcess(); System.Diagnostics.Process[]processList=System.Diagnostics.Process.GetProcessesByNa..
分类:Windows程序   时间:2015-05-25 06:19:48    阅读次数:174
C#获取当前路径的方法如下
1. System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName-获取模块的完整路径。2. System.Environment.CurrentDirectory-获取和设置当前目录(该进程从中启动的目录)的完全限定目录。3....
分类:Windows程序   时间:2015-05-23 11:21:10    阅读次数:128
547条   上一页 1 ... 32 33 34 35 36 ... 55 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!