private void btn_StartMessageSending_Click(object sender, RoutedEventArgs e)
        {
           try
           {
               if (!string.IsNullOrEmpty(txt_ComposeMessageMinDelay.Text))
               {
                   ComposeMessage.ComposeMessageMinDelay = Convert.ToInt32(txt_ComposeMessageMinDelay.Text);
               }
               if(!string.IsNullOrEmpty(txt_ComposeMesageMaxDelay.Text))
               {
                   ComposeMessage.ComposeMessageMaxDelay = Convert.ToInt32(txt_ComposeMesageMaxDelay.Text);
               }
           }
            catch(Exception ex)
           {
               GlobusLogHelper.log.Info("Exception : " + ex); 

           }
           //btn_StartMessageSending = Cursors.AppStarting;

            ComposeMessage objComposeMessage = new ComposeMessage();
            Thread thrSendingMessage = new Thread(objComposeMessage.startSendingMessage);
            thrSendingMessage.Start();
        }
        private void btn_ComposeMessage_GetFirstConnection_Click(object sender, RoutedEventArgs e)
        {
            #region MyRegion
            //if(LDUsers.LDGlobals.listAccounts.Count==0)
            //{
            //    GlobusLogHelper.log.Info("Please Upload Accout");
            //    return;
            //}
            //if(string.IsNullOrEmpty(selectedAccount))
            //{
            //    GlobusLogHelper.log.Info("Please select an account from drop down menu");
            //    return;
            //}

            //try
            //{
            //    MessageContacts.Clear();
            //    GrpMess.Clear();
            //    chklstBox_Messages_ComposeMessage_FirstConnections.Items.Clear();
            //    LinkdInContacts.Clear();
            //    //LstComposeMsg.Items.Clear();
            //    chklstBox_Messages_ComposeMessage_FirstConnections.Items.Clear();

            //    new Thread(() =>
            //    {
            //        LinkdinAddFromID();

            //    }).Start();

            //}
            //catch
            //{
            //} 
            #endregion


            try
            {

                if (LDGlobals.listAccounts.Count > 0)
                {
                   

                    Regex checkNo = new Regex("^[0-9]*$");
                    int processorCount = objUtils.GetProcessor();
                    int threads = 25;
                    int maxThread = 25 * processorCount;

                    ComposeMessage objComposeMessage = new ComposeMessage();

                    Thread GroupStatusThread = new Thread(objComposeMessage.StarGetFirstConnection);
                    GroupStatusThread.Start();
                }
                else
                {
                    GlobusLogHelper.log.Info("Please Load Accounts !");
                    GlobusLogHelper.log.Debug("Please Load Accounts !");

                }
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
            }


        }