修改站号和IP

This commit is contained in:
zhouyunhao
2024-08-14 17:26:00 +08:00
parent 26648c51d2
commit b4597def96
9 changed files with 176 additions and 111 deletions

View File

@@ -7,7 +7,7 @@
<ProjectGuid>{A74FBD1F-1F9C-45CE-B3E2-6E80278C02B0}</ProjectGuid> <ProjectGuid>{A74FBD1F-1F9C-45CE-B3E2-6E80278C02B0}</ProjectGuid>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>C_Windows_1</RootNamespace> <RootNamespace>C_Windows_1</RootNamespace>
<AssemblyName>LL18-Control</AssemblyName> <AssemblyName>LL28-Control</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

View File

@@ -111,6 +111,10 @@
this.Sunzong = new System.Windows.Forms.Label(); this.Sunzong = new System.Windows.Forms.Label();
this.label28 = new System.Windows.Forms.Label(); this.label28 = new System.Windows.Forms.Label();
this.CodePort1 = new System.IO.Ports.SerialPort(this.components); this.CodePort1 = new System.IO.Ports.SerialPort(this.components);
this.timerbar = new System.Windows.Forms.Timer(this.components);
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.button2 = new System.Windows.Forms.Button();
this.zhanhao = new System.Windows.Forms.TextBox();
this.myGroupBox4 = new C_Windows_1.MyGroupBox(this.components); this.myGroupBox4 = new C_Windows_1.MyGroupBox(this.components);
this.PUnit = new System.Windows.Forms.ComboBox(); this.PUnit = new System.Windows.Forms.ComboBox();
this.label47 = new System.Windows.Forms.Label(); this.label47 = new System.Windows.Forms.Label();
@@ -178,10 +182,6 @@
this.BtnCon1 = new System.Windows.Forms.Button(); this.BtnCon1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label();
this.timerbar = new System.Windows.Forms.Timer(this.components);
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.button2 = new System.Windows.Forms.Button();
this.zhanhao = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.DataGridView1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.DataGridView1)).BeginInit();
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
@@ -538,7 +538,7 @@
// //
this.label18.AutoSize = true; this.label18.AutoSize = true;
this.label18.Font = new System.Drawing.Font("宋体", 15F); this.label18.Font = new System.Drawing.Font("宋体", 15F);
this.label18.Location = new System.Drawing.Point(179, 38); this.label18.Location = new System.Drawing.Point(189, 35);
this.label18.Name = "label18"; this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(69, 20); this.label18.Size = new System.Drawing.Size(69, 20);
this.label18.TabIndex = 70; this.label18.TabIndex = 70;
@@ -547,7 +547,7 @@
// Code // Code
// //
this.Code.Font = new System.Drawing.Font("宋体", 18F); this.Code.Font = new System.Drawing.Font("宋体", 18F);
this.Code.Location = new System.Drawing.Point(254, 28); this.Code.Location = new System.Drawing.Point(264, 28);
this.Code.Name = "Code"; this.Code.Name = "Code";
this.Code.Size = new System.Drawing.Size(533, 35); this.Code.Size = new System.Drawing.Size(533, 35);
this.Code.TabIndex = 51; this.Code.TabIndex = 51;
@@ -785,7 +785,7 @@
// //
this.Scancode.AutoSize = true; this.Scancode.AutoSize = true;
this.Scancode.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Scancode.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Scancode.Location = new System.Drawing.Point(790, 38); this.Scancode.Location = new System.Drawing.Point(800, 38);
this.Scancode.Name = "Scancode"; this.Scancode.Name = "Scancode";
this.Scancode.Size = new System.Drawing.Size(90, 20); this.Scancode.Size = new System.Drawing.Size(90, 20);
this.Scancode.TabIndex = 144; this.Scancode.TabIndex = 144;
@@ -864,6 +864,35 @@
// //
this.CodePort1.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(this.CodePort1_DataReceived_1); this.CodePort1.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(this.CodePort1_DataReceived_1);
// //
// timerbar
//
this.timerbar.Interval = 200;
this.timerbar.Tick += new System.EventHandler(this.timerbar_Tick);
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(410, 258);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(100, 23);
this.progressBar1.TabIndex = 146;
//
// button2
//
this.button2.Location = new System.Drawing.Point(925, 351);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(84, 38);
this.button2.TabIndex = 147;
this.button2.Text = "修改站号";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// zhanhao
//
this.zhanhao.Location = new System.Drawing.Point(909, 319);
this.zhanhao.Name = "zhanhao";
this.zhanhao.Size = new System.Drawing.Size(113, 21);
this.zhanhao.TabIndex = 148;
//
// myGroupBox4 // myGroupBox4
// //
this.myGroupBox4.Controls.Add(this.PUnit); this.myGroupBox4.Controls.Add(this.PUnit);
@@ -1433,7 +1462,7 @@
this.myGroupBox1.Font = new System.Drawing.Font("宋体", 12F); this.myGroupBox1.Font = new System.Drawing.Font("宋体", 12F);
this.myGroupBox1.Location = new System.Drawing.Point(6, 28); this.myGroupBox1.Location = new System.Drawing.Point(6, 28);
this.myGroupBox1.Name = "myGroupBox1"; this.myGroupBox1.Name = "myGroupBox1";
this.myGroupBox1.Size = new System.Drawing.Size(167, 240); this.myGroupBox1.Size = new System.Drawing.Size(182, 240);
this.myGroupBox1.TabIndex = 119; this.myGroupBox1.TabIndex = 119;
this.myGroupBox1.TabStop = false; this.myGroupBox1.TabStop = false;
this.myGroupBox1.Text = "连接设置"; this.myGroupBox1.Text = "连接设置";
@@ -1453,7 +1482,7 @@
this.UDPResults.FormattingEnabled = true; this.UDPResults.FormattingEnabled = true;
this.UDPResults.Location = new System.Drawing.Point(6, 48); this.UDPResults.Location = new System.Drawing.Point(6, 48);
this.UDPResults.Name = "UDPResults"; this.UDPResults.Name = "UDPResults";
this.UDPResults.Size = new System.Drawing.Size(153, 24); this.UDPResults.Size = new System.Drawing.Size(170, 24);
this.UDPResults.TabIndex = 63; this.UDPResults.TabIndex = 63;
// //
// PortNum // PortNum
@@ -1518,35 +1547,6 @@
this.label6.TabIndex = 15; this.label6.TabIndex = 15;
this.label6.Text = "9999"; this.label6.Text = "9999";
// //
// timerbar
//
this.timerbar.Interval = 200;
this.timerbar.Tick += new System.EventHandler(this.timerbar_Tick);
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(410, 258);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(100, 23);
this.progressBar1.TabIndex = 146;
//
// button2
//
this.button2.Location = new System.Drawing.Point(925, 351);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(84, 38);
this.button2.TabIndex = 147;
this.button2.Text = "修改站号";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// zhanhao
//
this.zhanhao.Location = new System.Drawing.Point(909, 319);
this.zhanhao.Name = "zhanhao";
this.zhanhao.Size = new System.Drawing.Size(113, 21);
this.zhanhao.TabIndex = 148;
//
// Form1 // Form1
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -1620,7 +1620,6 @@
} }
#endregion #endregion
private System.Windows.Forms.Button BtnBreak;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox ReceiveText; private System.Windows.Forms.TextBox ReceiveText;
private System.Windows.Forms.TextBox SendText; private System.Windows.Forms.TextBox SendText;
@@ -1765,12 +1764,13 @@
private System.Windows.Forms.DataGridViewTextBoxColumn Column17; private System.Windows.Forms.DataGridViewTextBoxColumn Column17;
private System.Windows.Forms.DataGridViewTextBoxColumn Column14; private System.Windows.Forms.DataGridViewTextBoxColumn Column14;
private System.Windows.Forms.DataGridViewTextBoxColumn Column15; private System.Windows.Forms.DataGridViewTextBoxColumn Column15;
private System.Windows.Forms.ComboBox UDPResults;
private System.Windows.Forms.Button TCPconnect;
private System.Windows.Forms.Timer timerbar; private System.Windows.Forms.Timer timerbar;
private System.Windows.Forms.ProgressBar progressBar1; private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.Button button2; private System.Windows.Forms.Button button2;
private System.Windows.Forms.TextBox zhanhao; private System.Windows.Forms.TextBox zhanhao;
public System.Windows.Forms.TextBox Code; public System.Windows.Forms.TextBox Code;
public System.Windows.Forms.Button BtnBreak;
public System.Windows.Forms.ComboBox UDPResults;
public System.Windows.Forms.Button TCPconnect;
} }
} }

View File

@@ -23,6 +23,7 @@ using System.Net.Sockets;
using Timer = System.Windows.Forms.Timer; using Timer = System.Windows.Forms.Timer;
using System.Net; using System.Net;
using static System.Windows.Forms.VisualStyles.VisualStyleElement; using static System.Windows.Forms.VisualStyles.VisualStyleElement;
using Org.BouncyCastle.Utilities.Net;
namespace C_Windows_1 namespace C_Windows_1
{ {
@@ -47,7 +48,7 @@ namespace C_Windows_1
//public ModbusTcpNet modbusClient; //public ModbusTcpNet modbusClient;
public ModbusRtuOverTcp modbusClient /*= new ModbusRtuOverTcp("192.168.1.174", 9999)*/; public ModbusRtuOverTcp modbusClient /*= new ModbusRtuOverTcp("192.168.1.174", 9999)*/;
//产测计数 //产测计数
// public static Form1 f1;
public int ChanSum; public int ChanSum;
public int ChanPass; public int ChanPass;
@@ -60,7 +61,7 @@ namespace C_Windows_1
private bool isListening = false; // 监听标志位,控制是否继续监听 private bool isListening = false; // 监听标志位,控制是否继续监听
private Timer timeoutTimer; // 定时器用于控制超时 private Timer timeoutTimer; // 定时器用于控制超时
int connectflag = 0; public int connectflag = 0;
public Form1() public Form1()
{ {
f1 = this; f1 = this;
@@ -1123,12 +1124,11 @@ namespace C_Windows_1
udpClient = new UdpClient(); udpClient = new UdpClient();
udpClient.EnableBroadcast = true; udpClient.EnableBroadcast = true;
udpClient.Client.ReceiveTimeout = ReceiveTimeout; udpClient.Client.ReceiveTimeout = ReceiveTimeout;
//modbusClient.ReceiveTimeOut = 1000;
//modbusClient.ConnectTimeOut = 100;
//modbusClient.ReceiveTimeOut = 100;
@@ -1140,38 +1140,38 @@ namespace C_Windows_1
workstation = (int)yiqi.standby; workstation = (int)yiqi.standby;
while (true) while (true)
{ {
Thread.Sleep(500); //Thread.Sleep(500);
if (connectflag==1) //if (connectflag==1)
{
connect = modbusClient.Read("1006", 1);//判断连接是否正常
if (connect.IsSuccess)
{
TCPconnect.Enabled = false;
PortNum.Text = modbusClient.IpAddress;
label6.Text = modbusClient.Port.ToString();
label6.ForeColor = Color.Green;
//Code.Focus();
}
else
{
connectflag = 0;
TCPconnect.Enabled = true;
PortNum.Text = "";
label6.Text = "未连接";
label6.ForeColor = Color.Red;
}
machine2();//仪器读取线程
MachineDisplay();//仪器显示线程
//if (MachineStatus.Text == "待机中" && connect.IsSuccess)
//{ //{
// Thread.Sleep(3000);
// workstation = (int)yiqi.start;
// MachineStatus.Text = ""; // connect = modbusClient.Read("1006", 1);//判断连接是否正常
// if (connect.IsSuccess)
// {
// TCPconnect.Enabled = false;
// PortNum.Text = modbusClient.IpAddress;
// label6.Text = modbusClient.Port.ToString();
// label6.ForeColor = Color.Green;
// //Code.Focus();
// }
// else
// {
// connectflag = 0;
// TCPconnect.Enabled = true;
// PortNum.Text = "";
// label6.Text = "未连接";
// label6.ForeColor = Color.Red;
// }
// machine2();//仪器读取线程
// MachineDisplay();//仪器显示线程
// //if (MachineStatus.Text == "待机中" && connect.IsSuccess)
// //{
// // Thread.Sleep(3000);
// // workstation = (int)yiqi.start;
// // MachineStatus.Text = "";
// //}
//} //}
}
@@ -1188,8 +1188,8 @@ namespace C_Windows_1
{ {
UDPResults.Items.Clear(); UDPResults.Items.Clear();
byte[] data = Encoding.ASCII.GetBytes("hello,udp server"); byte[] data = Encoding.ASCII.GetBytes("hello,udp server");
IPAddress ip; System.Net.IPAddress ip;
ip = IPAddress.Parse("192.168.1.255"); ip = System.Net.IPAddress.Parse("192.168.1.255");
// 广播到 192.168.1.255 // 广播到 192.168.1.255
IPEndPoint endPoint = new IPEndPoint(ip, Port); IPEndPoint endPoint = new IPEndPoint(ip, Port);
@@ -1214,7 +1214,7 @@ namespace C_Windows_1
{ {
if (!isListening) return; if (!isListening) return;
IPEndPoint remoteEndPoint = new IPEndPoint(IPAddress.Any, Port); IPEndPoint remoteEndPoint = new IPEndPoint(System.Net.IPAddress.Any, Port);
byte[] receivedData = udpClient.EndReceive(ar, ref remoteEndPoint); byte[] receivedData = udpClient.EndReceive(ar, ref remoteEndPoint);
string receivedMessage = Encoding.ASCII.GetString(receivedData); string receivedMessage = Encoding.ASCII.GetString(receivedData);
@@ -1242,7 +1242,7 @@ namespace C_Windows_1
try try
{ {
connectflag = 0; connectflag = 0;
if (connect.IsSuccess) //if (connect.IsSuccess)
{ {
connectflag = 0; connectflag = 0;
modbusClient.ConnectClose(); modbusClient.ConnectClose();
@@ -1911,13 +1911,13 @@ namespace C_Windows_1
//{ //{
// MessageBox.Show("条码长度设置错误", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; // MessageBox.Show("条码长度设置错误", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return;
//} //}
//modbusClient.Write("0", true); modbusClient.Write("0", true);
workstation = (int)yiqi.start;
Code.Focus();
//workstation = (int)yiqi.start; //workstation = (int)yiqi.start;
//workstation = (int)yiqi.start;
//Code.Focus();
} }
@@ -2035,9 +2035,10 @@ namespace C_Windows_1
{ {
try try
{ {
workstation = (int)yiqi.rst; //workstation = (int)yiqi.rst;
//Code.Clear();
Code.Focus(); //Code.Focus();
modbusClient.Write("1", true);
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -3081,29 +3082,38 @@ namespace C_Windows_1
{ {
} }
string stationIP;
string ipAddress;
private void TCPconnect_Click(object sender, EventArgs e) private void TCPconnect_Click(object sender, EventArgs e)
{ {
//根据:符号分割站号和密码 //根据:符号分割站号和IP
string[] parts = UDPResults.Text.Split(':'); string[] parts = UDPResults.Text.Split(':');
// 确保分割结果符合预期 // 确保分割结果符合预期
if (parts.Length == 2) if (parts.Length == 2)
{ {
// 站号 // 站号
string station = parts[0]; stationIP = parts[0];
// IP 地址 // IP 地址
string ipAddress = parts[1]; ipAddress = parts[1];
modbusClient = new ModbusRtuOverTcp(ipAddress, 9999, Convert.ToByte(station)); modbusClient = new ModbusRtuOverTcp(ipAddress, 9999, Convert.ToByte(stationIP));
//modbusClient.ConnectTimeOut = 1000;
//modbusClient.ReceiveTimeOut = 1000;
if (modbusClient.ConnectServer().IsSuccess) if (modbusClient.ConnectServer().IsSuccess)
{ {
connectflag = 1; connectflag = 1;
TCPconnect.Enabled = false; TCPconnect.Enabled = false;
PortNum.Text = modbusClient.IpAddress;
label6.Text = modbusClient.Port.ToString();
label6.ForeColor = Color.Green;
station2 = Convert.ToUInt16(stationIP);
station = station2.ToString("X2");
} }
@@ -3123,10 +3133,37 @@ namespace C_Windows_1
} }
OperateResult changestation=new OperateResult();
public static string station;
public static ushort station2;
private void button2_Click(object sender, EventArgs e) private void button2_Click(object sender, EventArgs e)
{ {
ushort station = Convert.ToUInt16(zhanhao.Text); station2 = Convert.ToUInt16(zhanhao.Text);
modbusClient.Write("1076", station); modbusClient.Read("0", (ushort)1);
changestation =modbusClient.Write("1076", station2);
if (changestation.IsSuccess)
{
station = station2.ToString("X2");
connectflag = 0;
modbusClient.ConnectClose();
Thread.Sleep(200);
modbusClient = new ModbusRtuOverTcp(ipAddress, 9999, Convert.ToByte(station2));
Thread.Sleep(200);
if (modbusClient.ConnectServer().IsSuccess)
{
connectflag = 1;
TCPconnect.Enabled = false;
PortNum.Text = modbusClient.IpAddress;
label6.Text = modbusClient.Port.ToString();
UDPResults.Text = station2.ToString() + ":" + modbusClient.IpAddress;
label6.ForeColor = Color.Green;
MessageBox.Show("仪器站号修改为" + station2);
}
}
} }
private void label28_Click(object sender, EventArgs e) private void label28_Click(object sender, EventArgs e)

Binary file not shown.

View File

@@ -1,4 +1,5 @@
using HslCommunication; using HslCommunication;
using HslCommunication.ModBus;
using NPOI.SS.Formula.Functions; using NPOI.SS.Formula.Functions;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@@ -6,7 +7,9 @@ using System.ComponentModel;
using System.Data; using System.Data;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using System.Reflection.Emit;
using System.Text; using System.Text;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
@@ -22,8 +25,8 @@ namespace C_Windows_1
private void configIP_Load(object sender, EventArgs e) private void configIP_Load(object sender, EventArgs e)
{ {
IPAddress.Text = "192.168.1.XXX"; IPAddress.Text = "192.168.1.XXX";
IPGateway.Text = "255.255.255.0"; IPGateway.Text = "192.168.1.1";
SubnetMask.Text = "192.168.1.1"; SubnetMask.Text = "255.255.255.0";
} }
private void Save_Click(object sender, EventArgs e) private void Save_Click(object sender, EventArgs e)
@@ -66,22 +69,47 @@ namespace C_Windows_1
int a = 435; int a = 435;
string ARD = "0435"; string ARD = "0435";
string ARD2 = "0000"; string ARD2 = "0000";
string SendText = "0110" + ARD + "0007" + "0e" + ipone + iptwo + wgone + wgtwo + zwone + zwtwo + ARD2; string SendText = "01" + "10" + ARD + "0007" + "0e" + ipone + iptwo + wgone + wgtwo + zwone + zwtwo + ARD2;
if (FixedIP.Checked == true) if (FixedIP.Checked == true)
{ {
ARD2 = "0001"; ARD2 = "0001";
SendText = "0110" + ARD + "0007" + "0e" + ipone + iptwo + wgone + wgtwo + zwone + zwtwo + ARD2; SendText = Form1.station+"10" + ARD + "0007" + "0e" + ipone + iptwo + wgone + wgtwo + zwone + zwtwo + ARD2;
} }
else else
{ {
ARD2 = "0000"; ARD2 = "0000";
SendText = "0110" + ARD + "0007" + "0e" + ipone + iptwo + wgone + wgtwo + zwone + zwtwo + ARD2; SendText = Form1.station+"10" + ARD + "0007" + "0e" + ipone + iptwo + wgone + wgtwo + zwone + zwtwo + ARD2;
} }
Form1.f1.modbusClient.Read("0", (ushort)1);
OperateResult<byte[]> read = Form1.f1.modbusClient.ReadFromCoreServer(HslCommunication.BasicFramework.SoftBasic.HexStringToBytes(SendText)); OperateResult<byte[]> read = Form1.f1.modbusClient.ReadFromCoreServer(HslCommunication.BasicFramework.SoftBasic.HexStringToBytes(SendText));
if (read.IsSuccess) if (read.IsSuccess)
{ {
Form1.f1.Code.Text = "结果:" + HslCommunication.BasicFramework.SoftBasic.ByteToHexString(read.Content, ' '); // Form1.f1.Code.Text = "结果:" + HslCommunication.BasicFramework.SoftBasic.ByteToHexString(read.Content, ' ');
//Form1.f1.connectflag = 0;
//Form1.f1.modbusClient.ConnectClose();
////Thread.Sleep(200);
//Form1.f1.modbusClient = new ModbusRtuOverTcp(IPAddress.Text, 9999, Convert.ToByte(Form1.station2));
//Thread.Sleep(200);
//if (Form1.f1.modbusClient.ConnectServer().IsSuccess)
//{
// Form1.f1.connectflag = 1;
// Form1.f1.TCPconnect.Enabled = false;
// Form1.f1.PortNum.Text = Form1.f1.modbusClient.IpAddress;
// Form1.f1.label6.Text = Form1.f1.modbusClient.Port.ToString();
// Form1.f1.UDPResults.Text = Form1.station2.ToString() + ":" + IPAddress.Text;
// Form1.f1.label6.ForeColor = Color.Green;
// MessageBox.Show("IP修改成功");
//}
Form1.f1.connectflag = 0;
Form1.f1.TCPconnect.Enabled = true;
Form1.f1.PortNum.Text = Form1.f1.modbusClient.IpAddress;
Form1.f1.label6.Text = Form1.f1.modbusClient.Port.ToString();
Form1.f1.UDPResults.Text = Form1.station2.ToString() + ":" + IPAddress.Text;
Form1.f1.label6.ForeColor = Color.Red;
MessageBox.Show("IP修改成功");
} }
else else
{ {

View File

@@ -881,9 +881,6 @@ D:\新28\新TCP28上位机\C-Windows-1\obj\Debug\C-Windows-LL18.csproj.CoreCompi
D:\新28\新TCP28上位机\C-Windows-1\obj\Debug\C-Window.5B87B986.Up2Date D:\新28\新TCP28上位机\C-Windows-1\obj\Debug\C-Window.5B87B986.Up2Date
D:\新28\新TCP28上位机\C-Windows-1\obj\Debug\LL18-Control.exe D:\新28\新TCP28上位机\C-Windows-1\obj\Debug\LL18-Control.exe
D:\新28\新TCP28上位机\C-Windows-1\obj\Debug\LL18-Control.pdb D:\新28\新TCP28上位机\C-Windows-1\obj\Debug\LL18-Control.pdb
D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\bin\Debug\LL18-Control.exe.config
D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\bin\Debug\LL18-Control.exe
D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\bin\Debug\LL18-Control.pdb
D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\bin\Debug\BouncyCastle.Cryptography.dll D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\bin\Debug\BouncyCastle.Cryptography.dll
D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\bin\Debug\Enums.NET.dll D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\bin\Debug\Enums.NET.dll
D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\bin\Debug\ExtendedNumerics.BigDecimal.dll D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\bin\Debug\ExtendedNumerics.BigDecimal.dll
@@ -958,6 +955,9 @@ D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\obj\Debug\C_Windows_1.UserPassword
D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\obj\Debug\C-Windows-LL18.csproj.GenerateResource.cache D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\obj\Debug\C-Windows-LL18.csproj.GenerateResource.cache
D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\obj\Debug\C-Windows-LL18.csproj.CoreCompileInputs.cache D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\obj\Debug\C-Windows-LL18.csproj.CoreCompileInputs.cache
D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\obj\Debug\C-Window.5B87B986.Up2Date D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\obj\Debug\C-Window.5B87B986.Up2Date
D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\obj\Debug\LL18-Control.exe
D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\obj\Debug\LL18-Control.pdb
D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\obj\Debug\C_Windows_1.configIP.resources D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\obj\Debug\C_Windows_1.configIP.resources
D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\bin\Debug\LL28-Control.exe.config
D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\bin\Debug\LL28-Control.exe
D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\bin\Debug\LL28-Control.pdb
D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\obj\Debug\LL28-Control.exe
D:\tcpoverrtu28\新TCP28上位机\C-Windows-1\obj\Debug\LL28-Control.pdb