1.. 成员变量
private string baseDir = AppDomain.CurrentDomain.BaseDirectory;
private string hisFileName;
2. Load
//configFilename
hisFileName = baseDir + "importConfig.txt";
string txt = null, newTxt = null;
if (File.Exists(hisFileName))
{
using (StreamReader sr = new StreamReader(hisFileName, Encoding.UTF8))
{
do
{
newTxt = sr.ReadLine();
txt = newTxt != null ? newTxt : txt;
if (null != newTxt)
comboBox2.Items.Add(newTxt);
} while (null != newTxt);
}
if (null != txt && txt.Length > 0)
{