| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Management;
- using System.Text;
- using System.Windows.Forms;
- using Dongke.IBOSS.PRD.Basics.Library;
- namespace Dongke.IBOSS.PRD.WCF.Hosting
- {
- public partial class F_LicCode : Form
- {
- public F_LicCode(string sid)
- {
- InitializeComponent();
- try
- {
- this.textBox1.Text = Encryption.EncryptDES(this.UUID + "_" + sid, sid);
- }
- catch
- {
- }
- }
- public string UUID
- {
- get
- {
- try
- {
- string code = null;
- SelectQuery query = new SelectQuery("select * from Win32_ComputerSystemProduct");
- using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(query))
- {
- foreach (var item in searcher.Get())
- {
- using (item)
- {
- code = item["UUID"].ToString();
- }
- }
- }
- return code;
- }
- catch
- {
- return null;
- }
- }
- }
- private void btnClose_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- private void btnCopy_Click(object sender, EventArgs e)
- {
- try
- {
- Clipboard.SetText(this.textBox1.Text);
- }
- catch
- {
- }
- }
- }
- }
|