Example #1
0
        private void Regist_Load(object sender, EventArgs e)
        {
            MachineCode mc = new MachineCode();
            //string a = mc.GetCpuInfo();
            string b = mc.GetHDid();
            //string c = mc.GetMoAddress();
            string d = mc.GetCpuID();
            //string ee = mc.GetHardDiskID();
            //string f = mc.GetHostName();
            string g           = mc.GetMacAddress();
            string machinecode = d + g;

            for (int i = 4; i < machinecode.Length; i += 5)
            {
                machinecode = machinecode.Insert(i, "-");
            }
            textBox8.Text = machinecode;
        }
Example #2
0
 private void Regist_Load(object sender, EventArgs e)
 {
     MachineCode mc = new MachineCode();
     //string a = mc.GetCpuInfo();
     string b = mc.GetHDid();
     //string c = mc.GetMoAddress();
     string d = mc.GetCpuID();
     //string ee = mc.GetHardDiskID();
     //string f = mc.GetHostName();
     string g = mc.GetMacAddress();
     string machinecode = d + g;
     for (int i = 4; i < machinecode.Length; i += 5)
         machinecode = machinecode.Insert(i, "-");
     textBox8.Text = machinecode;
 }