/// <Clear all camapign controls after saving and updation>
        /// 
        /// </summary>
        /// <param name="FeatureName"></param>
        public void ClearCamapigns(String FeatureName)
        {
            ///Clear Text box of campaign Name
            txt_CampaignName.Invoke(new MethodInvoker(delegate
                {
                    txt_CampaignName.Text = "";
                    txt_CampaignName.ReadOnly = false;
                    _CmpName = string.Empty;
                }));


            // clear account file Text box 
            txt_accountfilepath.Invoke(new MethodInvoker(delegate
            {
                txt_accountfilepath.Text = "";
            }));


            //Clear selected feature ...
            if (FeatureName == "Follow")
            {
                #region
                grp_settings.Invoke(new MethodInvoker(delegate
                    {
                        grp_settings.Controls.Clear();
                        followusercontrol = new MixedCampaignManager.CustomUserControls.followusecontrols();
                        followusercontrol.Dock = DockStyle.Top;
                        followusercontrol.Visible = true;
                        panel1.Invoke(new MethodInvoker(delegate
                        {
                            panel1.AutoScroll = true;
                        }));
                        int i = followusercontrol.Height;
                        grp_settings.Height = i + 15;
                        grp_settings.Controls.Add(followusercontrol);
                        grp_settings.Refresh();
                    }));
                #endregion
            }
            else if (FeatureName == "Tweet")
            {
                #region
                grp_settings.Invoke(new MethodInvoker(delegate
                        {
                            panel1.Invoke(new MethodInvoker(delegate
                            {
                                panel1.AutoScroll = false;
                            }));

                            grp_settings.Controls.Clear();
                            tweetusercontrol = new MixedCampaignManager.CustomUserControls.tweetusercontrols();
                            tweetusercontrol.Dock = DockStyle.Top;
                            tweetusercontrol.Visible = true;
                            int i = tweetusercontrol.Height;
                            grp_settings.Height = i + 15;
                            grp_settings.Controls.Add(tweetusercontrol);
                            grp_settings.Refresh();
                        }));
                #endregion
            }
            else if (FeatureName == "Retweet")
            {
                #region
                grp_settings.Invoke(new MethodInvoker(delegate
                       {
                           panel1.Invoke(new MethodInvoker(delegate
                           {
                               panel1.AutoScroll = false;
                           }));

                           grp_settings.Controls.Clear();
                           retweetusercontrol = new MixedCampaignManager.CustomUserControls.retweetusercontrols();
                           retweetusercontrol.Dock = DockStyle.Top;
                           retweetusercontrol.Visible = true;
                           int i = retweetusercontrol.Height;
                           grp_settings.Height = i + 15;
                           grp_settings.Controls.Add(retweetusercontrol);
                           grp_settings.Refresh();
                       }));
                #endregion
            }
            else if (FeatureName == "Reply")
            {
                #region
                grp_settings.Invoke(new MethodInvoker(delegate
                       {
                           panel1.Invoke(new MethodInvoker(delegate
                           {
                               panel1.AutoScroll = false;
                           }));

                           grp_settings.Controls.Clear();
                           replyusercontrol = new MixedCampaignManager.CustomUserControls.replyusercontrols();
                           replyusercontrol.Dock = DockStyle.Top;
                           replyusercontrol.Visible = true;
                           int i = replyusercontrol.Height;
                           grp_settings.Height = i + 15;
                           grp_settings.Controls.Add(replyusercontrol);
                           grp_settings.Refresh();
                       }));
                #endregion
            }


            #region

            chkbox_IsScheduledDaily.Invoke(new MethodInvoker(delegate
            {
                chkbox_IsScheduledDaily.Checked = false;
            }));

            dateTimePicker_Start.Invoke(new MethodInvoker(delegate
            {
                dateTimePicker_Start.MinDate = DateTime.Now.Date;

                dateTimePicker_Start.Value = DateTime.Now;
            }));

            dateTimePicker_End.Invoke(new MethodInvoker(delegate
            {
                dateTimePicker_End.MinDate = DateTime.Now.Date;

                dateTimePicker_End.Value = DateTime.Now;
            }));
            #endregion

            txt_DelayFrom.Invoke(new MethodInvoker(delegate { txt_DelayFrom.Text = "20"; }));

            txt_DelayTo.Invoke(new MethodInvoker(delegate { txt_DelayTo.Text = "25"; }));

            txtNoOfFollowThreads.Invoke(new MethodInvoker(delegate { txtNoOfFollowThreads.Text = "7"; }));
        }
        private void chklstbox_campaign_ItemCheck(object sender, ItemCheckEventArgs e)
        {
            try
            {
                for (int ix = 0; ix < chklstbox_campaign.Items.Count; ++ix)
                {
                    if (ix != e.Index) chklstbox_campaign.SetItemChecked(ix, false);
                }


                if (e.Index == 0 && e.NewValue == CheckState.Checked)
                {
                    if (tweetusercontrol != null)
                    {
                        grp_settings.Invoke(new MethodInvoker(delegate
                        {
                            tweetusercontrol.Dispose();
                            GC.Collect();
                        }));
                    }
                    grp_settings.Invoke(new MethodInvoker(delegate
                    {
                        grp_settings.Controls.Clear();
                        followusercontrol = new MixedCampaignManager.CustomUserControls.followusecontrols();
                        followusercontrol.Dock = DockStyle.Top;
                        followusercontrol.Visible = true;

                        panel1.Invoke(new MethodInvoker(delegate
                            {
                                panel1.AutoScroll = true;
                            }));
                        int i = followusercontrol.Height;
                        grp_settings.Height = i + 15;
                        grp_settings.Controls.Add(followusercontrol);
                        grp_settings.Refresh();
                    }));
                }
                else if (e.Index == 1 && e.NewValue == CheckState.Checked)
                {
                    if (followusercontrol != null)
                    {
                        grp_settings.Invoke(new MethodInvoker(delegate
                        {
                            followusercontrol.Dispose();
                            GC.Collect();

                        }));
                    }
                    grp_settings.Invoke(new MethodInvoker(delegate
                    {
                        panel1.Invoke(new MethodInvoker(delegate
                        {
                            panel1.AutoScroll = false;
                        }));

                        grp_settings.Controls.Clear();
                        tweetusercontrol = new MixedCampaignManager.CustomUserControls.tweetusercontrols();
                        tweetusercontrol.Dock = DockStyle.Top;

                        tweetusercontrol.Visible = true;
                        int i = tweetusercontrol.Height;
                        grp_settings.Height = i + 15;
                        grp_settings.Controls.Add(tweetusercontrol);
                        grp_settings.Refresh();
                    }));
                }
                else if (e.Index == 2 && e.NewValue == CheckState.Checked)
                {
                    if (retweetusercontrol != null)
                    {
                        grp_settings.Invoke(new MethodInvoker(delegate
                        {
                            retweetusercontrol.Dispose();
                            GC.Collect();

                        }));
                    }
                    grp_settings.Invoke(new MethodInvoker(delegate
                    {
                        panel1.Invoke(new MethodInvoker(delegate
                        {
                            panel1.AutoScroll = false;
                        }));

                        grp_settings.Controls.Clear();
                        retweetusercontrol = new MixedCampaignManager.CustomUserControls.retweetusercontrols();
                        retweetusercontrol.Dock = DockStyle.Top;
                        retweetusercontrol.Visible = true;

                        int i = retweetusercontrol.Height;
                        grp_settings.Height = i + 15;
                        grp_settings.Controls.Add(retweetusercontrol);
                        grp_settings.Refresh();
                    }));
                }
                else if (e.Index == 3 && e.NewValue == CheckState.Checked)
                {

                    if (replyusercontrol != null)
                    {
                        grp_settings.Invoke(new MethodInvoker(delegate
                        {
                            replyusercontrol.Dispose();
                            GC.Collect();

                        }));
                    }
                    grp_settings.Invoke(new MethodInvoker(delegate
                    {
                        panel1.Invoke(new MethodInvoker(delegate
                        {
                            panel1.AutoScroll = false;
                        }));

                        grp_settings.Controls.Clear();
                        replyusercontrol = new MixedCampaignManager.CustomUserControls.replyusercontrols();
                        replyusercontrol.Dock = DockStyle.Top;
                        replyusercontrol.Visible = true;
                        int i = replyusercontrol.Height;
                        grp_settings.Height = i + 15;
                        grp_settings.Controls.Add(replyusercontrol);
                        grp_settings.Refresh();
                    }));
                }
            }
            catch (Exception ex)
            {
                ErrorLogger.AddToErrorLogText("4.chklstbox_campaign_ItemCheck :" + ex.Message);
            }
        }