Commit c60c7f7f authored by shaxuezheng's avatar shaxuezheng

Modify Form1.cs

parents 4559c01e ae9d62a8
......@@ -9,14 +9,12 @@ using MQTTnet.Client;
using Newtonsoft.Json;
namespace ModbusDemo.Common
{
public class ModualAlarm
public static class ModualAlarm
{
public const ushort usChannelNumber = 8;
private const string sAlarmTopic = "Witium/WTDS78X/20193261/Alarm";
public Hashtable hMqtttAlarmMap = new Hashtable();
public bool bErrorHasSend = false;
private string sAlarmJson;
private string sAlarmJsonPackage;
private const string sAlarmTopic = "Witium/WTDS78X/66666666/Alarm";
public static string sAlarmJson;
public static string sAlarmJsonPackage;
//private IMqttClient mqttClient = null;
public enum eAlarmCode : ushort
{
......@@ -26,9 +24,10 @@ namespace ModbusDemo.Common
ChannelDataRespError = 4,
ChannelDataChangeError = 8
}
public void vSetAlarmList(ushort usAddress, ushort[] usChannel, ushort[] usChannelAlarmcode,bool bStringIncrease)
public static void vSetAlarmList(ushort usAddress, ushort[] usChannel, ushort[] usChannelAlarmcode)
{
ushort i = 0;
Hashtable hMqtttAlarmMap = new Hashtable();
hMqtttAlarmMap.Add("addr", usAddress.ToString());
string sAlarm = "alm";
foreach (ushort usdata in usChannelAlarmcode)
......@@ -37,15 +36,15 @@ namespace ModbusDemo.Common
i++;
}
hMqtttAlarmMap.Add("ts", Form1.GetTimeStamp());
sAlarmJson += JsonConvert.SerializeObject(hMqtttAlarmMap);
if (bStringIncrease == true)
if (sAlarmJson != "[")
{
sAlarmJson += ",";
}
sAlarmJson += JsonConvert.SerializeObject(hMqtttAlarmMap);
}
public async Task vPublishAlarmPackageJson(IMqttClient mqttClient)
public static async Task vPublishAlarmPackageJson(IMqttClient mqttClient)
{
sAlarmJson = "[" + sAlarmJson + "]";
var message = new MqttApplicationMessageBuilder()
.WithTopic(sAlarmTopic)
.WithPayload(sAlarmJson)
......
......@@ -13,6 +13,7 @@ namespace ModbusDemo.windows
private string logFile;
private StreamWriter writer;
private FileStream fileStream = null;
private static object oTxtLock = new object();
public Totxt(string fileName)
{
logFile = fileName;
......@@ -20,6 +21,8 @@ namespace ModbusDemo.windows
}
public void Log(string info)
{
lock (oTxtLock)
{
try
{
......@@ -36,17 +39,6 @@ namespace ModbusDemo.windows
}
writer.WriteLine(DateTime.Now + ": " + info);
}
catch (Exception e)
{
if (writer != null)
{
writer.Close();
writer.Dispose();
fileStream.Close();
fileStream.Dispose();
}
throw;
}
finally
{
if (writer != null)
......@@ -58,7 +50,7 @@ namespace ModbusDemo.windows
}
}
}
}
public void CreateDirectory(string infoPath)
{
DirectoryInfo directoryInfo = Directory.GetParent(infoPath);
......
......@@ -31,6 +31,9 @@ namespace ModbusDemo.MessageFormat
public static ModbusMaster Modbus;
public static ushort usCommunFailTimes = 0;
public static eModbusErrorCode Modbus_ReadHoldingRegistersTask(out ushort[] OutputValue, byte slaveAddress, ushort startAddress, ushort numberOfPoints)
{
object oLock = new object();
lock (oLock)
{
eModbusErrorCode ModbusErrorCode;
try
......@@ -46,7 +49,7 @@ namespace ModbusDemo.MessageFormat
if (exception.Source.Equals("System"))
{
Console.WriteLine(DateTime.Now.ToString() + " " + exception.Message);
Form1.totxt.Log(DateTime.Now.ToString() + " " + exception.Message);
Form1.totxt.Log(DateTime.Now.ToString() + " " + exception.Message + "Modbus_ReadHoldingRegistersTask");
OutputValue = new ushort[numberOfPoints];
ModbusErrorCode = eModbusErrorCode.MB_ETIMEDOUT;
usCommunFailTimes++;
......@@ -111,7 +114,11 @@ namespace ModbusDemo.MessageFormat
}
return ModbusErrorCode;
}
}
public static eModbusErrorCode Modbus_ReadCoilsTask(out bool[] OutputValue, byte slaveAddress, ushort startAddress, ushort numberOfPoints)
{
object oLock = new object();
lock (oLock)
{
eModbusErrorCode ModbusErrorCode;
try
......@@ -127,7 +134,7 @@ namespace ModbusDemo.MessageFormat
if (exception.Source.Equals("System"))
{
Console.WriteLine(DateTime.Now.ToString() + " " + exception.Message);
Form1.totxt.Log(DateTime.Now.ToString() + " " + exception.Message);
Form1.totxt.Log(DateTime.Now.ToString() + " " + exception.Message + "Modbus_ReadCoilsTask");
OutputValue = new bool[numberOfPoints];
ModbusErrorCode = eModbusErrorCode.MB_ETIMEDOUT;
usCommunFailTimes++;
......@@ -192,7 +199,11 @@ namespace ModbusDemo.MessageFormat
}
return ModbusErrorCode;
}
}
public static eModbusErrorCode Modbus_WriteSingleCoil(byte slaveAddress, ushort startAddress, bool[] value)
{
object oLock = new object();
lock (oLock)
{
eModbusErrorCode ModbusErrorCode;
try
......@@ -208,8 +219,9 @@ namespace ModbusDemo.MessageFormat
if (exception.Source.Equals("System"))
{
Console.WriteLine(DateTime.Now.ToString() + " " + exception.Message);
Form1.totxt.Log(DateTime.Now.ToString() + " " + exception.Message);
Form1.totxt.Log(DateTime.Now.ToString() + " " + exception.Message + "Modbus_WriteSingleCoil");
ModbusErrorCode = eModbusErrorCode.MB_ETIMEDOUT;
usCommunFailTimes++;
}
//The server return error code.
//You can get the function code and exception code.
......@@ -270,7 +282,11 @@ namespace ModbusDemo.MessageFormat
}
return ModbusErrorCode;
}
}
public static eModbusErrorCode Modbus_WriteMultipleCoils(byte slaveAddress, ushort startAddress, bool[] data)
{
object oLock = new object();
lock (oLock)
{
eModbusErrorCode ModbusErrorCode;
try
......@@ -286,8 +302,9 @@ namespace ModbusDemo.MessageFormat
if (exception.Source.Equals("System"))
{
Console.WriteLine(DateTime.Now.ToString() + " " + exception.Message);
Form1.totxt.Log(DateTime.Now.ToString() + " " + exception.Message);
Form1.totxt.Log(DateTime.Now.ToString() + " " + exception.Message + "Modbus_WriteMultipleCoils");
ModbusErrorCode = eModbusErrorCode.MB_ETIMEDOUT;
usCommunFailTimes++;
}
//The server return error code.
//You can get the function code and exception code.
......@@ -348,103 +365,6 @@ namespace ModbusDemo.MessageFormat
}
return ModbusErrorCode;
}
//private void Init_Read_data()
//{
//}
//private async void Modbus_polling()
//{
// float EastTemperature = 0;
// float Easternwaterlevel = 0;
// float WestWaterLevel = 0;
//ushort[] temperature = { };
//ushort[] type = { };
//string[] vs = { };
//string[] s = { };
//string[] s6 = { };
//ushort[] register = { };
//ushort[] Inputtype = { };
//ushort[] registerN = { };
//ushort[] InputtypeN = { };
//bool[] EIO = { };
//bool[] SIO = { };
//bool[] WIO = { };
//int[] EOnOff = { 0 };
//int[] SOnOff = { 0 };
//int[] WOnOff = { 0 };
//pcDeviceAlarm pcDeviceAlarmdata = new pcDeviceAlarm();
//Modbus_ReadHoldingRegistersTask(out temperature, 1, 0, 4, out int signT);
//Modbus_ReadHoldingRegistersTask(out type, 1, 10, 4, out int sign);
//UInt64 time_1 = Form1.GetTimeStamp();
//Modbus_ReadHoldingRegistersTask(out register, 3, 0, 8, out int signr);
//Modbus_ReadHoldingRegistersTask(out Inputtype, 3, 10, 8, out int signI);
//UInt64 time_2 = Form1.GetTimeStamp();
//Modbus_ReadHoldingRegistersTask(out registerN, 6, 0, 8, out int signre);
//Modbus_ReadHoldingRegistersTask(out InputtypeN, 6, 10, 8, out int signIn);
//UInt64 time_3 = Form1.GetTimeStamp();
//Modbus_ReadCoilsTask(out EIO, 5, 16, 6, out int signE);
//Modbus_ReadCoilsTask(out SIO, 8, 16, 6, out int signS);
//Modbus_ReadCoilsTask(out WIO, 4, 16, 6, out int signW);
//if (sign == -1)
//{
// ushort bAddress = 1;
// ushort[] bChannel = new ushort[pcDeviceAlarm.usChannelNumber];
// pcDeviceAlarm.eAlarmCode[] eAlarmCode = new pcDeviceAlarm.eAlarmCode[pcDeviceAlarm.usChannelNumber];
// for (ushort i = 0; i < pcDeviceAlarm.usChannelNumber; i++)
// {
// eAlarmCode[i] = pcDeviceAlarm.eAlarmCode.CommunError;
// }
// pcDeviceAlarmdata.vSetAlarmList(bAddress, bChannel, eAlarmCode);
// await pcDeviceAlarmdata.vPublishAlarmPackageJson(mqttClient);
//}
//if (sign == -1 || signT ==-1|| signW ==-1 || signr == -1 || signI == -1 || signre == -1 || signIn == -1 || signE == -1 || signS == -1)
//{
// vs = null;
// type = null;
// EastTemperature = 0;
// Easternwaterlevel = 0;
// WestWaterLevel = 0;
//}
//else
//{
//vs = rtd.RtdValue(temperature, type);
//EastTemperature = float.Parse(vs[0]);
//s = Analog.Value(register, Inputtype);
//Easternwaterlevel = (float.Parse(s[0]) - 4) / 16 * 6;
//s6 = Analog.Value(registerN, InputtypeN);
//WestWaterLevel = (float.Parse(s6[0]) - 4) / 16 * 6;
//label3.Text = EastTemperature.ToString();
//label4.Text = Easternwaterlevel.ToString();
//EOnOff = state.IO(EIO);////东中转池
//SOnOff = state.IO(SIO);////西中转池
//WOnOff = state.IO(WIO); ////东南北水
//}
//WTDR14P x = new WTDR14P("1", EastTemperature, 0, 0, 0, time_1);
//WTDR18X p = new WTDR18X("3", Easternwaterlevel, 0, 0, 0, 0, 0, 0, 0, time_2);
//WTDR18X q = new WTDR18X("6", WestWaterLevel, 0, 0, 0, 0, 0, 0, 0, time_3);
////东搅拌
//WTDR66C EastStir = new WTDR66C("5", EOnOff[0], EOnOff[1], EOnOff[2], EOnOff[3], EOnOff[4], EOnOff[5], Form1.GetTimeStamp());
////东南北水
//WTDR66C WestStir = new WTDR66C("4", WOnOff[0], WOnOff[1], WOnOff[2], WOnOff[3], WOnOff[4], WOnOff[5], Form1.GetTimeStamp());
////西搅拌
//WTDR66C SouthWater = new WTDR66C("8", SOnOff[0], SOnOff[1], SOnOff[2], SOnOff[3], SOnOff[4], SOnOff[5], Form1.GetTimeStamp());
// mqttData = "[" +
// JsonConvert.SerializeObject(x) + "," +
// JsonConvert.SerializeObject(p) + "," +
// JsonConvert.SerializeObject(q) + "," +
// JsonConvert.SerializeObject(EastStir) + "," +
// JsonConvert.SerializeObject(WestStir) + "," +
// JsonConvert.SerializeObject(SouthWater)
// + "]";
//}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MQTTnet;
using MQTTnet.Client;
using Newtonsoft.Json;
namespace ModbusDemo.MessageFormat
{
public class ModualControl
{
public class Op
{
public UInt64 duration { get; set; }
public UInt64 startTime { get; set;}
public int d0 { get; set; }
public int d1 { get; set; }
public int d2 { get; set; }
public int d3 { get; set; }
public int d4 { get; set; }
public int d5 { get; set; }
public int d6 { get; set; }
public int d7 { get; set; }
public UInt64 ts { get; set; }
}
public class SsItem
{
public string addr { get; set; }
public Op op { get; set; }
}
public class MqttRoot
{
public string taskId { get; set; }
public List<SsItem> ss { get; set; }
}
public static List<MqttRoot> liModuualControl = new List<MqttRoot>();
public static void vGetaWay_Receive_Control(string sDataString)
{
MqttRoot cControl = JsonConvert.DeserializeObject<MqttRoot>(sDataString);
}
}
}
......@@ -132,7 +132,6 @@ namespace ModbusDemo
}
public class Ctrl
{
public string taskId;
public void settaskId(string taskId)
{
......
......@@ -2,6 +2,20 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SSDTUnitTestPath Condition="'$(SSDTUnitTestPath)' == ''">$(VsInstallRoot)\Common7\IDE\Extensions\Microsoft\SQLDB</SSDTUnitTestPath>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup>
<SSDTPath Condition="'$(SSDTPath)' == ''">$(VsInstallRoot)\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130</SSDTPath>
......@@ -22,20 +36,6 @@
<FileAlignment>512</FileAlignment>
<IsWebBootstrapper>false</IsWebBootstrapper>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
......@@ -43,7 +43,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>TRACE;DEBUG;DEBUG_TEST</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
......@@ -78,7 +78,6 @@
<HintPath>..\packages\NModbus4.2.1.0\lib\net40\NModbus4.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
......@@ -94,6 +93,7 @@
<Compile Include="application\Pond.cs" />
<Compile Include="application\UsThread.cs" />
<Compile Include="Common\ModualAlarm.cs" />
<Compile Include="MessageFormat\ModualControl.cs" />
<Compile Include="MessageFormat\ModbusComm.cs" />
<Compile Include="Modular\414P.cs" />
<Compile Include="Modular\478C.cs" />
......@@ -167,11 +167,11 @@
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<SsdtUnitTestVersion>3.1</SsdtUnitTestVersion>
</PropertyGroup>
<Import Project="$(SQLDBExtensionsRefPath)\Microsoft.Data.Tools.Schema.Sql.UnitTesting.targets" Condition="$(VisualStudioVersion) != '15.0' And '$(SQLDBExtensionsRefPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.Sql.UnitTesting.targets" Condition="$(VisualStudioVersion) != '15.0' And '$(SQLDBExtensionsRefPath)' == ''" />
<PropertyGroup>
<!-- <SsdtUnitTestVersion>3.1</SsdtUnitTestVersion> -->
<!-- </PropertyGroup> -->
<!-- <Import Project="$(SQLDBExtensionsRefPath)\Microsoft.Data.Tools.Schema.Sql.UnitTesting.targets" Condition="$(VisualStudioVersion) != '15.0' And '$(SQLDBExtensionsRefPath)' != ''" /> -->
<!-- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.Sql.UnitTesting.targets" Condition="$(VisualStudioVersion) != '15.0' And '$(SQLDBExtensionsRefPath)' == ''" /> -->
<!-- <PropertyGroup> -->
<SsdtUnitTestVersion>3.1</SsdtUnitTestVersion>
</PropertyGroup>
<Import Project="$(SQLDBExtensionsRefPath)\Microsoft.Data.Tools.Schema.Sql.UnitTesting.targets" Condition="$(VisualStudioVersion) != '15.0' And '$(SQLDBExtensionsRefPath)' != ''" />
......
This diff is collapsed.
......@@ -16,21 +16,27 @@ namespace ModbusDemo.Modular
public double[] dNowConvertData;
public double[] dBeforeConvertData;
}
public enum eX14pSensorChannelType : byte
{
Normal = 0,
Null,
}
public struct psxModualAlarm
{
public bool bDataNotFirstIncreaseOrDecrease;
public ushort[] usNowAlarmCode;
public ushort[] usBeforeAlarmCode;
}
public class pcx14P
{
public byte[] byModbusID;
public psx14pData[] sX14pDataStruct = new psx14pData[ModualPoll.byX14pNumber];
public psxModualAlarm[] sX14PAlarmStruct = new psxModualAlarm[ModualPoll.byX14pNumber];
public pcx14P(byte[] InitIDlist)
public eX14pSensorChannelType[,] eChannelType;
public pcx14P(byte[] InitIDlist, eX14pSensorChannelType[,] ChannelType)
{
this.byModbusID = InitIDlist;
this.eChannelType = ChannelType;
for (byte i = 0; i < ModualPoll.byX14pNumber; i++)
{
this.sX14pDataStruct[i].dBeforeConvertData = new double[ModualPoll.byX14pReadDataNumber];
......@@ -49,7 +55,7 @@ namespace ModbusDemo.Modular
Mike_5,
Mike_6,
Mike_7,
Level,
NormalCurrent,
}
public struct psX18xData
......
......@@ -71,7 +71,7 @@
"1",
"2"});
this.cmbStopBit.Location = new System.Drawing.Point(461, 98);
this.cmbStopBit.Margin = new System.Windows.Forms.Padding(4);
this.cmbStopBit.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cmbStopBit.Name = "cmbStopBit";
this.cmbStopBit.Size = new System.Drawing.Size(73, 24);
this.cmbStopBit.TabIndex = 70;
......@@ -81,7 +81,7 @@
this.btCloseCOM.Enabled = false;
this.btCloseCOM.Font = new System.Drawing.Font("Arial", 8F);
this.btCloseCOM.Location = new System.Drawing.Point(432, 130);
this.btCloseCOM.Margin = new System.Windows.Forms.Padding(4);
this.btCloseCOM.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btCloseCOM.Name = "btCloseCOM";
this.btCloseCOM.Size = new System.Drawing.Size(104, 29);
this.btCloseCOM.TabIndex = 72;
......@@ -96,7 +96,7 @@
"1-Odd Parity",
"2-Even Parity"});
this.cmbParity.Location = new System.Drawing.Point(311, 98);
this.cmbParity.Margin = new System.Windows.Forms.Padding(4);
this.cmbParity.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cmbParity.Name = "cmbParity";
this.cmbParity.Size = new System.Drawing.Size(132, 24);
this.cmbParity.TabIndex = 69;
......@@ -105,7 +105,7 @@
//
this.btOpenCOM.Font = new System.Drawing.Font("Arial", 8F);
this.btOpenCOM.Location = new System.Drawing.Point(311, 130);
this.btOpenCOM.Margin = new System.Windows.Forms.Padding(4);
this.btOpenCOM.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btOpenCOM.Name = "btOpenCOM";
this.btOpenCOM.Size = new System.Drawing.Size(104, 29);
this.btOpenCOM.TabIndex = 71;
......@@ -119,7 +119,7 @@
"7",
"8"});
this.cmbDataBit.Location = new System.Drawing.Point(236, 98);
this.cmbDataBit.Margin = new System.Windows.Forms.Padding(4);
this.cmbDataBit.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cmbDataBit.Name = "cmbDataBit";
this.cmbDataBit.Size = new System.Drawing.Size(63, 24);
this.cmbDataBit.TabIndex = 68;
......@@ -181,7 +181,7 @@
"57600",
"115200"});
this.cmbBaud.Location = new System.Drawing.Point(123, 98);
this.cmbBaud.Margin = new System.Windows.Forms.Padding(4);
this.cmbBaud.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cmbBaud.Name = "cmbBaud";
this.cmbBaud.Size = new System.Drawing.Size(100, 24);
this.cmbBaud.TabIndex = 67;
......@@ -201,7 +201,7 @@
//
this.cmbPort.Font = new System.Drawing.Font("Arial", 8F);
this.cmbPort.Location = new System.Drawing.Point(16, 98);
this.cmbPort.Margin = new System.Windows.Forms.Padding(4);
this.cmbPort.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cmbPort.Name = "cmbPort";
this.cmbPort.Size = new System.Drawing.Size(99, 24);
this.cmbPort.TabIndex = 65;
......@@ -225,7 +225,7 @@
this.txtReceiveMessage.Multiline = true;
this.txtReceiveMessage.Name = "txtReceiveMessage";
this.txtReceiveMessage.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.txtReceiveMessage.Size = new System.Drawing.Size(600, 640);
this.txtReceiveMessage.Size = new System.Drawing.Size(677, 660);
this.txtReceiveMessage.TabIndex = 77;
this.txtReceiveMessage.TextChanged += new System.EventHandler(this.txtReceiveMessage_TextChanged);
//
......@@ -238,9 +238,9 @@
this.updateops.Controls.Add(this.UpdateBar);
this.updateops.Controls.Add(this.UpdateBtn);
this.updateops.Location = new System.Drawing.Point(20, 218);
this.updateops.Margin = new System.Windows.Forms.Padding(4);
this.updateops.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.updateops.Name = "updateops";
this.updateops.Padding = new System.Windows.Forms.Padding(4);
this.updateops.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.updateops.Size = new System.Drawing.Size(516, 139);
this.updateops.TabIndex = 92;
this.updateops.TabStop = false;
......@@ -268,7 +268,7 @@
// choosebth
//
this.choosebth.Location = new System.Drawing.Point(243, 81);
this.choosebth.Margin = new System.Windows.Forms.Padding(4);
this.choosebth.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.choosebth.Name = "choosebth";
this.choosebth.Size = new System.Drawing.Size(100, 29);
this.choosebth.TabIndex = 3;
......@@ -289,7 +289,7 @@
// UpdateBar
//
this.UpdateBar.Location = new System.Drawing.Point(77, 25);
this.UpdateBar.Margin = new System.Windows.Forms.Padding(4);
this.UpdateBar.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.UpdateBar.Name = "UpdateBar";
this.UpdateBar.Size = new System.Drawing.Size(373, 29);
this.UpdateBar.TabIndex = 1;
......@@ -297,7 +297,7 @@
// UpdateBtn
//
this.UpdateBtn.Location = new System.Drawing.Point(351, 81);
this.UpdateBtn.Margin = new System.Windows.Forms.Padding(4);
this.UpdateBtn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.UpdateBtn.Name = "UpdateBtn";
this.UpdateBtn.Size = new System.Drawing.Size(100, 29);
this.UpdateBtn.TabIndex = 0;
......@@ -325,7 +325,7 @@
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(44, 487);
this.label2.Location = new System.Drawing.Point(44, 488);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(69, 20);
......@@ -355,7 +355,7 @@
// button2
//
this.button2.Location = new System.Drawing.Point(371, 476);
this.button2.Margin = new System.Windows.Forms.Padding(4);
this.button2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(100, 29);
this.button2.TabIndex = 97;
......@@ -366,7 +366,7 @@
// SubscribeBut
//
this.SubscribeBut.Location = new System.Drawing.Point(371, 432);
this.SubscribeBut.Margin = new System.Windows.Forms.Padding(4);
this.SubscribeBut.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.SubscribeBut.Name = "SubscribeBut";
this.SubscribeBut.Size = new System.Drawing.Size(100, 29);
this.SubscribeBut.TabIndex = 98;
......@@ -396,7 +396,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1184, 672);
this.ClientSize = new System.Drawing.Size(1256, 689);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.SubscribeBut);
......@@ -421,7 +421,7 @@
this.Controls.Add(this.cmbPort);
this.Controls.Add(this.label7);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "Form1";
this.Text = "牧场项目";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form1_FormClosed);
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment