private void SoftwareActivation_Shown(object sender, EventArgs e) { string Activation_Key = ""; //***********If alrady active and Activate=true then only show local server connection********** if (OnlineActivationTools.IsValidLicenseDate(out Activation_Key)) { string[] key = Activation_Key.Split('-'); try { txtKey1.Text = key[0]; txtKey2.Text = key[1]; txtKey3.Text = key[2]; txtKey4.Text = key[3]; txtKey1.Enabled = false; txtKey2.Enabled = false; txtKey3.Enabled = false; txtKey4.Enabled = false; btnActivated.Enabled = false; linkLabel1.Enabled = false; } catch (Exception) { } Cursor = Cursors.WaitCursor; AppServerConfigWIndow FRMAppServer = new AppServerConfigWIndow(mKey); FRMAppServer.OnClose += FRMAppServer_OnClose; FRMAppServer.ShowDialog(); Cursor = Cursors.Default; } }
private void Orgfrm_OnClose(string arg1, string arg2, string arg3) { //*********************Org Details********************** mOrg_Name = arg1; mOrg_ContectNo = arg2; mOrg_Email = arg3; //******Static Method Store Variable data*************** OnlineOrgTools.gOrgName = mOrg_Name; OnlineOrgTools.gOrgContectNo = mOrg_ContectNo; OnlineOrgTools.gOrgEmail = mOrg_Email; //********************FIRS ONLINE ACTIVATION************* if (OnlineActivationTools.IsOnlineActivation(mKey, mOrg_Name, mOrg_ContectNo, mOrg_Email, "Remarks")) { linkLabel1.Enabled = false; //*******************set Registry*********************** RegistrySetSetting(); //*************SQL Server Connection********************* if (_IsSuccess) { Cursor = Cursors.WaitCursor; AppServerConfigWIndow FRMAppServer = new AppServerConfigWIndow(mKey); FRMAppServer.OnClose += FRMAppServer_OnClose; FRMAppServer.ShowDialog(); Cursor = Cursors.Default; } } else { DesktopNotify("Already Activated.", ToolTipIcon.Warning); } }
private void GoForActivation() { if (!CheckInternetconnection.CheckForInternetConnection()) { pnlNetConnection.BringToFront(); pnlNetConnection.Visible = true; timer1.Start(); return; } else { pnlNetConnection.SendToBack(); pnlNetConnection.Visible = false; //******************Open Organization Details************** if (OnlineActivationTools.IsValidKey(mKey)) { if (!OnlineActivationTools.IsEmailNull(mKey)) { OrgDetailsWindow orgfrm = new OrgDetailsWindow(mKey); orgfrm.OnClose += Orgfrm_OnClose; orgfrm.ShowDialog(); } else { Orgfrm_OnClose("", "", ""); } } else { MessageBox.Show("Please enter a valid serial key.", "Invalid Key", MessageBoxButtons.OK, MessageBoxIcon.Warning); DesktopNotify("Invalid Key\nPlease enter a valid key.", ToolTipIcon.Warning); btnActivated.Enabled = true; } } }