Isabella
---- I fell upon the thorn of life, I bleed.
01 2012 档案
设置为自动启动的WindowService没有开机启动
摘要:当我们的服务依赖其他的服务才能启动时,我们需要给它添加依存关系。在你的serviceInstaller上点右键,选择属性, 设置ServicesDependedOn.当然你也可以在ProjectInstaller的InitializeComponent方法里添加代码,例子如下:this.serviceInstaller1.ServicesDependedOn = new string[] { "Eventlog", "WinMgmt","MMQ","Windows Management Instrumentation&quo 阅读全文
posted @ 2012-01-12 14:08 李昀璟 阅读(515) 评论(0) 推荐(0)
检测是否连网
摘要:To check for a network connection in .NET 2.0 use this:System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable()To monitor a change in IP address or a change in network availability, use the events from the NetworkChange class:System.Net.NetworkInformation.NetworkChange.NetworkAvailabil 阅读全文
posted @ 2012-01-03 10:20 李昀璟 阅读(255) 评论(0) 推荐(0)