コード例 #1
0
        private void frmActivation_Load(object sender, EventArgs e)
        {
            //this.Height = 200;
            if (Properties.Settings.Default.Product_Key != "No")
            {
                serial    = HardwareOp.Identifier("win32_DiskDrive", "SerialNumber").Substring(2);
                signature = HardwareOp.Identifier("win32_DiskDrive", "Signature");

                txtProductKey.Text = KeyGeneratorOp.GetUniqueKey(5) + "-" + serial.Trim() + "-"
                                     + signature
                                     + "-" + KeyGeneratorOp.GetUniqueKey(5);

                x = KeyGeneratorOp.GetUniqueKey(5) + "-" + serial.Trim() + "-"
                    + (Convert.ToDecimal(signature) * 272 - 159).ToString()
                    + "-" + KeyGeneratorOp.GetUniqueKey(5);

                txtActivationKeys.Text = x;
            }
            else
            {
                MessageBox.Show("البرنامج مفعل");
                new frmMain().ShowDialog();
            }
        }
コード例 #2
0
 private void btnActivationKey_Click(object sender, EventArgs e)
 {
     x = txtActivationKeys.Text = KeyGeneratorOp.GetUniqueKey(5) + "-" + serial.Trim() + "-"
                                  + (Convert.ToDecimal(signature) * 272 - 159).ToString()
                                  + "-" + KeyGeneratorOp.GetUniqueKey(5);
 }