/// <summary> /// 1.初始化显示 /// </summary> private void InitFormShow() { ThisDbpath = DbHelperOleDb.getDBPath(); if (string.IsNullOrEmpty(ThisDbpath)) { string strDefaultPath = System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath, "DB/KPSDB.accdb"); FileInfo file = new FileInfo(strDefaultPath); if (file.Exists) { ThisDbpath = strDefaultPath; this.openFileDialog1.InitialDirectory = file.Directory.FullName; } } this.textBox1.Text = ThisDbpath; }