文档介绍:C#;using;ponentModel;;;;using;;;;;(objectsender,EventArgse){;#region刷新服务watch=;foreach(ServiceControllertempinwatch){try{stringservepath="";ListViewItemlv=newListViewItem(;;#(=="Stopped"){"已停止");}elseif(=="Running"){"正在运行");}else{"已暂停");}#endregion#{RegistryKeyhklmrun1=;RegistryKeyhklmrun2=(@"system\currentcontrolset\services\"+;stringregs=("start").ToString();if(regs=="3"){"手动");}elseif(regs=="4"){"已禁用");}elseif(regs=="2"){"自动");}elseif(regs=="0"){"自动");}else{"未知");}}catch{}#endregion#{RegistryKeyhklmrun1=;RegistryKeyhklmrun2=(@"system\currentcontrolset\services\"+;stringregs=("Description").ToString();;}catch{"");}#endregion#{RegistryKeyhklmrun1=;RegistryKeyhklmrun2=(@"system\currentcontrolset\services\"+;servepath=("ImagePath").ToString();;}catch{"");}#endregion#="";try{FileVersionInfofinfo=(***@servepath);fileinfo=panyName;;}catch{"");}if(fileinfo!="MicrosoftCorporation"&&fileinfo!=""){=;}#endregion;}catch{}}#="当前服务:"++"项";}(objectsender,EventArgse){;#region刷新服务watch=;foreach(ServiceControllertempinwatch){#regionforeachtry{stringserverrunning="";serverrunning=;if(serverrunning=="Running"){try{stringservepath="";ListViewItemlv=newListViewItem(;;#(=="Stopped"){"已停止");}elseif(=="Running"){"正在运行");}else{"已暂停");}#endregion#{RegistryKeyhklmrun1=;RegistryKeyhklmrun2=(@"system\currentcontro