public void AddProfilePicture(ref GlobusHttpHelper GlobusHttpHelper, string Email, string Password, string proxyAddress, int ProxyPort, string proxyUsername, string proxyPassword) { try { IsCloseCalledForProfileManager = false; lstThreadForLinkedInProfileManager.Clear(); if (CampainGroupCreate.lstProfilePic.Count < 1) { MessageBox.Show("Please Upload Profile Image !"); AddLoggerLinkedInProfileManager("[ " + DateTime.Now + " ] => [ Please Upload Profile Image ! ]"); //return; } if (rdbUnique.Checked) { try { LinkedinProfileImgUploader.AddProfilePic_Unique = true; } catch { } } else { try { LinkedinProfileImgUploader.AddProfilePic_Random = true; } catch { } } LinkedinProfileImgUploader obj_LinkedinProfileManager = new LinkedinProfileImgUploader(Email, Password, proxyAddress, ProxyPort.ToString(), proxyUsername, proxyPassword); obj_LinkedinProfileManager.LinkedInProfileManagerLogEvents.addToLogger += new EventHandler(logger_LinkedInProfileManageraddToLogger); obj_LinkedinProfileManager.SetProfilePic(ref GlobusHttpHelper); //if (NumberHelper.ValidateNumber(txtThreads.Text)) //{ // threads = int.Parse(txtThreads.Text); //} //Thread thread_AddaCover = new Thread(thread_AddaCoverStart); //thread_AddaCover.Start(); //thread_AddaCoverStart(); } catch { } }
private void AddaCoverMulti_List(object oo) { try { if (!IsCloseCalledForProfileManager) { try { lstThreadForLinkedInProfileManager.Add(Thread.CurrentThread); lstThreadForLinkedInProfileManager.Distinct(); Thread.CurrentThread.IsBackground = true; } catch { } Array paramArr = new object[2]; paramArr = (Array)oo; LinkedInMaster linkedInMaster = (LinkedInMaster)paramArr.GetValue(0);//KeyValuePair<string, Facebooker> item = (KeyValuePair<string, Facebooker>)paramArr.GetValue(0); // KeyValuePair<string, LinkedInMaster> item = (KeyValuePair<string, LinkedInMaster>)paramArr.GetValue(0); //Facebooker facebooker = item.Value; GlobusHttpHelper HttpHelper = new GlobusHttpHelper(); LinkedinLogin Login = new LinkedinLogin(); string accountUser = linkedInMaster._Username; string accountPass = linkedInMaster._Password; string proxyAddress = linkedInMaster._ProxyAddress; string proxyPort = linkedInMaster._ProxyPort; string proxyUserName = linkedInMaster._ProxyUsername; string proxyPassword = linkedInMaster._ProxyPassword; if (!Login.IsLoggedIn) { //Login.LoginHttpHelper(ref HttpHelper); Login.logger.addToLogger += new EventHandler(logger_LinkedInProfileManageraddToLogger); Login.LoginHttpHelper(ref HttpHelper, accountUser, accountPass, proxyAddress, proxyUserName, proxyPassword, proxyPort); } if (Login.IsLoggedIn) { LinkedinProfileImgUploader obj_LinkedinProfileManager = new LinkedinProfileImgUploader(accountUser, accountPass, proxyAddress, proxyPort, proxyUserName, proxyPassword); ////facebooker.loginChecker.pumpMessageEvent.addToLogger += ProfileManagerLogEvents_addToLogger; obj_LinkedinProfileManager.LinkedInProfileManagerLogEvents.addToLogger += new EventHandler(logger_LinkedInProfileManageraddToLogger); //facebooker.StartAddaCover(ref obj_AddaCover, lstCoverPics); obj_LinkedinProfileManager.SetProfilePic(ref HttpHelper); ////facebooker.loginChecker.pumpMessageEvent.addToLogger -= ProfileManagerLogEvents_addToLogger; Login.logger.addToLogger -= new EventHandler(logger_LinkedInProfileManageraddToLogger); obj_LinkedinProfileManager.LinkedInProfileManagerLogEvents.addToLogger -= new EventHandler(logger_LinkedInProfileManageraddToLogger); } else { AddLoggerLinkedInProfileManager("[ " + DateTime.Now + " ] => [ Couldn't Login With Username >>> " + accountUser + " ]"); return; } } } catch { } finally { if (!IsCloseCalled) { count_ThreadController--; lock (lockr_ThreadController) { if (!IsCloseCalled) { Monitor.Pulse(lockr_ThreadController); } } } } }
private void AddaCoverMulti_List(object oo) { try { if (!IsCloseCalledForProfileManager) { try { lstThreadForLinkedInProfileManager.Add(Thread.CurrentThread); lstThreadForLinkedInProfileManager.Distinct(); Thread.CurrentThread.IsBackground = true; } catch { } Array paramArr = new object[2]; paramArr = (Array)oo; LinkedInMaster linkedInMaster = (LinkedInMaster)paramArr.GetValue(0);//KeyValuePair<string, Facebooker> item = (KeyValuePair<string, Facebooker>)paramArr.GetValue(0); // KeyValuePair<string, LinkedInMaster> item = (KeyValuePair<string, LinkedInMaster>)paramArr.GetValue(0); //Facebooker facebooker = item.Value; GlobusHttpHelper HttpHelper = new GlobusHttpHelper(); LinkedinLogin Login = new LinkedinLogin(); string accountUser = linkedInMaster._Username; string accountPass = linkedInMaster._Password; string proxyAddress = linkedInMaster._ProxyAddress; string proxyPort = linkedInMaster._ProxyPort; string proxyUserName = linkedInMaster._ProxyUsername; string proxyPassword = linkedInMaster._ProxyPassword; linkedInMaster.logger.addToLogger += new EventHandler(logger_LinkedInProfileManageraddToLogger); linkedInMaster.LoginHttpHelper(ref HttpHelper); if (linkedInMaster.IsLoggedIn) { LinkedinProfileImgUploader obj_LinkedinProfileManager = new LinkedinProfileImgUploader(accountUser, accountPass, proxyAddress, proxyPort, proxyUserName, proxyPassword); obj_LinkedinProfileManager.LinkedInProfileManagerLogEvents.addToLogger += logger_LinkedInProfileManageraddToLogger; NativeMethods.DeleteUrlCacheEntry("http://www.linkedin.com/"); obj_LinkedinProfileManager.SetProfilePic(ref HttpHelper); NativeMethods.DeleteUrlCacheEntry("http://www.linkedin.com/"); obj_LinkedinProfileManager.LinkedInProfileManagerLogEvents.addToLogger -= new EventHandler(logger_LinkedInProfileManageraddToLogger); } linkedInMaster.logger.addToLogger -= new EventHandler(logger_LinkedInProfileManageraddToLogger); } } catch { } finally { if (!IsCloseCalled) { count_ThreadController--; lock (lockr_ThreadController) { if (!IsCloseCalled) { Monitor.Pulse(lockr_ThreadController); } } } } }