private void LicenceValidation()
 {
     try
     {
         new Thread(() =>
         {
             if (btnActivate.Label == activate)
             {
                 Activate();
             }
             else if (btnActivate.Label == start)
             {
                 StartLicenseValidation();
             }
             else if (btnActivate.Label == validateLicense)
             {
                 StartLicenseValidation();
             }
         }).Start();
     }
     catch (Exception ex)
     {
         GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
     }
 }
        protected void OnBtnActivateClicked(object sender, EventArgs e)
        {
            try
            {
                new Thread(() =>
                {
                    if (btnActivate.Label == activate)
                    {
                        Activate();
                    }
                    else if (btnActivate.Label == start)
                    {
                        StartLicenseValidation();
                    }
                    else if (btnActivate.Label == validateLicense)
                    {
                        StartLicenseValidation();
                    }

                    if (status == "active")
                    {
                        AddToLogs("License Validated, Please click on Start LD Button");
                        Gtk.Application.Invoke((delegate
                        {
                            btnActivate.Visible = false;
                            btnStart.Visible = true;
                        }));
                    }
                }).Start();
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
            }
        }
 public void AddToLogs(string log)
 {
     try{
         Gtk.Application.Invoke(delegate {
             //txtViewLicenseLogger.Buffer.Text += log+"\n";
         });
     }
     catch (Exception ex)
     {
         GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
     }
 }
 private void OpenFrmMain()
 {
     try
     {
         PinDominator.MainWindow frmwinMain = new PinDominator.MainWindow();
         frmwinMain.Show();
         this.Hide();
     }
     catch (Exception ex)
     {
         GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
     }
 }
 private void EnableControls()
 {
     try
     {
         txtEmail.Sensitive         = true;
         txtPassword.Sensitive      = true;
         txtUserName.Sensitive      = true;
         txtTransactionID.Sensitive = true;
         cmb_LicType.Sensitive      = false;
     }
     catch (Exception ex)
     {
         GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
     }
 }
        public frmLicensing() :
            base(Gtk.WindowType.Toplevel)
        {
            this.Build();

            Gdk.Color fontcolor = new Gdk.Color(255, 255, 255);
            lblUser.ModifyFg(StateType.Normal, fontcolor);
            lblPasswword.ModifyFg(StateType.Normal, fontcolor);
            lblEmail.ModifyFg(StateType.Normal, fontcolor);
            lblTransactionID.ModifyFg(StateType.Normal, fontcolor);
            lblstatus.ModifyFg(StateType.Normal, fontcolor);
            lblLicenseStatus.ModifyFg(StateType.Normal, fontcolor);
            lblMacID.ModifyFg(StateType.Normal, fontcolor);
            lblLicenseType.ModifyFg(StateType.Normal, fontcolor);
            Gdk.Color col = new Gdk.Color();
            Gdk.Color.Parse("#3b5998", ref col);
            ModifyBg(StateType.Normal, col);



            try
            {
                btnStart.Visible = false;
                cpuID            = licensemanager.FetchMacId();

                new Thread(() =>
                {
                    Gtk.Application.Invoke((delegate
                    {
                        lblMacID.Text += "  " + cpuID;
                        lblMacID.ModifyBg(StateType.Normal, new Gdk.Color(120, 10, 120));
                        btnActivate.Label = "Validate Your License";
                        btnActivate.Visible = false;
                        //AddToLogs("[ " + DateTime.Now + " ] => [ Please wait while your License is Validated ]");
                        //timer_start_LD.Start();
                        LicenceValidation();
                        DisableControls();
                    }));
                }).Start();
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
            }
        }
        private void NoRecordFoundMethod()
        {
            try
            {
//				AddToLogs("[ " + DateTime.Now + " ] => [ Status: " + status + " ]");
//				AddToLogs("[ " + DateTime.Now + " ] => [ Please activate your license by submitting your Details ]");

                Gtk.Application.Invoke((delegate
                {
                    Gtk.Application.Invoke((delegate
                    {
                        btnActivate.Label = "Activate";
                        btnActivate.Visible = true;
                        EnableControls();
                    }));
                }));
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
            }
        }
        private void StartLicenseValidation()
        {
            try
            {
                LicenseValidation();
                if (status == "active")
                {
                    //AddToLogs("License Validated, Please click on Start Button");


                    Gtk.Application.Invoke((delegate
                    {
                        btnActivate.Visible = false;
                        //btnStart.Visible = true;
                        OpenFrmMain();
                    }));
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
            }
        }
Пример #9
0
        /// <summary>
        /// Checks the status of the CPUID from Database
        /// If status is Active, MainFrm starts
        /// </summary>
        ///
        #region ValidateCPUID
        public bool ValidateCPUID(ref string statusMessage, string cpuID)
        {
            try
            {
                #region Through php

                string res = string.Empty;
                string url = string.Empty;
                //getHtmlfromUrl(new Uri(Photolink), "","");
                url = "http://faced.extrem-hosting.net/GetUserData.php?cpid=" + cpuID + "";
                res = HttpHelpr.getHtmlfromUrl(new Uri(url), "", "", "");

                if (string.IsNullOrEmpty(res))
                {
                    System.Threading.Thread.Sleep(1000);
                    res = HttpHelpr.getHtmlfromUrl(new Uri(url), "", "", "");
                }

                if (!string.IsNullOrEmpty(res))
                {
                    string status   = string.Empty;
                    string dateTime = string.Empty;
                    string username = string.Empty;
                    string txnID    = string.Empty;

                    string trimmed_response = res.Replace("<pre>", "").Replace("</pre>", "").Trim().ToLower();

                    // BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(Responce):" + trimmed_response, Globals.DesktopFolder + "\\LogLicensingProcess.txt");

                    string[] array_status = System.Text.RegularExpressions.Regex.Split(trimmed_response, "<:>");
                    try
                    {
                        status = array_status[0].ToLower();
                    }
                    catch (Exception ex)
                    {
                        GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message + "ValidateCPUID", PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
                    }
                    try
                    {
                        dateTime = array_status[1].ToLower();
                        Loger("Date:" + dateTime);
                        //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(LicensingDate):" + dateTime, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                    }
                    catch (Exception ex)
                    {
                        GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
                    }
                    try
                    {
                        username = array_status[2].ToLower();
                        //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(Username):" + username, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                    }
                    catch (Exception ex)
                    {
                        GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
                    }
                    try
                    {
                        txnID = array_status[3].ToLower();
                        //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(TxnId):" + txnID, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                    }
                    catch (Exception ex)
                    {
                        GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
                    }

                    if (trimmed_response.ToLower().Contains("freetrial") && ((status.ToLower() == "active") || (status.ToLower() == "nonactive")))
                    {
                        if (CheckActivationUpdateStatus(cpuID, dateTime, status, ""))
                        {
                            statusMessage = "Active";
                            //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(Licence Status):" + statusMessage, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                            return(true);
                        }
                        else
                        {
                            statusMessage = "trialexpired";
                            //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(Licence Status):" + statusMessage, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                            return(false);
                        }
                    }
                    else if (status.ToLower() == "active")
                    {
                        statusMessage = "active";
                        //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(Licence Status):" + statusMessage, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                        return(true);
                        // DisableControls();
                    }
                    else if (status.ToLower() == "nonactive")
                    {
                        statusMessage = "nonactive";
                        //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(Licence Status):" + statusMessage, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                        //MessageDialog md = new MessageDialog (this, DialogFlags.Modal, MessageType.Info, ButtonsType.Ok, "Verification of your txn is under process.\\n Please wait for your Transaction to be verified");
                        //ResponseType response = (ResponseType)md.Run ();
                        //md.Destroy();
                        //MessageBox.Show("Verification of your txn is under process.\n Please wait for your Transaction to be verified");
                        return(false);
                    }
                    else if (trimmed_response.Contains("trialexpired"))
                    {
                        statusMessage = "trialexpired";
                        //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(Licence Status):" + statusMessage, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                        //MessageBox.Show("Your 3 Days Trial Version has Expired.");
                        return(false);
                    }
                    else if (trimmed_response.ToLower() == "suspended")
                    {
                        statusMessage = "suspended";
                        //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(Licence Status):" + statusMessage, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                        return(false);
                    }
                    else if (trimmed_response.Contains("no record found"))
                    {
                        statusMessage = "norecordfound";
                        //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(Licence Status):" + statusMessage, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                        return(false);
                    }
                    else
                    {
                        statusMessage = "Some Error in Status Field";
                        //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(Licence Status):" + statusMessage, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                        return(false);
                    }
                }
                else
                {
                    statusMessage = "ServerDown";
                    //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID Sorry:" + statusMessage, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                    return(false);
                }

                #endregion
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                statusMessage = "Error in License Validation";
                GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message + "ValidateCPUID", PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
                //MessageBox.Show(ex.StackTrace);
            }
            return(false);
        }
Пример #10
0
        public bool ValidateCPUID(ref string statusMessage, string servr, ref string username, ref string password, ref string txnID, ref string email, string freeTrialKey, string cpuID)
        {
            //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("UserName: "******" CPUID:" + cpuID, Globals.DesktopFolder + "\\LogLicensingProcess.txt");

            try
            {
                #region Drct
                //string cpuID = FetchMacId();
                //string SelectQuery = "Select * from users where cpuid='" + cpuID + "'";
                //DataSet ds = DataBaseHandler.SelectQuery(SelectQuery, "users");
                //if (ds.Tables[0].Rows.Count == 1)
                //{
                //    string status = ds.Tables[0].Rows[0]["status"].ToString();
                //    if (status.ToLower() == "active")
                //    {
                //        statusMessage = "active";
                //        return true;
                //    }
                //    else if (status.ToLower() == "nonactive")
                //    {
                //        statusMessage = "nonactive";
                //        return false;
                //    }
                //    else if (status.ToLower() == "suspended")
                //    {
                //        statusMessage = "suspended";
                //        return false;
                //    }
                //}

                #endregion

                #region Through php

                //string cpuID = FetchMacId();
                //ChilkatHttpHelpr HttpHelpr = new ChilkatHttpHelpr();
                HttpHelpr = new GlobusHttpHelper();

                #region Servr 1
                {
                    string res = string.Empty;

                    string url = "http://" + servr + "/GetUserData.php?cpid=" + cpuID + "";
                    res = HttpHelpr.getHtmlfromUrl(new Uri(url), "", "", "");
                    res = HttpHelpr.getHtmlfromUrl(new Uri(url), "", "", "");

                    if (string.IsNullOrEmpty(res))
                    {
                        System.Threading.Thread.Sleep(1000);
                        res = HttpHelpr.getHtmlfromUrl(new Uri(url), "", "", "");
                    }

                    if (!string.IsNullOrEmpty(res))
                    {
                        string activationstatus = string.Empty;
                        string dateTime         = string.Empty;
                        //string username = string.Empty;
                        //string txnID = string.Empty;

                        string trimmed_response = res.Replace("<pre>", "").Replace("</pre>", "").Trim().ToLower();

                        //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(Responce):" + trimmed_response, Globals.DesktopFolder + "\\LogLicensingProcess.txt");

                        string[] array_status = System.Text.RegularExpressions.Regex.Split(trimmed_response, "<:>");

                        try
                        {
                            activationstatus = array_status[0].ToLower();
                            //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(Status):" + activationstatus, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                        }
                        catch (Exception ex)
                        {
                            GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
                        }
                        try
                        {
                            dateTime = array_status[1].ToLower();
                            //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(LicenseDate):" + dateTime, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                        }
                        catch (Exception ex)
                        {
                            GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
                        }

                        try
                        {
                            username = array_status[2].ToLower();
                            //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(Username):" + username, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                        }
                        catch (Exception ex)
                        {
                            GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
                        }
                        try
                        {
                            password = array_status[3].ToLower();
                            //GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(Username):" + username, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                        }
                        catch (Exception ex)
                        {
                            GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
                        }

                        try
                        {
                            txnID = array_status[4].ToLower();
                        }
                        catch (Exception ex)
                        {
                            GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
                        }

                        try
                        {
                            email = array_status[5].ToLower();
                            //GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(Username):" + username, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                        }
                        catch (Exception ex)
                        {
                            GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
                        }

                        try
                        {
                            Globals.licType = array_status[6].ToLower();
                        }
                        catch { }

                        if (trimmed_response.ToLower().Contains(freeTrialKey) && ((activationstatus.ToLower() == "active") || (activationstatus.ToLower() == "nonactive")))
                        {
                            //Globals.IsFreeVersion = true ;

                            if (CheckActivationUpdateStatus(cpuID, dateTime, activationstatus, servr))
                            {
                                statusMessage = "active";
                                //servr = "1";
                                return(true);
                            }
                            else
                            {
                                statusMessage = "trialexpired";
                                return(false);
                            }

                            if (activationstatus.ToLower() == "active")
                            {
                                statusMessage = "active";
                                //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(Status):" + statusMessage, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                                //servr = "1";
                                return(true);
                            }
                            else if (activationstatus.ToLower() == "nonactive")
                            {
                                //Update status as Active
                                string url1      = "http://" + servr + "/UpdateStatus.php?cpid=" + cpuID + "&status=" + "Active";
                                string updateRes = HttpHelpr.getHtmlfromUrl(new Uri(url1), "", "", "");
                                if (string.IsNullOrEmpty(updateRes))
                                {
                                    System.Threading.Thread.Sleep(1000);
                                    updateRes = HttpHelpr.getHtmlfromUrl(new Uri(url1), "", "", "");
                                }

                                // BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(Your Free Version is Activated):" + statusMessage, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                                // MessageBox.Show("Your Free Version is Activated");
                                return(true);
                            }
                        }
                        else if (activationstatus.ToLower() == "active")
                        {
                            statusMessage = "active";
                            //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(LicenceStatus2):" + statusMessage, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                            return(true);
                            // DisableControls();
                        }
                        else if (activationstatus.ToLower() == "nonactive")
                        {
                            statusMessage = "nonactive";
                            //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(LicenceStatus2):" + statusMessage, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                            // MessageBox.Show("Verification of your txn is under process.\n Please wait for your Transaction to be verified.\n Please Contact To Support Team to activate your license,   Skype Id Is :- Facedominatorsupport");
                            return(false);
                            // DisableControls();
                        }

                        else if (trimmed_response.Contains("trialexpired"))
                        {
                            statusMessage = "trialexpired";
                            //need to know the naviagtion site : LinkedinDominator.com
                            // BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(LicenceStatus2):" + statusMessage, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                            // MessageBox.Show("Your 3 Days Trial Version has Expired. Please visit our site: http://linkeddominator.com/ to purchase your License");
                            return(false);
                        }
                        else if (trimmed_response.ToLower() == "suspended")
                        {
                            statusMessage = "suspended";
                            //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(LicenceStatus2):" + statusMessage, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                            return(false);
                        }
                        else if (trimmed_response.Contains("no record found"))
                        {
                            statusMessage = "norecordfound";
                            //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(LicenceStatus2):" + statusMessage, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                            return(false);
                        }
                        else
                        {
                            statusMessage = "Some Error in Licensing Server";
                            //BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(LicenceStatus2):" + statusMessage, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                            return(false);
                        }
                    }
                    else
                    {
                        statusMessage = "ServerDown";
                        // BaseLib.GlobusFileHelper.AppendStringToTextfileNewLine("ValidateCPUID(LicenceStatus2):" + statusMessage, Globals.DesktopFolder + "\\LogLicensingProcess.txt");
                        return(false);
                    }
                }
                #endregion
                #endregion
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                statusMessage = "Error in License Validation";
                Loger("Error in License Validation");
                //MessageBox.Show(ex.StackTrace);
            }
            return(false);
        }
        private void LicenseValidation()
        {
            try
            {
                string username = string.Empty;
                string pass     = string.Empty;
                string txnID    = string.Empty;
                string email    = string.Empty;

                try{
                    Gtk.Application.Invoke(delegate
                    {
                        DisableControls();
                    });
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.StackTrace);
                    //GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog+ "\\ErrorLogLicensing.txt");
                }


                {
                    //AddToLogs("[ " + DateTime.Now + " ] => [ Validating on Server 1 ]");
                    if (licensemanager.ValidateCPUID(ref status, server1, ref username, ref pass, ref txnID, ref email, freeTrialKey, cpuID))
                    {
                        try
                        {
                            #region Server 1
                            Gtk.Application.Invoke((delegate
                            {
                                btnActivate.Label = "Start";
                                lblstatus.Text = "Activated";

                                txtUserName.Text = username;
                                txtPassword.Text = pass;
                                txtTransactionID.Text = txnID;
                                txtEmail.Text = email;
                                cmb_LicType.Entry.Text = Globals.licType;
                            }));
                        }
                        catch (Exception ex)
                        {
                            Console.WriteLine(ex.StackTrace);
                            GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
                        }
                        #endregion

                        return;
                    }
                    else if (status == "norecordfound")
                    {
                        NoRecordFoundMethod();
                        return;
                    }
                    if (status == "nonactive")
                    {
                        Gtk.Application.Invoke((delegate
                        {
                            //lblServr3Status.Text = status;
                            Gtk.Application.Invoke((delegate
                            {
                                txtUserName.Text = username;
                                txtPassword.Text = pass;
                                txtTransactionID.Text = txnID;
                                txtEmail.Text = email;

                                btnActivate.Visible = true;
                                lblstatus.Text = "Please contact skype support team \n\tFaceDominatorSupport ";
                                //StartLicenseValidation();
                                btnActivate.Sensitive = false;
                                btnActivate.Label = "Registered Successfully";
                            }));
                        }));

                        Gtk.Application.Invoke((delegate
                        {
                            DisableControls();
                        }));
                    }
                    else if (status == "norecordfound")
                    {
                        NoRecordFoundMethod();
                        return;
                    }
                    if (licensemanager.ValidateCPUID(ref status, server1, ref username, ref pass, ref txnID, ref email, freeTrialKey, cpuID))
                    {
                        #region Server 2
                        Gtk.Application.Invoke((delegate
                        {
                            btnActivate.Label = "Start";
                            lblstatus.Text = "Activated";
                            //lblstatus.BackColor = Color.Green;

                            txtUserName.Text = username;
                            txtPassword.Text = pass;
                            txtTransactionID.Text = txnID;
                            txtEmail.Text = email;
                        }));

                        #endregion

                        return;
                    }
                    else if (status == "norecordfound")
                    {
                        NoRecordFoundMethod();
                        return;
                    }
                    else
                    {
                        AddToLogs("[ " + DateTime.Now + " ] => [ Failed on Server 2, Status : " + status + " \nValidating on Server 3 ]");

                        CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable();

                        if (CheckNetConn)
                        {
                        }
                        else
                        {
                            //AddToLogs("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]");
                        }
                    }
                    if (licensemanager.ValidateCPUID(ref status, server1, ref username, ref pass, ref txnID, ref email, freeTrialKey, cpuID))
                    {
                        #region Server 3
                        Gtk.Application.Invoke((delegate
                        {
                            btnActivate.Label = "Start";
                            lblstatus.Text = "Activated";

                            txtUserName.Text = username;
                            txtPassword.Text = pass;
                            txtTransactionID.Text = txnID;
                            txtEmail.Text = email;
                        }));

                        #endregion

                        return;
                    }
                    else
                    {
                        Gtk.Application.Invoke((delegate
                        {
                            //lblServr3Status.Text = status;
                        }));
                    }
                    if (status == "nonactive")
                    {
                        //AddToLogs("[ " + DateTime.Now + " ] => [ Status: " + status + " ]");

                        Gtk.Application.Invoke((delegate
                        {
                            DisableControls();
                        }));
                    }
                    else if (status == "norecordfound")
                    {
                        NoRecordFoundMethod();
                        return;
                    }
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt");
            }
        }