Exemplo n.º 1
0
        private void LinkedInAddSearchCompany()
        {
            counter_AddFollowUrl = LinkedInManager.linkedInDictionary.Count;

            try
            {
                numberOfThreads = Convert.ToInt32(txtNoOfThread.Text.ToString());
                if (LinkedInManager.linkedInDictionary.Count() > 0)
                {
                    //ThreadPool.SetMaxThreads(numberOfThreads, numberOfThreads);

                    foreach (KeyValuePair <string, LinkedInMaster> item in LinkedInManager.linkedInDictionary)
                    {
                        if (LinkedinCompanyFollow.lstLinkedinCompanyURL.Count() > 0)
                        {
                            ThreadPool.SetMaxThreads(numberOfThreads, numberOfThreads);

                            ThreadPool.QueueUserWorkItem(new WaitCallback(PostAddcompanyUrl), new object[] { item });

                            Thread.Sleep(500);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Follow Company --> LinkedInAddSearchCompany() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Follow Company --> LinkedInAddSearchCompany() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddSearchGroupErrorLogs);
            }
        }
Exemplo n.º 2
0
        //*********Manage Connetion with search keword*****************//

        #region btnKeywordLoadFile_Click
        private void btnKeywordLoadFile_Click(object sender, EventArgs e)
        {
            try
            {
                using (OpenFileDialog ofd = new OpenFileDialog())
                {
                    ofd.Filter           = "Text Files (*.txt)|*.txt";
                    ofd.InitialDirectory = Application.StartupPath;
                    if (ofd.ShowDialog() == DialogResult.OK)
                    {
                        txtKeywordLoad.Text = ofd.FileName;
                        CampainGroupCreate.Campaign_lstConnectionSearchKeyword.Clear();
                        List <string> templist = GlobusFileHelper.ReadFiletoStringList(ofd.FileName);
                        foreach (string item in templist)
                        {
                            if (!CampainGroupCreate.Campaign_lstConnectionSearchKeyword.Contains(item))
                            {
                                if (!string.IsNullOrEmpty(item.Replace(" ", "").Replace("\t", "")))
                                {
                                    CampainGroupCreate.Campaign_lstConnectionSearchKeyword.Add(item);
                                    //SearchCriteria.Que_Keyword.Enqueue(item);
                                }
                            }
                        }
                    }
                    AddLoggerLinkedInProfileManager("[ " + DateTime.Now + " ] => [ " + CampainGroupCreate.Campaign_lstConnectionSearchKeyword.Count + " Keywords Loaded  ]");
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnKeywordLoadFile_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnKeywordLoadFile_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddConnectionErrorLogs);
            }
        }
Exemplo n.º 3
0
        private void btnRemovePendingGroup_Click(object sender, EventArgs e)
        {
            CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable();

            if (CheckNetConn)
            {
                try
                {
                    lstGroupInvitation.Clear();
                    lstGroupInvitationThread.Clear();

                    if (IsStop)
                    {
                        IsStop = false;
                    }

                    if (LinkedInManager.linkedInDictionary.Count() == 0)
                    {
                        return;
                    }
                    else if (chkOwnGroup.CheckedItems.Count == 0)
                    {
                        AddLoggerGroupsInvitation("[ " + DateTime.Now + " ] => [ Please select Atleast One Group.. ]");
                        MessageBox.Show("Please select Atleast One Group..");
                        return;
                    }
                    else if (GroupStatus.lstEmailsGroupInvite.Count == 0)
                    {
                        AddLoggerGroupsInvitation("[ " + DateTime.Now + " ] => [ Please Add Emails to send Group Invitation ]");
                        MessageBox.Show("Please Add Emails to send Group Invitation..");
                        return;
                    }

                    counter_GroupSearch = 0;
                    AddLoggerGroupsInvitation("[ " + DateTime.Now + " ] => [ Process Running Please wait for sometimes.. ]");
                    btnRemovePendingGroup.Cursor = Cursors.AppStarting;

                    if (chkOwnGroup.CheckedItems.Count > 0)
                    {
                        new Thread(() =>
                        {
                            LinkedInGroupsInvitation();
                        }).Start();
                    }
                    else
                    {
                    }
                }
                catch (Exception ex)
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Own Groups --> btnRemovePendingGroup_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                    GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Own Groups --> btnRemovePendingGroup_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPendingGroupErrorLogs);
                }
            }
            else
            {
                MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection...");
                AddLoggerGroupsInvitation("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]");
            }
        }
Exemplo n.º 4
0
        private void StartScarpperLoginUsingThreadPool()
        {
            foreach (KeyValuePair <string, LinkedInMaster> item in LinkedInManager.linkedInDictionaryExcelInput)
            {
                try
                {
                    try
                    {
                        if (NumberHelper.ValidateNumber(txtThreadSecondModescrapper.Text.Trim()))
                        {
                            int numberofThreds = int.Parse(txtThreadSecondModescrapper.Text.Trim());

                            ThreadPool.SetMaxThreads(numberofThreds, 5);
                            ThreadPool.QueueUserWorkItem(new WaitCallback(StartScarppLoginUsingInputData), new object[] { item });
                            Thread.Sleep(1000);
                            // StartScarppLoginUsingInputData(new object[] { item });
                        }
                    }
                    catch (Exception ex)
                    {
                        GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Status Update --> LinkdinStatusUpdate() ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                        GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Status Update --> LinkdinStatusUpdate() ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinStatusUpdateErrorLogs);
                    }
                }
                catch { }
            }
        }
        public void StartActionMultithreadInvite(ref PinInterestUser objPinUser)
        {
            try
            {
                try
                {
                    lstThreadsInvite.Add(Thread.CurrentThread);
                    lstThreadsInvite.Distinct().ToList();
                    Thread.CurrentThread.IsBackground = true;
                }
                catch (Exception ex)
                { };
                foreach (var item_lstEmailInvites in ClGlobul.lstEmailInvites)
                {
                    try
                    {
                        Invite(item_lstEmailInvites, ref objPinUser);
                        GlobusFileHelper.AppendStringToTextfileNewLine(item_lstEmailInvites, PDGlobals.InviteSentPath);
                        Thread.Sleep(1000);
                    }
                    catch (Exception ex)
                    {
                        GlobusLogHelper.log.Info(" => [ Invite Failed For This Email " + item_lstEmailInvites + " ]");
                    }

                    int DelayTime = RandomNumberGenerator.GenerateRandom(minDelayInvite, maxDelayInvite);
                    GlobusLogHelper.log.Info(" => [ Delay For " + DelayTime + " Seconds ]");
                    Thread.Sleep(DelayTime);
                }
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
            }
        }
Exemplo n.º 6
0
        public void getHashTags()
        {
            classes.Cls_FollowStart ObjFollowProcess = new MixedCampaignManager.classes.Cls_FollowStart();

            //ObjFollowProcess.CampaignFollowLogEvents.addToLogger += new EventHandler(logEvents_addToLogger);

            Globals.HashTags.Clear();
            string returnStatus = string.Empty;

            Globals.HashTags = GetHashTags_New(out returnStatus);
            if (Globals.HashTags.Count > 0)
            {
                Log("[ " + DateTime.Now + " ] => [ " + Globals.HashTags.Count + " Trending Hash Tags ]");
                Log("[ " + DateTime.Now + " ] => [ " + Globals.HashTags.Count + " Hash Tags In List ]");
                foreach (string data in Globals.HashTags)
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine(data, Globals.Path_HashtagsStore);
                }
                Log("[ " + DateTime.Now + " ] => [ Hash tag Finished ]");
                Log("-----------------------------------------------------------------------------------------------------------------------");
            }
            else
            {
                Log("[ " + DateTime.Now + " ] => [ Rate Limit Exceeded.Please Try After Some Time ]");
            }
        }
Exemplo n.º 7
0
 private void chkGroupUpdate_CheckedChanged(object sender, EventArgs e)
 {
     try
     {
         if (chkGroupUpdate.Checked == true)
         {
             for (int i = 0; i < chkUpdateCollection.Items.Count; i++)
             {
                 string aaa = Convert.ToString(chkUpdateCollection.Items[i]);
                 chkUpdateCollection.SetItemChecked(i, true);
             }
         }
         else
         {
             for (int i = 0; i < chkUpdateCollection.Items.Count; i++)
             {
                 string aaa = Convert.ToString(chkUpdateCollection.Items[i]);
                 chkUpdateCollection.SetItemChecked(i, false);
             }
         }
     }
     catch (Exception ex)
     {
         GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Group Update --> chkGroupUpdate_CheckedChanged() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
         GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Group Update --> chkGroupUpdate_CheckedChanged() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinGetGroupMemberErrorLogs);
     }
 }
Exemplo n.º 8
0
        private void btnStartCampagin_Click(object sender, EventArgs e)
        {
            try
            {
                if (dgvCampaigndata.RowCount > 0)
                {
                    string[] Array = new string[4];
                    Globals.Array[0] = dgvCampaigndata.SelectedRows[0].Cells[1].Value.ToString();
                    Globals.Array[1] = dgvCampaigndata.SelectedRows[0].Cells[2].Value.ToString();
                    Globals.Array[2] = dgvCampaigndata.SelectedRows[0].Cells[3].Value.ToString();
                    Globals.Array[3] = dgvCampaigndata.SelectedRows[0].Cells[4].Value.ToString();
                    this.Close();

                    RaiseFlyCreationEvent();
                }
                else
                {
                    MessageBox.Show("No Campaign in DataBase");
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> Campaign --> btnStartCampagin_Click() --> " + ex.Message, Globals.Path_CampaignManager);
            }
        }
Exemplo n.º 9
0
        private void LinkedInMembersGroupSearch()
        {
            int    numberofThreads = 5;
            string SelectedEmail   = string.Empty;

            this.Invoke(new MethodInvoker(delegate
            {
                SelectedEmail = cmbUser.SelectedItem.ToString();
            }));

            try
            {
                if (LinkedInManager.linkedInDictionary.Count > 0)
                {
                    ThreadPool.SetMaxThreads(numberofThreads, 5);
                    foreach (KeyValuePair <string, LinkedInMaster> item in LinkedInManager.linkedInDictionary)
                    {
                        if (SelectedEmail.Contains(item.Key))
                        {
                            ThreadPool.SetMaxThreads(numberofThreads, 5);
                            ThreadPool.QueueUserWorkItem(new WaitCallback(StartDMMultiThreadedMembersGroupScrpAdd), new object[] { item });
                            Thread.Sleep(1000);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Friends Group Scraper --> LinkedInMembersGroupSearch() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Friends Group Scraper --> LinkedInMembersGroupSearch() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddFriendsGroupScraperErrorLogs);
            }
        }
Exemplo n.º 10
0
        private void btnSet_Click(object sender, EventArgs e)
        {
            try
            {
                Globals.DesktopFolder = txtExportLocation.Text;
                string path = string.Empty;
                path = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\InBoardPro\\LDDefaultFolderPath.txt";
                using (StreamWriter sw = new StreamWriter(path))
                {
                    sw.Write("");
                }

                GlobusFileHelper.AppendStringToTextfileNewLine(txtExportLocation.Text, Globals.Path_LinkedinDefaultSave);

                List <string> defaultpath = new List <string>();

                if (MessageBox.Show("Export Location Is >>>" + Globals.DesktopFolder, "Notification", MessageBoxButtons.OK) == DialogResult.OK)
                {
                    defaultpath            = GlobusFileHelper.ReadFiletoStringList(Globals.Path_LinkedinDefaultSave);
                    txtExportLocation.Text = defaultpath[0];

                    this.Close();
                }
            }
            catch
            {
            }
        }
Exemplo n.º 11
0
 private void btntitle_Click(object sender, EventArgs e)
 {
     try
     {
         using (OpenFileDialog ofd = new OpenFileDialog())
         {
             ofd.Filter           = "Text Files (*.txt)|*.txt";
             ofd.InitialDirectory = Application.StartupPath;
             if (ofd.ShowDialog() == DialogResult.OK)
             {
                 txtTitleName.Text = ofd.FileName;
                 lsttitlename.Clear();
                 List <string> templist = GlobusFileHelper.ReadFile(ofd.FileName);
                 foreach (string item in templist)
                 {
                     string newItem = item.Replace("\t", "");
                     if (!lsttitlename.Contains(item) && !string.IsNullOrEmpty(newItem))
                     {
                         lsttitlename.Add(item);
                     }
                 }
                 AddExperienceLogger("[ " + DateTime.Now + " ] => [ " + lsttitlename.Count + "  Title Loaded ]");
             }
         }
     }
     catch (Exception ex)
     {
         GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Account Creator --> btnfname_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
         GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Account Creator --> btnfname_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAccountCraetionErrorLogs);
     }
 }
Exemplo n.º 12
0
        private void LinkedInGroupMemberSearch()
        {
            int numberofThreads = 5;

            try
            {
                counter_GroupMemberSearch = LinkedInManager.linkedInDictionary.Count;

                if (LinkedInManager.linkedInDictionary.Count > 0)
                {
                    ThreadPool.SetMaxThreads(numberofThreads, 5);
                    foreach (KeyValuePair <string, LinkedInMaster> item in LinkedInManager.linkedInDictionary)
                    {
                        ThreadPool.SetMaxThreads(numberofThreads, 5);
                        ThreadPool.QueueUserWorkItem(new WaitCallback(StartDMMultiThreadedGroupMemmberAdd), new object[] { item });
                        Thread.Sleep(1000);
                    }
                }
                else
                {
                    MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu");
                    AddLoggerGroupAdd("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]");
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Friends Group Scraper --> LinkedInGroupMemberSearch() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Friends Group Scraper --> LinkedInGroupMemberSearch() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddFriendsGroupScraperErrorLogs);
            }
        }
Exemplo n.º 13
0
        private void LinkedInUpdateLiker()
        {
            try
            {
                int numberOfThreads = 0;

                if (GroupStatus.GroupUrl.Count > 0)
                {
                    foreach (string grpKey in GroupStatus.GroupUrl)
                    {
                        Groups.GroupUpdate.Que_GrpKey_Post.Enqueue(grpKey);
                    }
                }
                else
                {
                    AddLoggerCommentLiker("[ " + DateTime.Now + " ] => [ Group User Key Invalid ]");
                    return;
                }

                counter_GroupMemberSearch = LinkedInManager.linkedInDictionary.Count;

                if (LinkedInManager.linkedInDictionary.Count() > 0)
                {
                    ThreadPool.SetMaxThreads(numberOfThreads, 5);

                    foreach (KeyValuePair <string, LinkedInMaster> item in LinkedInManager.linkedInDictionary)
                    {
                        string value = string.Empty;
                        cmbGroupUser.Invoke(new MethodInvoker(delegate
                        {
                            value = cmbGroupUser.SelectedItem.ToString();
                        }));

                        if (value.Contains(item.Key))
                        {
                            ThreadPool.SetMaxThreads(numberOfThreads, 5);

                            ThreadPool.QueueUserWorkItem(new WaitCallback(PostUpdateLiker), new object[] { item });

                            Thread.Sleep(1000);
                        }

                        if (value.Contains("Select All Account"))
                        {
                            ThreadPool.SetMaxThreads(numberOfThreads, 5);

                            ThreadPool.QueueUserWorkItem(new WaitCallback(PostUpdateLiker), new object[] { item });

                            Thread.Sleep(1000);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Group Update --> LinkedInUpdateLiker() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Group Update --> LinkedInUpdateLiker() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinGetGroupMemberErrorLogs);
            }
        }
Exemplo n.º 14
0
        private void btnLinkedinSearch_Click(object sender, EventArgs e)
        {
            CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable();

            if (CheckNetConn)
            {
                try
                {
                    lstJoinFriendGroupThread.Clear();

                    if (IsStop)
                    {
                        IsStop = false;
                    }

                    if (LinkedInManager.linkedInDictionary.Count() == 0)
                    {
                        return;
                    }
                    else if (cmbUser.Items.Count == 0)
                    {
                        AddLoggerGroupAdd("[ " + DateTime.Now + " ] => [ Please click Add Friend button.. ]");
                        MessageBox.Show("Please click Add Friend button..");
                        return;
                    }
                    else if (chkMembers.Items.Count == 0)
                    {
                        AddLoggerGroupAdd("[ " + DateTime.Now + " ] => [ Please select ID.. ]");
                        MessageBox.Show("Please select ID..");
                        return;
                    }
                    if (chkMembers.CheckedItems.Count == 0)
                    {
                        AddLoggerGroupAdd("[ " + DateTime.Now + " ] => [ Please select Atleast One Friend.. ]");
                        MessageBox.Show("Please select Atleast One Friend..");
                        return;
                    }

                    GroupStatus.GroupDtl.Clear();
                    AddLoggerGroupAdd("[ " + DateTime.Now + " ] => [ Search Groups for Selected Friends.. ]");
                    btnLinkedinSearch.Cursor = Cursors.AppStarting;

                    new Thread(() =>
                    {
                        LinkedInMembersGroupSearch();
                    }).Start();
                }
                catch (Exception ex)
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Friends Group Scraper --> btnAddGroups_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                    GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Friends Group Scraper --> btnAddGroups_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddFriendsGroupScraperErrorLogs);
                }
            }
            else
            {
                MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection...");
                AddLoggerGroupAdd("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]");
            }
        }
Exemplo n.º 15
0
        private void StartAcceptInvitation()
        {
            try
            {
                int NoofThread = 5;
                if (NumberHelper.ValidateNumber(textNoOfThread.Text.Trim()))
                {
                    NoofThread = int.Parse(textNoOfThread.Text.Trim());
                    if (NoofThread == 0)
                    {
                        AddAcceptInvitationsLogger("[ " + DateTime.Now + " ] => [ PROCESS COMPLETED ]");
                        AddAcceptInvitationsLogger("-------------------------------------------------------------------------------------------------------------------");
                        BtnAccectInvitation.Cursor = Cursors.Default;
                        return;
                    }
                    ThreadPool.SetMaxThreads(NoofThread, 5);
                }
                else
                {
                    AddAcceptInvitationsLogger("[ " + DateTime.Now + " ] => [ Please Fill Integer value in TextBox(No. of Threads) ]");
                    return;

                    textNoOfThread.Text = "5";
                }

                counter_AcceptInvitation = LinkedInManager.linkedInDictionary.Count;

                if (LinkedInManager.linkedInDictionary.Count > 0)
                {
                    try
                    {
                        foreach (KeyValuePair <string, LinkedInMaster> item in LinkedInManager.linkedInDictionary)
                        {
                            ThreadPool.SetMaxThreads(NoofThread, 5);

                            ThreadPool.QueueUserWorkItem(new WaitCallback(StartAcceptInvitationMultiThread), new object[] { item });
                            // StartAcceptInvitationMultiThread  ( new object[] { item });

                            Thread.Sleep(1000);
                        }
                    }
                    catch (Exception ex)
                    {
                        GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Accept Invitation --> StartAcceptInvitation() ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                        GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Accept Invitation --> StartAcceptInvitation() ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddConnectionErrorLogs);
                    }
                }
                else
                {
                    AddAcceptInvitationsLogger("[ " + DateTime.Now + " ] => [ Please Load Account ! ]");
                    return;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error >>> " + ex.StackTrace);
            }
        }
Exemplo n.º 16
0
        private void LinkedInRemovePendingGroups()
        {
            try
            {
                int numberOfThreads = 20;
                counter_PendGroupRemoved = LinkedInManager.linkedInDictionary.Count;

                string SelectedEmail = string.Empty;
                this.Invoke(new MethodInvoker(delegate
                {
                    SelectedEmail = cmbUserPendingGroup.SelectedItem.ToString();
                }));

                try
                {
                    if (LinkedInManager.linkedInDictionary.Count() > 0)
                    {
                        ThreadPool.SetMaxThreads(numberOfThreads, 5);

                        foreach (KeyValuePair <string, LinkedInMaster> item in LinkedInManager.linkedInDictionary)
                        {
                            if (!chkSelectPendingGrp.Checked)
                            {
                                if (SelectedEmail.Contains(item.Key))
                                {
                                    ThreadPool.SetMaxThreads(numberOfThreads, 5);

                                    ThreadPool.QueueUserWorkItem(new WaitCallback(PostRemovePendingGroups), new object[] { item });

                                    Thread.Sleep(1000);
                                }
                            }
                            else
                            {
                                if (IsallaccChecked)
                                {
                                    ThreadPool.SetMaxThreads(numberOfThreads, 5);

                                    ThreadPool.QueueUserWorkItem(new WaitCallback(PostRemovePendingGroups), new object[] { item });

                                    Thread.Sleep(1000);
                                }
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Pending Groups --> LinkedInRemovePendingGroups() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                    GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Pending Groups --> LinkedInRemovePendingGroups() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPendingGroupErrorLogs);
                }
            }
            catch
            {
            }
        }
Exemplo n.º 17
0
        public void StartScrapGroupMember()
        {
            try
            {
                int NoofThread = 5;
                counter = LinkedInManager.linkedInDictionary.Count();

                if (NumberHelper.ValidateNumber(TxtNoOfThreads.Text.Trim()))
                {
                    NoofThread = Convert.ToInt32(TxtNoOfThreads.Text.Trim());
                    ThreadPool.SetMaxThreads(NoofThread, 5);
                }
                else
                {
                    AddScrapGroupMemberLogger("Please Fill Integer value in TextBox(No. of Threads) ");
                    NoofThread          = 0;
                    TxtNoOfThreads.Text = "5";
                    return;
                }

                if (LinkedInManager.linkedInDictionary.Count > 0)
                {
                    try
                    {
                        foreach (KeyValuePair <string, LinkedInMaster> item in LinkedInManager.linkedInDictionary)
                        {
                            ThreadPool.SetMaxThreads(NoofThread, 5);

                            //ThreadPool.QueueUserWorkItem(new WaitCallback(StartScrapGrpMemberMultiThread), new object[] { item });
                            StartScrapGrpMemberMultiThread(new object[] { item });

                            Thread.Sleep(1000);
                            if (!ChangeToNextAccount)
                            {
                                break;
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Accept Invitation --> StartAcceptInvitation() ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                        GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Accept Invitation --> StartAcceptInvitation() ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddConnectionErrorLogs);
                    }
                }
                else
                {
                    AddScrapGroupMemberLogger("[ " + DateTime.Now + " ] => [ Please Load Account ! ]");
                    return;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error >>> " + ex.StackTrace);
            }
        }
Exemplo n.º 18
0
        //{
        //    GlobusHttpHelper objhttpHelper = new GlobusHttpHelper();
        //    string HtmlData = objhttpHelper.getHtmlfromUrl(new Uri(Url));
        //    Console.Write("Fetching Email");
        //    lstEmail = globussRegex.GetEmailsFromString(HtmlData);
        //    Console.WriteLine("Fetched Email");
        //    Monitor.Enter(this);
        //    Console.Write("SavingData");
        //    Savedata();
        //    Monitor.Exit(this);
        //}

        private void Savedata(string rslt)
        {
            string FilePath = Application.StartupPath + "\\md.csv";

            GlobusFileHelper.AppendStringToTextfileNewLine(rslt, FilePath);

            //foreach (string str in lstEmail)
            //{
            //    GlobusFileHelper.AppendStringToTextfileNewLine(str, FilePath);
            //}
        }
Exemplo n.º 19
0
        public void SearchConnection(ref GlobusHttpHelper GlobusHttpHelper, string Email, string Password, string proxyAddress, int ProxyPort, string proxyUsername, string proxyPassword)
        {
            try
            {
                Campaign_lstSearchconnectionThread.Clear();


                int  SearchMinDelay = 0;
                int  SearchMaxDelay = 0;
                bool DelayReset     = true;
                if (chkUniqueConnectin.Checked)
                {
                    ManageConnections.ConnectUsing_Search.UseuniqueConn = true;
                    foreach (string itemKeyword in CampainGroupCreate.Campaign_lstConnectionSearchKeyword)
                    {
                        try
                        {
                            ManageConnections.ConnectUsing_Search.lstQueuKeywords.Enqueue(itemKeyword);
                        }
                        catch { }
                    }
                }

                if (CampainGroupCreate.Campaign_lstConnectionSearchKeyword.Count == 0)
                {
                    MessageBox.Show("Please Add Keywords!");
                    AddLoggerLinkedInProfileManager("[ " + DateTime.Now + " ] => [ Please Add Keywords! ]");
                    return;
                }
                else
                {
                    Queue <string> que_SearchKeywords = new Queue <string>();
                    foreach (string itemKeyword in CampainGroupCreate.Campaign_lstConnectionSearchKeyword)
                    {
                        que_SearchKeywords.Enqueue(itemKeyword);
                    }

                    LinkedInMaster LinkedIn_Master = new LinkedInMaster();
                    ManageConnections.ConnectUsing_Search ConnectUsing_Search = new ConnectUsing_Search(Email, Password, proxyAddress, ProxyPort.ToString(), proxyUsername, proxyPassword, que_SearchKeywords);
                    ManageConnections.ConnectUsing_Search.ConnectSearchUsingkeyword(ref ConnectUsing_Search, SearchMinDelay, SearchMaxDelay);

                    //ConnectUsing_Search.ConnectionSearch();

                    //ConnectUsingSearch obj_ConnectUsingSearch = new ConnectUsingSearch(Email, Password, proxyAddress, ProxyPort.ToString(), proxyUsername, proxyPassword);
                    //obj_ConnectUsingSearch.ConnectionSearch();
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnSearchConnection_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnSearchConnection_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddConnectionErrorLogs);
            }
        }
Exemplo n.º 20
0
 private void btnViewCampaign_Click(object sender, EventArgs e)
 {
     try
     {
         this.Close();
         FrmStartCampaign StartCampaign = new FrmStartCampaign();
         StartCampaign.ShowDialog();
     }
     catch (Exception ex)
     {
         GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> btnViewCampaign_Click() --> " + ex.Message, Globals.Path_CampaignManager);
     }
 }
Exemplo n.º 21
0
        public void SearchConnectionKeywordThread()
        {
            //ConnectUsingSearchKeywod obj_ConnectUsingSearchKeywod = new ConnectUsingSearchKeywod
            int SearchMinDelay = 0;
            int SearchMaxDelay = 0;

            if (!string.IsNullOrEmpty(txtSearchMindelay.Text) && NumberHelper.ValidateNumber(txtSearchMindelay.Text))
            {
                SearchMinDelay = Convert.ToInt32(txtSearchMindelay.Text);
            }
            if (!string.IsNullOrEmpty(txtSearchMaxDelay.Text) && NumberHelper.ValidateNumber(txtSearchMaxDelay.Text))
            {
                SearchMaxDelay = Convert.ToInt32(txtSearchMaxDelay.Text);
            }


            if (LinkedInManager.linkedInDictionary.Count > 0 && !string.IsNullOrEmpty(txtInviteKeyword.Text.ToString()))
            {
                int SetThread = 5;
                if (!string.IsNullOrEmpty(txtThreadManageConnection.Text) && NumberHelper.ValidateNumber(txtThreadManageConnection.Text))
                {
                    SetThread = Convert.ToInt32(txtThreadManageConnection.Text);
                }

                if (LinkedInManager.linkedInDictionary.Count > 0 && !string.IsNullOrEmpty(txtInviteKeyword.Text.ToString()))
                {
                    AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Process Start... ]");

                    counter_Search_connection = LinkedInManager.linkedInDictionary.Count;

                    try
                    {
                        foreach (KeyValuePair <string, LinkedInMaster> item in LinkedInManager.linkedInDictionary)
                        {
                            ThreadPool.SetMaxThreads(SetThread, 5);
                            ThreadPool.QueueUserWorkItem(new WaitCallback(SendInviteUsingKeyWords), new object[] { item, SearchMinDelay, SearchMaxDelay });
                        }
                    }
                    catch (Exception ex)
                    {
                        GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnSearchConnection_Click() --> ---2--- >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                        GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnSearchConnection_Click() --> ---2--- >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddConnectionErrorLogs);
                    }
                }
                else
                {
                    AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Please Enter Keywords! ]");
                }
            }
        }
Exemplo n.º 22
0
        private void filterdata()
        {
            List <string> lst      = new List <string>();
            string        FilePath = Application.StartupPath + "\\asdfg.csv";

            lst = GlobusFileHelper.readcsvfile(Application.StartupPath + "\\md.csv");
            foreach (string str in lst)
            {
                string Temp = str.Replace(",", "");
                if (!string.IsNullOrEmpty(Temp) && !str.Contains("Name") && !str.Contains("Office"))
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine(str, FilePath);
                }
            }
        }
Exemplo n.º 23
0
        public void modModule(string module)
        {
            try
            {
                switch (module)
                {
                case "WaitAndReply_":
                    Log("[ " + DateTime.Now + " ] => [ Scheduler started for : " + module + " ]");
                    RaiseSchedulerEvent(Module.WaitAndReply);
                    break;

                case "Tweet_":
                    Log("[ " + DateTime.Now + " ] => [ Scheduler started for : " + module + " ]");
                    RaiseSchedulerEvent(Module.Tweet);
                    //return Module.Tweet;
                    break;

                case "Retweet_":
                    //return Module.Retweet;
                    break;

                case "Follow":
                    //return Module.Follow;
                    Log("[ " + DateTime.Now + " ] => [ Scheduler started for : " + module + " ]");
                    RaiseSchedulerEvent(Module.Follow);
                    break;

                case "Unfollow_":
                    //return Module.Unfollow;
                    break;

                case "ProfileManager_":
                    //return Module.ProfileManager;
                    break;

                //case Module.ProfileManager:
                //    return threadNaming_ProfileManager_;

                default:
                    break;
                    //return Module.None;
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine("Error -->  modModule(string module) switch (module)--> " + ex.Message, Globals.Path_TwtErrorLogs);
            }
        }
Exemplo n.º 24
0
        public void LoadDataGrid()
        {
            try
            {
                DataTable dt = SelectAccoutsForGridView();

                dgvCampaigndata.Invoke(new MethodInvoker(delegate
                {
                    dgvCampaigndata.DataSource = dt;
                }));
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> Campaign --> LoadDataGrid() --> " + ex.Message, Globals.Path_CampaignManager);
            }
        }
Exemplo n.º 25
0
        public void StopThreads(string module)
        {
            Dictionary <string, Thread> tempdictionary_Threads = new Dictionary <string, Thread>();

            foreach (KeyValuePair <string, Thread> item in dictionary_Threads)
            {
                try
                {
                    tempdictionary_Threads.Add(item.Key, item.Value);
                }
                catch { }
            }
            try
            {
                foreach (KeyValuePair <string, Thread> item in tempdictionary_Threads)
                {
                    try
                    {
                        string key        = item.Key;
                        string threadName = Regex.Split(key, "_")[0];
                        module = module.Replace("_", "");
                        //Thread thread = item.Value;
                        if (threadName == module)
                        {
                            //AddToLog_follow("[ " + DateTime.Now + " ] => [ Aborting : " + key + " ]");
                            //thread.Abort();
                            Thread thread       = item.Value;
                            int    abortCounter = 0;

                            if (thread != null)
                            {
                                thread.Abort();
                                //}
                                //AddToLog_follow("[ " + DateTime.Now + " ] => [ Aborted : " + key + " ]");
                                dictionary_Threads.Remove(key);
                            }
                        }
                    }
                    catch { }
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine("Error in Abort in Profile Manager Foreach Loop " + ex.Message, Globals.Path_TwtErrorLogs);
            }
        }
Exemplo n.º 26
0
        private void btnGetUser_Click(object sender, EventArgs e)
        {
            CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable();

            if (CheckNetConn)
            {
                try
                {
                    if (LinkedInManager.linkedInDictionary.Count() == 0)
                    {
                        MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu");
                        AddLoggerCommentLiker("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]");
                        lstLoglinkdinScarper.Items.Clear();
                        frmAccounts FrmAccount = new frmAccounts();
                        FrmAccount.Show();
                        return;
                    }

                    GrpMess.Clear();
                    lstLoglinkdinScarper.Items.Clear();
                    chkUpdateCollection.Items.Clear();
                    cmbGroupUser.Items.Clear();
                    cmbGroupUser.Items.Add("Select All Account");
                    //pictureBox3Red.Visible = true;
                    //pictureBox3Green.Visible = false;
                    AddLoggerCommentLiker("[ " + DateTime.Now + " ] => [ Starting Process for Login... ]");
                    AddLoggerCommentLiker("[ " + DateTime.Now + " ] => [ Process is Running Now... ]");
                    btnGetUser.Cursor = Cursors.AppStarting;

                    new Thread(() =>
                    {
                        LinkdinGroupUpdate();
                    }).Start();
                }
                catch (Exception ex)
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Group Update --> btnGetUser_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                    GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Group Update --> btnGetUser_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinGetGroupMemberErrorLogs);
                }
            }
            else
            {
                MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection...");
                AddLoggerCommentLiker("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]");
            }
        }
Exemplo n.º 27
0
        private void btnAddStatusImage_Click(object sender, EventArgs e)
        {
            CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable();

            if (CheckNetConn)
            {
                try
                {
                    lstThreadForStatusImage.Clear();
                    if (IsStop)
                    {
                        IsStop = false;
                    }

                    if (LinkedInManager.linkedInDictionary.Count() == 0)
                    {
                        MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu");
                        AddToLogStatusImage("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]");
                        frmAccounts FrmAccount = new frmAccounts();
                        FrmAccount.Show();
                        return;
                    }
                    else if (ClsStatusImageShare.lstpicfile.Count == 0)
                    {
                        MessageBox.Show("Please Add Status Image for Post");
                        AddToLogStatusImage("[ " + DateTime.Now + " ] => [ Please Add Status Image for Post ]");
                        return;
                    }
                }
                catch (Exception ex)
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Status Update --> btnAddStatusImage_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                    GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Status Update --> btnAddStatusImage_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinStatusImageUpdateErrorLogs);
                }

                new Thread(() =>
                {
                    LinkdinStatusImageShare();
                }).Start();
            }
            else
            {
                MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection...");
                AddToLogStatusImage("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]");
            }
        }
Exemplo n.º 28
0
 private void PopulateCmo()
 {
     try
     {
         comboBoxemail.Items.Clear();
         foreach (KeyValuePair <string, LinkedInMaster> item in LinkedInManager.linkedInDictionary)
         {
             comboBoxemail.Items.Add(item.Key);
         }
         //AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Accounts Uploaded.. ]");
     }
     catch (Exception ex)
     {
         GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> PopulateCmo() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
         GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> PopulateCmo() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs);
     }
 }
Exemplo n.º 29
0
        private void btnAddPendingGroups_Click(object sender, EventArgs e)
        {
            CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable();

            if (CheckNetConn)
            {
                try
                {
                    if (LinkedInManager.linkedInDictionary.Count() == 0)
                    {
                        MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu");
                        AddLoggerPendingGroups("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]");

                        frmAccounts FrmAccount = new frmAccounts();
                        FrmAccount.Show();
                        return;
                    }

                    lstLogPendingGroups.Items.Clear();
                    chkPendingGroup.Items.Clear();

                    cmbUserPendingGroup.Items.Clear();
                    LinkdInContacts.Clear();

                    AddLoggerPendingGroups("[ " + DateTime.Now + " ] => [ Starting Search for Pending Groups.. ]");

                    btnAddPendingGroups.Cursor = Cursors.AppStarting;

                    new Thread(() =>
                    {
                        LinkedInPendingGroupSearch();
                    }).Start();
                }
                catch (Exception ex)
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Pending Groups --> btnAddPendingGroups_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                    GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Pending Groups --> btnAddPendingGroups_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPendingGroupErrorLogs);
                }
            }
            else
            {
                MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection...");
                AddLoggerPendingGroups("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]");
            }
        }
Exemplo n.º 30
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     try
     {
         string SelectedCampaignName = string.Empty;
         cmboxCampiagnName.Invoke(new MethodInvoker(delegate
         {
             SelectedCampaignName = cmboxCampiagnName.SelectedItem.ToString();
         }));
         if (SelectedCampaignName != "Select Campaign Name")
         {
             string  Query = "Select * From tb_CampaignData";
             DataSet ds    = DataBaseHandler.SelectQuery(Query, "tb_CampaignData");
             foreach (DataRow dr in ds.Tables[0].Rows)
             {
                 string CampaignName = dr["Campaign_Name"].ToString();
                 if (SelectedCampaignName == CampaignName)
                 {
                     grpBoxCampaignDetaills.Enabled = true;
                     if (dr[4].ToString() == "Username")
                     {
                         txtUsernameList.Text = dr["Username_List"].ToString();
                         SelectionType        = "Username";
                         EditCampaign         = true;
                     }
                     else if (dr[4].ToString() == "Keyword")
                     {
                         txtKeywordList.Text = dr["Keyword_List"].ToString();
                         SelectionType       = "Keyword";
                         EditCampaign        = true;
                     }
                 }
             }
         }
         else
         {
             MessageBox.Show("Please Select a Valid Campaign Name");
         }
     }
     catch (Exception ex)
     {
         GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> btnEdit_Click() --> " + ex.Message, Globals.Path_CampaignManager);
     }
 }