Пример #1
0
        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            BlogGatherCnblogs bgb = new BlogGatherCnblogs(this.toolStripTextBox1.Text);

            bgb.delAddBlog += new BlogGatherCnblogs.GreetingDelegate(this.AddBlog);
            bgb.GatherBlog(e);
        }
Пример #2
0
        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            if (!Directory.Exists(m_strDBFolder))
            {
                Directory.CreateDirectory(m_strDBFolder);
            }
            if (File.Exists(m_strDBFolder + this.toolStripTextBox1.Text + ".db"))
            {
                MessageBox.Show("该博客已存在,若要重新下载请先到WebSiteDB删除!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            m_sqliteMng.CreateDB(m_strDBFolder + this.toolStripTextBox1.Text + ".db");
            m_sqliteMng.ExecuteSql(m_strCreatTable
                                   , m_connStr1 + this.toolStripTextBox1.Text + ".db" + m_connStr2);

            string strInsertTaskInitData = m_strInsertTaskInitData.Replace("#^$BlogID$^#", this.toolStripTextBox1.Text);

            m_sqliteMng.ExecuteSql(strInsertTaskInitData
                                   , m_connStr1 + this.toolStripTextBox1.Text + ".db" + m_connStr2);
            BlogGatherCnblogs bgb = new BlogGatherCnblogs(this.toolStripTextBox1.Text);

            bgb.delAddBlog += new BlogGatherCnblogs.GreetingDelegate(this.AddBlog);
            bgb.GatherBlog(e);
        }