private void btn_SaveSocketPara_Click(object sender, EventArgs e) { Class_IniOperation _iniOperation = new Class_IniOperation(Class_Global.SocketParaPath); _iniOperation.WriteValue("Socket", "IP", txB_IP.Text); _iniOperation.WriteValue("Socket", "Port", txB_SocketPort.Text); }
private void btnsavecommmunication_Click(object sender, EventArgs e) { Class_IniOperation _iniOperation = new Class_IniOperation(Class_Global.SocketParaPath); _iniOperation.WriteValue("Socket", "IP", text_IP.Text); _iniOperation.WriteValue("Socket", "Port", text_Port.Text); }
private void checkBox_IsSocketOpen_Click(object sender, EventArgs e) { Class_IniOperation _iniOperation = new Class_IniOperation(Class_Global.SocketParaPath); if (checkBox_IsSocketOpen.Checked == true) { _iniOperation.WriteValue("Socket", "开关", "打开"); } else { _iniOperation.WriteValue("Socket", "开关", "关闭"); } }
//运行参数————〉ini文件 public void WriteComportSection() { _iniOperation.WriteValue("ComPort", "PortName", _comPort.PortName); _iniOperation.WriteValue("ComPort", "BaudRate", _comPort.BaudRate); _iniOperation.WriteValue("ComPort", "DataBits", _comPort.DataBits); _iniOperation.WriteValue("ComPort", "Parity", _comPort.Parity); _iniOperation.WriteValue("ComPort", "StopBits", _comPort.StopBits); _iniOperation.WriteValue("ComPort", "PortName2", _comPort.PortName2); _iniOperation.WriteValue("ComPort", "BaudRate2", _comPort.BaudRate2); _iniOperation.WriteValue("ComPort", "DataBits2", _comPort.DataBits2); _iniOperation.WriteValue("ComPort", "Parity2", _comPort.Parity2); _iniOperation.WriteValue("ComPort", "StopBits2", _comPort.StopBits2); }