Пример #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            string expDate;
            string serialNo     = textBox1.Text;
            string reportNumber = textBox2.Text;

            if (checkBox1.Checked)
            {
                expDate = "99999999";
            }
            else
            {
                expDate = dateTimePicker1.Value.ToString("yyyyMMdd");
            }

            string license = LicenseTool.GenerateLisense(expDate, serialNo, reportNumber);

            //加密
            textBox3.AppendText(license + "\r\n");

            //解密

            LicenseTool.AnalyzeLisense(license, serialNo, out expDate, out reportNumber);
            textBox3.AppendText("有效期至:" + expDate + "\r\n");
            textBox3.AppendText("报表数:" + reportNumber + "\r\n");
        }
Пример #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     textBox1.Text = LicenseTool.GetMacByNetworkInterface();
 }