예제 #1
0
파일: frmMain.cs 프로젝트: mezeus/IPCAXprs
        private void frmMain_Shown(object sender, EventArgs e)
        {
            CheckLicense c = new CheckLicense();

            _certPubicKeyData = c.ActivateLicense();
            if (!c.IsLicenseExists())
            {
                //_certPubicKeyData = c.ActivateLicense();

                using (frmActivation frm = new frmActivation())
                {
                    frm.CertificatePublicKeyData = _certPubicKeyData;
                    frm.ShowDialog();

                    //Exit the application after activation to reload the license file
                    //Actually it is not nessessary, you may just call the API to reload the license file
                    //Here just simplied the demo process
                }
            }
            else
            {
                MyLicense _lic = c.GetLicense(_certPubicKeyData);
                licInfo.ShowLicenseInfo(_lic);
            }
        }
예제 #2
0
 private void tileItem1_ItemClick(object sender, TileItemEventArgs e)
 {
     License.frmActivation frm = new License.frmActivation();
     frm.ShowDialog();
 }