public int CheckNetworkLicense() { //配置xml路径 NetAuthorization.m_sNetAuthorizationXml = Application.StartupPath + @"\LicenseServer.xml"; //读取服务器信息 NetAuthorization.ReadServerInfo(); //执行验证 bool bSucceed = NetAuthorization.CheckNetworkLicense(); if (bSucceed) { return(1); } else { AccountForm acFroom = new AccountForm(); if (acFroom.ShowDialog() == DialogResult.OK) { return(0); } else { return(-1); } } }
private void btnOK_Click(object sender, EventArgs e) { NetAuthorization.UpdateServerInfo(te_KeyserviceIP.Text.Trim(), te_Port.Text.Trim(), te_Pwd.Text.Trim()); this.DialogResult = DialogResult.OK; }