public string RegisterUser(string Username, string Password, string cpuID, string TransactionID, string Email, string servr) { GlobusHttpHelper HttpHelpr = new GlobusHttpHelper(); string res = string.Empty; string url = string.Empty; //getHtmlfromUrl(new Uri(Photolink), "",""); url = "http://" + servr + "/register.php?user="******"&pass="******"&cpid=" + cpuID + "&transid=" + TransactionID + "&email=" + Email + "&LicType=" + Globals.licType + " "; try { res = HttpHelpr.getHtmlfromUrl(new Uri(url), "", "", ""); //res = HttpHelpr.GetHtml(url); if (string.IsNullOrEmpty(res)) { System.Threading.Thread.Sleep(1000); res = HttpHelpr.getHtmlfromUrl(new Uri(url), "", "", ""); //res = HttpHelpr.GetHtml(url); } if (string.IsNullOrEmpty(res)) { Gtk.Application.Quit(); } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message, PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt"); } return(res); }
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"); } }
public string FetchMacId() { string macAddresses = ""; try { foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces()) { if (nic.OperationalStatus == OperationalStatus.Up) { if (!string.IsNullOrEmpty(macAddresses)) { break; } macAddresses += nic.GetPhysicalAddress().ToString(); //break; } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine(ex.Message + "FetchMacId", PDGlobals.pathErrorLog + "\\ErrorLogLicensing.txt"); } return(macAddresses); }
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"); } }
protected void OnBtnUploadUrlEventManagerClicked(object sender, EventArgs e) { FileChooserDialog fileChooser = new FileChooserDialog("Choose Files to View", this, FileChooserAction.Open, "Cancel", ResponseType.Cancel, "Open", ResponseType.Accept); if (fileChooser.Run() == (int)ResponseType.Accept) { //txtEntryUploadAccount.Text = fileChooser.Filename.ToString (); objEventManager.LstEventURLsEventInviter = GlobusFileHelper.ReadFile(fileChooser.Filename.ToString().Trim()); Addtologger("Event Url Loaded : " + objEventManager.LstEventURLsEventInviter.Count); } fileChooser.Destroy(); }
//socialautobot.PageManager ObjPageManager=new socialautobot.PageManager(); protected void OnBtnUploadKeywordClicked(object sender, EventArgs e) { FileChooserDialog fileChooser = new FileChooserDialog("Choose Files to View", this, FileChooserAction.Open, "Cancel", ResponseType.Cancel, "Open", ResponseType.Accept); if (fileChooser.Run() == (int)ResponseType.Accept) { //txtEntryUploadAccount.Text = fileChooser.Filename.ToString (); PageManager.lstFanPageKeyWords = GlobusFileHelper.ReadFile(fileChooser.Filename.ToString().Trim()); // upload correct Message Addtologger("Fan page KeyWords Loaded : " + PageManager.lstFanPageKeyWords.Count); } fileChooser.Destroy(); }
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 static void ExportDataCSVFile(string CSV_Header, string CSV_Content, string CSV_FilePath) { try { if (!File.Exists(CSV_FilePath)) { GlobusFileHelper.AppendStringToTextFile(CSV_FilePath, CSV_Header); } GlobusFileHelper.AppendStringToTextFile(CSV_FilePath, CSV_Content); } catch (Exception) { } }
protected void OnBtnUploadUrlClicked(object sender, EventArgs e) { FileChooserDialog fileChooser = new FileChooserDialog("Choose Files to View", this, FileChooserAction.Open, "Cancel", ResponseType.Cancel, "Open", ResponseType.Accept); if (fileChooser.Run() == (int)ResponseType.Accept) { //txtEntryUploadAccount.Text = fileChooser.Filename.ToString (); PageManager.lstFanPagePostURLs = GlobusFileHelper.ReadFile(fileChooser.Filename.ToString().Trim()); // upload correct Message PageManager.lstFanPageUrlsFanPageLiker = PageManager.lstFanPagePostURLs; ObjFan.lstFanPageUrlCollectionFanPagePoster = PageManager.lstFanPageUrlsFanPageLiker; ObjFan.LstDownloadPhotoURLsDownloadPhoto = PageManager.lstFanPageUrlsFanPageLiker; Addtologger("Fan page Urls Loaded : " + PageManager.lstFanPagePostURLs.Count); } fileChooser.Destroy(); }
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 BrowseUnFollowList() { try { ClGlobul.lstUploadUnFollowList.Clear(); FileChooserDialog objFileChooser = new FileChooserDialog("Choose Files To View", this, FileChooserAction.Open, "Cancel", ResponseType.Cancel, "Open", ResponseType.Accept); if (objFileChooser.Run() == (int)ResponseType.Accept) { txtUnFollowList_UnFollow.Text = objFileChooser.Filename.ToString(); ClGlobul.lstUploadUnFollowList = GlobusFileHelper.ReadFile(txtUnFollowList_UnFollow.Text.Trim()); GlobusLogHelper.log.Info("[ " + DateTime.Now + "] => [ Total UnFollow List Uploaded :" + ClGlobul.lstUploadUnFollowList.Count + " ]"); } objFileChooser.Destroy(); } catch (Exception ex) { Console.Write(ex.Message); } }
protected void OnBtnLoadUrlsMessageClicked(object sender, EventArgs e) { try { FileChooserDialog fileChooser = new FileChooserDialog("Choose Files to View", this, FileChooserAction.Open, "Cancel", ResponseType.Cancel, "Open", ResponseType.Accept); if (fileChooser.Run() == (int)ResponseType.Accept) { //txtEntryUploadAccount.Text = fileChooser.Filename.ToString (); objFriendManager.lstWallPostURLsWallPoster = GlobusFileHelper.ReadFile(fileChooser.Filename.ToString().Trim()); // upload correct Message Addtologger("Urls Loaded : " + objFriendManager.lstWallPostURLsWallPoster.Count); } fileChooser.Destroy(); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
protected void OnBtnUploadDetailsEventCreatorClicked(object sender, EventArgs e) { try { FileChooserDialog fileChooser = new FileChooserDialog("Choose Files to View", this, FileChooserAction.Open, "Cancel", ResponseType.Cancel, "Open", ResponseType.Accept); if (fileChooser.Run() == (int)ResponseType.Accept) { //txtEntryUploadAccount.Text = fileChooser.Filename.ToString (); objEventManager.LstEventDetailsEventCreator = GlobusFileHelper.ReadFile(fileChooser.Filename.ToString().Trim()); Addtologger("Event creator Details Loaded : " + objEventManager.LstEventDetailsEventCreator.Count); } fileChooser.Destroy(); } catch (Exception Ex) { Console.WriteLine(Ex.StackTrace); } }
protected void OnBtnLoadFanpageUrlsClicked(object sender, EventArgs e) { FBUtils.CheckUploadProfileUrls = true; try { FileChooserDialog fileChooser = new FileChooserDialog("Choose Files to View", this, FileChooserAction.Open, "Cancel", ResponseType.Cancel, "Open", ResponseType.Accept); if (fileChooser.Run() == (int)ResponseType.Accept) { //txtEntryUploadAccount.Text = fileChooser.Filename.ToString (); FBUtils.LoadFanpageUrls = GlobusFileHelper.ReadFile(fileChooser.Filename.ToString().Trim()); // upload correct Message Addtologger("Profile Urls Loaded : " + FBUtils.LoadFanpageUrls.Count); } fileChooser.Destroy(); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
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"); } }
protected void OnBtnFanPageLoadUrlsMassegeClicked(object sender, EventArgs e) { try { FileChooserDialog fileChooser = new FileChooserDialog("Choose Files to View", this, FileChooserAction.Open, "Cancel", ResponseType.Cancel, "Open", ResponseType.Accept); if (fileChooser.Run() == (int)ResponseType.Accept) { //txtEntryUploadAccount.Text = fileChooser.Filename.ToString (); //GroupManager.LstOfGroupKeywords = GlobusFileHelper.ReadFile (fileChooser.Filename.ToString ().Trim ()); // upload correct Message ObjFan.lstFanPageUrlCollectionFanPagePostUrl = GlobusFileHelper.ReadFile(fileChooser.Filename.ToString().Trim()); Addtologger("Urls Loaded : " + ObjFan.lstFanPageUrlCollectionFanPagePostUrl.Count); } fileChooser.Destroy(); } catch (Exception ex) { Console.WriteLine(ex.StackTrace); } }
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"); } }
/// <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); }
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); }
//PageManager ObjFan=new PageManager(); protected void OnBtnUploadMessageFanPageClicked(object sender, EventArgs e) { try { FileChooserDialog fileChooser = new FileChooserDialog("Choose Files to View", this, FileChooserAction.Open, "Cancel", ResponseType.Cancel, "Open", ResponseType.Accept); if (fileChooser.Run() == (int)ResponseType.Accept) { //txtEntryUploadAccount.Text = fileChooser.Filename.ToString (); //GroupManager.LstOfGroupKeywords = GlobusFileHelper.ReadFile (fileChooser.Filename.ToString ().Trim ()); // upload correct Message ObjFan.lstFanPageUrlCollectionFanPagePostUrl = GlobusFileHelper.ReadFile(fileChooser.Filename.ToString().Trim()); PageManager.lstFanPageCollectionFanPagePosterMessage = ObjFan.lstFanPageUrlCollectionFanPagePostUrl; Addtologger("Message Loaded : " + PageManager.lstFanPageCollectionFanPagePosterMessage.Count); } chkFanPageManagerSendPicWithMessage.Active = true; fileChooser.Destroy(); } catch (Exception ex) { Console.WriteLine("Error : " + ex.StackTrace); } /*try * { * Application.Init(); * * myWin = new Window("DBC Settings"); * myWin.Resize(400,200); * myWin.SetPosition (WindowPosition.CenterAlways); * myWin.Resizable = false; * Fixed myfixed = new Fixed(); * myfixed.WidthRequest = 400; * myfixed.HeightRequest = 200; * //Create a label and put some text in it. * Label lblUserName = new Label(); * lblUserName.Text = "DBC UserName: "******"DBC Password: "******"save"); * btnSave.SetSizeRequest (100, 30); * * Button btnClear = new Button ("Clear"); * btnClear.SetSizeRequest (100, 30); * * FontDescription font = new Pango.FontDescription(); * font.Size = 64; * * font.Family = "Courier"; * font.Weight=Weight.Bold; * lblPassword.ModifyFont(font); * rbk_downloadFanPagePictures.ModifyFont(font); * * myfixed.Put (txtDBCUserName,170,35); * myfixed.Put (lblUserName,20,35); * myfixed.Put (lblPassword,24,80); * myfixed.Put (txtDBCPassword,170,80); * myfixed.Put (btnSave,100,120); * myfixed.Put (btnClear,210,120); * myWin.Add(myfixed); * myWin.DeleteEvent += delegate { Application.Quit(); }; * //btnSave.Clicked+=onClickSave; * //btnClear.Clicked+=onClickClear; * //LoadDBC(); * * myWin.ShowAll(); * Application.Run(); * * } * catch{ * }*/ }
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"); } }