This price is for resource organization, does not provide any technical support, and does not include installation. Don’t buy it if you are new to it!
The source code is only for research and learning code, illegal and commercial purposes are strictly prohibited! If you need commercial use, please purchase the official source code!
Only suitable for veterans and technical masters! No refunds will be given after shipment!
[Source code introduction]
You can send it to me directly by email and I will send it to you.
free
[Source code screenshot]
[Source code example]
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.IO;using My.License.Reg;namespace My.License.Demo{ public partial class Form1 : Form { public static int CheckRule = My.Framework.ConvertHelper.ToInt(My.Framework.Sys.SysConfig.GetAppSetting("CheckRule")); public Form1() { InitializeComponent() ; } #region authorization processing private bool isHasLicense = false; //Whether there is a license, the default is False #region whether there is a permission code and it is correct /// /// whether there is a permission code and it is correct /// < /summary> /// public bool IsHasCode(ref string errorMsg) { string error = string.Empty; try { //2017-12-12 No software system and version number authorization //isHasLicense = My .License.BizHelper.LicenseCheck.Instance.CheckLicense(ref errorMsg); //2017-12-12 No software system and version number authorization//2017-12-12 Software system and version number authorization isHasLicense = My.License.BizHelper .LicenseCheck.Instance.CheckLicense(ref errorMsg, new SoftInfo()); //2017-12-12 There is software system and version number authorization} catch (Exception ex) { error = ex.Message; isHasLicense = false; } return isHasLicense ; } #endregion #region Get the relevant License.xml file /// /// Whether the permission code is correct and /// /// public bool HasLicenseFile() { bool isHasLicenseXML = false; string error = string.Empty; try { string licenseXMLFilePath = My.Framework.FileHelper.GetApplicationPath() "\License.xml"; string[] tempArry = licenseXMLFilePath.Split('\');/ /MachineCode int fileNameLength = tempArry[tempArry.Length - 1].Length; string dir = licenseXMLFilePath.Substring(0, licenseXMLFilePath.Length - fileNameLength - 1); if (Directory.Exists(dir)) { if (File.Exists( licenseXMLFilePath)) { //string licenseCheckStr = MyLicense.Interface.ComputerInfoHelper.GetLicenseCheckStr(MyLicense.Interface.ComputerInfoHelper.GetCheckKey(), MachineCode, string.Empty); string licenseLscFilePath = My.Framework.FileHelper.GetApplicationPath() "\" MachineCode ".lsc"; isHasLicenseXML = (File.Exists(licenseLscFilePath)); } } } catch (Exception ex) { error = ex.Message; isHasLicenseXML = false; } return isHasLicenseXML; } #endregion #region License authorized/ // /// The license has been authorized /// public bool LicenseIsOK { get { return isHasLicense; } } #endregion #region The license has been authorized /// /// The license has been granted Authorization/// public string MachineCode { get { return My.License.BizHelper.LicenseCheck.Instance.GetIMEI;//return machine code string } } #endregion private void Form1_Load(object sender, EventArgs e) { string errorMsg = string.Empty; if (IsHasCode(ref errorMsg) == false || HasLicenseFile() == false) { //this.Close(); //Application.Run(new LicenseImport()); this.Hide() ; LicenseImport licenseFrm = new LicenseImport(); licenseFrm.Owner = this; licenseFrm.ShowDialog(); } else { string mgs = string.Empty; MessageBox.Show("OK"); } } #endregion }}