// Constructors:
        public GenericPoster(ref Object sender, ref DoWorkEventArgs e, string projname, string topictablename, string AnswerTmpl)
        {
            // INITialize all DB objects
            worker = sender as BackgroundWorker;
            proj = new Projects();
            tblaccts = new Emailaccounts();
            tblproxies = new Proxies();
            tblresp = new Responses();
            tblaff = new Affiliateprograms();
            tbltopics = new Topicsgeneric(topictablename);

            stdfunc = new StdPosterFunctionsNonStatic();

            nexttmpl = 0;
            nextproxy = 0;
            nextemail = 0;
            nexttopic = 0;

            ProjectName = projname;
            AnswerTemplate = AnswerTmpl;
            


            //  worker.ReportProgress((2 * 1 * 10), "Testing...");

            error = e;
            e = error;
            // error.Cancel = true;
            
            SelectProject(ref proj, ProjectName);
            ParseProperties();

            if (property.ContainsKey("projecttimezone"))
                try
                {
                    tzoneproject = Convert.ToInt32(property["projecttimezone"]);
                }
                catch
                {
                }

            if ((worker.CancellationPending == true))  // if the STOP button has been clicked
            {
                e.Cancel = true;
                return;
            }
        }
 private bool PostTheQuestion(ref Topicsgeneric tbltopics_local, Emailaccounts tblaccts_local, string passwd_local, string proxy_local, string iCode_local)
 {
     worker.ReportProgress((2 * progressvalue++), "Posting a question.");
     tbltopics_local.Link = stdfunc.PostQuestion(tblaccts_local.Username, tblaccts_local.Email, passwd_local, tbltopics_local.Topic, proxy_local, iCode_local);
     tbltopics_local.Save();
     string returnvar = tbltopics_local.Link;
     if (returnvar != "" && returnvar != null && returnvar != "#EANF#" && returnvar != "NODATA")
         return true;
     else return false;
 }