public void  bindMethod()
        {

            
                foreach(string item in LDGlobals.listAccounts)
            {
                string userName=item.Split(':')[0];
                cmb_CompanyEmployeeScraper_SelectAcc.Items.Add(userName);

            }
            MainWindow bojMainWindow = new MainWindow();

            ClsSelect ObjSelectMethod = new ClsSelect();
            CountryCode = ObjSelectMethod.getCountry();

            foreach (KeyValuePair<string, string> pair in CountryCode)
            {
                try
                {
                    cmb_CompanyEmployeeScraper_Country.Items.Add(pair.Value);
                }
                catch
                {
                }
            }

        }
        public void bindMethod()
        {
              MainWindow objMainWindow = new MainWindow();
            string WithingList = objMainWindow.WithingList;

            foreach (string item in LDGlobals.listAccounts)
            {
                string userName = item.Split(':')[0];
                cmb_LIScraperInput_selectedAcc.Items.Add(userName);

            }


            Dictionary<string, string> CountryCode = new Dictionary<string, string>();
            ClsSelect ObjSelectMethod = new ClsSelect();
            CountryCode = ObjSelectMethod.getCountry();
            foreach (KeyValuePair<string, string> pair in CountryCode)
            {
                try
                {
                    cmb_SaleNavigtor_Country_Code.Items.Add(pair.Value);
                   // CombScraperCountry.Items.Add(pair.Value);


                  //  lstCountry.Add(pair.Value);
                   // CampainGroupCreate.Campaign_lstCountry.Add(pair.Value);
                    
                }
                catch
                {
                }
            }
            
            // location
            try
            {
                //cmb_SaleNavigtor_Location.Items.Add("Located in or near");
                //cmb_SaleNavigtor_Location.Items.Add("Anywhere");

            }
            catch
            { }

            // within
            string[] arraywithin = Regex.Split(WithingList, ",");
            foreach (string item in arraywithin)
            {
                string[] arrayPostalwithin = Regex.Split(item, ":");
                if (arrayPostalwithin.Length == 2)
                {
                    cmb_SaleNavigtor_Within.Items.Add(arrayPostalwithin[1]);
                }
            }

            // title curernt or past
            string TitleValue = objMainWindow.TitleValue;
            string[] arrayTitleValue = Regex.Split(TitleValue, ",");
           // if (!Globals.ComboBoxCurrent_Past_Task_Done)
           // {
                foreach (string item in arrayTitleValue)
                {
                    string[] arraytitleValue = Regex.Split(item, ":");
                    if (arraytitleValue.Length == 2)
                    {
                       // cmb_SaleNavigtor_Company_CrrentOrPast.Items.Add(arraytitleValue[1]);
                       // cmbboxCompanyValue.Items.Add(arraytitleValue[1]);
                    }
                }
          //  }

        }
예제 #3
0
        public void GetCountryNameValue(ref string countryName, ref string countryValue)
        {
            try
            {
                ClsSelect CountryList = new ClsSelect();
                string[] arrayCountry = Regex.Split(CountryList.country, ",");

                foreach (string CountryValue in arrayCountry)
                {
                    if (CountryValue.Contains(countryName))
                    {
                        if (countryName == "India")
                        {
                            string[] value = Regex.Split(CountryValue, ":");
                            countryName = value[1].ToString();
                            countryValue = value[0].ToString();
                        }
                        else
                        {
                            string[] value = Regex.Split(CountryValue, ":");
                            countryName = value[1].ToString();
                            countryValue = value[0].ToString();
                            break;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> GetCountryNameValue() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> GetCountryNameValue() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs);
            }
        }
예제 #4
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            try
            {
                frmCampaignScraper.CampaignStopLogevents.addToLogger += new EventHandler(CampaignnameLog);
                GroupStatus.loggerFriendsGroup.addToLogger += new EventHandler(loggerGroupStatusEvent);
                CheckVersion();
                CopyFolder();
                CopyDatabase();

                btnLinkedinSearchProfileURLLoad.Enabled = false;
                //tabMain.TabPages.Remove(tabViewProfileRank);
                //tabMain.TabPages.Remove(tabInboxManager);
                FrmCaptchaLogin.LoadDecaptchaSettings();
                //image = Properties.Resources.background;
                //recSideImage = Properties.Resources.background;

                image = Properties.Resources.background;
                recSideImage = Properties.Resources.background;

                Color clr = ColorTranslator.FromHtml("#F1713C");

                CopyUpdateStatus();
                DeleteManageAddConnection();
                Uploaddata();

                txtExportedFile1.Text = Globals.DesktopFolder;
                txtExportedFile2.Text = Globals.DesktopFolder;
                // calling btnSubmitCapchaLogin_Click(sender, e) of FrmCaptchaLogin;
                //FrmCaptchaLogin obj_FrmCaptchaLogin = new FrmCaptchaLogin();
                //obj_FrmCaptchaLogin.Show();

                //obj_FrmCaptchaLogin.btnSubmitCapchaLogin_Click(sender, e);

                //obj_FrmCaptchaLogin.Close();

                #region Event Method subscription
                frmAccounts.AccountsLogEvents.addToLogger += new EventHandler(AccountsLogEvents_addToLogger);
                obj.linkedinLoginAndLogout.LoginEvent.addToLogger += new EventHandler(LoginEvent_addToLogger);
                LinkedInScrape.logger.addToLogger += new EventHandler(ScrapeEvent_addToLogger);
                GroupStatus.logger.addToLogger += new EventHandler(GroupStatus_addToLogger); // AddLoggerGroupAdd
                LinkedinSearch.loggersearch.addToLogger += new EventHandler(LinkedinSearchLogEvents_addToLogger);
                GroupStatus.logger.addToLogger += new EventHandler(LinkedingrpLogEvents_addToLogger);
                LinkedinSearch.loggerscrap.addToLogger += new EventHandler(linkedinFilterSearchlogEvent_addToLogger);
                ProfileRank.loggerrank.addToLogger += new EventHandler(ProfileRankLogEvents_addToLogger);

                #endregion

                copyGroupCreator();

                Dictionary<string, string> IndustryCode = new Dictionary<string, string>();
                Dictionary<string, string> Langaugecode = new Dictionary<string, string>();

                ClsSelect ObjSelectMethod = new ClsSelect();
                CountryCode = ObjSelectMethod.getCountry();

                IndustryCode = ObjSelectMethod.getIndustry();
                Langaugecode = ObjSelectMethod.getLangauge();

                foreach (KeyValuePair<string, string> pair in CountryCode)
                {
                    try
                    {
                        CombScraperCountry.Items.Add(pair.Value);

                        lstCountry.Add(pair.Value);
                        CampainGroupCreate.Campaign_lstCountry.Add(pair.Value);
                        //CombCountry.Items.Add(pair.Value);
                    }
                    catch
                    {
                    }
                }

                //CombCountry.SelectedIndex = 1;

                try
                {
                    CombScraperCountry.SelectedIndex = 1;
                    combScraperLocation.SelectedIndex = 1;
                    CombScraperCountry.SelectedIndex = 0;
                    combScraperLocation.SelectedIndex = 0;
                    cmbMsgFrom.SelectedIndex = 1;
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Error >>> " + ex.StackTrace);
                }
                foreach (KeyValuePair<string, string> pair in IndustryCode)
                {
                    try
                    {
                        lstIndustry.Add(pair.Value);
                        CampainGroupCreate.Campaign_lstIndustry.Add(pair.Value);
                    }
                    catch
                    {
                    }
                }

                foreach (KeyValuePair<string, string> pair in Langaugecode)
                {
                    cmbLanguage.Items.Add(pair.Key);
                }

                ConnectUsing_Search.ConnectSearchLogEvents.addToLogger += new EventHandler(loggerAddConnection_addToLogger);
                InvitationEmails.InviteConnectionLogEvents.addToLogger += new EventHandler(loggerAddConnection_addToLogger);
                EndorsePeople.logger.addToLogger += new EventHandler(EndorsePeople_addToLogger);
                GroupStatus.loggerEndorseCampaign.addToLogger += new EventHandler(EndorsePeople_addToLogger);
                //comboBoxlocation.SelectedItem = comboBoxlocation.Items[0];
                //CombCountry.SelectedItem = CombCountry.Items[1];
                //listStatusMessages = new List<string>();

                LinkedinLogin Login = new LinkedinLogin();

                Login.logger.addToLogger += new EventHandler(logger_addToLogger);

                ToolTip Tooltip = new ToolTip();

                Tooltip.AutoPopDelay = 5000;
                Tooltip.InitialDelay = 1000;
                Tooltip.ReshowDelay = 500;

                Tooltip.ShowAlways = true;

                Tooltip.SetToolTip(this.linkLblJoinGroupUrl, "New Feature Join Group Using Url");
                Tooltip.SetToolTip(this.linkbtnScrapeinExcelInput, "LinkedIn Scraper Using Excel Input File With Mode1 and Mode2 option");

            }
            catch
            {
            }
        }
        private void AddLocation()
        {
            ClsSelect ObjSelectMethod = new ClsSelect();

            CountryCode = ObjSelectMethod.getCountry();

            foreach (KeyValuePair<string, string> pair in CountryCode)
            {
                try
                {
                    combScraperLocation.Items.Add(pair.Value);
                }
                catch
                {
                }
            }
        }
        private void CompanyEmployeeScraper_Load(object sender, EventArgs e)
        {
            image = Properties.Resources.background;
            LinkedinSearch.loggersearch.addToLogger += new EventHandler(LinkedinSearchCompEmplLogEvents_addToLogger);
            LinkedinSearch.loggerscrap.addToLogger += new EventHandler(LinkedinSearchCompEmplLogEvents_addToLogger);
            LinkedInScrape.logger.addToLogger += new EventHandler(LinkedinSearchCompEmplLogEvents_addToLogger);

            LoadPreScrapper();

            comboBoxemail.SelectedIndex = 0;
            ClsSelect ObjSelectMethod = new ClsSelect();
            CountryCode = ObjSelectMethod.getCountry();

            foreach (KeyValuePair<string, string> pair in CountryCode)
            {
                try
                {
                    CombScraperCountry.Items.Add(pair.Value);
                }
                catch
                {
                }
            }
        }
        private void btn_LIScraper_Save_Click(object sender, RoutedEventArgs e)
        {
            try
            {
              LinkedInScraper.selectedEmailId = cmb_LIScraper_SelectedAcc.SelectedItem.ToString();
              LinkedInScraper.FirstName = txt_LIScraper_FirstName.Text;
              LinkedInScraper.LastName = txt_LIScraper_LastName.Text;
              LinkedInScraper.selectedLocation = cmb_LIS_Location.SelectedItem.ToString();
              LinkedInScraper.selectedCountry = cmb_LIS_Country_Code.SelectedItem.ToString();
              LinkedInScraper.postalCode = txt_LIScraper_PostalCode.Text;
              LinkedInScraper.Within = cmb_LIS_Within.SelectedItem.ToString();
              LinkedInScraper.CompanyValue = txt_LIScraper_Comapny.Text;
              LinkedInScraper.CompanyScope = cmb_LIS_Company_CrrentOrPast.SelectedItem.ToString();

              string countryName = cmb_LIS_Country_Code.SelectedItem.ToString();

              #region within CompanyScope
              try
              {
                 // if (cmb_LIS_Company_CrrentOrPast.Enabled == true)
                  {
                      string[] arrayTitleList = Regex.Split(TitleValue, ",");
                      foreach (string item in arrayTitleList)
                      {
                          string[] arrayTitleValue = Regex.Split(item, ":");

                          if (arrayTitleValue[1] == cmb_LIS_Company_CrrentOrPast.SelectedItem.ToString())
                          {
                              LinkedInScraper.CompanyScope = arrayTitleValue[0];
                          }
                      }
                  }
              }
              catch (Exception ex)
              {

              }
              #endregion


              #region Within the PostalCode
              try
              {
                  string[] arraywithinList = Regex.Split(WithingList, ",");
                  foreach (string item in arraywithinList)
                  {
                      if (item.Contains(cmb_LIS_Within.SelectedItem.ToString()))
                      {
                          string[] arrayWithin = Regex.Split(item, ":");
                          LinkedInScraper.Within = arrayWithin[0];
                      }
                  }
              }
              catch (Exception ex)
              {

              }
              #endregion

                #region country Code

              try
              {
                  ClsSelect CountryList = new ClsSelect();
                  string[] arrayCountry = Regex.Split(CountryList.country, ",");

                  foreach (string CountryValue in arrayCountry)
                  {
                      if (CountryValue.Contains(countryName))
                      {
                          if (countryName == "India")
                          {
                              string[] value = Regex.Split(CountryValue, ":");
                              countryName = value[1].ToString();
                              LinkedInScraper.Country = value[0].ToString();
                          }
                          else
                          {
                              string[] value = Regex.Split(CountryValue, ":");
                              countryName = value[1].ToString();
                              LinkedInScraper.Country = value[0].ToString();
                              break;
                          }
                      }
                  }
              }
              catch (Exception ex)
              {
              }

                #endregion 

            }
            catch (Exception ex)
            {
            }
        }