private void rbtnClient_CheckedChanged(object sender, EventArgs e) { if (rbtnClient.Checked) { MachineValue = "0"; if (MessageBox.Show("Are you sure that you want to connected Client machine With Server ", "DATABASE CONNECTION", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { NewFolderCreate_mdfFileMove(); ServerManagement newServer = new ServerManagement(); newServer.OnClose += NewServer_OnClose; newServer.ShowDialog(); } } }
public static bool IsActivatedStatus() { Cursor.Current = Cursors.WaitCursor; //****************** Date Update From Online Server to Offline server********************************************************* DateUpdateFromOnlineServer(); //******************activation check********************************************************* #region Full if (RegEdit.ReadSubkeyAppsPremiumValue() == true)//==true,Because its nullable value return { if (SoftwareLicenceTools.IsValidSerialKey()) { //Server connection test only Full Version Software if (RegEdit.ReadSubkeyMachineValue() == 1) { #region Server if (SoftwareLicenceTools.IsValidLicenseDate()) { if (SoftwareLicenceTools.UpdateCurrentDate(DateTime.Now)) { return(true); } else { MessageBox.Show("System Date Is not Recognized, Please Contect Service Provider", "DAPPRO licence", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); } } else { if (MessageBox.Show("Application licence is expire are you activate your application ?", "DAPPRO licence", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) { SoftwareActivation frm = new SoftwareActivation(); frm.ShowDialog(); } else { Application.Exit(); } } } #endregion else if (RegEdit.ReadSubkeyMachineValue() == 0) { #region Client if (SoftwareLicenceTools.TestServerConnection()) { if (SoftwareLicenceTools.IsValidLicenseDate()) { return(true); } else { if (MessageBox.Show("Application licence is expire are you activate your application ?", "DAPPRO licence", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) { SoftwareActivation frm = new SoftwareActivation(); frm.ShowDialog(); } else { Application.Exit(); } } } else { ServerManagement frmTestServer = new ServerManagement(); frmTestServer.OnClose += FrmTestServer_OnClose; frmTestServer.ShowDialog(); } #endregion } else { SoftwareActivation frm = new SoftwareActivation(); frm.ShowDialog(); } } else { SoftwareActivation frm = new SoftwareActivation(); frm.ShowDialog(); } } #endregion #region Trail else if (RegEdit.ReadSubkeyAppsPremiumValue() == false) { if (SoftwareLicenceTools.IsValidLicenseDate()) { if (SoftwareLicenceTools.UpdateCurrentDate(DateTime.Now)) { return(true); } else { MessageBox.Show("System Date Is not Recognized, Please Contect Service Provider", "DAPPRO licence", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); } } else { if (MessageBox.Show("Application licence is expire are you activate your application ?", "DAPPRO licence", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) { SoftwareActivation frm = new SoftwareActivation(); frm.ShowDialog(); } else { Application.Exit(); } } } #endregion #region FirstTime else { SoftwareActivation frm = new SoftwareActivation(); frm.ShowDialog(); } #endregion return(false); Cursor.Current = Cursors.Default; }