2019-03-18

private void MainForm_Load(object sender, EventArgs e)
        {
            string str = ConfigurationManager.AppSettings["DBStr"];
            if (string.IsNullOrEmpty(str))
            {
                base.BeginInvoke(this.logInvoke, new object[] { "无法读取数据库连接字符串,请检查配置文件是否丢失或异常,修改配置文件异常后请重启软件。" });
                this.button_Do.Enabled = false;
                this.button_CleanAll.Enabled = false;
                this.groupBox2.Enabled = false;
                this.groupBox3.Enabled = false;
            }
            else
            {
                base.BeginInvoke(this.logInvoke, new object[] { "新闻解析工具启动" });
                SqlHelper.DBString = str;
                base.BeginInvoke(this.logInvoke, new object[] { "当前数据库连接为: " + str });
                base.BeginInvoke(this.logInvoke, new object[] { "3 秒后首次运行程序..." });
                this._nextWorkTime = DateTime.Now.AddSeconds(3.0);
                this.TimePlan();
            }
            base.BeginInvoke(this.noteInvoke, new object[] { string.Format("当前下载新闻 {3} 条,解析新闻 {0} 条,专题新闻 {1} 条,常规新闻 {2} 条。", new object[] { this._articleNewsCount + this._subNewsCount, this._subNewsCount, this._articleNewsCount, this._downloadCount }) });
        }
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容