private void Frm_Config_Load(object sender, EventArgs e) { Server_ip.Text = SetIni.getString("listenr", "serverip", "", iniurl); Serv_port.Text = SetIni.getString("listenr", "port", "", iniurl); Log_url.Text = SetIni.getString("log", "url", "", iniurl); Ref_time.Text = SetIni.getString("log", "ref", "", iniurl); Data_IP.Text = SetIni.getString("data", "server", "", iniurl); Data_Port.Text = SetIni.getString("data", "port", "", iniurl); Data_Instance.Text = SetIni.getString("data", "sid", "", iniurl); Data_User.Text = SetIni.getString("data", "user", "", iniurl); Data_Pass.Text = SetIni.getString("data", "pass", "", iniurl); }
private void button1_Click(object sender, EventArgs e) { SetIni.writeString("listenr", "serverip", Server_ip.Text, iniurl); SetIni.writeString("listenr", "port", Serv_port.Text, iniurl); SetIni.writeString("log", "url", Log_url.Text, iniurl); SetIni.writeString("log", "ref", Ref_time.Text, iniurl); SetIni.writeString("data", "server", Data_IP.Text, iniurl); SetIni.writeString("data", "port", Data_Port.Text, iniurl); SetIni.writeString("data", "sid", Data_Instance.Text, iniurl); SetIni.writeString("data", "user", Data_User.Text, iniurl); SetIni.writeString("data", "pass", Data_Pass.Text, iniurl); MessageBox.Show("保存成功!"); this.Close(); }