回复 4楼 apull
现在我是这样保存数据的,
string S1 = E1_HmoeMode.Text;
string S2 = E1_HomeHith.Text;
string S3 = E1_HomeLow.Text;
string S4 = E1_ValueAbs1.Text;
string S5 = E1_ValueAbs2.Text;
string S6 = E1_ValueAbs3.Text;
string S7 = E1_ValueAbs4.Text;
string S8 = E1_JogSpeed.Text;
IniFunc.writeString("Information", "1", S1, filename);
IniFunc.writeString("Information", "2", S2, filename);
IniFunc.writeString("Information", "3", S3, filename);
IniFunc.writeString("Information", "4", S4, filename);
IniFunc.writeString("Information", "5", S5, filename);
IniFunc.writeString("Information", "6", S6, filename);
IniFunc.writeString("Information", "7", S7, filename);
IniFunc.writeString("Information", "8", S8, filename);
这个是读取数据的
string S1 = IniFunc.getString("Information", "1", null, filename);
string S2 = IniFunc.getString("Information", "2", null, filename);
string S3 = IniFunc.getString("Information", "3", null, filename);
string S4 = IniFunc.getString("Information", "4", null, filename);
string S5 = IniFunc.getString("Information", "5", null, filename);
string S6 = IniFunc.getString("Information", "6", null, filename);
string S7 = IniFunc.getString("Information", "7", null, filename);
string S8 = IniFunc.getString("Information", "8", null, filename);
E1_HmoeMode.Text
= S1;
E1_HomeHith.Text
= S2;
E1_HomeLow.Text
= S3;
E1_ValueAbs1.Text = S4;
E1_ValueAbs2.Text = S5;
E1_ValueAbs3.Text = S6;
E1_ValueAbs4.Text = S7;
E1_JogSpeed.Text
= S8;