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 { } } } }