public static LicenseCheckResult CheckLicense() { LicenseCheckResult result = new LicenseCheckResult(); string license = MyConstants.License; if (!string.IsNullOrEmpty(license)) { LicenseCheckResult result2; try { string[] strArray = Base64Util.Decrypt(MD5Util.RemoveMD5Profix(license)).Split(new char[] { '|' }); if (strArray.Length < 4) { return result; } string str3 = strArray[0]; if (str3.ToLower() == "whc.pager") { result.IsValided = true; } result.Username = strArray[1]; result.CompanyName = strArray[2]; try { result.DisplayCopyright = Convert.ToBoolean(strArray[3]); } catch { result.DisplayCopyright = true; } result2 = result; } catch { } return result2; } return result; }
private void WinGridView_Load(object sender, EventArgs e) { if (!this.DesignMode) { LicenseCheckResult result = LicenseTool.CheckLicense(); if (result.IsValided) { } this.contextMenuStrip1.Opening += new CancelEventHandler(contextMenuStrip1_Opening); this.gridControl1.MouseClick += new MouseEventHandler(dataGridView1_MouseClick); this.gridControl1.MouseDoubleClick += new MouseEventHandler(dataGridView1_MouseDoubleClick); this.gridView1.Appearance.EvenRow.BackColor = EventRowBackColor; //设置菜单的别名 this.menu_Add.Text = AddMenuText; this.menu_Edit.Text = EditMenuText; this.menu_Delete.Text = DeleteMenuText; this.menu_Refresh.Text = RefreshMenuText; //实现多语言的处理代码 LanguageHelper.InitLanguage(this); } }