//心跳周期变化 private void comboBox_HeartCirle_SelectedIndexChanged(object sender, EventArgs e) { //更新定时器频率 timer_Heart.Interval = int.Parse(comboBox_HeartCirle.Text) * 1000; //存储配置 Ini.Write("心跳配置", "周期", comboBox_HeartCirle.Text); }
//服务器端口变化 private void textBox_ServerPort_TextChanged(object sender, EventArgs e) { //判断Port有效性 string portStr = textBox_ServerPort.Text.Trim(); if (PORT_YN(portStr)) { //存储配置 Ini.Write("网络配置", "Port", textBox_ServerPort.Text); } }
//服务器IP变化 private void textBox_ServerIP_TextChanged(object sender, EventArgs e) { //判断IP有效性 string ipStr = textBox_ServerIP.Text.Trim(); if (IP_YN(ipStr)) { //存储配置 Ini.Write("网络配置", "IP", ipStr); } }
//快速指令-内容 private void textBox_CmdStr_TextChanged(object sender, EventArgs e) { //存储配置 Ini.Write("快速指令", "内容", textBox_CmdStr.Text); }
//快速指令-设备ID private void textBox_CmdDeviceID_TextChanged(object sender, EventArgs e) { //存储配置 Ini.Write("快速指令", "设备ID", textBox_CmdDeviceID.Text); }
//快速指令-类型 private void comboBox_CmdType_SelectedIndexChanged(object sender, EventArgs e) { //存储配置 Ini.Write("快速指令", "类型", comboBox_CmdType.Text); }
//关指令变化 private void textBox_closecmd_TextChanged(object sender, EventArgs e) { //存储配置 Ini.Write("监听配置", "关指令", textBox_closecmd.Text); }
//监听设备ID private void textBox_DeviceId_TextChanged(object sender, EventArgs e) { //存储配置 Ini.Write("监听配置", "设备ID", textBox_DeviceId.Text); }
//用户id变化 private void textBox_UserID_TextChanged(object sender, EventArgs e) { //存储配置 Ini.Write("心跳配置", "用户ID", textBox_UserID.Text); }