void Init() { //数据库配置信息 if (null != DBConnectionRoot.InitDBConnection) { this.txtInitDbServer.Text = DBConnectionRoot.InitDBConnection.DataServer; this.txtInitDbName.Text = DBConnectionRoot.InitDBConnection.DataBase; this.txtInitDbAccount.Text = DBConnectionRoot.InitDBConnection.LoginAccount; this.txtInitDbPwd.Text = DBConnectionRoot.InitDBConnection.Password; } if (null != DBConnectionRoot.DownloadSourceDBConnection) { this.txtDownDbServer.Text = DBConnectionRoot.DownloadSourceDBConnection.DataServer; this.txtDownDbName.Text = DBConnectionRoot.DownloadSourceDBConnection.DataBase; this.txtDownDbAccount.Text = DBConnectionRoot.DownloadSourceDBConnection.LoginAccount; this.txtDownDbPwd.Text = DBConnectionRoot.DownloadSourceDBConnection.Password; } //初始化类型项下拉控件数据绑定 combInitType var list = EnumExtensions.GetNameDescription(typeof(DataInitType)).ToList(); list.Insert(0, new KeyValuePair <string, string>("0", "请选择")); this.combInitType.ValueMember = "key"; this.combInitType.DisplayMember = "value"; this.combInitType.DataSource = list; writerDelegate = WriteMessage; MsgWriter.InitInstance(this, writerDelegate); progressDelegate = UpdateProgress; ProgressUpdater.InitInstance(this, progressDelegate); }