2019年1月21日

摘要: 实现效果: 知识运用: EventLog类的Source属性和WriteEntry方法 实现代码: 阅读全文

posted @ 2019-01-21 20:22 努力成长静待花开 阅读(180) 评论(0) 推荐(0) 编辑

摘要: 实现效果: 知识运用: EventLog类的SourceExists CreateEventSource方法 public static bool SourceExists (string source) //在计算机的注册表中搜索给定的事件源 public static void CreateEv 阅读全文

posted @ 2019-01-21 19:43 努力成长静待花开 阅读(338) 评论(0) 推荐(0) 编辑

摘要: 实现效果: 知识运用: EventLog类的Log属性 Entries属性 EventLogEntryCollection类的Count属性 及 EventLogEntry类的相关属性 实现代码: 阅读全文

posted @ 2019-01-21 19:14 努力成长静待花开 阅读(635) 评论(0) 推荐(0) 编辑

摘要: 实现效果: 知识运用: EventLog类的Log属性 Entries属性 EventLogEntryCollection类的Count属性 及 EventLogEntry类的相关属性 实现代码: 阅读全文

posted @ 2019-01-21 18:37 努力成长静待花开 阅读(227) 评论(0) 推荐(0) 编辑

摘要: 实现效果: 知识运用: EventLog类的Log属性 Entries属性 //获取或设置读取或写入的日志名称 public string Log ( get; set;) //属性值: 日志的名称 Application System 和 Security或其他自定义 默认为(“”); publi 阅读全文

posted @ 2019-01-21 17:59 努力成长静待花开 阅读(739) 评论(0) 推荐(0) 编辑

摘要: 实现效果: 知识运用: WindowsPrincipal类的IsInRole方法 //确定当前主体是否属于制定的Windows用户组 public virtual bool IsInRole (WindowsBuiltInRole role) //属性为枚举值之一 实现代码: 阅读全文

posted @ 2019-01-21 16:29 努力成长静待花开 阅读(1076) 评论(0) 推荐(0) 编辑

摘要: 实现效果: 知识运用: Environment类的UserName属性 //获取已登陆Windows的人员的用户名 public static string UserName ( get; ) 实现代码: 阅读全文

posted @ 2019-01-21 15:52 努力成长静待花开 阅读(241) 评论(0) 推荐(0) 编辑

摘要: 实现效果: 知识运用: ManagementObjectSearch类和ManagementObject类 实现代码: 阅读全文

posted @ 2019-01-21 15:44 努力成长静待花开 阅读(402) 评论(0) 推荐(0) 编辑

摘要: 实现效果: 阅读全文

posted @ 2019-01-21 15:29 努力成长静待花开 阅读(177) 评论(0) 推荐(0) 编辑

摘要: 实现效果: 知识运用: Application类的ExecutablePath属性 //获取启动了应用程序的可执行文件的路径和可执行文件的名称 public static string ExecutablePath ( get;); 实现代码: 阅读全文

posted @ 2019-01-21 13:56 努力成长静待花开 阅读(334) 评论(0) 推荐(0) 编辑

摘要: 实现效果: 知识运用: Environment类的GetFolderPath方法 //获取指向由枚举标识的系统特殊文件夹的路径 public static string GetFolderPath (Environment.SpecialFolder folder) 实现代码: 阅读全文

posted @ 2019-01-21 12:00 努力成长静待花开 阅读(214) 评论(0) 推荐(0) 编辑

摘要: 实现效果: 知识运用: PowerStatus类的PowerLineStatus属性 //该类指示当前的系统电源状态信息 public PowerLineStatus PowerLineStatus { get; } //属性值:PowerLineStatus枚举值之一 指示当前系统电源状态 实现代 阅读全文

posted @ 2019-01-21 00:05 努力成长静待花开 阅读(360) 评论(0) 推荐(0) 编辑