Beispiel #1
0
        /// <summary>
        /// 生成机器码
        /// </summary>
        /// <returns>机器码</returns>
        public static string GetMNum()
        {
            string strNum  = ManagementHelper.Instance().CpuID + ManagementHelper.Instance().DiskVolume; //获得24位Cpu和硬盘序列号
            string strMNum = strNum.Substring(0, 24);                                                    //从生成的字符串中取出前24个字符做为机器码

            return(strMNum);
        }
Beispiel #2
0
 /// <summary>
 /// 执行
 /// </summary>
 /// <returns></returns>
 public static ManagementHelper Instance()
 {
     if (FInstance == null)
     {
         FInstance = new ManagementHelper();
     }
     return(FInstance);
 }