您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

46 行
1.2 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using Learun.Util;
  10. namespace Quanjiang.DigitalScholl.License
  11. {
  12. public partial class Form1 : Form
  13. {
  14. public Form1()
  15. {
  16. InitializeComponent();
  17. }
  18. private void Form1_Load(object sender, EventArgs e)
  19. {
  20. }
  21. private void btgenerate_Click(object sender, EventArgs e)
  22. {
  23. StringBuilder machinelic =new StringBuilder();
  24. if (tbmachine.Text!="")
  25. {
  26. machinelic.Append(Md5Helper.Encrypt(tbmachine.Text,16));
  27. machinelic.Append("&");
  28. if (cbenabledtp.Checked)
  29. {
  30. machinelic.Append(dtpenddate.Value.ToString("yyyy-MM-dd"));
  31. }
  32. string desstr = DESEncrypt.Encrypt(machinelic.ToString(), "bjquanjiang@2020!@lckey" + Md5Helper.Encrypt(tbmachine.Text, 32));
  33. tblicensecode.Text = desstr;
  34. }
  35. else
  36. {
  37. MessageBox.Show("请填写机器码");
  38. }
  39. }
  40. }
  41. }