public XtraForm1() { InitializeComponent(); //windowsUIView1_QueryControl += windowsUIView1_QueryControl(); // This line of code is generated by Data Source Configuration Wizard treeList1.OptionsBehavior.Editable = false; treeList1.OptionsView.ShowColumns = false; treeList1.OptionsView.ShowIndicator = false; treeList1.OptionsView.ShowHorzLines = false; treeList1.OptionsView.ShowVertLines = false; //MenuSettings(false); IPCAUI.License.CheckLicense chkLicense = new License.CheckLicense(); if (!chkLicense.IsLicenseExists()) { IPCAUI.Models.LicenseBehaviour.LockEntries = true; MessageBox.Show("You do not have a valid License! \n Please activate your License. \n Some of the features may not work correctly. \n Thank you.", "IPCA Software Solutions",MessageBoxButtons.OKCancel,MessageBoxIcon.Information); } else { chkLicense.SetLicensetoApplication(); //Master.Visible = LicenseBehaviour.EnableMaster; //Reports.Visible = LicenseBehaviour.EnableReports; //Transactions.Visible = LicenseBehaviour.EnableTransaction; } //lblDay.Text = DateTime.Today.DayOfWeek.ToString(); //lblDate.Text = DateTime.Now.ToShortDateString(); }
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); } }