public void Login()
        {
            string _EmailId = "[email protected]";
            string _Password = "vini1hjkdhj1233";

            try
            {
                clearProxyDataFromAccount();

                #region Previous Login Code //16.03.2015
                if (string.IsNullOrEmpty(proxyPort))
                {
                    proxyPort = "0";
                }
                //string _MainSourcePage = httpHelper.getHtmlfromUrl(new Uri("https://pinterest.com/login/"), string.Empty, string.Empty, this.UserAgent);
                string _MainSourcePage = httpHelper.getHtmlfromUrlProxy(new Uri("https://pinterest.com/login/"), "", proxyAddress, int.Parse(proxyPort), proxyUsername, proxyPassword, "");
                if (string.IsNullOrEmpty(_MainSourcePage))
                {
                    _MainSourcePage = httpHelper.getHtmlfromUrlProxy(new Uri("https://pinterest.com/login/"), "", "", int.Parse("0"), "", "", "");
                }

                ///Get App Version 
                if (_MainSourcePage.Contains("app_version"))
                {
                    string[] ArrAppVersion = System.Text.RegularExpressions.Regex.Split(_MainSourcePage, "app_version");
                    if (ArrAppVersion.Count() > 0)
                    {
                        //string DataString = ArrAppVersion[ArrAppVersion.Count() - 1];

                        //int startindex = DataString.IndexOf("\"");
                        //string start = DataString.Substring(startindex).Replace("\": \"", "").Replace("\"", string.Empty);
                        //int endindex = start.IndexOf("}");

                        //App_version = start.Substring(0, endindex);

                        string DataString = ArrAppVersion[ArrAppVersion.Length - 1];

                        int startindex = DataString.IndexOf("\": \"");
                        int endindex = DataString.IndexOf(",");

                        App_version = DataString.Substring(startindex, endindex - startindex).Replace("\": \"", "").Replace("\"", string.Empty).Replace("}", string.Empty);
                    }
                }
                else
                {
                    ///App version is not available in page source 
                }


                string referer = "https://www.pinterest.com/login/";
                string PostData = "source_url=%2F&data=%7B%22options%22%3A%7B%22username_or_email%22%3A%22CheerfulCarpenter868%40hotmail.com%22%2C%22password%22%3A%22CjHTIdZcyp%22%7D%2C%22context%22%3A%7B%7D%7D&module_path=App%3EHomePage%3EUnauthHomePage%3ESignupForm%3EUserRegister(is_login_form%3Dnull%2C+wall_class%3DdarkWall%2C+container%3Dhome_page%2C+show_personalize_field%3Dfalse%2C+unified_auth%3Dnull%2C+auto_follow%3Dnull%2C+next%3Dnull%2C+register%3Dtrue)";
                //string PostData = "source_url=%2Flogin%2F&data=%7B%22options%22%3A%7B%22username_or_email%22%3A%22" + Uri.EscapeDataString(Username) + "%22%2C%22password%22%3A%22" + Password + "%22%7D%2C%22context%22%3A%7B%22app_version%22%3A%22" + App_version + "%22%7D%7D&module_path%3DApp()%3ELoginPage()%3ELogin()%3EButton(class_name%3Dprimary%2C%20text%3DLog%20in%2C%20type%3Dsubmit%2C%20size%3Dlarge)";
                //string PostData = "source_url=%2Flogin%2F&data=%7B%22options%22%3A%7B%22username_or_email%22%3A%22" + Uri.EscapeDataString(Username) + "%22%2C%22password%22%3A%22" + Password + "%22%7D%2C%22context%22%3A%7B%22app_version%22%3A%22" + App_version + "%22%2C%22https_exp%22%3Afalse%7D%7D&module_path=App()%3ELoginPage()%3ELogin()%3EButton(class_name%3Dprimary%2C+text%3DLog+in%2C+type%3Dsubmit%2C+size%3Dlarge)";
                //PostData = "source_url=%2Fsettings%2F&data=%7B%22options%22%3A%7B%22first_name%22%3A%22abhay%22%2C%22last_name%22%3A%22mahavar%22%2C%22username%22%3A%22"++"%22%2C%22about%22%3A%22hi+i+am+software+Developer%22%2C%22location%22%3A%22kanpur%22%2C%22website_url%22%3A%22http%3A%2F%2Fwww.scriptnut.com%2F%22%7D%2C%22context%22%3A%7B%22app_version%22%3A%22b1da8fc%22%2C%22https_exp%22%3Afalse%7D%7D&module_path=App()%3EUserSettingsPage(resource%3DUserSettingsResource())%3EShowModalButton(module%3DUserEdit)%23Modal(module%3DUserEdit(resource%3DUserSettingsResource()))";
                string login = httpHelper.postFormDataProxyPin(new Uri("https://www.pinterest.com/resource/UserSessionResource/create/"), PostData, referer);
                //string login = httpHelper.postFormDataProxy(new Uri("https://www.pinterest.com/resource/UserSessionResource/create/"), PostData, referer, proxyAddress, int.Parse(proxyPort), proxyUsername, proxyPassword);
                if (string.IsNullOrEmpty(login))
                {
                    //login = httpHelper.postFormDataProxy(new Uri("https://www.pinterest.com/resource/UserSessionResource/create/"), PostData, referer, "", int.Parse("0"), "", "");

                    login = httpHelper.postFormDataProxyPin(new Uri("https://www.pinterest.com/resource/UserSessionResource/create/"), PostData, referer);
                }

                string AfterLoginPageSource = httpHelper.getHtmlfromUrlProxy(new Uri("https://www.pinterest.com"), "", proxyAddress, int.Parse(proxyPort), proxyUsername, proxyPassword, "");
                if (string.IsNullOrEmpty(AfterLoginPageSource))
                {
                    AfterLoginPageSource = httpHelper.getHtmlfromUrlProxy(new Uri("https://www.pinterest.com"), "", "", int.Parse("0"), "", "", "");
                }

                if (AfterLoginPageSource.Contains("Logout") || AfterLoginPageSource.Contains("pinHolder"))
                {
                    Log("[ " + DateTime.Now + " ] => [ Successfully Login for " + Username + " ]");
                    this.LoggedIn = true;

                }
                else
                {
                    // Just Modifying for Now
                    //Log("[ " + DateTime.Now + " ] => [ Login Failed for " + Username + " ]");
                    //this.LoggedIn = false;
                    if (!string.IsNullOrEmpty(AfterLoginPageSource))
                    {
                        Log("[ " + DateTime.Now + " ] => [ Successfully Login for " + Username + " ]");
                        this.LoggedIn = true;
                    }
                    else
                    {
                        Log("[ " + DateTime.Now + " ] => [ Login Failed for " + Username + " ]");
                        this.LoggedIn = false;
                    }
                } 
                #endregion

                //List<string> listFollowersFromDatabse = new List<string>();
                try
                {

                    string CheckWlcomeUrl = httpHelper.getHtmlfromUrl(new Uri("https://www.pinterest.com/"));


                    List<string> listFollowersFromDatabse = new List<string>();
                    try
                    {
                        string screen_Name = Getscreen_Name();
                        PinterestAccountManager.ScreenName = screen_Name;
                        string selectquery = "Select * from  tb_FollowerName where UserName='" + screen_Name + "'";
                        System.Data.DataSet ds = DataBaseHandler.SelectQuery(selectquery, "tb_FollowerName");

                        foreach (System.Data.DataRow dRow in ds.Tables[0].Rows)
                        {
                            try
                            {
                                listFollowersFromDatabse.Add(dRow["FollwerName"].ToString());
                            }
                            catch { }

                        }
                    }
                    catch { }

                    try
                    {
                        FrmEmailProxyAssigner obj = new FrmEmailProxyAssigner();

                        string screen_Name = Getscreen_Name();

                        //Get current followers list from website
                        List<string> FollowersName = GetRefrshFollowerName(screen_Name);

                        //FollowersName.RemoveAt(0);

                        if (FollowersName != null)
                        {
                            FollowersName = FollowersName.Distinct().ToList();
                        }
                        if (FollowersName.Contains(screen_Name))
                        {
                            FollowersName.Remove(screen_Name);
                        }
                        //listFollowersFromDatabse.Add("gunde");
                        List<string> listUnfollowers = listFollowersFromDatabse.Except(FollowersName).ToList();

                        LogForFollow(listUnfollowers.Count + " users Unfollowed Account : " + screen_Name);

                        string UnfollowersList = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\PInterestUnfollowersList.csv";

                        //write unfollowers list to csv
                        if (!System.IO.File.Exists(UnfollowersList))                                                             //*     CSV Header     *//
                        {
                            try
                            {
                                string dataFormat = "Account_ScreenName" + "," + "UnfollowerUsername";
                                GlobusFileHelper.AppendStringToTextfileNewLine(dataFormat, UnfollowersList); //dataFormat
                            }
                            catch (Exception ex) { };
                        }

                        foreach (string unfollower in listUnfollowers)
                        {
                            try
                            {
                                string dataFormat = screen_Name + "," + unfollower;
                                GlobusFileHelper.AppendStringToTextfileNewLine(dataFormat, UnfollowersList); //dataFormat

                                LogForFollow("Unfollower : " + unfollower + " for Account : " + screen_Name + " written to file " + UnfollowersList);
                            }
                            catch (Exception ex) { };

                            try
                            {
                                string query = "DELETE FROM  tb_FollowerName where UserName='" + screen_Name + "' and FollwerName='" + unfollower + "'";
                                DataBaseHandler.DeleteQuery(query, "tb_FollowerName");

                                LogForFollow("Unfollower : " + unfollower + " for Account : " + screen_Name + " deleted from Databse");
                            }
                            catch { }
                        }

                        List<string> listNewFollowers = FollowersName.Except(listFollowersFromDatabse).ToList();

                        LogForFollow(listNewFollowers.Count + " NEW Followers for Account : " + screen_Name + "");

                        foreach (string follName_item in listNewFollowers)
                        {
                            try
                            {
                                string query = "INSERT INTO  tb_FollowerName (UserName,FollwerName) VALUES ('" + screen_Name + "' ,'" + follName_item + "') ";
                                DataBaseHandler.InsertQuery(query, "tb_FollowerName");

                                LogForFollow("New follower : " + follName_item + " for Account : " + screen_Name + " added to Databse");
                            }
                            catch { }

                        }

                        string follower = GetFollowercount(screen_Name);
                        string following = GetFollowingCount(screen_Name);
                        string BOARDS = GetBoard(screen_Name);


                        string followingCount = PinterestAccountManager.getBetween(following, "value'>", "</span>");

                        

                        string BoardsName = string.Empty;
                        List<string> BOARDSNAMES = new List<string>();
                        if (frmMain.inviteStart)
                        {
                            BOARDSNAMES = obj.GetAllBoardNames_new1(screen_Name);
                            
                            foreach (var itemBoardNames in BOARDSNAMES)
                            {
                                lstBoardNames.Add(itemBoardNames.ToLower().Replace(" ", "-"));
                            }
                        }
                        frmMain.inviteStart = true;

                        //string BOARDSNAME = GetBoardsNAME(screen_Name);

                        try
                        {
                            foreach (string item_BoardNames in BOARDSNAMES)
                            {
                                //string insertBoard = "INSERT INTO tb_BoardName(UserName,BoardsName)VALUES('" + Username + "','" + item_BoardNames + "')";
                                //DataBaseHandler.InsertQuery(insertBoard, "tb_BoardName");

                                BoardsName += item_BoardNames + (":").ToString();
                            }
                        }
                        catch { }

                        try
                        {
                            string UpdateQuery = "Update tb_emails set Follower = '" + follower + "',Following = '" + followingCount + "',BOARDS= '" + BOARDS + "',BOARDSNAME='" + BoardsName + "',ScreenName='" + screen_Name + "' where UserName = '" + Username + "'";
                            DataBaseHandler.UpdateQuery(UpdateQuery, "tb_emails");
                            new FrmEmailProxyAssigner().LoadDataGrid();
                            new FrmEmailProxyAssigner().makeReadOnlyDataGrid();

                        }
                        catch { }
                    }

                    catch { }

                    string[] ArrData = System.Text.RegularExpressions.Regex.Split(AfterLoginPageSource, "username");

                    foreach (var item in ArrData)
                    {
                        if (item.Contains("{\"page_info"))
                        {
                            continue;
                        }
                        if (!item.StartsWith("\": null,") && !item.StartsWith("{\"request_identifier\""))
                        {
                            int startindex = item.IndexOf(":");
                            int endindex = item.IndexOf("\", \"");

                            this.Name = item.Substring(startindex + 1, endindex - startindex).Replace("id=\"UserNav\"", string.Empty).Replace("a ", string.Empty).Replace("<", string.Empty).Replace(">", string.Empty).Replace("'", string.Empty).Replace("href=", string.Empty).Replace("\"", string.Empty).Replace("/", string.Empty).Trim();
                            break;
                        }
                        if (item.Contains("locale"))// && item.Contains("P.currentUser.set"))
                        {
                            int startindex = item.IndexOf(":");
                            int endindex = item.IndexOf("\", \"");

                            this.Name = item.Substring(startindex + 1, endindex - startindex).Replace("id=\"UserNav\"", string.Empty).Replace("a ", string.Empty).Replace("<", string.Empty).Replace(">", string.Empty).Replace("'", string.Empty).Replace("href=", string.Empty).Replace("\"", string.Empty).Replace("/", string.Empty).Trim();
                            break;
                        }
                        else if (item.Contains("name\": \"AuthHomePage"))
                        {
                            int startindex = item.IndexOf(":");
                            int endindex = item.IndexOf("\", \"");

                            this.Name = item.Substring(startindex + 1, endindex - startindex).Replace("\"", string.Empty).Trim();
                        }
                    }
                    if (ArrData.Count() == 2 && string.IsNullOrEmpty(Name))
                    {
                        int startindex = ArrData[1].IndexOf(":");
                        int endindex = ArrData[1].IndexOf("\", \"");

                        this.Name = ArrData[1].Substring(startindex + 1, endindex - startindex).Replace("id=\"UserNav\"", string.Empty).Replace("a ", string.Empty).Replace("<", string.Empty).Replace(">", string.Empty).Replace("'", string.Empty).Replace("href=", string.Empty).Replace("\"", string.Empty).Replace("/", string.Empty).Trim();
                    }


                }
                catch (Exception ex)
                {
                    this.Name = string.Empty;
                }
            }
            catch { };
        }
        public bool LoginPinterestAccount1(ref GlobusHttpHelper httpHelper, string Username, string Password, string proxyAddress, string proxyPort, string proxyUsername, string proxyPassword,string ss)
        {
            lock (this)
            {
                string Name = string.Empty;
                string ProxyAddress = proxyAddress;
                string ProxyPort = proxyPort;
                string ProxyUsername = proxyUsername;
                string ProxyPassword = proxyPassword;
                string AfterLoginPageSource = string.Empty;
                try
                {
                    //string PinPage = httpHelper.getHtmlfromUrl(new Uri("https://www.pinterest.com/"));
                    string PinPage = httpHelper.getHtmlfromUrlProxy(new Uri("https://www.pinterest.com/"), ProxyAddress, Convert.ToInt32(proxyPort), proxyUsername, proxyPassword);
                    //string _MainSourcePage = httpHelper.getHtmlfromUrl(new Uri("https://www.pinterest.com/resource/NoopResource/get/?source_url=%2Flogin%2F%3Fnext%3Dhttps%253A%252F%252Fwww.pinterest.com%252F%26prev%3Dhttps%253A%252F%252Fwww.pinterest.com%252F&data=%7B%22options%22%3A%7B%7D%2C%22context%22%3A%7B%7D%7D&module_path=App()%3EHomePage()%3EUnauthHomePage(signup_email%3Dnull%2C+tab%3Dfollowing%2C+cmp%3Dnull%2C+resource%3DInspiredWallResource())&_=1424169081757"));
                    string _MainSourcePage = httpHelper.getHtmlfromUrlProxy(new Uri("https://www.pinterest.com/resource/NoopResource/get/?source_url=%2Flogin%2F%3Fnext%3Dhttps%253A%252F%252Fwww.pinterest.com%252F%26prev%3Dhttps%253A%252F%252Fwww.pinterest.com%252F&data=%7B%22options%22%3A%7B%7D%2C%22context%22%3A%7B%7D%7D&module_path=App()%3EHomePage()%3EUnauthHomePage(signup_email%3Dnull%2C+tab%3Dfollowing%2C+cmp%3Dnull%2C+resource%3DInspiredWallResource())&_=1424169081757"), proxyAddress, Convert.ToInt32(proxyPort), proxyUsername, proxyPassword);
                    //string _MainSourcePage = httpHelper.getHtmlfromUrl(new Uri("https://www.pinterest.com/resource/NoopResource/get/?source_url=%2Flogin%2F%3Faction%3Dlogin%26next%3Dhttps%253A%252F%252Fwww.pinterest.com%252F%26prev%3Dhttps%253A%252F%252Fwww.pinterest.com%252F%26referrer%3Dhome_page&data=%7B%22options%22%3A%7B%7D%2C%22context%22%3A%7B%7D%7D&module_path=App%3EHomePage%3EUnauthLoggedOutHomePage%3ELoginButton(class_name%3DloggedOutHomePageLogin%2C+text%3DLog+in%2C+element_type%3Da)&_=1437811789975"));

                    ///Get App Version 
                    if (PinPage.Contains("app_version"))
                    {
                        try
                        {
                            string[] ArrAppVersion = System.Text.RegularExpressions.Regex.Split(PinPage, "app_version");
                            if (ArrAppVersion.Count() > 0)
                            {
                                string DataString = ArrAppVersion[ArrAppVersion.Count() - 1];

                                int startindex = DataString.IndexOf("\"");
                                string start = DataString.Substring(startindex).Replace("\": \"", "").Replace("}", string.Empty).Replace("\"", string.Empty);
                                int endindex = start.IndexOf(",");

                                App_version = start.Substring(0, endindex);
                            }
                        }
                        catch { };
                    }
                    else
                    {
                        ///App version is not available in page source 
                    }


                    string referer = "https://www.pinterest.com/";

                    string PostData1 = "source_url=%2Flogin%2F%3Fnext%3Dhttps%253A%252F%252Fwww.pinterest.com%252F%26prev%3Dhttps%253A%252F%252Fwww.pinterest.com%252F&data=%7B%22options%22%3A%7B%22username_or_email%22%3A%22" + Uri.EscapeDataString(Username) + "%22%2C%22password%22%3A%22" + Uri.EscapeDataString(Password) + "%22%7D%2C%22context%22%3A%7B%7D%7D&module_path=App()%3ELoginPage()%3ELogin()%3EButton(text%3DLog+In%2C+size%3Dlarge%2C+class_name%3Dprimary%2C+type%3Dsubmit)";
                    //string PostData1 = "source_url=%2Flogin%2F%3Fnext%3Dhttps%253A%252F%252Fwww.pinterest.com%252F%26prev%3Dhttps%253A%252F%252Fwww.pinterest.com%252F&data=%7B%22options%22%3A%7B%22username_or_email%22%3A%22" + Uri.EscapeDataString(Username) + "%22%2C%22password%22%3A%22" + Uri.EscapeDataString(Password) + "%22%7D%2C%22context%22%3A%7B%7D%7D&module_path=App()%3ELoginPage()%3ELogin()%3EButton(text%3DLog+In%2C+size%3Dlarge%2C+class_name%3Dprimary%2C+type%3Dsubmit)";
                    //PostData = "source_url=%2Fsettings%2F&data=%7B%22options%22%3A%7B%22first_name%22%3A%22abhay%22%2C%22last_name%22%3A%22mahavar%22%2C%22username%22%3A%22"++"%22%2C%22about%22%3A%22hi+i+am+software+Developer%22%2C%22location%22%3A%22kanpur%22%2C%22website_url%22%3A%22http%3A%2F%2Fwww.scriptnut.com%2F%22%7D%2C%22context%22%3A%7B%22app_version%22%3A%22b1da8fc%22%2C%22https_exp%22%3Afalse%7D%7D&module_path=App()%3EUserSettingsPage(resource%3DUserSettingsResource())%3EShowModalButton(module%3DUserEdit)%23Modal(module%3DUserEdit(resource%3DUserSettingsResource()))";

                    //string PostData1 = "source_url=%2Flogin%2F%3Faction%3Dlogin%26next%3Dhttps%253A%252F%252Fwww.pinterest.com%252F%26prev%3Dhttps%253A%252F%252Fwww.pinterest.com%252F%26referrer%3Dhome_page&data=%7B%22options%22%3A%7B%22username_or_email%22%3A%22" + Uri.EscapeDataString(Username) + "%22%2C%22password%22%3A%22" + Uri.EscapeDataString(Password) + " %22%7D%2C%22context%22%3A%7B%7D%7D&module_path=App%3ELoginPage%3ELogin%3EButton(text%3DLog+in%2C+size%3Dlarge%2C+class_name%3Dprimary%2C+type%3Dsubmit)";


                    //string login = httpHelper.postFormDataProxyPin(new Uri("https://www.pinterest.com/resource/UserSessionResource/create/"), PostData1, referer);
                    string login = httpHelper.postFormDataProxy(new Uri("https://www.pinterest.com/resource/UserSessionResource/create/"), PostData1, referer, proxyAddress, Convert.ToInt32(proxyPort), proxyUsername, proxyPassword);

                   //  string CheckLogin = httpHelper.postFormDataProxy(new Uri("https://www.pinterest.com/resource/UserSessionResource/create/"), PostData1, referer, ProxyAddress, int.Parse(ProxyUsername), ProxyPassword, ProxyPort);

                     //AfterLoginPageSource = httpHelper.getHtmlfromUrl(new Uri("https://www.pinterest.com"));
                     AfterLoginPageSource = httpHelper.getHtmlfromUrlProxy(new Uri("https://www.pinterest.com"), proxyAddress, Convert.ToInt32(proxyPort), proxyUsername, proxyPassword);

                    if (AfterLoginPageSource.Contains("Logout") || AfterLoginPageSource.Contains("pinHolder") || AfterLoginPageSource.Contains("header1\": \"What are you interested in?") || AfterLoginPageSource.Contains("\"error\": null") || login.Contains("\"error\": null"))
                    {
                        Log("[ " + DateTime.Now + " ] => [ Successfully Login for " + Username + " ]");
                        this.LoggedIn = true;

                        //GlobusLogHelper.log.Debug("[ Social Sites => Pinterest => Account Creator => [ Successfully Login for " + Username + " ]");
                        //GlobusLogHelper.log.Info("[ Social Sites => Pinterest => Account Creator => [ Successfully Login for " + Username + " ]");
                        //this.LoggedIn = true;
                        //return true;
                    }
                    else
                    {
                        Log("[ " + DateTime.Now + " ] => [ Login Failed for " + Username + " ]");
                        this.LoggedIn = false;

                        //GlobusLogHelper.log.Debug("[ Social Sites => Pinterest => Account Creator => [ Login Failed for " + Username + " ]");
                        //GlobusLogHelper.log.Info("[ Social Sites => Pinterest => Account Creator => [ Login Failed for " + Username + " ]");
                        //this.LoggedIn = false;
                        return false;
                    }
                }
                catch (Exception ex)
                {
                    Log("[ " + DateTime.Now + " ] => [ Login Failed for " + Username + " ]");
                    this.LoggedIn = false;

                    //GlobusLogHelper.log.Debug("[ Social Sites => Pinterest => Account Creator => [ Login Failed for " + Username + " ]");
                    //GlobusLogHelper.log.Info("[ Social Sites => Pinterest => Account Creator => [ Login Failed for " + Username + " ]");
                    //GlobusLogHelper.log.Error(ex.Message);
                    return false;
                }


                try
                {

                 //   string CheckWlcomeUrl = httpHelper.getHtmlfromUrl(new Uri("https://www.pinterest.com/"));


                    List<string> listFollowersFromDatabse = new List<string>();
                    try
                    {
                        string screen_Name = Getscreen_Name();
                        string selectquery = "Select * from  tb_FollowerName where UserName='" + screen_Name + "'";
                        System.Data.DataSet ds = DataBaseHandler.SelectQuery(selectquery, "tb_FollowerName");

                        foreach (System.Data.DataRow dRow in ds.Tables[0].Rows)
                        {
                            try
                            {
                                listFollowersFromDatabse.Add(dRow["FollwerName"].ToString());
                            }
                            catch { }

                        }
                    }
                    catch { }

                    try
                    {
                        FrmEmailProxyAssigner obj = new FrmEmailProxyAssigner();

                        string screen_Name = Getscreen_Name();
                        Screen_Name = screen_Name;
                        //Get current followers list from website
                        List<string> FollowersName = GetRefrshFollowerName(screen_Name);

                        //FollowersName.RemoveAt(0);

                        if (FollowersName != null)
                        {
                            FollowersName = FollowersName.Distinct().ToList();
                        }
                        if (FollowersName.Contains(screen_Name))
                        {
                            FollowersName.Remove(screen_Name);
                        }
                        //listFollowersFromDatabse.Add("gunde");
                        List<string> listUnfollowers = listFollowersFromDatabse.Except(FollowersName).ToList();

                        LogForFollow(listUnfollowers.Count + " users Unfollowed Account : " + screen_Name);

                        string UnfollowersList = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\PInterestUnfollowersList.csv";

                        //write unfollowers list to csv
                        if (!System.IO.File.Exists(UnfollowersList))                                                             //*     CSV Header     *//
                        {
                            try
                            {
                                string dataFormat = "Account_ScreenName" + "," + "UnfollowerUsername";
                                GlobusFileHelper.AppendStringToTextfileNewLine(dataFormat, UnfollowersList); //dataFormat
                            }
                            catch (Exception ex) { };
                        }

                        foreach (string unfollower in listUnfollowers)
                        {
                            try
                            {
                                string dataFormat = screen_Name + "," + unfollower;
                                GlobusFileHelper.AppendStringToTextfileNewLine(dataFormat, UnfollowersList); //dataFormat

                                LogForFollow("Unfollower : " + unfollower + " for Account : " + screen_Name + " written to file " + UnfollowersList);
                            }
                            catch (Exception ex) { };

                            try
                            {
                                string query = "DELETE FROM  tb_FollowerName where UserName='" + screen_Name + "' and FollwerName='" + unfollower + "'";
                                DataBaseHandler.DeleteQuery(query, "tb_FollowerName");

                                LogForFollow("Unfollower : " + unfollower + " for Account : " + screen_Name + " deleted from Databse");
                            }
                            catch { }
                        }

                        List<string> listNewFollowers = FollowersName.Except(listFollowersFromDatabse).ToList();

                        LogForFollow(listNewFollowers.Count + " NEW Followers for Account : " + screen_Name + "");

                        foreach (string follName_item in listNewFollowers)
                        {
                            try
                            {
                                string query = "INSERT INTO  tb_FollowerName (UserName,FollwerName) VALUES ('" + screen_Name + "' ,'" + follName_item + "') ";
                                DataBaseHandler.InsertQuery(query, "tb_FollowerName");

                                LogForFollow("New follower : " + follName_item + " for Account : " + screen_Name + " added to Databse");
                            }
                            catch { }

                        }

                        string follower = GetFollowercount(screen_Name);
                        string following = GetFollowingCount(screen_Name);
                        string BOARDS = GetBoard(screen_Name);


                        string followingCount = PinterestAccountManager.getBetween(following, "value'>", "</span>");



                        string BoardsName = string.Empty;
                        List<string> BOARDSNAMES = new List<string>();
                        if (frmMain.inviteStart)
                        {
                            BOARDSNAMES = obj.GetAllBoardNames_new1(screen_Name);

                            foreach (var itemBoardNames in BOARDSNAMES)
                            {
                                lstBoardNames.Add(itemBoardNames.ToLower().Replace(" ", "-"));
                            }
                        }
                        frmMain.inviteStart = true;

                        //string BOARDSNAME = GetBoardsNAME(screen_Name);

                        try
                        {
                            foreach (string item_BoardNames in BOARDSNAMES)
                            {
                                //string insertBoard = "INSERT INTO tb_BoardName(UserName,BoardsName)VALUES('" + Username + "','" + item_BoardNames + "')";
                                // DataBaseHandler.InsertQuery(insertBoard, "tb_BoardName");

                                BoardsName += item_BoardNames + (":").ToString();
                            }
                        }
                        catch { }

                        try
                        {
                            string UpdateQuery = "Update tb_emails set Follower = '" + follower + "',Following = '" + followingCount + "',BOARDS= '" + BOARDS + "',BOARDSNAME='" + BoardsName + "',ScreenName='" + screen_Name + "' where UserName = '" + Username + "'";
                            DataBaseHandler.UpdateQuery(UpdateQuery, "tb_emails");
                            
                            new FrmEmailProxyAssigner().LoadDataGrid();
                            new FrmEmailProxyAssigner().makeReadOnlyDataGrid();

                        }
                        catch { }
                    }

                    catch { }

                    string[] ArrData = System.Text.RegularExpressions.Regex.Split(AfterLoginPageSource, "username");

                    foreach (var item in ArrData)
                    {
                        if (item.Contains("{\"page_info"))
                        {
                            continue;
                        }
                        if (!item.StartsWith("\": null,") && !item.StartsWith("{\"request_identifier\""))
                        {
                            int startindex = item.IndexOf(":");
                            int endindex = item.IndexOf("\", \"");

                            this.Name = item.Substring(startindex + 1, endindex - startindex).Replace("id=\"UserNav\"", string.Empty).Replace("a ", string.Empty).Replace("<", string.Empty).Replace(">", string.Empty).Replace("'", string.Empty).Replace("href=", string.Empty).Replace("\"", string.Empty).Replace("/", string.Empty).Trim();
                            break;
                        }
                        if (item.Contains("locale"))// && item.Contains("P.currentUser.set"))
                        {
                            int startindex = item.IndexOf(":");
                            int endindex = item.IndexOf("\", \"");

                            this.Name = item.Substring(startindex + 1, endindex - startindex).Replace("id=\"UserNav\"", string.Empty).Replace("a ", string.Empty).Replace("<", string.Empty).Replace(">", string.Empty).Replace("'", string.Empty).Replace("href=", string.Empty).Replace("\"", string.Empty).Replace("/", string.Empty).Trim();
                            break;
                        }
                        else if (item.Contains("name\": \"AuthHomePage"))
                        {
                            int startindex = item.IndexOf(":");
                            int endindex = item.IndexOf("\", \"");

                            this.Name = item.Substring(startindex + 1, endindex - startindex).Replace("\"", string.Empty).Trim();
                        }
                    }
                    if (ArrData.Count() == 2 && string.IsNullOrEmpty(Name))
                    {
                        int startindex = ArrData[1].IndexOf(":");
                        int endindex = ArrData[1].IndexOf("\", \"");

                        this.Name = ArrData[1].Substring(startindex + 1, endindex - startindex).Replace("id=\"UserNav\"", string.Empty).Replace("a ", string.Empty).Replace("<", string.Empty).Replace(">", string.Empty).Replace("'", string.Empty).Replace("href=", string.Empty).Replace("\"", string.Empty).Replace("/", string.Empty).Trim();
                    }
                }
                catch (Exception ex)
                {
                    this.Name = string.Empty;
                }
            }
            if (this.LoggedIn)
            {
                return true;
            }
            return false;
        }