此為資源整理價格,不提供任何技術支持,不包安裝。新手不要買!
原始碼僅供研究學習程式碼使用,嚴禁用於非法和商業用途!如需商業用途請去購買官方正版源碼!
只適用於老手和技術大神!出貨後謝絕退款行為!
【原始碼介紹】
可直接寄信箱給我,我寄給你
免費
【原始碼截圖】
【原始碼範例】
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(Compon) { InitiForm1(Component) ; } #region 授權處理private bool isHasLicense = false;//是否已有許可證,預設為False #region 是否有權限碼且正確/// /// 是否有權限碼且正確/// < /summary> /// public bool IsHasCode(ref string errorMsg) { string error = string.Empty; try { //2017-12-12 無軟體系統及版本編號授權//isHasLicense = My .License.BizHelper.LicenseCheck.Instance.CheckLicense(ref errorMsg); //2017-12-12 無軟體系統及版本號授權//2017-12-12 有軟體系統及版本號授權isHasLicense = My.License.BizHelpericense .LicenseCheck.Instance.CheckLicense(ref errorMsg, new SoftInfo()); //2017-12-12 有軟體系統及版本號授權} catch (Exception ex) { error = ex.Message; isHasLicense = falsese; ; } #endregion #region 取得相關License.xml檔/// /// 是否有權限碼且正確/// /// public bool HasLicenseFile() { bool isHasLicenseXML = false; string error = string.Empty; try { string licenseXMLFilePath = My.Framework.FileHelper.GetApplicationPath() "\License.xml"; string[] tempArry = licenseXMLPath.'); /MachineCode int fileNameLength = tempArry[tempArry.Length - 1].Length; string dir = licenseXMLFilePath.Substring(0, licenseXMLFilePath.Length - fileNameLength - 1); if (Directory.Existf)( licenseXMLFilePath)) { //string licenseCheckStr = MyLicense.Interface.ComputerInfoHelper.GetLicenseCheckStr(MyLicense.Interface.ComputerInfoHelper.GetCheckKey(), MachineCode, string.Empty); string licenseLscFilePath = My.Framework. MachineCode ".lsc"; isHasLicenseXML = (File.Exists(licenseLscFilePath)); } } } catch (Exception ex) { error = ex.Message; isHasLicenseXML = false; } return isHasLicenseXML }; // /// 授權已授權/// public bool LicenseIsOK { get { return isHasLicense; } } #endregion #region 授權已授權/// /// 授權已授權/// public string MachineCode { get { return My.License.BizHelper.LicenseCheck.Instance.GetIMEI;//回傳機器碼字串} } #endregion private void Form1_Load(object sender, string esgor) string = 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 }}