Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
GC_Branch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周磊
GC_Branch
Commits
2f1c2e54
Commit
2f1c2e54
authored
Jun 03, 2019
by
liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
针对redmine上内容进行修改
parent
954dc085
Show whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
1698 additions
and
584 deletions
+1698
-584
AboutForm.cs
GcDevicePc/AboutForm.cs
+1
-1
UserCtl.cs
GcDevicePc/CK_UI/UserCtl.cs
+57
-56
MoudbusOperation.cs
GcDevicePc/Common/MoudbusOperation.cs
+1
-1
NModbusSlave.cs
GcDevicePc/Common/NModbusSlave.cs
+6
-143
FID.cs
GcDevicePc/ConfigMethod/FID.cs
+33
-1
MethodMain.cs
GcDevicePc/ConfigMethod/MethodMain.cs
+1
-1
SPortTabs.cs
GcDevicePc/ConfigMethod/SPortTabs.cs
+1
-1
TCD.cs
GcDevicePc/ConfigMethod/TCD.cs
+33
-1
IPPIP.Designer.cs
GcDevicePc/ConfigMethod/injectionport/IPPIP.Designer.cs
+1
-0
IPPIP.cs
GcDevicePc/ConfigMethod/injectionport/IPPIP.cs
+56
-1
DataState.Designer.cs
GcDevicePc/DataState.Designer.cs
+1
-0
DataState.cs
GcDevicePc/DataState.cs
+297
-18
Auxiliary.Designer.cs
GcDevicePc/DeviceConfigUI/Auxiliary.Designer.cs
+15
-13
Auxiliary.cs
GcDevicePc/DeviceConfigUI/Auxiliary.cs
+4
-2
ColumnBox.Designer.cs
GcDevicePc/DeviceConfigUI/ColumnBox.Designer.cs
+2
-0
ColumnBox.cs
GcDevicePc/DeviceConfigUI/ColumnBox.cs
+2
-1
Detection.Designer.cs
GcDevicePc/DeviceConfigUI/Detection.Designer.cs
+25
-23
Detection.cs
GcDevicePc/DeviceConfigUI/Detection.cs
+2
-1
Sampling.Designer.cs
GcDevicePc/DeviceConfigUI/Sampling.Designer.cs
+8
-6
Sampling.cs
GcDevicePc/DeviceConfigUI/Sampling.cs
+6
-6
HMIBuffer.cs
GcDevicePc/GCBuffer/HMIBuffer.cs
+3
-0
GcDevicePc.csproj
GcDevicePc/GcDevicePc.csproj
+2
-0
MDIBase.Designer.cs
GcDevicePc/MDIBase.Designer.cs
+7
-37
MDIBase.cs
GcDevicePc/MDIBase.cs
+74
-44
MainForm.Designer.cs
GcDevicePc/MainForm.Designer.cs
+1
-1
GcDataTh.cs
GcDevicePc/ProThread/GcDataTh.cs
+40
-0
HMIControl.cs
GcDevicePc/ProThread/HMIControl.cs
+1
-0
SendDataToZB.cs
GcDevicePc/ProThread/SendDataToZB.cs
+679
-0
SignalDataToHw.cs
GcDevicePc/ProThread/SignalDataToHw.cs
+21
-59
Program.cs
GcDevicePc/Program.cs
+17
-19
Resources.Designer.cs
GcDevicePc/Properties/Resources.Designer.cs
+12
-2
Resources.resx
GcDevicePc/Properties/Resources.resx
+12
-5
RunTables.Designer.cs
GcDevicePc/RunTables.Designer.cs
+0
-14
RunTables.cs
GcDevicePc/RunTables.cs
+66
-4
TestForm.Designer.cs
GcDevicePc/TestForm.Designer.cs
+26
-0
TestForm.cs
GcDevicePc/TestForm.cs
+34
-15
色谱3.png
GcDevicePc/UI/picture/色谱3.png
+0
-0
UserConfig.Designer.cs
GcDevicePc/UserConfig.Designer.cs
+22
-20
UserConfig.cs
GcDevicePc/UserConfig.cs
+38
-20
auxtool.Designer.cs
GcDevicePc/auxtool.Designer.cs
+26
-64
auxtool.cs
GcDevicePc/auxtool.cs
+65
-4
CKVocAnalyzer.dll
dll/CKVocAnalyzer.dll
+0
-0
No files found.
GcDevicePc/AboutForm.cs
View file @
2f1c2e54
...
@@ -42,7 +42,7 @@ namespace GcDevicePc
...
@@ -42,7 +42,7 @@ namespace GcDevicePc
this
.
fid1ver
.
Text
=
this
.
FID1version
;
this
.
fid1ver
.
Text
=
this
.
FID1version
;
this
.
fid2ver
.
Text
=
this
.
FID2version
;
this
.
fid2ver
.
Text
=
this
.
FID2version
;
this
.
tcdver
.
Text
=
this
.
TCD1version
;
this
.
tcdver
.
Text
=
this
.
TCD1version
;
this
.
PCver
.
Text
=
this
.
Hmiversion
+
"/1.5.
1
"
;
this
.
PCver
.
Text
=
this
.
Hmiversion
+
"/1.5.
4
"
;
}
}
}
}
}
}
GcDevicePc/CK_UI/UserCtl.cs
View file @
2f1c2e54
...
@@ -252,6 +252,7 @@ namespace GcDevicePc.CK_UI
...
@@ -252,6 +252,7 @@ namespace GcDevicePc.CK_UI
Trace
.
Write
(
ex
);
Trace
.
Write
(
ex
);
}
}
}
}
private
void
datadisp
()
private
void
datadisp
()
{
{
try
try
...
...
GcDevicePc/Common/MoudbusOperation.cs
View file @
2f1c2e54
...
@@ -585,6 +585,7 @@ namespace GcDevicePc.Common
...
@@ -585,6 +585,7 @@ namespace GcDevicePc.Common
}
}
return
ret
;
return
ret
;
}
}
/// <summary>
/// <summary>
/// 获取HMI状态
/// 获取HMI状态
/// </summary>
/// </summary>
...
@@ -634,7 +635,6 @@ namespace GcDevicePc.Common
...
@@ -634,7 +635,6 @@ namespace GcDevicePc.Common
{
{
globaldata
.
m_hmibuffer
.
gcinfo
.
EPCStatus
=
epcdata
;
globaldata
.
m_hmibuffer
.
gcinfo
.
EPCStatus
=
epcdata
;
}
}
}
}
#
endregion
#
endregion
...
...
GcDevicePc/Common/NModbusSlave.cs
View file @
2f1c2e54
...
@@ -35,61 +35,11 @@ namespace GcDevicePc.Common
...
@@ -35,61 +35,11 @@ namespace GcDevicePc.Common
slave
.
Listen
();
slave
.
Listen
();
//// 后台线程1:用于接收tcp连接请求,并将网络流加入列表。随主线程的退出而退出。
//new Thread(() =>
//{
// while (true)
// {
// Thread.Sleep(100);// 可以根据需要设置时间
// if (!listener.Pending())
// {
// continue;
// }
// var client = listener.AcceptTcpClient();
// // 下面属性根据需要进行设置
// // client.ReceiveBufferSize
// // client.ReceiveTimeout
// // client.SendBufferSize
// // client.SendTimeout
// if (!client.Connected)
// {
// continue;
// }
// streams.Add(client.GetStream());
// }
//})
//{ IsBackground = true }.Start();
//// 后台线程2:用于接收请求,并作出响应。随主线程的退出而退出。
//new Thread(() =>
//{
// while (true)
// {
// Thread.Sleep(100);// 可以根据需要设置时间
// if (streams == null || streams.Count == 0)
// {
// continue;
// }
// streams = streams.Where(s => s.CanRead && s.CanWrite).ToList();
// foreach (var stream in streams.Where(stream => stream.CanRead && stream.CanWrite))
// {
// AsyncReceiveBytes(stream,
// s =>
// {
// // todo:对result进行解码
// // todo:对收到指令进行逻辑判断,得出待响应的C#对象
// AsyncSendBytes(s, new byte[0]); // todo:将待响应的C#对象转换成字节数组,替换new byte[0]。
// });
// }
// }
//})
//{ IsBackground = true }.Start();
}
}
public
void
NModbusSlaveClose
()
public
void
NModbusSlaveClose
()
{
{
//listener.Stop();
//slave.Dispose();
}
}
~
NModbusSlave
()
~
NModbusSlave
()
...
@@ -97,55 +47,6 @@ namespace GcDevicePc.Common
...
@@ -97,55 +47,6 @@ namespace GcDevicePc.Common
listener
.
Stop
();
listener
.
Stop
();
slave
.
Dispose
();
slave
.
Dispose
();
}
}
// 发送事件和目标的入口
//public void SendEventAndTarget()
//{
// if (streams == null || streams.Count == 0)
// {
// return;
// }
// streams = streams.Where(s => s.CanRead && s.CanWrite).ToList();
// foreach (var stream in streams.TakeWhile(stream => stream.CanWrite))
// {
// AsyncSendBytes(stream, new byte[0]);// todo:这里将待发送的C#对象转换的字节数组替换new byte[0]。
// }
//}
//private static void AsyncReceiveBytes(NetworkStream stream,
// Action<NetworkStream> callback)
//{
// // 短时后台线程:用于处理网络流的读操作,处理完成后即归还线程池。
// // 每个网络流都会分配一个线程。
// //ThreadPool.SetMaxThreads();根据需要设置。
// ThreadPool.QueueUserWorkItem(delegate
// {
// var buffer = new byte[1024];// 1024:根据需要进行设置。
// var result = new byte[0];
// do
// {
// var a = stream.Read(buffer, 0, buffer.Length);
// result = result.Concat(buffer.Take(a)).ToArray();
// } while (stream.DataAvailable);
// callback(stream);
// });
//}
//private static void AsyncSendBytes(NetworkStream stream, byte[] bytes)
//{
// // 短时后台线程:用于处理网络流的写操作,处理完成后即归还线程池。
// // 每个网络流都会分配一个线程。
// //ThreadPool.SetMaxThreads();根据需要设置。
// ThreadPool.QueueUserWorkItem(delegate
// {
// try
// {
// stream.Write(bytes, 0, bytes.Count());
// }
// catch (Exception)
// {
// Console.WriteLine("远程主机主动断开此连接!");// 也可以做其它处理。
// }
// });
//}
private
readonly
TcpListener
listener
;
private
readonly
TcpListener
listener
;
// 网络流列表
// 网络流列表
...
@@ -158,45 +59,23 @@ namespace GcDevicePc.Common
...
@@ -158,45 +59,23 @@ namespace GcDevicePc.Common
private
void
DataStore_DataStoreReadFrom
(
object
sender
,
DataStoreEventArgs
e
)
private
void
DataStore_DataStoreReadFrom
(
object
sender
,
DataStoreEventArgs
e
)
{
{
//int iAddress = e.StartAddress;
try
try
{
{
//if (e.ModbusDataType == ModbusDataType.HoldingRegister)
//{
// //for (int i = 0; i < e.Data.B.Count; i++)
// {
// //Set AO
// //e.Data.B[i] already write to
// //slave.DataStore.HoldingRegisters[e.StartAddress + i + 1] = slavereadhreg(Convert.ToUInt16(e.StartAddress + i + 1));
// //e.StartAddress starts from 0
// //You can set AO value to hardware here
// }
// slave.DataStore.HoldingRegisters[e.StartAddress + 1] = slavereadhreg(Convert.ToUInt16(e.StartAddress + 1));
//}
switch
(
e
.
ModbusDataType
)
switch
(
e
.
ModbusDataType
)
{
{
case
ModbusDataType
.
HoldingRegister
:
case
ModbusDataType
.
HoldingRegister
:
for
(
int
i
=
0
;
i
<
e
.
Data
.
B
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
e
.
Data
.
B
.
Count
;
i
++)
{
{
//Set AO
//e.Data.B[i] already write to
//slave.DataStore.HoldingRegisters[e.StartAddress + i + 1] = 1;
slave
.
DataStore
.
HoldingRegisters
[
e
.
StartAddress
+
i
+
1
]
=
slavereadhreg
(
Convert
.
ToUInt16
(
e
.
StartAddress
+
i
+
1
));
slave
.
DataStore
.
HoldingRegisters
[
e
.
StartAddress
+
i
+
1
]
=
slavereadhreg
(
Convert
.
ToUInt16
(
e
.
StartAddress
+
i
+
1
));
//e.StartAddress starts from 0
//You can set AO value to hardware here
}
}
break
;
break
;
case
ModbusDataType
.
Coil
:
case
ModbusDataType
.
Coil
:
for
(
int
i
=
0
;
i
<
e
.
Data
.
A
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
e
.
Data
.
A
.
Count
;
i
++)
{
{
//set DO
//e.Data.A[i] already write to
slave
.
DataStore
.
CoilDiscretes
[
e
.
StartAddress
+
i
+
1
]
=
slavereadcreg
(
Convert
.
ToUInt16
(
e
.
StartAddress
+
i
+
1
))
==
0
?
false
:
true
;
slave
.
DataStore
.
CoilDiscretes
[
e
.
StartAddress
+
i
+
1
]
=
slavereadcreg
(
Convert
.
ToUInt16
(
e
.
StartAddress
+
i
+
1
))
==
0
?
false
:
true
;
//e.StartAddress starts from 0
//You can set DO value to hardware here
}
}
break
;
break
;
}
}
...
@@ -214,14 +93,7 @@ namespace GcDevicePc.Common
...
@@ -214,14 +93,7 @@ namespace GcDevicePc.Common
{
{
try
try
{
{
//if (e.ModbusDataType == ModbusDataType.HoldingRegister)
//{
// //for (int i = 0; i < e.Data.B.Count; i++)
// //{
// // Console.WriteLine("[" + i + "] " + e.Data.B[i]);
// //}
// slavewirtehreg(e.StartAddress, e.Data.B[e.StartAddress]);
//}
switch
(
e
.
ModbusDataType
)
switch
(
e
.
ModbusDataType
)
{
{
case
ModbusDataType
.
HoldingRegister
:
case
ModbusDataType
.
HoldingRegister
:
...
@@ -241,16 +113,7 @@ namespace GcDevicePc.Common
...
@@ -241,16 +113,7 @@ namespace GcDevicePc.Common
//trigger Modbus_Request_Event
//trigger Modbus_Request_Event
private
void
Modbus_Request_Event
(
object
sender
,
ModbusSlaveRequestEventArgs
e
)
private
void
Modbus_Request_Event
(
object
sender
,
ModbusSlaveRequestEventArgs
e
)
{
{
//disassemble packet from master
//byte fc = e.Message.FunctionCode;
//byte[] data = e.Message.MessageFrame;
//byte[] byteStartAddress = new byte[] { data[3], data[2] };
//byte[] byteNum = new byte[] { data[5], data[4] };
//Int16 StartAddress = BitConverter.ToInt16(byteStartAddress, 0);
//Int16 NumOfPoint = BitConverter.ToInt16(byteNum, 0);
//Console.WriteLine(fc.ToString() + "," + StartAddress.ToString() + "," +
//NumOfPoint.ToString());
//Console.WriteLine("asdadas");
}
}
...
...
GcDevicePc/ConfigMethod/FID.cs
View file @
2f1c2e54
...
@@ -25,11 +25,28 @@ namespace GcDevicePc.ConfigMethod
...
@@ -25,11 +25,28 @@ namespace GcDevicePc.ConfigMethod
this
.
methodconfig
=
methodconfig
;
this
.
methodconfig
=
methodconfig
;
}
}
int
configTemp
;
public
void
reflashContent
(
int
index
)
public
void
reflashContent
(
int
index
)
{
{
this
.
methodconfig
.
GetFidByID
(
index
);
this
.
methodconfig
.
GetFidByID
(
index
);
switch
(
index
)
{
case
0
:
configTemp
=
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16DetFrontPTemp
;
break
;
case
1
:
configTemp
=
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16DetInterPTemp
;
break
;
case
2
:
configTemp
=
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16DetBehindPTemp
;
break
;
default
:
break
;
}
fidsettemp
.
Text
=
this
.
methodconfig
.
fid
[
index
].
fHeaterTempSet
.
ToString
();
fidsettemp
.
Text
=
this
.
methodconfig
.
fid
[
index
].
fHeaterTempSet
.
ToString
();
if
(
hwconfig
.
hwconfiginfo
.
u16StartType
==
1
||
hwconfig
.
hwconfiginfo
.
u16StartType
==
3
)
if
(
hwconfig
.
hwconfiginfo
.
u16StartType
==
1
||
hwconfig
.
hwconfiginfo
.
u16StartType
==
3
)
{
{
...
@@ -165,7 +182,7 @@ namespace GcDevicePc.ConfigMethod
...
@@ -165,7 +182,7 @@ namespace GcDevicePc.ConfigMethod
this
.
methodconfig
.
epc
[
0
].
ThirdFlow
=
string2float
(
tb
空气压力设定
.
Text
);
this
.
methodconfig
.
epc
[
0
].
ThirdFlow
=
string2float
(
tb
空气压力设定
.
Text
);
this
.
methodconfig
.
epc
[
0
].
gasType3
=
(
ushort
)
0
;
this
.
methodconfig
.
epc
[
0
].
gasType3
=
(
ushort
)
0
;
}
}
bool
isone
=
false
;
private
void
fidsettemp_TextChanged
(
object
sender
,
EventArgs
e
)
private
void
fidsettemp_TextChanged
(
object
sender
,
EventArgs
e
)
{
{
float
tmpval
=
string2float
(
fidsettemp
.
Text
);
float
tmpval
=
string2float
(
fidsettemp
.
Text
);
...
@@ -174,6 +191,21 @@ namespace GcDevicePc.ConfigMethod
...
@@ -174,6 +191,21 @@ namespace GcDevicePc.ConfigMethod
MessageBox
.
Show
(
"设置温度需要小于400"
);
MessageBox
.
Show
(
"设置温度需要小于400"
);
fidsettemp
.
Text
=
"0"
;
fidsettemp
.
Text
=
"0"
;
}
}
else
{
if
(
isone
)
{
if
(
tmpval
>
configTemp
)
{
MessageBox
.
Show
(
"设置温度不能大于保护温度"
);
(
sender
as
TextBox
).
Text
=
"0"
;
}
}
else
{
isone
=
true
;
}
}
}
}
}
}
}
}
GcDevicePc/ConfigMethod/MethodMain.cs
View file @
2f1c2e54
...
@@ -435,7 +435,7 @@ namespace GcDevicePc.ConfigMethod
...
@@ -435,7 +435,7 @@ namespace GcDevicePc.ConfigMethod
}
}
SignalDataToHw
.
methodconfig
=
this
.
gcmethodconfig
;
SignalDataToHw
.
methodconfig
=
this
.
gcmethodconfig
;
SendDataToZB
.
methodconfig
=
this
.
gcmethodconfig
;
//string message = "提交成功!";
//string message = "提交成功!";
//MessageBox.Show(message, "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
//MessageBox.Show(message, "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
...
...
GcDevicePc/ConfigMethod/SPortTabs.cs
View file @
2f1c2e54
...
@@ -278,7 +278,7 @@ namespace GcDevicePc.ConfigMethod
...
@@ -278,7 +278,7 @@ namespace GcDevicePc.ConfigMethod
Page
.
UseVisualStyleBackColor
=
true
;
Page
.
UseVisualStyleBackColor
=
true
;
tabControlDet
.
Controls
.
Add
(
Page
);
tabControlDet
.
Controls
.
Add
(
Page
);
tabControlDet
.
TabPages
[
tabControlDet
.
TabPages
.
Count
-
1
].
Text
=
"后进样口"
;
tabControlDet
.
TabPages
[
tabControlDet
.
TabPages
.
Count
-
1
].
Text
=
"后进样口"
;
Detadd_Dlg
(
0
,
tabControlDet
.
TabPages
.
Count
-
1
);
Detadd_Dlg
(
1
,
tabControlDet
.
TabPages
.
Count
-
1
);
}
}
//if (hwconfig.hwconfiginfo.u16InjValveVA1 == 1)
//if (hwconfig.hwconfiginfo.u16InjValveVA1 == 1)
...
...
GcDevicePc/ConfigMethod/TCD.cs
View file @
2f1c2e54
...
@@ -39,11 +39,28 @@ namespace GcDevicePc.ConfigMethod
...
@@ -39,11 +39,28 @@ namespace GcDevicePc.ConfigMethod
return
ret
;
return
ret
;
}
}
int
configTemp
;
public
void
reflashContent
(
int
index
)
public
void
reflashContent
(
int
index
)
{
{
this
.
methodconfig
.
GetTcdByID
(
index
);
this
.
methodconfig
.
GetTcdByID
(
index
);
switch
(
index
)
{
case
0
:
configTemp
=
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16DetFrontPTemp
;
break
;
case
1
:
configTemp
=
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16DetInterPTemp
;
break
;
case
2
:
configTemp
=
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16DetBehindPTemp
;
break
;
default
:
break
;
}
//tb桥电流.Text = this.methodconfig.tcd[index].u16Electric.ToString();
//tb桥电流.Text = this.methodconfig.tcd[index].u16Electric.ToString();
tcdsettemp
.
Text
=
this
.
methodconfig
.
tcd
[
index
].
fHeaterTempSet
.
ToString
();
tcdsettemp
.
Text
=
this
.
methodconfig
.
tcd
[
index
].
fHeaterTempSet
.
ToString
();
...
@@ -142,7 +159,7 @@ namespace GcDevicePc.ConfigMethod
...
@@ -142,7 +159,7 @@ namespace GcDevicePc.ConfigMethod
//else if (cListBoxSign.GetItemChecked(2) == true)
//else if (cListBoxSign.GetItemChecked(2) == true)
// this.methodconfig.tcd[index].u16SigDeduct = 3;
// this.methodconfig.tcd[index].u16SigDeduct = 3;
}
}
bool
isone
=
false
;
private
void
tcdsettemp_TextChanged
(
object
sender
,
EventArgs
e
)
private
void
tcdsettemp_TextChanged
(
object
sender
,
EventArgs
e
)
{
{
float
tmpval
=
string2float
(
tcdsettemp
.
Text
);
float
tmpval
=
string2float
(
tcdsettemp
.
Text
);
...
@@ -151,6 +168,21 @@ namespace GcDevicePc.ConfigMethod
...
@@ -151,6 +168,21 @@ namespace GcDevicePc.ConfigMethod
MessageBox
.
Show
(
"设置温度需要小于400"
);
MessageBox
.
Show
(
"设置温度需要小于400"
);
tcdsettemp
.
Text
=
"0"
;
tcdsettemp
.
Text
=
"0"
;
}
}
else
{
if
(
isone
)
{
if
(
tmpval
>
configTemp
)
{
MessageBox
.
Show
(
"设置温度不能大于保护温度"
);
(
sender
as
TextBox
).
Text
=
"0"
;
}
}
else
{
isone
=
true
;
}
}
}
}
}
}
}
}
GcDevicePc/ConfigMethod/injectionport/IPPIP.Designer.cs
View file @
2f1c2e54
...
@@ -88,6 +88,7 @@
...
@@ -88,6 +88,7 @@
this
.
txtHeater
.
Name
=
"txtHeater"
;
this
.
txtHeater
.
Name
=
"txtHeater"
;
this
.
txtHeater
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
24
);
this
.
txtHeater
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
24
);
this
.
txtHeater
.
TabIndex
=
4
;
this
.
txtHeater
.
TabIndex
=
4
;
this
.
txtHeater
.
TextChanged
+=
new
System
.
EventHandler
(
this
.
TxtHeater_TextChanged
);
//
//
// lblSamplePortType
// lblSamplePortType
//
//
...
...
GcDevicePc/ConfigMethod/injectionport/IPPIP.cs
View file @
2f1c2e54
...
@@ -25,6 +25,8 @@ namespace GcDevicePc.ConfigMethod.injectionport
...
@@ -25,6 +25,8 @@ namespace GcDevicePc.ConfigMethod.injectionport
this
.
methodconfig
=
methodconfig
;
this
.
methodconfig
=
methodconfig
;
}
}
int
configTemp
;
public
void
reflashContent
(
int
index
)
public
void
reflashContent
(
int
index
)
{
{
this
.
methodconfig
.
GetDevInjPortAllPara
();
this
.
methodconfig
.
GetDevInjPortAllPara
();
...
@@ -32,8 +34,22 @@ namespace GcDevicePc.ConfigMethod.injectionport
...
@@ -32,8 +34,22 @@ namespace GcDevicePc.ConfigMethod.injectionport
label1
.
Text
=
"进样口类型:"
;
label1
.
Text
=
"进样口类型:"
;
label21
.
Text
=
"进样口载气:"
;
label21
.
Text
=
"进样口载气:"
;
switch
(
index
)
{
case
0
:
configTemp
=
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16InjPortFPTemp
;
break
;
case
1
:
configTemp
=
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16InjPortBPTemp
;
break
;
default
:
break
;
}
txtHeater
.
Text
=
this
.
methodconfig
.
port
[
index
].
HeaterTmpActual
.
ToString
();
txtHeater
.
Text
=
this
.
methodconfig
.
port
[
index
].
HeaterTmpActual
.
ToString
();
if
(
this
.
hwconfig
.
hwconfiginfo
.
u16StartType
==
1
||
this
.
hwconfig
.
hwconfiginfo
.
u16StartType
==
3
)
if
(
this
.
hwconfig
.
hwconfiginfo
.
u16StartType
==
1
||
this
.
hwconfig
.
hwconfiginfo
.
u16StartType
==
3
)
{
{
txtFlow
.
Text
=
this
.
methodconfig
.
port
[
index
].
pipFlowActual
.
ToString
();
txtFlow
.
Text
=
this
.
methodconfig
.
port
[
index
].
pipFlowActual
.
ToString
();
...
@@ -186,6 +202,17 @@ namespace GcDevicePc.ConfigMethod.injectionport
...
@@ -186,6 +202,17 @@ namespace GcDevicePc.ConfigMethod.injectionport
label1
.
Text
=
"辅助名:"
;
label1
.
Text
=
"辅助名:"
;
label21
.
Text
=
"辅助载气类型:"
;
label21
.
Text
=
"辅助载气类型:"
;
switch
(
index
)
{
case
0
:
configTemp
=
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16AuxHeaterPTemp1
;
break
;
case
1
:
configTemp
=
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16AuxHeaterPTemp2
;
break
;
default
:
break
;
}
if
(
this
.
hwconfig
.
hwconfiginfo
.
u16StartType
==
1
||
this
.
hwconfig
.
hwconfiginfo
.
u16StartType
==
3
)
if
(
this
.
hwconfig
.
hwconfiginfo
.
u16StartType
==
1
||
this
.
hwconfig
.
hwconfiginfo
.
u16StartType
==
3
)
{
{
...
@@ -381,6 +408,34 @@ namespace GcDevicePc.ConfigMethod.injectionport
...
@@ -381,6 +408,34 @@ namespace GcDevicePc.ConfigMethod.injectionport
}
}
}
}
}
}
bool
isone
=
false
;
private
void
TxtHeater_TextChanged
(
object
sender
,
EventArgs
e
)
{
float
tmpval
=
string2float
((
sender
as
TextBox
).
Text
);
if
(
tmpval
>
400.0f
)
{
MessageBox
.
Show
(
"设置温度需要小于400"
);
(
sender
as
TextBox
).
Text
=
"0"
;
}
else
{
if
(
isone
)
{
if
(
tmpval
>
configTemp
)
{
MessageBox
.
Show
(
"设置温度不能大于保护温度"
);
(
sender
as
TextBox
).
Text
=
"0"
;
}
}
else
{
isone
=
true
;
}
}
}
//private void combControlMode_SelectedIndexChanged(object sender, EventArgs e)
//private void combControlMode_SelectedIndexChanged(object sender, EventArgs e)
//{
//{
...
...
GcDevicePc/DataState.Designer.cs
View file @
2f1c2e54
...
@@ -42,6 +42,7 @@
...
@@ -42,6 +42,7 @@
this
.
datalist
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
datalist
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
datalist
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
datalist
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
datalist
.
Name
=
"datalist"
;
this
.
datalist
.
Name
=
"datalist"
;
this
.
datalist
.
OwnerDraw
=
true
;
this
.
datalist
.
Size
=
new
System
.
Drawing
.
Size
(
286
,
330
);
this
.
datalist
.
Size
=
new
System
.
Drawing
.
Size
(
286
,
330
);
this
.
datalist
.
TabIndex
=
0
;
this
.
datalist
.
TabIndex
=
0
;
this
.
datalist
.
UseCompatibleStateImageBehavior
=
false
;
this
.
datalist
.
UseCompatibleStateImageBehavior
=
false
;
...
...
GcDevicePc/DataState.cs
View file @
2f1c2e54
...
@@ -950,6 +950,7 @@ namespace GcDevicePc
...
@@ -950,6 +950,7 @@ namespace GcDevicePc
public
Thread
updateth
;
public
Thread
updateth
;
GcDataTh
mymodbus
;
GcDataTh
mymodbus
;
HMIControl
hmiopt
;
int
lvindex
;
int
lvindex
;
public
DataState
()
public
DataState
()
...
@@ -958,6 +959,7 @@ namespace GcDevicePc
...
@@ -958,6 +959,7 @@ namespace GcDevicePc
this
.
datalist
.
Width
=
this
.
Width
;
this
.
datalist
.
Width
=
this
.
Width
;
this
.
datalist
.
Height
=
this
.
Height
;
this
.
datalist
.
Height
=
this
.
Height
;
hmiopt
=
new
HMIControl
(
globaldata
.
connection_ip
,
globaldata
.
datamodbusport
);
datalist
.
Scroll
+=
new
EventHandler
(
datalist_Scroll
);
datalist
.
Scroll
+=
new
EventHandler
(
datalist_Scroll
);
}
}
...
@@ -981,7 +983,7 @@ namespace GcDevicePc
...
@@ -981,7 +983,7 @@ namespace GcDevicePc
{
{
this
.
datalist
.
View
=
View
.
Details
;
this
.
datalist
.
View
=
View
.
Details
;
this
.
datalist
.
Columns
.
Add
(
"仪器方法"
,
120
,
HorizontalAlignment
.
Left
);
this
.
datalist
.
Columns
.
Add
(
"仪器方法"
,
120
,
HorizontalAlignment
.
Left
);
this
.
datalist
.
Columns
.
Add
(
"当前
值/设置值
"
,
120
,
HorizontalAlignment
.
Center
);
this
.
datalist
.
Columns
.
Add
(
"当前
/设置
"
,
120
,
HorizontalAlignment
.
Center
);
globaldata
.
m_profileMethod
.
GetDevState
();
globaldata
.
m_profileMethod
.
GetDevState
();
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
...
@@ -1016,6 +1018,10 @@ namespace GcDevicePc
...
@@ -1016,6 +1018,10 @@ namespace GcDevicePc
double
iDetvalueold
=
0
;
double
iDetvalueold
=
0
;
double
bDetvalueold
=
0
;
double
bDetvalueold
=
0
;
ListViewItem
tempshow
;
ListViewItem
tempshow
;
float
[]
temp
=
new
float
[
7
]{
0
,
0
,
0
,
0
,
0
,
0
,
0
};
int
[]
timea
=
new
int
[
7
]
{
10
,
10
,
10
,
10
,
10
,
10
,
10
};
private
void
dataupdate_Tick
(
object
sender
,
EventArgs
e
)
private
void
dataupdate_Tick
(
object
sender
,
EventArgs
e
)
{
{
int
i
;
int
i
;
...
@@ -1125,6 +1131,55 @@ namespace GcDevicePc
...
@@ -1125,6 +1131,55 @@ namespace GcDevicePc
//errinfo = null;
//errinfo = null;
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
HmiAbnormal
[
0
]
!=
0
||
globaldata
.
m_hmibuffer
.
gcinfo
.
HmiAbnormal
[
1
]
!=
0
||
globaldata
.
m_hmibuffer
.
gcinfo
.
HmiAbnormal
[
2
]
!=
0
)
{
tempshow
=
new
ListViewItem
();
this
.
datalist
.
Items
.
Add
(
tempshow
);
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"异常"
;
tempshow
.
Font
=
new
Font
(
tempshow
.
Font
,
tempshow
.
Font
.
Style
|
FontStyle
.
Bold
);
tempshow
.
SubItems
.
Add
(
""
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
HmiAbnormal
[
0
]
!=
0
)
{
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"温度异常"
;
tempshow
.
SubItems
.
Add
(
"XA00"
+
globaldata
.
m_hmibuffer
.
gcinfo
.
HmiAbnormal
[
0
].
ToString
());
tempshow
.
BackColor
=
Color
.
LightYellow
;
this
.
datalist
.
Items
.
Add
(
tempshow
);
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
HmiAbnormal
[
1
]
!=
0
)
{
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
""
;
tempshow
.
SubItems
.
Add
(
"XB00"
+
globaldata
.
m_hmibuffer
.
gcinfo
.
HmiAbnormal
[
1
].
ToString
());
tempshow
.
BackColor
=
Color
.
LightYellow
;
this
.
datalist
.
Items
.
Add
(
tempshow
);
}
}
else
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
HmiAbnormal
[
1
]
!=
0
)
{
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"温度异常"
;
tempshow
.
SubItems
.
Add
(
"XB00"
+
globaldata
.
m_hmibuffer
.
gcinfo
.
HmiAbnormal
[
1
].
ToString
());
tempshow
.
BackColor
=
Color
.
LightYellow
;
this
.
datalist
.
Items
.
Add
(
tempshow
);
}
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
HmiAbnormal
[
2
]
!=
0
)
{
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"FID异常"
;
tempshow
.
SubItems
.
Add
(
"XC00"
+
globaldata
.
m_hmibuffer
.
gcinfo
.
HmiAbnormal
[
2
].
ToString
());
tempshow
.
BackColor
=
Color
.
LightYellow
;
this
.
datalist
.
Items
.
Add
(
tempshow
);
}
}
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
...
@@ -1145,9 +1200,41 @@ namespace GcDevicePc
...
@@ -1145,9 +1200,41 @@ namespace GcDevicePc
{
{
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"前进样口"
;
tempshow
.
Text
=
"前进样口"
;
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
)
+
" / "
+
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPSetTemp
.
ToString
(
"0"
));
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.FPActualTemp) + " / " + globaldata.m_dpbuffer.ShowList.showtemp.FPSetTemp.ToString("0"));
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
)
+
" / "
+
CProfileDevice
.
m_DevParam
.
port
[
0
].
fHeaterSetTemp
.
ToString
(
"0"
));
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
<
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16InjPortFPTemp
+
1
)
{
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
>
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPSetTemp
-
1
&&
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
<
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPSetTemp
+
1
)
{
tempshow
.
BackColor
=
Color
.
White
;
}
else
{
tempshow
.
BackColor
=
Color
.
LightYellow
;
}
}
else
{
tempshow
.
BackColor
=
Color
.
PaleVioletRed
;
}
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
//if (globaldata.m_dpbuffer.ShowList.showtemp.FPActualTemp > globaldata.m_dpbuffer.ShowList.showtemp.FPSetTemp + 20.0f)
//{
// if (globaldata.m_dpbuffer.ShowList.showtemp.FPActualTemp > temp[0])
// {
// }
// MessageBox.Show(tempshow.Text + "温度异常,系统停止中!");
// globaldata.OS_STOP = true;
// hmiopt.WriteEndVal();
//}
//temp[0] = globaldata.m_dpbuffer.ShowList.showtemp.FPActualTemp;
}
}
//else
//else
//{
//{
...
@@ -1165,9 +1252,39 @@ namespace GcDevicePc
...
@@ -1165,9 +1252,39 @@ namespace GcDevicePc
{
{
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"后进样口"
;
tempshow
.
Text
=
"后进样口"
;
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
)
+
" / "
+
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPSetTemp
.
ToString
(
"0"
));
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
)
+
" / "
+
CProfileDevice
.
m_DevParam
.
port
[
1
].
fHeaterSetTemp
.
ToString
(
"0"
));
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.BPActualTemp) + " / " + globaldata.m_dpbuffer.ShowList.showtemp.BPSetTemp.ToString("0"));
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
<
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16InjPortBPTemp
+
1
)
{
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
>
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPSetTemp
-
1
&&
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
<
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPSetTemp
+
1
)
{
tempshow
.
BackColor
=
Color
.
White
;
}
else
{
tempshow
.
BackColor
=
Color
.
LightYellow
;
}
}
else
{
tempshow
.
BackColor
=
Color
.
PaleVioletRed
;
}
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
//if (globaldata.m_dpbuffer.ShowList.showtemp.BPActualTemp > globaldata.m_dpbuffer.ShowList.showtemp.BPSetTemp + 20.0f)
//{
// MessageBox.Show(tempshow.Text + "温度异常,系统停止中!");
// globaldata.OS_STOP = true;
// hmiopt.WriteEndVal();
//}
//temp[1] = globaldata.m_dpbuffer.ShowList.showtemp.BPActualTemp;
}
}
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.BPActualTemp) + " / " + "未定义");
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.BPActualTemp) + " / " + "未定义");
//else
//else
...
@@ -1183,7 +1300,27 @@ namespace GcDevicePc
...
@@ -1183,7 +1300,27 @@ namespace GcDevicePc
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"柱箱"
;
tempshow
.
Text
=
"柱箱"
;
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.ColActualTemp) + " / " + "未定义");
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.ColActualTemp) + " / " + "未定义");
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
ColActualTemp
)
+
" / "
+
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
ColSetTemp
.
ToString
(
"0"
));
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
ColActualTemp
)
+
" / "
+
CProfileDevice
.
m_DevParam
.
col
.
fColTempSet
.
ToString
(
"0"
));
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.ColActualTemp) + " / " + globaldata.m_dpbuffer.ShowList.showtemp.ColSetTemp.ToString("0"));
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
ColActualTemp
<
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16ColPTemp
+
1
)
{
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
ColActualTemp
>
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
ColSetTemp
-
1
&&
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
ColActualTemp
<
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
ColSetTemp
+
1
)
{
tempshow
.
BackColor
=
Color
.
White
;
}
else
{
tempshow
.
BackColor
=
Color
.
LightYellow
;
}
}
else
{
tempshow
.
BackColor
=
Color
.
PaleVioletRed
;
}
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
}
}
...
@@ -1214,9 +1351,40 @@ namespace GcDevicePc
...
@@ -1214,9 +1351,40 @@ namespace GcDevicePc
{
{
tempshow
.
Text
=
"FPD1"
;
tempshow
.
Text
=
"FPD1"
;
}
}
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
)
+
" / "
+
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetSetTemp
.
ToString
(
"0"
));
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
)
+
" / "
+
CProfileDevice
.
m_DevParam
.
fid
[
0
].
fHeaterTempSet
.
ToString
(
"0"
));
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.fDetActualTemp) + " / " + globaldata.m_dpbuffer.ShowList.showtemp.fDetSetTemp.ToString("0"));
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
<
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16DetFrontPTemp
+
1
)
{
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
>
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetSetTemp
-
1
&&
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
<
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetSetTemp
+
1
)
{
tempshow
.
BackColor
=
Color
.
White
;
}
else
{
tempshow
.
BackColor
=
Color
.
LightYellow
;
}
}
else
{
tempshow
.
BackColor
=
Color
.
PaleVioletRed
;
}
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
//if (globaldata.m_dpbuffer.ShowList.showtemp.fDetActualTemp > globaldata.m_dpbuffer.ShowList.showtemp.fDetSetTemp + 20.0f)
//{
// MessageBox.Show(tempshow.Text + "温度异常,系统停止中!");
// globaldata.OS_STOP = true;
// hmiopt.WriteEndVal();
//}
//temp[2] = globaldata.m_dpbuffer.ShowList.showtemp.fDetActualTemp;
}
}
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.fDetActualTemp) + " / " + "未定义");
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.fDetActualTemp) + " / " + "未定义");
//else
//else
...
@@ -1244,9 +1412,38 @@ namespace GcDevicePc
...
@@ -1244,9 +1412,38 @@ namespace GcDevicePc
{
{
tempshow
.
Text
=
"FPD2"
;
tempshow
.
Text
=
"FPD2"
;
}
}
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
)
+
" / "
+
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetSetTemp
.
ToString
(
"0"
));
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
)
+
" / "
+
CProfileDevice
.
m_DevParam
.
fid
[
1
].
fHeaterTempSet
.
ToString
(
"0"
));
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.iDetActualTemp) + " / " + globaldata.m_dpbuffer.ShowList.showtemp.iDetSetTemp.ToString("0"));
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
<
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16DetInterPTemp
+
1
)
{
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
>
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetSetTemp
-
1
&&
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
<
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetSetTemp
+
1
)
{
tempshow
.
BackColor
=
Color
.
White
;
}
else
{
tempshow
.
BackColor
=
Color
.
LightYellow
;
}
}
else
{
tempshow
.
BackColor
=
Color
.
PaleVioletRed
;
}
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.iDetActualTemp) + " / " + "未定义");
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.iDetActualTemp) + " / " + "未定义");
//if (globaldata.m_dpbuffer.ShowList.showtemp.iDetActualTemp > globaldata.m_dpbuffer.ShowList.showtemp.iDetSetTemp + 20.0f)
//{
// MessageBox.Show(tempshow.Text + "温度异常,系统停止中!");
// globaldata.OS_STOP = true;
// hmiopt.WriteEndVal();
//}
//temp[3] = globaldata.m_dpbuffer.ShowList.showtemp.iDetActualTemp;
}
}
...
@@ -1274,9 +1471,36 @@ namespace GcDevicePc
...
@@ -1274,9 +1471,36 @@ namespace GcDevicePc
tempshow
.
Text
=
"FPD3"
;
tempshow
.
Text
=
"FPD3"
;
}
}
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetActualTemp
)
+
" / "
+
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetSetTemp
.
ToString
(
"0"
));
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetActualTemp
)
+
" / "
+
CProfileDevice
.
m_DevParam
.
tcd
[
2
].
fHeaterTempSet
.
ToString
(
"0"
));
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.bDetActualTemp) + " / " + globaldata.m_dpbuffer.ShowList.showtemp.bDetSetTemp.ToString("0"));
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetActualTemp
<
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16DetBehindPTemp
+
1
)
{
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetActualTemp
>
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetSetTemp
-
1
&&
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetActualTemp
<
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetSetTemp
+
1
)
{
tempshow
.
BackColor
=
Color
.
White
;
}
else
{
tempshow
.
BackColor
=
Color
.
LightYellow
;
}
}
else
{
tempshow
.
BackColor
=
Color
.
PaleVioletRed
;
}
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
//if (globaldata.m_dpbuffer.ShowList.showtemp.bDetActualTemp > globaldata.m_dpbuffer.ShowList.showtemp.bDetSetTemp + 20.0f)
//{
// MessageBox.Show(tempshow.Text + "温度异常,系统停止中!");
// globaldata.OS_STOP = true;
// hmiopt.WriteEndVal();
//}
//temp[4] = globaldata.m_dpbuffer.ShowList.showtemp.bDetActualTemp;
}
}
}
}
...
@@ -1295,14 +1519,39 @@ namespace GcDevicePc
...
@@ -1295,14 +1519,39 @@ namespace GcDevicePc
tempshow
.
Text
=
"未命名"
;
tempshow
.
Text
=
"未命名"
;
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp1
)
+
" / "
+
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxSetTemp1
.
ToString
(
"0"
));
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp1
)
+
" / "
+
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxSetTemp1
.
ToString
(
"0"
));
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp1
<
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16AuxHeaterPTemp1
+
1
)
{
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp1
>
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxSetTemp1
-
1
&&
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp1
<
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxSetTemp1
+
1
)
{
tempshow
.
BackColor
=
Color
.
White
;
}
else
{
tempshow
.
BackColor
=
Color
.
LightYellow
;
}
}
else
{
tempshow
.
BackColor
=
Color
.
PaleVioletRed
;
}
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
//if (globaldata.m_dpbuffer.ShowList.showtemp.AuxActualTemp1 > globaldata.m_dpbuffer.ShowList.showtemp.AuxSetTemp1 + 20.0f)
//{
// MessageBox.Show(tempshow.Text + "温度异常,系统停止中!");
// globaldata.OS_STOP = true;
// hmiopt.WriteEndVal();
//}
}
}
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.AuxActualTemp1) + " / " + "未定义");
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.AuxActualTemp1) + " / " + "未定义");
//else
//else
//{
//{
//}
//}
//temp[5] = globaldata.m_dpbuffer.ShowList.showtemp.AuxActualTemp1;
}
}
...
@@ -1318,8 +1567,35 @@ namespace GcDevicePc
...
@@ -1318,8 +1567,35 @@ namespace GcDevicePc
tempshow
.
Text
=
"未命名"
;
tempshow
.
Text
=
"未命名"
;
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp2
)
+
" / "
+
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxSetTemp2
.
ToString
(
"0"
));
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp2
)
+
" / "
+
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxSetTemp2
.
ToString
(
"0"
));
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp2
<
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16AuxHeaterPTemp2
+
1
)
{
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp2
>
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxSetTemp2
-
1
&&
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp2
<
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxSetTemp2
+
1
)
{
tempshow
.
BackColor
=
Color
.
White
;
}
else
{
tempshow
.
BackColor
=
Color
.
LightYellow
;
}
}
else
{
tempshow
.
BackColor
=
Color
.
PaleVioletRed
;
}
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
//if (globaldata.m_dpbuffer.ShowList.showtemp.AuxActualTemp2 > globaldata.m_dpbuffer.ShowList.showtemp.AuxSetTemp2 + 20.0f)
//{
// MessageBox.Show(tempshow.Text + "温度异常,系统停止中!");
// globaldata.OS_STOP = true;
// hmiopt.WriteEndVal();
//}
//temp[6] = globaldata.m_dpbuffer.ShowList.showtemp.AuxActualTemp2;
}
}
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.AuxActualTemp2) + " / " + "未定义");
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.AuxActualTemp2) + " / " + "未定义");
//else
//else
...
@@ -1333,7 +1609,9 @@ namespace GcDevicePc
...
@@ -1333,7 +1609,9 @@ namespace GcDevicePc
// tempshow.SubItems.Add(CProfileDevice.m_DevParam.aux.fActualTemp_HeatArea2.ToString("#0.00") + " / " + CProfileDevice.m_DevParam.aux.fSetTemp_HeatArea2.ToString("0"));
// tempshow.SubItems.Add(CProfileDevice.m_DevParam.aux.fActualTemp_HeatArea2.ToString("#0.00") + " / " + CProfileDevice.m_DevParam.aux.fSetTemp_HeatArea2.ToString("0"));
//this.datalist.Items.Add(tempshow);
//this.datalist.Items.Add(tempshow);
}
}
}
}
#
endregion
#
endregion
...
@@ -1526,9 +1804,9 @@ namespace GcDevicePc
...
@@ -1526,9 +1804,9 @@ namespace GcDevicePc
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
1
)
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
1
)
tempshow
.
Text
=
"FID1
(mV)
"
;
tempshow
.
Text
=
"FID1"
;
else
else
tempshow
.
Text
=
"FPD1
(mV)
"
;
tempshow
.
Text
=
"FPD1"
;
{
{
fDetvalue
=
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetValue
;
fDetvalue
=
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetValue
;
...
@@ -1538,7 +1816,7 @@ namespace GcDevicePc
...
@@ -1538,7 +1816,7 @@ namespace GcDevicePc
fDetvalue
=
fDetvalueold
;
fDetvalue
=
fDetvalueold
;
if
(
fDetvalue
!=
0.0f
)
if
(
fDetvalue
!=
0.0f
)
tempshow
.
SubItems
.
Add
(
fDetvalue
.
ToString
(
"0.000"
));
tempshow
.
SubItems
.
Add
(
fDetvalue
.
ToString
(
"0.000"
)
+
" mV"
);
}
}
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
...
@@ -1628,7 +1906,7 @@ namespace GcDevicePc
...
@@ -1628,7 +1906,7 @@ namespace GcDevicePc
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
0
)
//TCD
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
0
)
//TCD
{
{
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"TCD2
(mV)
"
;
tempshow
.
Text
=
"TCD2"
;
iDetvalue
=
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
iDetValue
;
iDetvalue
=
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
iDetValue
;
...
@@ -1638,7 +1916,7 @@ namespace GcDevicePc
...
@@ -1638,7 +1916,7 @@ namespace GcDevicePc
iDetvalue
=
iDetvalueold
;
iDetvalue
=
iDetvalueold
;
if
(
iDetvalue
!=
0.0f
)
if
(
iDetvalue
!=
0.0f
)
tempshow
.
SubItems
.
Add
(
iDetvalue
.
ToString
(
"0.000"
));
tempshow
.
SubItems
.
Add
(
iDetvalue
.
ToString
(
"0.000"
)
+
" mV"
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
...
@@ -1671,9 +1949,9 @@ namespace GcDevicePc
...
@@ -1671,9 +1949,9 @@ namespace GcDevicePc
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
1
)
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
1
)
tempshow
.
Text
=
"FID2
(mV)
"
;
tempshow
.
Text
=
"FID2"
;
else
else
tempshow
.
Text
=
"FPD2
(mV)
"
;
tempshow
.
Text
=
"FPD2"
;
iDetvalue
=
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
iDetValue
;
iDetvalue
=
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
iDetValue
;
...
@@ -1683,7 +1961,7 @@ namespace GcDevicePc
...
@@ -1683,7 +1961,7 @@ namespace GcDevicePc
iDetvalue
=
iDetvalueold
;
iDetvalue
=
iDetvalueold
;
if
(
iDetvalue
!=
0.0f
)
if
(
iDetvalue
!=
0.0f
)
tempshow
.
SubItems
.
Add
(
iDetvalue
.
ToString
(
"0.000"
));
tempshow
.
SubItems
.
Add
(
iDetvalue
.
ToString
(
"0.000"
)
+
" mV"
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
...
@@ -2047,6 +2325,7 @@ namespace GcDevicePc
...
@@ -2047,6 +2325,7 @@ namespace GcDevicePc
#
endregion
#
endregion
this
.
datalist
.
EndUpdate
();
this
.
datalist
.
EndUpdate
();
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
...
GcDevicePc/DeviceConfigUI/Auxiliary.Designer.cs
View file @
2f1c2e54
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
// label6
// label6
//
//
this
.
label6
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
Fixed3D
;
this
.
label6
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
Fixed3D
;
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
184
,
73
);
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
205
,
55
);
this
.
label6
.
Name
=
"label6"
;
this
.
label6
.
Name
=
"label6"
;
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
2
,
100
);
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
2
,
100
);
this
.
label6
.
TabIndex
=
12
;
this
.
label6
.
TabIndex
=
12
;
...
@@ -82,14 +82,14 @@
...
@@ -82,14 +82,14 @@
//
//
// AuxHeaterPTemp2
// AuxHeaterPTemp2
//
//
this
.
AuxHeaterPTemp2
.
Location
=
new
System
.
Drawing
.
Point
(
283
,
147
);
this
.
AuxHeaterPTemp2
.
Location
=
new
System
.
Drawing
.
Point
(
304
,
129
);
this
.
AuxHeaterPTemp2
.
Name
=
"AuxHeaterPTemp2"
;
this
.
AuxHeaterPTemp2
.
Name
=
"AuxHeaterPTemp2"
;
this
.
AuxHeaterPTemp2
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
24
);
this
.
AuxHeaterPTemp2
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
24
);
this
.
AuxHeaterPTemp2
.
TabIndex
=
11
;
this
.
AuxHeaterPTemp2
.
TabIndex
=
11
;
//
//
// AuxHeaterName2
// AuxHeaterName2
//
//
this
.
AuxHeaterName2
.
Location
=
new
System
.
Drawing
.
Point
(
2
59
,
119
);
this
.
AuxHeaterName2
.
Location
=
new
System
.
Drawing
.
Point
(
2
80
,
95
);
this
.
AuxHeaterName2
.
Name
=
"AuxHeaterName2"
;
this
.
AuxHeaterName2
.
Name
=
"AuxHeaterName2"
;
this
.
AuxHeaterName2
.
Size
=
new
System
.
Drawing
.
Size
(
91
,
24
);
this
.
AuxHeaterName2
.
Size
=
new
System
.
Drawing
.
Size
(
91
,
24
);
this
.
AuxHeaterName2
.
TabIndex
=
10
;
this
.
AuxHeaterName2
.
TabIndex
=
10
;
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
// label5
// label5
//
//
this
.
label5
.
AutoSize
=
true
;
this
.
label5
.
AutoSize
=
true
;
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
2
12
,
150
);
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
2
33
,
132
);
this
.
label5
.
Name
=
"label5"
;
this
.
label5
.
Name
=
"label5"
;
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label5
.
TabIndex
=
9
;
this
.
label5
.
TabIndex
=
9
;
...
@@ -106,7 +106,7 @@
...
@@ -106,7 +106,7 @@
// label4
// label4
//
//
this
.
label4
.
AutoSize
=
true
;
this
.
label4
.
AutoSize
=
true
;
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
2
12
,
128
);
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
2
33
,
104
);
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label4
.
TabIndex
=
8
;
this
.
label4
.
TabIndex
=
8
;
...
@@ -114,14 +114,14 @@
...
@@ -114,14 +114,14 @@
//
//
// AuxHeaterPTemp1
// AuxHeaterPTemp1
//
//
this
.
AuxHeaterPTemp1
.
Location
=
new
System
.
Drawing
.
Point
(
90
,
147
);
this
.
AuxHeaterPTemp1
.
Location
=
new
System
.
Drawing
.
Point
(
111
,
129
);
this
.
AuxHeaterPTemp1
.
Name
=
"AuxHeaterPTemp1"
;
this
.
AuxHeaterPTemp1
.
Name
=
"AuxHeaterPTemp1"
;
this
.
AuxHeaterPTemp1
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
24
);
this
.
AuxHeaterPTemp1
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
24
);
this
.
AuxHeaterPTemp1
.
TabIndex
=
7
;
this
.
AuxHeaterPTemp1
.
TabIndex
=
7
;
//
//
// AuxHeaterName1
// AuxHeaterName1
//
//
this
.
AuxHeaterName1
.
Location
=
new
System
.
Drawing
.
Point
(
66
,
121
);
this
.
AuxHeaterName1
.
Location
=
new
System
.
Drawing
.
Point
(
87
,
97
);
this
.
AuxHeaterName1
.
Name
=
"AuxHeaterName1"
;
this
.
AuxHeaterName1
.
Name
=
"AuxHeaterName1"
;
this
.
AuxHeaterName1
.
Size
=
new
System
.
Drawing
.
Size
(
91
,
24
);
this
.
AuxHeaterName1
.
Size
=
new
System
.
Drawing
.
Size
(
91
,
24
);
this
.
AuxHeaterName1
.
TabIndex
=
6
;
this
.
AuxHeaterName1
.
TabIndex
=
6
;
...
@@ -129,7 +129,7 @@
...
@@ -129,7 +129,7 @@
// label3
// label3
//
//
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
19
,
153
);
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
40
,
135
);
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label3
.
TabIndex
=
5
;
this
.
label3
.
TabIndex
=
5
;
...
@@ -138,7 +138,7 @@
...
@@ -138,7 +138,7 @@
// label2
// label2
//
//
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
19
,
124
);
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
40
,
100
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label2
.
TabIndex
=
4
;
this
.
label2
.
TabIndex
=
4
;
...
@@ -151,24 +151,26 @@
...
@@ -151,24 +151,26 @@
"0"
,
"0"
,
"1"
,
"1"
,
"2"
});
"2"
});
this
.
AuxHeaterNum
.
Location
=
new
System
.
Drawing
.
Point
(
152
,
26
);
this
.
AuxHeaterNum
.
Location
=
new
System
.
Drawing
.
Point
(
152
,
17
);
this
.
AuxHeaterNum
.
Name
=
"AuxHeaterNum"
;
this
.
AuxHeaterNum
.
Name
=
"AuxHeaterNum"
;
this
.
AuxHeaterNum
.
Size
=
new
System
.
Drawing
.
Size
(
73
,
23
);
this
.
AuxHeaterNum
.
Size
=
new
System
.
Drawing
.
Size
(
73
,
23
);
this
.
AuxHeaterNum
.
TabIndex
=
3
;
this
.
AuxHeaterNum
.
TabIndex
=
3
;
this
.
AuxHeaterNum
.
Visible
=
false
;
//
//
// label1
// label1
//
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
19
,
2
9
);
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
19
,
2
0
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
127
,
15
);
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
127
,
15
);
this
.
label1
.
TabIndex
=
2
;
this
.
label1
.
TabIndex
=
2
;
this
.
label1
.
Text
=
"辅助加热器数目:"
;
this
.
label1
.
Text
=
"辅助加热器数目:"
;
this
.
label1
.
Visible
=
false
;
//
//
// AuxHeater2
// AuxHeater2
//
//
this
.
AuxHeater2
.
AutoSize
=
true
;
this
.
AuxHeater2
.
AutoSize
=
true
;
this
.
AuxHeater2
.
Location
=
new
System
.
Drawing
.
Point
(
2
12
,
90
);
this
.
AuxHeater2
.
Location
=
new
System
.
Drawing
.
Point
(
2
33
,
72
);
this
.
AuxHeater2
.
Name
=
"AuxHeater2"
;
this
.
AuxHeater2
.
Name
=
"AuxHeater2"
;
this
.
AuxHeater2
.
Size
=
new
System
.
Drawing
.
Size
(
79
,
19
);
this
.
AuxHeater2
.
Size
=
new
System
.
Drawing
.
Size
(
79
,
19
);
this
.
AuxHeater2
.
TabIndex
=
1
;
this
.
AuxHeater2
.
TabIndex
=
1
;
...
@@ -178,7 +180,7 @@
...
@@ -178,7 +180,7 @@
// AuxHeater1
// AuxHeater1
//
//
this
.
AuxHeater1
.
AutoSize
=
true
;
this
.
AuxHeater1
.
AutoSize
=
true
;
this
.
AuxHeater1
.
Location
=
new
System
.
Drawing
.
Point
(
19
,
90
);
this
.
AuxHeater1
.
Location
=
new
System
.
Drawing
.
Point
(
40
,
72
);
this
.
AuxHeater1
.
Name
=
"AuxHeater1"
;
this
.
AuxHeater1
.
Name
=
"AuxHeater1"
;
this
.
AuxHeater1
.
Size
=
new
System
.
Drawing
.
Size
(
79
,
19
);
this
.
AuxHeater1
.
Size
=
new
System
.
Drawing
.
Size
(
79
,
19
);
this
.
AuxHeater1
.
TabIndex
=
0
;
this
.
AuxHeater1
.
TabIndex
=
0
;
...
...
GcDevicePc/DeviceConfigUI/Auxiliary.cs
View file @
2f1c2e54
...
@@ -34,7 +34,7 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -34,7 +34,7 @@ namespace GcDevicePc.DeviceConfigUI
{
{
if
(
this
.
hWConfig
!=
null
)
if
(
this
.
hWConfig
!=
null
)
{
{
this
.
AuxHeaterNum
.
SelectedIndex
=
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeaterNum
;
//
this.AuxHeaterNum.SelectedIndex = this.hWConfig.hwconfiginfo.u16AuxHeaterNum;
this
.
AuxHeater1
.
Checked
=
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeater1
==
1
?
true
:
false
;
this
.
AuxHeater1
.
Checked
=
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeater1
==
1
?
true
:
false
;
this
.
AuxHeaterName1
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeaterName1
;
this
.
AuxHeaterName1
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeaterName1
;
this
.
AuxHeaterPTemp1
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeaterPTemp1
.
ToString
();
this
.
AuxHeaterPTemp1
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeaterPTemp1
.
ToString
();
...
@@ -53,7 +53,9 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -53,7 +53,9 @@ namespace GcDevicePc.DeviceConfigUI
{
{
if
(
this
.
hWConfig
!=
null
)
if
(
this
.
hWConfig
!=
null
)
{
{
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeaterNum
=
this
.
AuxHeaterNum
.
SelectedIndex
;
//this.hWConfig.hwconfiginfo.u16AuxHeaterNum = this.AuxHeaterNum.SelectedIndex;
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeaterNum
=
(
this
.
AuxHeater1
.
Checked
?
1
:
0
)
+
(
this
.
AuxHeater2
.
Checked
?
1
:
0
);
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeater1
=
this
.
AuxHeater1
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeater1
=
this
.
AuxHeater1
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeaterName1
=
this
.
AuxHeaterName1
.
Text
;
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeaterName1
=
this
.
AuxHeaterName1
.
Text
;
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeaterPTemp1
=
int
.
Parse
(
this
.
AuxHeaterPTemp1
.
Text
);
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeaterPTemp1
=
int
.
Parse
(
this
.
AuxHeaterPTemp1
.
Text
);
...
...
GcDevicePc/DeviceConfigUI/ColumnBox.Designer.cs
View file @
2f1c2e54
...
@@ -296,6 +296,7 @@
...
@@ -296,6 +296,7 @@
this
.
ChromNum
.
Name
=
"ChromNum"
;
this
.
ChromNum
.
Name
=
"ChromNum"
;
this
.
ChromNum
.
Size
=
new
System
.
Drawing
.
Size
(
78
,
23
);
this
.
ChromNum
.
Size
=
new
System
.
Drawing
.
Size
(
78
,
23
);
this
.
ChromNum
.
TabIndex
=
1
;
this
.
ChromNum
.
TabIndex
=
1
;
this
.
ChromNum
.
Visible
=
false
;
//
//
// label3
// label3
//
//
...
@@ -305,6 +306,7 @@
...
@@ -305,6 +306,7 @@
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
97
,
15
);
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
97
,
15
);
this
.
label3
.
TabIndex
=
0
;
this
.
label3
.
TabIndex
=
0
;
this
.
label3
.
Text
=
"色谱柱数目:"
;
this
.
label3
.
Text
=
"色谱柱数目:"
;
this
.
label3
.
Visible
=
false
;
//
//
// ColPTemp
// ColPTemp
//
//
...
...
GcDevicePc/DeviceConfigUI/ColumnBox.cs
View file @
2f1c2e54
...
@@ -66,7 +66,8 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -66,7 +66,8 @@ namespace GcDevicePc.DeviceConfigUI
this
.
hWConfig
.
hwconfiginfo
.
u16ColType
=
this
.
ColType
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16ColType
=
this
.
ColType
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16ColPTemp
=
int
.
Parse
(
this
.
ColPTemp
.
Text
);
this
.
hWConfig
.
hwconfiginfo
.
u16ColPTemp
=
int
.
Parse
(
this
.
ColPTemp
.
Text
);
this
.
hWConfig
.
hwconfiginfo
.
u16ChromNum
=
this
.
ChromNum
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16ChromNum
=
(
this
.
ChromFront
.
Checked
?
1
:
0
)
+
(
this
.
ChromBehind
.
Checked
?
1
:
0
);
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront
=
this
.
ChromFront
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront
=
this
.
ChromFront
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFrontType
=
this
.
ChromFrontType
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFrontType
=
this
.
ChromFrontType
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront_Length
=
int
.
Parse
(
this
.
ChromFront_Length
.
Text
);
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront_Length
=
int
.
Parse
(
this
.
ChromFront_Length
.
Text
);
...
...
GcDevicePc/DeviceConfigUI/Detection.Designer.cs
View file @
2f1c2e54
...
@@ -94,7 +94,7 @@
...
@@ -94,7 +94,7 @@
// label10
// label10
//
//
this
.
label10
.
AutoSize
=
true
;
this
.
label10
.
AutoSize
=
true
;
this
.
label10
.
Location
=
new
System
.
Drawing
.
Point
(
395
,
222
);
this
.
label10
.
Location
=
new
System
.
Drawing
.
Point
(
395
,
196
);
this
.
label10
.
Name
=
"label10"
;
this
.
label10
.
Name
=
"label10"
;
this
.
label10
.
Size
=
new
System
.
Drawing
.
Size
(
45
,
15
);
this
.
label10
.
Size
=
new
System
.
Drawing
.
Size
(
45
,
15
);
this
.
label10
.
TabIndex
=
22
;
this
.
label10
.
TabIndex
=
22
;
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
// label9
// label9
//
//
this
.
label9
.
AutoSize
=
true
;
this
.
label9
.
AutoSize
=
true
;
this
.
label9
.
Location
=
new
System
.
Drawing
.
Point
(
395
,
1
57
);
this
.
label9
.
Location
=
new
System
.
Drawing
.
Point
(
395
,
1
31
);
this
.
label9
.
Name
=
"label9"
;
this
.
label9
.
Name
=
"label9"
;
this
.
label9
.
Size
=
new
System
.
Drawing
.
Size
(
45
,
15
);
this
.
label9
.
Size
=
new
System
.
Drawing
.
Size
(
45
,
15
);
this
.
label9
.
TabIndex
=
21
;
this
.
label9
.
TabIndex
=
21
;
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
this
.
DetBehindAisle
.
Items
.
AddRange
(
new
object
[]
{
this
.
DetBehindAisle
.
Items
.
AddRange
(
new
object
[]
{
"A"
,
"A"
,
"B"
});
"B"
});
this
.
DetBehindAisle
.
Location
=
new
System
.
Drawing
.
Point
(
440
,
218
);
this
.
DetBehindAisle
.
Location
=
new
System
.
Drawing
.
Point
(
440
,
192
);
this
.
DetBehindAisle
.
Name
=
"DetBehindAisle"
;
this
.
DetBehindAisle
.
Name
=
"DetBehindAisle"
;
this
.
DetBehindAisle
.
Size
=
new
System
.
Drawing
.
Size
(
64
,
23
);
this
.
DetBehindAisle
.
Size
=
new
System
.
Drawing
.
Size
(
64
,
23
);
this
.
DetBehindAisle
.
TabIndex
=
20
;
this
.
DetBehindAisle
.
TabIndex
=
20
;
...
@@ -126,7 +126,7 @@
...
@@ -126,7 +126,7 @@
this
.
DetInterAisle
.
Items
.
AddRange
(
new
object
[]
{
this
.
DetInterAisle
.
Items
.
AddRange
(
new
object
[]
{
"A"
,
"A"
,
"B"
});
"B"
});
this
.
DetInterAisle
.
Location
=
new
System
.
Drawing
.
Point
(
440
,
1
54
);
this
.
DetInterAisle
.
Location
=
new
System
.
Drawing
.
Point
(
440
,
1
28
);
this
.
DetInterAisle
.
Name
=
"DetInterAisle"
;
this
.
DetInterAisle
.
Name
=
"DetInterAisle"
;
this
.
DetInterAisle
.
Size
=
new
System
.
Drawing
.
Size
(
64
,
23
);
this
.
DetInterAisle
.
Size
=
new
System
.
Drawing
.
Size
(
64
,
23
);
this
.
DetInterAisle
.
TabIndex
=
19
;
this
.
DetInterAisle
.
TabIndex
=
19
;
...
@@ -137,7 +137,7 @@
...
@@ -137,7 +137,7 @@
this
.
DetFrontAisle
.
Items
.
AddRange
(
new
object
[]
{
this
.
DetFrontAisle
.
Items
.
AddRange
(
new
object
[]
{
"A"
,
"A"
,
"B"
});
"B"
});
this
.
DetFrontAisle
.
Location
=
new
System
.
Drawing
.
Point
(
440
,
87
);
this
.
DetFrontAisle
.
Location
=
new
System
.
Drawing
.
Point
(
440
,
61
);
this
.
DetFrontAisle
.
Name
=
"DetFrontAisle"
;
this
.
DetFrontAisle
.
Name
=
"DetFrontAisle"
;
this
.
DetFrontAisle
.
Size
=
new
System
.
Drawing
.
Size
(
64
,
23
);
this
.
DetFrontAisle
.
Size
=
new
System
.
Drawing
.
Size
(
64
,
23
);
this
.
DetFrontAisle
.
TabIndex
=
18
;
this
.
DetFrontAisle
.
TabIndex
=
18
;
...
@@ -145,7 +145,7 @@
...
@@ -145,7 +145,7 @@
// label8
// label8
//
//
this
.
label8
.
AutoSize
=
true
;
this
.
label8
.
AutoSize
=
true
;
this
.
label8
.
Location
=
new
System
.
Drawing
.
Point
(
395
,
90
);
this
.
label8
.
Location
=
new
System
.
Drawing
.
Point
(
395
,
64
);
this
.
label8
.
Name
=
"label8"
;
this
.
label8
.
Name
=
"label8"
;
this
.
label8
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label8
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label8
.
TabIndex
=
17
;
this
.
label8
.
TabIndex
=
17
;
...
@@ -153,21 +153,21 @@
...
@@ -153,21 +153,21 @@
//
//
// DetBehindPTemp
// DetBehindPTemp
//
//
this
.
DetBehindPTemp
.
Location
=
new
System
.
Drawing
.
Point
(
307
,
218
);
this
.
DetBehindPTemp
.
Location
=
new
System
.
Drawing
.
Point
(
307
,
192
);
this
.
DetBehindPTemp
.
Name
=
"DetBehindPTemp"
;
this
.
DetBehindPTemp
.
Name
=
"DetBehindPTemp"
;
this
.
DetBehindPTemp
.
Size
=
new
System
.
Drawing
.
Size
(
73
,
24
);
this
.
DetBehindPTemp
.
Size
=
new
System
.
Drawing
.
Size
(
73
,
24
);
this
.
DetBehindPTemp
.
TabIndex
=
16
;
this
.
DetBehindPTemp
.
TabIndex
=
16
;
//
//
// DetInterPTemp
// DetInterPTemp
//
//
this
.
DetInterPTemp
.
Location
=
new
System
.
Drawing
.
Point
(
307
,
1
54
);
this
.
DetInterPTemp
.
Location
=
new
System
.
Drawing
.
Point
(
307
,
1
28
);
this
.
DetInterPTemp
.
Name
=
"DetInterPTemp"
;
this
.
DetInterPTemp
.
Name
=
"DetInterPTemp"
;
this
.
DetInterPTemp
.
Size
=
new
System
.
Drawing
.
Size
(
73
,
24
);
this
.
DetInterPTemp
.
Size
=
new
System
.
Drawing
.
Size
(
73
,
24
);
this
.
DetInterPTemp
.
TabIndex
=
15
;
this
.
DetInterPTemp
.
TabIndex
=
15
;
//
//
// DetFrontPTemp
// DetFrontPTemp
//
//
this
.
DetFrontPTemp
.
Location
=
new
System
.
Drawing
.
Point
(
307
,
87
);
this
.
DetFrontPTemp
.
Location
=
new
System
.
Drawing
.
Point
(
307
,
61
);
this
.
DetFrontPTemp
.
Name
=
"DetFrontPTemp"
;
this
.
DetFrontPTemp
.
Name
=
"DetFrontPTemp"
;
this
.
DetFrontPTemp
.
Size
=
new
System
.
Drawing
.
Size
(
73
,
24
);
this
.
DetFrontPTemp
.
Size
=
new
System
.
Drawing
.
Size
(
73
,
24
);
this
.
DetFrontPTemp
.
TabIndex
=
14
;
this
.
DetFrontPTemp
.
TabIndex
=
14
;
...
@@ -175,7 +175,7 @@
...
@@ -175,7 +175,7 @@
// label7
// label7
//
//
this
.
label7
.
AutoSize
=
true
;
this
.
label7
.
AutoSize
=
true
;
this
.
label7
.
Location
=
new
System
.
Drawing
.
Point
(
236
,
222
);
this
.
label7
.
Location
=
new
System
.
Drawing
.
Point
(
236
,
196
);
this
.
label7
.
Name
=
"label7"
;
this
.
label7
.
Name
=
"label7"
;
this
.
label7
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label7
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label7
.
TabIndex
=
13
;
this
.
label7
.
TabIndex
=
13
;
...
@@ -184,7 +184,7 @@
...
@@ -184,7 +184,7 @@
// label6
// label6
//
//
this
.
label6
.
AutoSize
=
true
;
this
.
label6
.
AutoSize
=
true
;
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
236
,
1
58
);
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
236
,
1
32
);
this
.
label6
.
Name
=
"label6"
;
this
.
label6
.
Name
=
"label6"
;
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label6
.
TabIndex
=
12
;
this
.
label6
.
TabIndex
=
12
;
...
@@ -199,7 +199,7 @@
...
@@ -199,7 +199,7 @@
"ECD"
,
"ECD"
,
"FPD"
,
"FPD"
,
"PID"
});
"PID"
});
this
.
DetBehindType
.
Location
=
new
System
.
Drawing
.
Point
(
158
,
218
);
this
.
DetBehindType
.
Location
=
new
System
.
Drawing
.
Point
(
158
,
192
);
this
.
DetBehindType
.
Name
=
"DetBehindType"
;
this
.
DetBehindType
.
Name
=
"DetBehindType"
;
this
.
DetBehindType
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
23
);
this
.
DetBehindType
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
23
);
this
.
DetBehindType
.
TabIndex
=
11
;
this
.
DetBehindType
.
TabIndex
=
11
;
...
@@ -213,7 +213,7 @@
...
@@ -213,7 +213,7 @@
"ECD"
,
"ECD"
,
"FPD"
,
"FPD"
,
"PID"
});
"PID"
});
this
.
DetInterType
.
Location
=
new
System
.
Drawing
.
Point
(
158
,
1
54
);
this
.
DetInterType
.
Location
=
new
System
.
Drawing
.
Point
(
158
,
1
28
);
this
.
DetInterType
.
Name
=
"DetInterType"
;
this
.
DetInterType
.
Name
=
"DetInterType"
;
this
.
DetInterType
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
23
);
this
.
DetInterType
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
23
);
this
.
DetInterType
.
TabIndex
=
10
;
this
.
DetInterType
.
TabIndex
=
10
;
...
@@ -221,7 +221,7 @@
...
@@ -221,7 +221,7 @@
// label5
// label5
//
//
this
.
label5
.
AutoSize
=
true
;
this
.
label5
.
AutoSize
=
true
;
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
111
,
222
);
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
111
,
196
);
this
.
label5
.
Name
=
"label5"
;
this
.
label5
.
Name
=
"label5"
;
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label5
.
TabIndex
=
9
;
this
.
label5
.
TabIndex
=
9
;
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
// label4
// label4
//
//
this
.
label4
.
AutoSize
=
true
;
this
.
label4
.
AutoSize
=
true
;
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
111
,
1
58
);
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
111
,
1
32
);
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label4
.
TabIndex
=
8
;
this
.
label4
.
TabIndex
=
8
;
...
@@ -239,7 +239,7 @@
...
@@ -239,7 +239,7 @@
// label3
// label3
//
//
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
236
,
92
);
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
236
,
66
);
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label3
.
TabIndex
=
7
;
this
.
label3
.
TabIndex
=
7
;
...
@@ -254,7 +254,7 @@
...
@@ -254,7 +254,7 @@
"ECD"
,
"ECD"
,
"FPD"
,
"FPD"
,
"PID"
});
"PID"
});
this
.
DetFrontType
.
Location
=
new
System
.
Drawing
.
Point
(
158
,
88
);
this
.
DetFrontType
.
Location
=
new
System
.
Drawing
.
Point
(
158
,
62
);
this
.
DetFrontType
.
Name
=
"DetFrontType"
;
this
.
DetFrontType
.
Name
=
"DetFrontType"
;
this
.
DetFrontType
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
23
);
this
.
DetFrontType
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
23
);
this
.
DetFrontType
.
TabIndex
=
6
;
this
.
DetFrontType
.
TabIndex
=
6
;
...
@@ -262,7 +262,7 @@
...
@@ -262,7 +262,7 @@
// label2
// label2
//
//
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
111
,
92
);
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
111
,
66
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label2
.
TabIndex
=
5
;
this
.
label2
.
TabIndex
=
5
;
...
@@ -271,7 +271,7 @@
...
@@ -271,7 +271,7 @@
// DetBehind
// DetBehind
//
//
this
.
DetBehind
.
AutoSize
=
true
;
this
.
DetBehind
.
AutoSize
=
true
;
this
.
DetBehind
.
Location
=
new
System
.
Drawing
.
Point
(
24
,
220
);
this
.
DetBehind
.
Location
=
new
System
.
Drawing
.
Point
(
24
,
194
);
this
.
DetBehind
.
Name
=
"DetBehind"
;
this
.
DetBehind
.
Name
=
"DetBehind"
;
this
.
DetBehind
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
19
);
this
.
DetBehind
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
19
);
this
.
DetBehind
.
TabIndex
=
4
;
this
.
DetBehind
.
TabIndex
=
4
;
...
@@ -281,7 +281,7 @@
...
@@ -281,7 +281,7 @@
// DetInter
// DetInter
//
//
this
.
DetInter
.
AutoSize
=
true
;
this
.
DetInter
.
AutoSize
=
true
;
this
.
DetInter
.
Location
=
new
System
.
Drawing
.
Point
(
24
,
1
56
);
this
.
DetInter
.
Location
=
new
System
.
Drawing
.
Point
(
24
,
1
30
);
this
.
DetInter
.
Name
=
"DetInter"
;
this
.
DetInter
.
Name
=
"DetInter"
;
this
.
DetInter
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
19
);
this
.
DetInter
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
19
);
this
.
DetInter
.
TabIndex
=
3
;
this
.
DetInter
.
TabIndex
=
3
;
...
@@ -291,7 +291,7 @@
...
@@ -291,7 +291,7 @@
// DetFront
// DetFront
//
//
this
.
DetFront
.
AutoSize
=
true
;
this
.
DetFront
.
AutoSize
=
true
;
this
.
DetFront
.
Location
=
new
System
.
Drawing
.
Point
(
24
,
91
);
this
.
DetFront
.
Location
=
new
System
.
Drawing
.
Point
(
24
,
65
);
this
.
DetFront
.
Name
=
"DetFront"
;
this
.
DetFront
.
Name
=
"DetFront"
;
this
.
DetFront
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
19
);
this
.
DetFront
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
19
);
this
.
DetFront
.
TabIndex
=
2
;
this
.
DetFront
.
TabIndex
=
2
;
...
@@ -306,19 +306,21 @@
...
@@ -306,19 +306,21 @@
"1"
,
"1"
,
"2"
,
"2"
,
"3"
});
"3"
});
this
.
DetNum
.
Location
=
new
System
.
Drawing
.
Point
(
144
,
31
);
this
.
DetNum
.
Location
=
new
System
.
Drawing
.
Point
(
341
,
14
);
this
.
DetNum
.
Name
=
"DetNum"
;
this
.
DetNum
.
Name
=
"DetNum"
;
this
.
DetNum
.
Size
=
new
System
.
Drawing
.
Size
(
79
,
23
);
this
.
DetNum
.
Size
=
new
System
.
Drawing
.
Size
(
79
,
23
);
this
.
DetNum
.
TabIndex
=
1
;
this
.
DetNum
.
TabIndex
=
1
;
this
.
DetNum
.
Visible
=
false
;
//
//
// label1
// label1
//
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
38
,
34
);
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
235
,
17
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
112
,
15
);
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
112
,
15
);
this
.
label1
.
TabIndex
=
0
;
this
.
label1
.
TabIndex
=
0
;
this
.
label1
.
Text
=
"检测单元数目:"
;
this
.
label1
.
Text
=
"检测单元数目:"
;
this
.
label1
.
Visible
=
false
;
//
//
// okbtn
// okbtn
//
//
...
...
GcDevicePc/DeviceConfigUI/Detection.cs
View file @
2f1c2e54
...
@@ -61,7 +61,8 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -61,7 +61,8 @@ namespace GcDevicePc.DeviceConfigUI
{
{
if
(
this
.
hWConfig
!=
null
)
if
(
this
.
hWConfig
!=
null
)
{
{
this
.
hWConfig
.
hwconfiginfo
.
u16DetNum
=
this
.
DetNum
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16DetNum
=
(
this
.
DetFront
.
Checked
?
1
:
0
)
+
(
this
.
DetInter
.
Checked
?
1
:
0
)
+
(
this
.
DetBehind
.
Checked
?
1
:
0
);
this
.
hWConfig
.
hwconfiginfo
.
u16DetFront
=
this
.
DetFront
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16DetFront
=
this
.
DetFront
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16DetFrontType
=
this
.
DetFrontType
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16DetFrontType
=
this
.
DetFrontType
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16DetFrontPTemp
=
int
.
Parse
(
this
.
DetFrontPTemp
.
Text
);
this
.
hWConfig
.
hwconfiginfo
.
u16DetFrontPTemp
=
int
.
Parse
(
this
.
DetFrontPTemp
.
Text
);
...
...
GcDevicePc/DeviceConfigUI/Sampling.Designer.cs
View file @
2f1c2e54
...
@@ -200,7 +200,7 @@
...
@@ -200,7 +200,7 @@
// ValveSix
// ValveSix
//
//
this
.
ValveSix
.
AutoSize
=
true
;
this
.
ValveSix
.
AutoSize
=
true
;
this
.
ValveSix
.
Location
=
new
System
.
Drawing
.
Point
(
4
47
,
187
);
this
.
ValveSix
.
Location
=
new
System
.
Drawing
.
Point
(
4
57
,
178
);
this
.
ValveSix
.
Name
=
"ValveSix"
;
this
.
ValveSix
.
Name
=
"ValveSix"
;
this
.
ValveSix
.
Size
=
new
System
.
Drawing
.
Size
(
57
,
19
);
this
.
ValveSix
.
Size
=
new
System
.
Drawing
.
Size
(
57
,
19
);
this
.
ValveSix
.
TabIndex
=
7
;
this
.
ValveSix
.
TabIndex
=
7
;
...
@@ -210,7 +210,7 @@
...
@@ -210,7 +210,7 @@
// ValveFive
// ValveFive
//
//
this
.
ValveFive
.
AutoSize
=
true
;
this
.
ValveFive
.
AutoSize
=
true
;
this
.
ValveFive
.
Location
=
new
System
.
Drawing
.
Point
(
2
86
,
187
);
this
.
ValveFive
.
Location
=
new
System
.
Drawing
.
Point
(
2
96
,
178
);
this
.
ValveFive
.
Name
=
"ValveFive"
;
this
.
ValveFive
.
Name
=
"ValveFive"
;
this
.
ValveFive
.
Size
=
new
System
.
Drawing
.
Size
(
49
,
19
);
this
.
ValveFive
.
Size
=
new
System
.
Drawing
.
Size
(
49
,
19
);
this
.
ValveFive
.
TabIndex
=
6
;
this
.
ValveFive
.
TabIndex
=
6
;
...
@@ -220,7 +220,7 @@
...
@@ -220,7 +220,7 @@
// ValveFour
// ValveFour
//
//
this
.
ValveFour
.
AutoSize
=
true
;
this
.
ValveFour
.
AutoSize
=
true
;
this
.
ValveFour
.
Location
=
new
System
.
Drawing
.
Point
(
83
,
187
);
this
.
ValveFour
.
Location
=
new
System
.
Drawing
.
Point
(
93
,
178
);
this
.
ValveFour
.
Name
=
"ValveFour"
;
this
.
ValveFour
.
Name
=
"ValveFour"
;
this
.
ValveFour
.
Size
=
new
System
.
Drawing
.
Size
(
49
,
19
);
this
.
ValveFour
.
Size
=
new
System
.
Drawing
.
Size
(
49
,
19
);
this
.
ValveFour
.
TabIndex
=
5
;
this
.
ValveFour
.
TabIndex
=
5
;
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
// ValveThree
// ValveThree
//
//
this
.
ValveThree
.
AutoSize
=
true
;
this
.
ValveThree
.
AutoSize
=
true
;
this
.
ValveThree
.
Location
=
new
System
.
Drawing
.
Point
(
4
47
,
107
);
this
.
ValveThree
.
Location
=
new
System
.
Drawing
.
Point
(
4
57
,
98
);
this
.
ValveThree
.
Name
=
"ValveThree"
;
this
.
ValveThree
.
Name
=
"ValveThree"
;
this
.
ValveThree
.
Size
=
new
System
.
Drawing
.
Size
(
49
,
19
);
this
.
ValveThree
.
Size
=
new
System
.
Drawing
.
Size
(
49
,
19
);
this
.
ValveThree
.
TabIndex
=
4
;
this
.
ValveThree
.
TabIndex
=
4
;
...
@@ -240,7 +240,7 @@
...
@@ -240,7 +240,7 @@
// ValveTwo
// ValveTwo
//
//
this
.
ValveTwo
.
AutoSize
=
true
;
this
.
ValveTwo
.
AutoSize
=
true
;
this
.
ValveTwo
.
Location
=
new
System
.
Drawing
.
Point
(
2
86
,
107
);
this
.
ValveTwo
.
Location
=
new
System
.
Drawing
.
Point
(
2
96
,
98
);
this
.
ValveTwo
.
Name
=
"ValveTwo"
;
this
.
ValveTwo
.
Name
=
"ValveTwo"
;
this
.
ValveTwo
.
Size
=
new
System
.
Drawing
.
Size
(
49
,
19
);
this
.
ValveTwo
.
Size
=
new
System
.
Drawing
.
Size
(
49
,
19
);
this
.
ValveTwo
.
TabIndex
=
3
;
this
.
ValveTwo
.
TabIndex
=
3
;
...
@@ -250,7 +250,7 @@
...
@@ -250,7 +250,7 @@
// ValveOne
// ValveOne
//
//
this
.
ValveOne
.
AutoSize
=
true
;
this
.
ValveOne
.
AutoSize
=
true
;
this
.
ValveOne
.
Location
=
new
System
.
Drawing
.
Point
(
83
,
107
);
this
.
ValveOne
.
Location
=
new
System
.
Drawing
.
Point
(
93
,
98
);
this
.
ValveOne
.
Name
=
"ValveOne"
;
this
.
ValveOne
.
Name
=
"ValveOne"
;
this
.
ValveOne
.
Size
=
new
System
.
Drawing
.
Size
(
49
,
19
);
this
.
ValveOne
.
Size
=
new
System
.
Drawing
.
Size
(
49
,
19
);
this
.
ValveOne
.
TabIndex
=
2
;
this
.
ValveOne
.
TabIndex
=
2
;
...
@@ -272,6 +272,7 @@
...
@@ -272,6 +272,7 @@
this
.
ValveBox
.
Name
=
"ValveBox"
;
this
.
ValveBox
.
Name
=
"ValveBox"
;
this
.
ValveBox
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
23
);
this
.
ValveBox
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
23
);
this
.
ValveBox
.
TabIndex
=
1
;
this
.
ValveBox
.
TabIndex
=
1
;
this
.
ValveBox
.
Visible
=
false
;
//
//
// label3
// label3
//
//
...
@@ -281,6 +282,7 @@
...
@@ -281,6 +282,7 @@
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
15
);
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
15
);
this
.
label3
.
TabIndex
=
0
;
this
.
label3
.
TabIndex
=
0
;
this
.
label3
.
Text
=
"阀总数:"
;
this
.
label3
.
Text
=
"阀总数:"
;
this
.
label3
.
Visible
=
false
;
//
//
// tabPage3
// tabPage3
//
//
...
...
GcDevicePc/DeviceConfigUI/Sampling.cs
View file @
2f1c2e54
...
@@ -145,13 +145,13 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -145,13 +145,13 @@ namespace GcDevicePc.DeviceConfigUI
this
.
hWConfig
.
hwconfiginfo
.
u16SampleBehindType
=
this
.
SampleBehindType
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16SampleBehindType
=
this
.
SampleBehindType
.
SelectedIndex
;
//阀
//阀
this
.
hWConfig
.
hwconfiginfo
.
u16ValveBox
=
this
.
ValveBox
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16ValveBox
=
(
this
.
ValveOne
.
Checked
?
1
:
0
)
+
(
this
.
ValveTwo
.
Checked
?
1
:
0
)
+
(
this
.
ValveThree
.
Checked
?
1
:
0
)
+
(
this
.
ValveFour
.
Checked
?
1
:
0
)
+
(
this
.
ValveFive
.
Checked
?
1
:
0
)
+
(
this
.
ValveSix
.
Checked
?
1
:
0
)
;
this
.
hWConfig
.
hwconfiginfo
.
u16ValveOne
=
this
.
ValveOne
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16ValveOne
=
this
.
ValveOne
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16ValveTwo
=
this
.
ValveTwo
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16ValveTwo
=
this
.
ValveTwo
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16ValveThree
=
this
.
ValveThree
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16ValveThree
=
this
.
ValveThree
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16ValveFour
=
this
.
ValveFour
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16ValveFour
=
this
.
ValveFour
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16ValveFive
=
this
.
ValveFive
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16ValveFive
=
this
.
ValveFive
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16ValveSix
=
this
.
ValveSix
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16ValveSix
=
this
.
ValveSix
.
Checked
?
1
:
0
;
//进样口
//进样口
int
num
=
0
;
int
num
=
0
;
...
...
GcDevicePc/GCBuffer/HMIBuffer.cs
View file @
2f1c2e54
...
@@ -50,6 +50,8 @@ namespace GcDevicePc.GCBuffer
...
@@ -50,6 +50,8 @@ namespace GcDevicePc.GCBuffer
///////////////////////////////////////
///////////////////////////////////////
public
ushort
[]
EPCStatus
;
public
ushort
[]
EPCStatus
;
public
ushort
[]
HmiAbnormal
;
}
}
public
hmiinfo
gcinfo
=
new
hmiinfo
();
public
hmiinfo
gcinfo
=
new
hmiinfo
();
...
@@ -71,6 +73,7 @@ namespace GcDevicePc.GCBuffer
...
@@ -71,6 +73,7 @@ namespace GcDevicePc.GCBuffer
gcinfo
.
hmioffline
=
false
;
gcinfo
.
hmioffline
=
false
;
gcinfo
.
HMIMac
=
new
ushort
[
3
]
{
0
,
0
,
0
};
gcinfo
.
HMIMac
=
new
ushort
[
3
]
{
0
,
0
,
0
};
gcinfo
.
EPCStatus
=
new
ushort
[
16
]
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
gcinfo
.
EPCStatus
=
new
ushort
[
16
]
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
gcinfo
.
HmiAbnormal
=
new
ushort
[
3
]
{
0
,
0
,
0
};
}
}
~
HMIBuffer
()
~
HMIBuffer
()
...
...
GcDevicePc/GcDevicePc.csproj
View file @
2f1c2e54
...
@@ -639,6 +639,7 @@
...
@@ -639,6 +639,7 @@
<Compile
Include=
"ProThread\HMIControl.cs"
/>
<Compile
Include=
"ProThread\HMIControl.cs"
/>
<Compile
Include=
"ProThread\HMISearch.cs"
/>
<Compile
Include=
"ProThread\HMISearch.cs"
/>
<Compile
Include=
"ProThread\HmiStatueTh.cs"
/>
<Compile
Include=
"ProThread\HmiStatueTh.cs"
/>
<Compile
Include=
"ProThread\SendDataToZB.cs"
/>
<Compile
Include=
"ProThread\SignalDataToHw.cs"
/>
<Compile
Include=
"ProThread\SignalDataToHw.cs"
/>
<Compile
Include=
"ProThread\ThreadMonitor.cs"
/>
<Compile
Include=
"ProThread\ThreadMonitor.cs"
/>
<Compile
Include=
"QuitForm.cs"
>
<Compile
Include=
"QuitForm.cs"
>
...
@@ -1011,6 +1012,7 @@
...
@@ -1011,6 +1012,7 @@
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Content
Include=
"logo.ico"
/>
<Content
Include=
"logo.ico"
/>
<Content
Include=
"UI\picture\色谱3.png"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<ProjectReference
Include=
"..\SharedSpace\SharedSpace.csproj"
>
<ProjectReference
Include=
"..\SharedSpace\SharedSpace.csproj"
>
...
...
GcDevicePc/MDIBase.Designer.cs
View file @
2f1c2e54
...
@@ -47,9 +47,6 @@
...
@@ -47,9 +47,6 @@
this
.
MethodBrowseMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
MethodBrowseMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
SettingSeparator
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
SettingSeparator
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
GCConfigMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
GCConfigMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
ConfigCreateSubMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
ConfigShowSubMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
ConfigSendSubMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
DataMainMenu
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
DataMainMenu
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
HistoryDataMenu
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
HistoryDataMenu
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
CalibrationMenu
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
CalibrationMenu
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
...
@@ -176,7 +173,7 @@
...
@@ -176,7 +173,7 @@
//
//
this
.
NetWorkMenu
.
Name
=
"NetWorkMenu"
;
this
.
NetWorkMenu
.
Name
=
"NetWorkMenu"
;
this
.
NetWorkMenu
.
Size
=
new
System
.
Drawing
.
Size
(
176
,
26
);
this
.
NetWorkMenu
.
Size
=
new
System
.
Drawing
.
Size
(
176
,
26
);
this
.
NetWorkMenu
.
Text
=
"
网络配
置"
;
this
.
NetWorkMenu
.
Text
=
"
通讯设
置"
;
this
.
NetWorkMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
NetWorkMenu_Click
);
this
.
NetWorkMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
NetWorkMenu_Click
);
//
//
// MethodBatMenu
// MethodBatMenu
...
@@ -214,34 +211,10 @@
...
@@ -214,34 +211,10 @@
//
//
// GCConfigMenuItem
// GCConfigMenuItem
//
//
this
.
GCConfigMenuItem
.
DropDownItems
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
this
.
ConfigCreateSubMenuItem
,
this
.
ConfigShowSubMenuItem
,
this
.
ConfigSendSubMenuItem
});
this
.
GCConfigMenuItem
.
Name
=
"GCConfigMenuItem"
;
this
.
GCConfigMenuItem
.
Name
=
"GCConfigMenuItem"
;
this
.
GCConfigMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
176
,
26
);
this
.
GCConfigMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
176
,
26
);
this
.
GCConfigMenuItem
.
Text
=
"仪器配置"
;
this
.
GCConfigMenuItem
.
Text
=
"仪器配置"
;
//
this
.
GCConfigMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
ConfigCreateSubMenuItem_Click
);
// ConfigCreateSubMenuItem
//
this
.
ConfigCreateSubMenuItem
.
Name
=
"ConfigCreateSubMenuItem"
;
this
.
ConfigCreateSubMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
144
,
26
);
this
.
ConfigCreateSubMenuItem
.
Text
=
"配置创建"
;
this
.
ConfigCreateSubMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
ConfigCreateSubMenuItem_Click
);
//
// ConfigShowSubMenuItem
//
this
.
ConfigShowSubMenuItem
.
Name
=
"ConfigShowSubMenuItem"
;
this
.
ConfigShowSubMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
144
,
26
);
this
.
ConfigShowSubMenuItem
.
Text
=
"配置查看"
;
this
.
ConfigShowSubMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
ConfigShowSubMenuItem_Click
);
//
// ConfigSendSubMenuItem
//
this
.
ConfigSendSubMenuItem
.
Name
=
"ConfigSendSubMenuItem"
;
this
.
ConfigSendSubMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
144
,
26
);
this
.
ConfigSendSubMenuItem
.
Text
=
"配置发送"
;
this
.
ConfigSendSubMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
ConfigSendSubMenuItem_Click
);
//
//
// DataMainMenu
// DataMainMenu
//
//
...
@@ -257,21 +230,21 @@
...
@@ -257,21 +230,21 @@
// HistoryDataMenu
// HistoryDataMenu
//
//
this
.
HistoryDataMenu
.
Name
=
"HistoryDataMenu"
;
this
.
HistoryDataMenu
.
Name
=
"HistoryDataMenu"
;
this
.
HistoryDataMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
HistoryDataMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
HistoryDataMenu
.
Text
=
"
历史
数据查询"
;
this
.
HistoryDataMenu
.
Text
=
"数据查询"
;
this
.
HistoryDataMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
HistoryDataMenu_Click
);
this
.
HistoryDataMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
HistoryDataMenu_Click
);
//
//
// CalibrationMenu
// CalibrationMenu
//
//
this
.
CalibrationMenu
.
Name
=
"CalibrationMenu"
;
this
.
CalibrationMenu
.
Name
=
"CalibrationMenu"
;
this
.
CalibrationMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
CalibrationMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
CalibrationMenu
.
Text
=
"
校准查看
"
;
this
.
CalibrationMenu
.
Text
=
"
数据校准
"
;
this
.
CalibrationMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
CalibrationMenu_Click
);
this
.
CalibrationMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
CalibrationMenu_Click
);
//
//
// HistoryPicMenu
// HistoryPicMenu
//
//
this
.
HistoryPicMenu
.
Name
=
"HistoryPicMenu"
;
this
.
HistoryPicMenu
.
Name
=
"HistoryPicMenu"
;
this
.
HistoryPicMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
HistoryPicMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
HistoryPicMenu
.
Text
=
"历史谱图"
;
this
.
HistoryPicMenu
.
Text
=
"历史谱图"
;
this
.
HistoryPicMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
HistoryPicMenu_Click
);
this
.
HistoryPicMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
HistoryPicMenu_Click
);
//
//
...
@@ -472,9 +445,6 @@
...
@@ -472,9 +445,6 @@
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
AuxToolMenu
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
AuxToolMenu
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
SettingSeparator
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
SettingSeparator
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
GCConfigMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
GCConfigMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
ConfigCreateSubMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
ConfigShowSubMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
ConfigSendSubMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
ParameterSettingMenu
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
ParameterSettingMenu
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
DebugMainMenu
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
DebugMainMenu
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
SingleControlMenu
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
SingleControlMenu
;
...
...
GcDevicePc/MDIBase.cs
View file @
2f1c2e54
...
@@ -85,6 +85,7 @@ namespace GcDevicePc
...
@@ -85,6 +85,7 @@ namespace GcDevicePc
private
DataOutput
wtd624xOutput
=
new
DataOutput
();
private
DataOutput
wtd624xOutput
=
new
DataOutput
();
private
SignalDataToHw
signalDataTohw
=
new
SignalDataToHw
();
private
SignalDataToHw
signalDataTohw
=
new
SignalDataToHw
();
private
SendDataToZB
signalDataTozb
=
new
SendDataToZB
();
#
endregion
#
endregion
#
region
Author
by
zjx
#
region
Author
by
zjx
...
@@ -754,6 +755,7 @@ namespace GcDevicePc
...
@@ -754,6 +755,7 @@ namespace GcDevicePc
else
else
{
{
UserMainMenu
.
Visible
=
false
;
UserMainMenu
.
Visible
=
false
;
ParameterSettingMenu
.
Visible
=
false
;
}
}
}
}
...
@@ -771,7 +773,7 @@ namespace GcDevicePc
...
@@ -771,7 +773,7 @@ namespace GcDevicePc
/// 1.0.2.3 添加了周期完成后,重新绘图功能
/// 1.0.2.3 添加了周期完成后,重新绘图功能
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
{
{
this
.
Text
=
String
.
Format
(
"Tetchrom色谱工作站-1.5.
2
{0}"
,
Formstr
);
this
.
Text
=
String
.
Format
(
"Tetchrom色谱工作站-1.5.
4
{0}"
,
Formstr
);
//if (LandIn.Island)
//if (LandIn.Island)
//{
//{
// HmiStatus.Text = String.Format("状态:{0}", statestr);
// HmiStatus.Text = String.Format("状态:{0}", statestr);
...
@@ -845,17 +847,21 @@ namespace GcDevicePc
...
@@ -845,17 +847,21 @@ namespace GcDevicePc
{
{
hmiopt
.
WriteStopVal
();
hmiopt
.
WriteStopVal
();
WaitHMIFree
();
WaitHMIFree
();
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
)
{
{
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
hmiopt
.
WriteOpenVal
();
hmiopt
.
WriteOpenVal
();
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
1
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
1
)
hmiopt
.
WriteSingleVal
();
hmiopt
.
WriteSingleVal
();
}
}
WaitHMIWork
();
WaitHMIWork
();
}
}
else
//批处理
else
//批处理
{
{
...
@@ -1178,7 +1184,7 @@ namespace GcDevicePc
...
@@ -1178,7 +1184,7 @@ namespace GcDevicePc
{
{
globaldata
.
m_profileMethod
.
SetStatusFullName
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_StatusName
);
globaldata
.
m_profileMethod
.
SetStatusFullName
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_StatusName
);
globaldata
.
m_profileMethod
.
GetDevState
();
globaldata
.
m_profileMethod
.
GetDevState
();
if
(
globaldata
.
CurrentVersion
==
"1"
)
//
if (globaldata.CurrentVersion == "1")
{
{
tmpname
=
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
?
tmpname
=
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
?
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_BATMethodName
:
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_BATMethodName
:
...
@@ -1228,6 +1234,7 @@ namespace GcDevicePc
...
@@ -1228,6 +1234,7 @@ namespace GcDevicePc
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
sendtohw
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
sendtohw
)
{
{
signalDataTohw
.
DataToHwStart
();
signalDataTohw
.
DataToHwStart
();
signalDataTozb
.
DataToZBStart
();
}
}
try
try
...
@@ -1264,7 +1271,7 @@ namespace GcDevicePc
...
@@ -1264,7 +1271,7 @@ namespace GcDevicePc
}
}
}
}
Thread
gethmistaues
;
//
Thread gethmistaues;
//private void Start_Thread()
//private void Start_Thread()
//{
//{
// // mydatasave.ChannelDataStart();
// // mydatasave.ChannelDataStart();
...
@@ -1357,10 +1364,10 @@ namespace GcDevicePc
...
@@ -1357,10 +1364,10 @@ namespace GcDevicePc
dest
[
8
]
=
globaldata
.
m_hmibuffer
.
gcinfo
.
runtime
;
dest
[
8
]
=
globaldata
.
m_hmibuffer
.
gcinfo
.
runtime
;
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
)
//
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.system_Statue)
status_flag
=
dest
[
5
];
status_flag
=
dest
[
5
];
else
//
else
status_flag
=
10
;
//
status_flag = 10;
GCstatus
=
dest
[
5
];
GCstatus
=
dest
[
5
];
runtype
=
dest
[
7
];
runtype
=
dest
[
7
];
...
@@ -1585,7 +1592,7 @@ namespace GcDevicePc
...
@@ -1585,7 +1592,7 @@ namespace GcDevicePc
bool
color_flag
=
true
;
bool
color_flag
=
true
;
switch
(
flag
)
switch
(
flag
)
{
{
case
0
:
//
case 0:
case
1
:
case
1
:
status_text
=
"空闲中..."
;
status_text
=
"空闲中..."
;
this
.
HmiStatus
.
BackColor
=
Color
.
LightGreen
;
this
.
HmiStatus
.
BackColor
=
Color
.
LightGreen
;
...
@@ -1662,7 +1669,7 @@ namespace GcDevicePc
...
@@ -1662,7 +1669,7 @@ namespace GcDevicePc
}
}
statestr
=
status_text
;
statestr
=
status_text
;
IsStateColor
=
color_flag
;
IsStateColor
=
color_flag
;
Console
.
WriteLine
(
flag
.
ToString
());
//Console.WriteLine(""+ globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.work_Statue);
//Console.WriteLine(""+ globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.work_Statue);
//if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 0)
//if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 0)
...
@@ -1677,6 +1684,29 @@ namespace GcDevicePc
...
@@ -1677,6 +1684,29 @@ namespace GcDevicePc
//{
//{
// (this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 0;
// (this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 0;
//}
//}
if
(
flag
!=
10
&&
flag
!=
0
)
{
OSflag
=
true
;
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptbtnstatus
=
4
;
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMSysbtnstatus
=
1
;
//globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.system_Statue = true;
//globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.work_Statue = 0;
}
else
{
OSflag
=
false
;
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptbtnstatus
=
0
;
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMSysbtnstatus
=
0
;
//globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.system_Statue = false;
//globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.work_Statue = 0;
}
if
(
oldflag
!=
flag
)
if
(
oldflag
!=
flag
)
{
{
oldflag
=
flag
;
oldflag
=
flag
;
...
@@ -1685,7 +1715,7 @@ namespace GcDevicePc
...
@@ -1685,7 +1715,7 @@ namespace GcDevicePc
private
void
tips_Show
(
ushort
[]
data
)
private
void
tips_Show
(
ushort
[]
data
)
{
{
string
tips
=
""
;
string
tips
=
string
.
Empty
;
if
(
data
[
0
]
==
1
)
if
(
data
[
0
]
==
1
)
{
{
...
...
GcDevicePc/MainForm.Designer.cs
View file @
2f1c2e54
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1008
,
730
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1008
,
730
);
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Name
=
"MainForm"
;
this
.
Name
=
"MainForm"
;
this
.
Text
=
"Tetchrom色谱工作站-1.5.
2
用户界面"
;
this
.
Text
=
"Tetchrom色谱工作站-1.5.
4
用户界面"
;
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
this
.
PerformLayout
();
...
...
GcDevicePc/ProThread/GcDataTh.cs
View file @
2f1c2e54
...
@@ -414,6 +414,24 @@ namespace GcDevicePc.ProThread
...
@@ -414,6 +414,24 @@ namespace GcDevicePc.ProThread
return
ret
;
return
ret
;
}
}
private
int
GetHmiAbnormalHoldingReg
(
ushort
address
,
ushort
num
,
ref
UInt16
[]
state
)
{
int
ret
=
-
1
;
int
count
=
0
;
if
(
setflag
)
{
ret
=
globaldata
.
global_moudbus
.
ReadHoldingReg
(
address
,
num
,
this
.
strIP
,
netPost
,
ref
state
);
while
(
ret
!=
0
)
{
count
++;
if
(
count
>
3
)
break
;
ret
=
globaldata
.
global_moudbus
.
ReadHoldingReg
(
address
,
num
,
this
.
strIP
,
netPost
,
ref
state
);
}
}
return
ret
;
}
#
endregion
#
endregion
...
@@ -465,6 +483,20 @@ namespace GcDevicePc.ProThread
...
@@ -465,6 +483,20 @@ namespace GcDevicePc.ProThread
return
ret
==
0
?
true
:
false
;
return
ret
==
0
?
true
:
false
;
}
}
public
int
GetHmiAbnormal
(
ref
ushort
[]
data
)
{
int
ret
=
-
1
;
try
{
ret
=
GetHmiAbnormalHoldingReg
(
1101
,
3
,
ref
data
);
}
catch
(
Exception
e
)
{
Log
.
Error
(
e
.
Message
);
}
return
ret
;
}
public
int
GetFireUpTime
(
ref
ushort
[]
state
)
public
int
GetFireUpTime
(
ref
ushort
[]
state
)
{
{
int
ret
=
-
1
;
int
ret
=
-
1
;
...
@@ -696,6 +728,7 @@ namespace GcDevicePc.ProThread
...
@@ -696,6 +728,7 @@ namespace GcDevicePc.ProThread
byte
[]
tenstate
=
new
byte
[
2
]
{
0
,
0
};
byte
[]
tenstate
=
new
byte
[
2
]
{
0
,
0
};
ushort
[]
firestatus
=
new
ushort
[
4
]
{
0
,
0
,
0
,
0
};
ushort
[]
firestatus
=
new
ushort
[
4
]
{
0
,
0
,
0
,
0
};
ushort
[]
dacstatus
=
new
ushort
[
6
]
{
0
,
0
,
0
,
0
,
0
,
0
};
ushort
[]
dacstatus
=
new
ushort
[
6
]
{
0
,
0
,
0
,
0
,
0
,
0
};
ushort
[]
hmiabnormal
=
new
ushort
[
3
];
//ushort[] epcdata = new ushort[36];
//ushort[] epcdata = new ushort[36];
ushort
[]
epc1
=
new
ushort
[
6
];
ushort
[]
epc1
=
new
ushort
[
6
];
...
@@ -936,6 +969,11 @@ namespace GcDevicePc.ProThread
...
@@ -936,6 +969,11 @@ namespace GcDevicePc.ProThread
globaldata
.
m_dpbuffer
.
ShowList
.
showepc
.
EPC2_2_Set
=
(
epc2
[
4
]
>
64000
?
(
ushort
)
0
:
epc2
[
4
]);
globaldata
.
m_dpbuffer
.
ShowList
.
showepc
.
EPC2_2_Set
=
(
epc2
[
4
]
>
64000
?
(
ushort
)
0
:
epc2
[
4
]);
globaldata
.
m_dpbuffer
.
ShowList
.
showepc
.
EPC2_3_Set
=
(
epc2
[
5
]
>
64000
?
(
ushort
)
0
:
epc2
[
5
]);
globaldata
.
m_dpbuffer
.
ShowList
.
showepc
.
EPC2_3_Set
=
(
epc2
[
5
]
>
64000
?
(
ushort
)
0
:
epc2
[
5
]);
}
}
if
(
GetHmiAbnormal
(
ref
hmiabnormal
)
==
0
)
{
globaldata
.
m_hmibuffer
.
gcinfo
.
HmiAbnormal
=
hmiabnormal
;
}
}
}
...
@@ -976,6 +1014,8 @@ namespace GcDevicePc.ProThread
...
@@ -976,6 +1014,8 @@ namespace GcDevicePc.ProThread
globaldata
.
m_hmibuffer
.
gcinfo
.
NowEndTime
=
Get_Method_EndTime
();
globaldata
.
m_hmibuffer
.
gcinfo
.
NowEndTime
=
Get_Method_EndTime
();
}
}
}
}
}
}
/// <summary>
/// <summary>
...
...
GcDevicePc/ProThread/HMIControl.cs
View file @
2f1c2e54
...
@@ -363,6 +363,7 @@ namespace GcDevicePc.ProThread
...
@@ -363,6 +363,7 @@ namespace GcDevicePc.ProThread
else
else
{
{
writestatue
=
0
;
writestatue
=
0
;
TCD_SetDAC
(
port
,
0
);
}
}
count
=
0
;
count
=
0
;
...
...
GcDevicePc/ProThread/SendDataToZB.cs
0 → 100644
View file @
2f1c2e54
using
GcDevicePc.GCBuffer
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Runtime.InteropServices
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
namespace
GcDevicePc.ProThread
{
class
SendDataToZB
{
[
DllImport
(
@"SendData.dll"
)]
public
static
extern
void
GcSendDataToZb
(
Int32
data1
,
Int32
data2
,
Int32
data3
);
#
region
私有变量
ManualResetEvent
datamre
=
new
ManualResetEvent
(
false
);
Thread
t_DataToHw
;
#
endregion
#
region
private
void
StartSendDataToZB
()
{
GcSendDataToZb
(
1
,
0
,
1
);
GcSendDataToZb
(
0
,
1
,
1
);
}
private
void
StopSendDataToZB
()
{
GcSendDataToZb
(
1
,
0
,
2
);
GcSendDataToZb
(
0
,
1
,
2
);
}
private
void
SendDataToZB_A
(
Int32
data
)
{
GcSendDataToZb
(
data
,
0
,
3
);
GcSendDataToZb
(
0
,
0
,
4
);
}
private
void
SendDataToZB_B
(
Int32
data
)
{
GcSendDataToZb
(
0
,
data
,
4
);
GcSendDataToZb
(
0
,
0
,
3
);
}
private
void
SendDataToZB_AB
(
Int32
dataA
,
Int32
dataB
)
{
GcSendDataToZb
(
dataA
,
dataB
,
0
);
}
#
endregion
#
region
数据输出逻辑
private
ushort
CheckNumandTime
(
int
num
,
ushort
[]
Det
,
ushort
[]
Time
)
{
ushort
count
=
0
;
for
(
int
i
=
0
;
i
<
Det
.
Length
;
i
++)
{
if
(
num
==
Det
[
i
]
||
num
==
Time
[
i
])
{
break
;
}
else
{
count
++;
}
}
return
count
;
}
private
void
CleanAllToZBData
()
{
lock
(
globaldata
.
channelA_A
)
{
globaldata
.
channelA_A
.
Clear
();
}
lock
(
globaldata
.
channelA_B
)
{
globaldata
.
channelA_B
.
Clear
();
}
lock
(
globaldata
.
channelA_C
)
{
globaldata
.
channelA_C
.
Clear
();
}
lock
(
globaldata
.
channelB_A
)
{
globaldata
.
channelB_A
.
Clear
();
}
lock
(
globaldata
.
channelB_B
)
{
globaldata
.
channelB_B
.
Clear
();
}
lock
(
globaldata
.
channelB_C
)
{
globaldata
.
channelB_C
.
Clear
();
}
}
private
void
InitSendToZBData
()
{
int
mydataA
=
0
;
int
mydataB
=
0
;
int
i
=
0
;
for
(
i
=
0
;
i
<
5
;
i
++)
{
switch
(
methodconfig
.
signal
.
uDetA
[
0
])
{
case
1
:
if
(
globaldata
.
channelA_A
.
Count
>=
1
)
{
mydataA
=
Int32
.
Parse
(
globaldata
.
channelA_A
[
globaldata
.
channelA_A
.
Count
-
1
].
ToString
());
globaldata
.
channelA_A
.
RemoveAt
(
0
);
}
break
;
case
2
:
if
(
globaldata
.
channelA_B
.
Count
>=
1
)
{
mydataA
=
Int32
.
Parse
(
globaldata
.
channelA_B
[
globaldata
.
channelA_B
.
Count
-
1
].
ToString
());
globaldata
.
channelA_B
.
RemoveAt
(
0
);
}
break
;
case
3
:
if
(
globaldata
.
channelA_C
.
Count
>=
1
)
{
mydataA
=
Int32
.
Parse
(
globaldata
.
channelA_C
[
globaldata
.
channelA_C
.
Count
-
1
].
ToString
());
globaldata
.
channelA_C
.
RemoveAt
(
0
);
}
break
;
}
switch
(
methodconfig
.
signal
.
uDetB
[
0
])
{
case
1
:
if
(
globaldata
.
channelB_A
.
Count
>=
1
)
{
mydataB
=
Int32
.
Parse
(
globaldata
.
channelB_A
[
globaldata
.
channelB_A
.
Count
-
1
].
ToString
());
globaldata
.
channelB_A
.
RemoveAt
(
0
);
}
break
;
case
2
:
if
(
globaldata
.
channelB_B
.
Count
>=
1
)
{
mydataB
=
Int32
.
Parse
(
globaldata
.
channelB_B
[
globaldata
.
channelB_B
.
Count
-
1
].
ToString
());
globaldata
.
channelB_B
.
RemoveAt
(
0
);
}
break
;
case
3
:
if
(
globaldata
.
channelB_C
.
Count
>=
1
)
{
mydataB
=
Int32
.
Parse
(
globaldata
.
channelB_C
[
globaldata
.
channelB_C
.
Count
-
1
].
ToString
());
globaldata
.
channelB_C
.
RemoveAt
(
0
);
}
break
;
}
if
(
methodconfig
.
signal
.
u16ChannelA
==
1
&&
methodconfig
.
signal
.
u16ChannelB
==
1
)
{
SendDataToZB_AB
(
mydataA
,
mydataB
);
Thread
.
Sleep
(
50
);
}
//写入A
if
(
methodconfig
.
signal
.
u16ChannelA
==
1
&&
methodconfig
.
signal
.
u16ChannelB
!=
1
)
{
SendDataToZB_A
(
mydataA
);
Thread
.
Sleep
(
50
);
}
//写入B
if
(
methodconfig
.
signal
.
u16ChannelA
!=
1
&&
methodconfig
.
signal
.
u16ChannelB
==
1
)
{
SendDataToZB_B
(
mydataB
);
Thread
.
Sleep
(
50
);
}
}
}
private
void
EndSendToHWData
(
ushort
lastA
,
int
offsetA
,
ushort
lastB
,
int
offsetB
)
{
int
mydataA
=
0
;
int
mydataB
=
0
;
int
i
=
0
;
for
(
i
=
0
;
i
<
5
;
i
++)
{
switch
(
methodconfig
.
signal
.
uDetA
[
lastA
])
{
case
1
:
if
(
globaldata
.
channelA_A
.
Count
>=
1
)
{
mydataA
=
Int32
.
Parse
(
globaldata
.
channelA_A
[
0
].
ToString
())
-
offsetA
;
globaldata
.
channelA_A
.
RemoveAt
(
0
);
}
break
;
case
2
:
if
(
globaldata
.
channelA_B
.
Count
>=
1
)
{
mydataA
=
Int32
.
Parse
(
globaldata
.
channelA_B
[
0
].
ToString
())
-
offsetA
;
globaldata
.
channelA_B
.
RemoveAt
(
0
);
}
break
;
case
3
:
if
(
globaldata
.
channelA_C
.
Count
>=
1
)
{
mydataA
=
Int32
.
Parse
(
globaldata
.
channelA_C
[
0
].
ToString
())
-
offsetA
;
globaldata
.
channelA_C
.
RemoveAt
(
0
);
}
break
;
}
switch
(
methodconfig
.
signal
.
uDetB
[
lastB
])
{
case
1
:
if
(
globaldata
.
channelB_A
.
Count
>=
1
)
{
mydataB
=
Int32
.
Parse
(
globaldata
.
channelB_A
[
0
].
ToString
())
-
offsetB
;
globaldata
.
channelB_A
.
RemoveAt
(
0
);
}
break
;
case
2
:
if
(
globaldata
.
channelB_B
.
Count
>=
1
)
{
mydataB
=
Int32
.
Parse
(
globaldata
.
channelB_B
[
0
].
ToString
())
-
offsetB
;
globaldata
.
channelB_B
.
RemoveAt
(
0
);
}
break
;
case
3
:
if
(
globaldata
.
channelB_C
.
Count
>=
1
)
{
mydataB
=
Int32
.
Parse
(
globaldata
.
channelB_C
[
0
].
ToString
())
-
offsetB
;
globaldata
.
channelB_C
.
RemoveAt
(
0
);
}
break
;
}
if
(
methodconfig
.
signal
.
u16ChannelA
==
1
&&
methodconfig
.
signal
.
u16ChannelB
==
1
)
{
SendDataToZB_AB
(
mydataA
,
mydataB
);
Thread
.
Sleep
(
50
);
}
//写入A
if
(
methodconfig
.
signal
.
u16ChannelA
==
1
&&
methodconfig
.
signal
.
u16ChannelB
!=
1
)
{
SendDataToZB_A
(
mydataA
);
Thread
.
Sleep
(
50
);
}
//写入B
if
(
methodconfig
.
signal
.
u16ChannelA
!=
1
&&
methodconfig
.
signal
.
u16ChannelB
==
1
)
{
SendDataToZB_B
(
mydataB
);
Thread
.
Sleep
(
50
);
}
}
}
public
static
GCMethodConfig
methodconfig
{
get
;
set
;
}
private
void
SendToZB_Draw
()
{
DateTime
StartTimeA
;
DateTime
StartTimeB
;
DateTime
EndTimeA
;
DateTime
EndTimeB
;
TimeSpan
tsA
;
TimeSpan
tsB
;
int
secA
;
int
secB
;
int
offetA
=
0
;
int
offetB
=
0
;
bool
run_stop
=
false
;
ushort
SendNumA
=
0
;
ushort
SendNumB
=
0
;
//int i = 0;
bool
runflag
=
false
;
while
(
true
)
{
if
((
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
4
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
5
)
&&
methodconfig
!=
null
&&
run_stop
!=
true
)
//if ((globaldata.m_hmibuffer.gcinfo.methodstatus == 4 || globaldata.m_hmibuffer.gcinfo.methodstatus == 5) && globaldata.m_hmibuffer.gcinfo.hmistatus == 4 && run_stop != true)
{
int
saveB
=
0
;
int
recordB
=
0
;
int
recordA
=
0
;
int
saveA
=
0
;
int
onea
=
0
;
int
oneb
=
0
;
bool
ackoneA
=
false
;
bool
ackoneB
=
false
;
InitSendToZBData
();
//清除所有数据,准备传输
CleanAllToZBData
();
//开启绘图通知
StartSendDataToZB
();
//绘图通知开启flag
runflag
=
true
;
if
(
methodconfig
.
signal
.
u16ChannelA
==
1
)
{
SendNumA
=
CheckNumandTime
(
0
,
methodconfig
.
signal
.
uDetA
,
methodconfig
.
signal
.
u16DetTimeLengthA
);
}
if
(
methodconfig
.
signal
.
u16ChannelB
==
1
)
{
SendNumB
=
CheckNumandTime
(
0
,
methodconfig
.
signal
.
uDetB
,
methodconfig
.
signal
.
u16DetTimeLengthB
);
}
//LogHelper.I("StepA StpeB is", SendNumA.ToString() + " "+ SendNumB.ToString());
ushort
MAXNum
=
SendNumA
>
SendNumB
?
SendNumA
:
SendNumB
;
if
(
methodconfig
.
signal
.
u16ChannelA
==
1
||
methodconfig
.
signal
.
u16ChannelB
==
1
)
{
int
StepA
=
0
;
int
StepB
=
0
;
{
StartTimeA
=
DateTime
.
Now
;
StartTimeB
=
DateTime
.
Now
;
int
mydataA
=
0
;
int
mydataB
=
0
;
while
(
true
)
{
EndTimeA
=
DateTime
.
Now
;
tsA
=
StartTimeA
.
Subtract
(
EndTimeA
).
Duration
();
secA
=
(
int
)
tsA
.
TotalSeconds
;
EndTimeB
=
DateTime
.
Now
;
tsB
=
StartTimeB
.
Subtract
(
EndTimeB
).
Duration
();
secB
=
(
int
)
tsB
.
TotalSeconds
;
if
(
StepA
<
SendNumA
)
{
if
(
secA
<=
methodconfig
.
signal
.
u16DetTimeLengthA
[
StepA
])
{
int
mydataA_old
;
//Console.WriteLine("总共:" + SendNumA.ToString() + " 阶段,现在是第" + StepA.ToString() + "个阶段:" + secA.ToString() + "/" + methodconfig.signal.u16DetTimeLengthA[StepA].ToString());
switch
(
methodconfig
.
signal
.
uDetA
[
StepA
])
{
case
1
:
if
(
globaldata
.
channelA_A
.
Count
>=
1
)
{
//if (changeA_flag)
//{
// offetA = Int32.Parse(globaldata.channelA_A[0].ToString()) - mydataA_old;
// changeA_flag = false;
//}
mydataA
=
Int32
.
Parse
(
globaldata
.
channelA_A
[
0
].
ToString
())
-
offetA
;
if
(
ackoneA
)
{
onea
=
mydataA
;
ackoneA
=
false
;
}
if
(
onea
>
saveA
)
{
mydataA
=
mydataA
-
(
onea
-
saveA
);
}
else
if
(
onea
<
saveA
)
{
mydataA
=
mydataA
+
(
saveA
-
onea
);
}
mydataA_old
=
mydataA
;
}
break
;
case
2
:
if
(
globaldata
.
channelA_B
.
Count
>=
1
)
{
//if (changeA_flag)
//{
// offetA = Int32.Parse(globaldata.channelA_B[0].ToString()) - mydataA_old;
// changeA_flag = false;
//}
mydataA
=
Int32
.
Parse
(
globaldata
.
channelA_B
[
0
].
ToString
())
-
offetA
;
if
(
ackoneA
)
{
onea
=
mydataA
;
ackoneA
=
false
;
}
if
(
onea
>
saveA
)
{
mydataA
=
mydataA
-
(
onea
-
saveA
);
}
else
if
(
onea
<
saveA
)
{
mydataA
=
mydataA
+
(
saveA
-
onea
);
}
mydataA_old
=
mydataA
;
}
break
;
case
3
:
if
(
globaldata
.
channelA_C
.
Count
>=
1
)
{
//if (changeA_flag)
//{
// offetA = Int32.Parse(globaldata.channelA_C[0].ToString()) - mydataA_old;
// changeA_flag = false;
//}
mydataA
=
Int32
.
Parse
(
globaldata
.
channelA_C
[
0
].
ToString
())
-
offetA
;
if
(
ackoneA
)
{
onea
=
mydataA
;
ackoneA
=
false
;
}
if
(
onea
>
saveA
)
{
mydataA
=
mydataA
-
(
onea
-
saveA
);
}
else
if
(
onea
<
saveA
)
{
mydataA
=
mydataA
+
(
saveA
-
onea
);
}
mydataA_old
=
mydataA
;
}
break
;
}
if
(
globaldata
.
channelA_A
.
Count
>=
1
)
{
globaldata
.
channelA_A
.
RemoveAt
(
0
);
}
if
(
globaldata
.
channelA_B
.
Count
>=
1
)
{
globaldata
.
channelA_B
.
RemoveAt
(
0
);
}
if
(
globaldata
.
channelA_C
.
Count
>=
1
)
{
globaldata
.
channelA_C
.
RemoveAt
(
0
);
}
recordA
=
mydataA
;
}
else
{
// LogHelper.I("StepA++ ", StepA.ToString() + " " + SendNumA.ToString());
saveA
=
recordA
;
ackoneA
=
true
;
StepA
++;
StartTimeA
=
DateTime
.
Now
;
}
}
if
(
StepB
<
SendNumB
)
{
if
(
secB
<=
methodconfig
.
signal
.
u16DetTimeLengthB
[
StepB
])
{
int
mydataB_old
;
//Console.WriteLine("总共:" + SendNumB.ToString() + " 阶段,现在是第" + StepB.ToString() + "个阶段:" + secB.ToString() + "/" + methodconfig.signal.u16DetTimeLengthB[i].ToString());
switch
(
methodconfig
.
signal
.
uDetB
[
StepB
])
{
case
1
:
if
(
globaldata
.
channelB_A
.
Count
>=
1
)
{
//if (changeB_flag)
//{
// offetB = Int32.Parse(globaldata.channelB_A[0].ToString()) - mydataB_old;
// changeB_flag = false;
//}
mydataB
=
Int32
.
Parse
(
globaldata
.
channelB_A
[
0
].
ToString
())
-
offetB
;
if
(
ackoneB
)
{
oneb
=
mydataB
;
ackoneB
=
false
;
}
if
(
oneb
>
saveB
)
{
mydataB
=
mydataB
-
(
oneb
-
saveB
);
}
else
if
(
oneb
<
saveB
)
{
mydataB
=
mydataB
+
(
saveB
-
oneb
);
}
mydataB_old
=
mydataB
;
}
break
;
case
2
:
if
(
globaldata
.
channelB_B
.
Count
>=
1
)
{
//if (changeB_flag)
//{
// offetB = Int32.Parse(globaldata.channelB_B[0].ToString()) - mydataB_old;
// changeB_flag = false;
//}
mydataB
=
Int32
.
Parse
(
globaldata
.
channelB_B
[
0
].
ToString
())
-
offetB
;
if
(
ackoneB
)
{
oneb
=
mydataB
;
ackoneB
=
false
;
}
if
(
oneb
>
saveB
)
{
mydataB
=
mydataB
-
(
oneb
-
saveB
);
}
else
if
(
oneb
<
saveB
)
{
mydataB
=
mydataB
+
(
saveB
-
oneb
);
}
mydataB_old
=
mydataB
;
}
break
;
case
3
:
if
(
globaldata
.
channelB_C
.
Count
>=
1
)
{
//if (changeB_flag)
//{
// offetB = Int32.Parse(globaldata.channelB_C[0].ToString()) - mydataB_old;
// changeB_flag = false;
//}
mydataB
=
Int32
.
Parse
(
globaldata
.
channelB_C
[
0
].
ToString
())
-
offetB
;
if
(
ackoneB
)
{
oneb
=
mydataB
;
ackoneB
=
false
;
}
if
(
oneb
>
saveB
)
{
mydataB
=
mydataB
-
(
oneb
-
saveB
);
}
else
if
(
oneb
<
saveB
)
{
mydataB
=
mydataB
+
(
saveB
-
oneb
);
}
mydataB_old
=
mydataB
;
}
break
;
}
if
(
globaldata
.
channelB_A
.
Count
>=
1
)
{
globaldata
.
channelB_A
.
RemoveAt
(
0
);
}
if
(
globaldata
.
channelB_B
.
Count
>=
1
)
{
globaldata
.
channelB_B
.
RemoveAt
(
0
);
}
if
(
globaldata
.
channelB_C
.
Count
>=
1
)
{
globaldata
.
channelB_C
.
RemoveAt
(
0
);
}
recordB
=
mydataB
;
}
else
{
// LogHelper.I("StepB ", StepB.ToString() + " " + SendNumB.ToString());
saveB
=
recordB
;
ackoneB
=
true
;
StepB
++;
StartTimeB
=
DateTime
.
Now
;
}
}
//写入AB
if
(
StepA
<
SendNumA
&&
StepB
<
SendNumB
)
{
//Console.WriteLine("SendDataToHW A B", secA.ToString() + " "+ secB.ToString());
SendDataToZB_AB
(
mydataA
,
mydataB
);
Thread
.
Sleep
(
50
);
}
//写入A
if
(
StepA
<
SendNumA
&&
StepB
>=
SendNumB
)
{
// LogHelper.I("SendDataToHW_A", secA.ToString());
SendDataToZB_A
(
mydataA
);
Thread
.
Sleep
(
50
);
}
//写入B
if
(
StepB
<
SendNumB
&&
StepA
>=
SendNumA
)
{
// LogHelper.I("SendDataToHW_B", secB.ToString());
SendDataToZB_B
(
mydataB
);
Thread
.
Sleep
(
50
);
}
if
(
StepB
>=
SendNumB
&&
StepA
>=
SendNumA
)
{
run_stop
=
true
;
break
;
}
if
((
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
!=
4
&&
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
!=
5
))
{
//LogHelper.I("methodstatus", "stop");
run_stop
=
true
;
break
;
}
}
//if ((globaldata.m_hmibuffer.gcinfo.methodstatus != 4 && globaldata.m_hmibuffer.gcinfo.methodstatus != 5))
//{
// break;
//}
}
}
}
if
((
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
!=
4
&&
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
!=
5
)
||
run_stop
)
{
if
(
runflag
)
{
StopSendDataToZB
();
CleanAllToZBData
();
runflag
=
false
;
run_stop
=
false
;
}
}
}
}
#
endregion
public
void
DataToZBStart
()
{
if
(
datamre
!=
null
)
{
datamre
.
Reset
();
}
t_DataToHw
=
new
Thread
(
SendToZB_Draw
);
t_DataToHw
.
IsBackground
=
true
;
t_DataToHw
.
Start
();
}
public
void
DataToZBStop
()
{
datamre
.
Set
();
}
}
}
GcDevicePc/ProThread/SignalDataToHw.cs
View file @
2f1c2e54
...
@@ -11,7 +11,7 @@ namespace GcDevicePc.ProThread
...
@@ -11,7 +11,7 @@ namespace GcDevicePc.ProThread
{
{
class
SignalDataToHw
class
SignalDataToHw
{
{
[
DllImport
(
@"HWSendData.dll"
,
EntryPoint
=
"SendDataToHW"
)]
[
DllImport
(
@"HWSendData.dll"
)]
public
static
extern
void
GCSendDataToHW
(
Int32
data1
,
Int32
data2
,
Int32
data3
);
public
static
extern
void
GCSendDataToHW
(
Int32
data1
,
Int32
data2
,
Int32
data3
);
#
region
私有变量
#
region
私有变量
ManualResetEvent
datamre
=
new
ManualResetEvent
(
false
);
ManualResetEvent
datamre
=
new
ManualResetEvent
(
false
);
...
@@ -277,60 +277,28 @@ namespace GcDevicePc.ProThread
...
@@ -277,60 +277,28 @@ namespace GcDevicePc.ProThread
TimeSpan
tsB
;
TimeSpan
tsB
;
int
secA
;
int
secA
;
int
secB
;
int
secB
;
int
mydataA
=
0
;
int
mydataA_old
=
0
;
int
mydataB
=
0
;
int
mydataB_old
=
0
;
int
offetA
=
0
;
int
offetA
=
0
;
int
offetB
=
0
;
int
offetB
=
0
;
int
StepA
=
0
;
int
StepB
=
0
;
//bool StepA_flag = false;
// bool StepB_flag = false;
bool
changeA_flag
=
false
;
bool
changeB_flag
=
false
;
bool
run_stop
=
false
;
bool
run_stop
=
false
;
int
recordA
=
0
;
int
saveA
=
0
;
int
recordB
=
0
;
int
saveB
=
0
;
int
onea
=
0
;
int
oneb
=
0
;
bool
ackoneA
=
false
;
bool
ackoneB
=
false
;
ushort
SendNumA
=
0
;
ushort
SendNumA
=
0
;
ushort
SendNumB
=
0
;
ushort
SendNumB
=
0
;
ushort
MAXNum
=
0
;
//int i = 0;
//int i = 0;
bool
runflag
=
false
;
bool
runflag
=
false
;
while
(
true
)
while
(
true
)
{
{
if
((
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
4
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
5
)
&&
globaldata
.
m_hmibuffer
.
gcinfo
.
hmistatus
==
4
&&
run_stop
!=
true
)
if
((
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
4
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
5
)
&&
methodconfig
!=
null
&&
run_stop
!=
true
)
//if ((globaldata.m_hmibuffer.gcinfo.methodstatus == 4 || globaldata.m_hmibuffer.gcinfo.methodstatus == 5) && globaldata.m_hmibuffer.gcinfo.hmistatus == 4 && run_stop != true)
{
{
saveB
=
0
;
int
saveB
=
0
;
recordB
=
0
;
int
recordB
=
0
;
recordA
=
0
;
int
recordA
=
0
;
saveA
=
0
;
int
saveA
=
0
;
onea
=
0
;
oneb
=
0
;
ackoneA
=
false
;
ackoneB
=
false
;
mydataA_old
=
0
;
int
onea
=
0
;
mydataB_old
=
0
;
int
oneb
=
0
;
bool
ackoneA
=
false
;
bool
ackoneB
=
false
;
InitSendToHWData
();
InitSendToHWData
();
//清除所有数据,准备传输
//清除所有数据,准备传输
CleanAllToHWData
();
CleanAllToHWData
();
...
@@ -349,26 +317,20 @@ namespace GcDevicePc.ProThread
...
@@ -349,26 +317,20 @@ namespace GcDevicePc.ProThread
SendNumB
=
CheckNumandTime
(
0
,
methodconfig
.
signal
.
uDetB
,
methodconfig
.
signal
.
u16DetTimeLengthB
);
SendNumB
=
CheckNumandTime
(
0
,
methodconfig
.
signal
.
uDetB
,
methodconfig
.
signal
.
u16DetTimeLengthB
);
}
}
//
LogHelper.I("StepA StpeB is", SendNumA.ToString() + " "+ SendNumB.ToString());
//LogHelper.I("StepA StpeB is", SendNumA.ToString() + " "+ SendNumB.ToString());
MAXNum
=
SendNumA
>
SendNumB
?
SendNumA
:
SendNumB
;
ushort
MAXNum
=
SendNumA
>
SendNumB
?
SendNumA
:
SendNumB
;
if
(
methodconfig
.
signal
.
u16ChannelA
==
1
||
methodconfig
.
signal
.
u16ChannelB
==
1
)
if
(
methodconfig
.
signal
.
u16ChannelA
==
1
||
methodconfig
.
signal
.
u16ChannelB
==
1
)
{
{
StepA
=
0
;
int
StepA
=
0
;
StepB
=
0
;
int
StepB
=
0
;
{
{
StartTimeA
=
DateTime
.
Now
;
StartTimeA
=
DateTime
.
Now
;
StartTimeB
=
DateTime
.
Now
;
StartTimeB
=
DateTime
.
Now
;
int
mydataA
=
0
;
int
mydataB
=
0
;
changeA_flag
=
false
;
changeB_flag
=
false
;
mydataA
=
0
;
mydataB
=
0
;
while
(
true
)
while
(
true
)
{
{
EndTimeA
=
DateTime
.
Now
;
EndTimeA
=
DateTime
.
Now
;
...
@@ -382,6 +344,7 @@ namespace GcDevicePc.ProThread
...
@@ -382,6 +344,7 @@ namespace GcDevicePc.ProThread
{
{
if
(
secA
<=
methodconfig
.
signal
.
u16DetTimeLengthA
[
StepA
])
if
(
secA
<=
methodconfig
.
signal
.
u16DetTimeLengthA
[
StepA
])
{
{
int
mydataA_old
;
//Console.WriteLine("总共:" + SendNumA.ToString() + " 阶段,现在是第" + StepA.ToString() + "个阶段:" + secA.ToString() + "/" + methodconfig.signal.u16DetTimeLengthA[StepA].ToString());
//Console.WriteLine("总共:" + SendNumA.ToString() + " 阶段,现在是第" + StepA.ToString() + "个阶段:" + secA.ToString() + "/" + methodconfig.signal.u16DetTimeLengthA[StepA].ToString());
switch
(
methodconfig
.
signal
.
uDetA
[
StepA
])
switch
(
methodconfig
.
signal
.
uDetA
[
StepA
])
...
@@ -504,7 +467,6 @@ namespace GcDevicePc.ProThread
...
@@ -504,7 +467,6 @@ namespace GcDevicePc.ProThread
ackoneA
=
true
;
ackoneA
=
true
;
StepA
++;
StepA
++;
StartTimeA
=
DateTime
.
Now
;
StartTimeA
=
DateTime
.
Now
;
changeA_flag
=
true
;
}
}
}
}
...
@@ -513,6 +475,7 @@ namespace GcDevicePc.ProThread
...
@@ -513,6 +475,7 @@ namespace GcDevicePc.ProThread
{
{
if
(
secB
<=
methodconfig
.
signal
.
u16DetTimeLengthB
[
StepB
])
if
(
secB
<=
methodconfig
.
signal
.
u16DetTimeLengthB
[
StepB
])
{
{
int
mydataB_old
;
//Console.WriteLine("总共:" + SendNumB.ToString() + " 阶段,现在是第" + StepB.ToString() + "个阶段:" + secB.ToString() + "/" + methodconfig.signal.u16DetTimeLengthB[i].ToString());
//Console.WriteLine("总共:" + SendNumB.ToString() + " 阶段,现在是第" + StepB.ToString() + "个阶段:" + secB.ToString() + "/" + methodconfig.signal.u16DetTimeLengthB[i].ToString());
switch
(
methodconfig
.
signal
.
uDetB
[
StepB
])
switch
(
methodconfig
.
signal
.
uDetB
[
StepB
])
...
@@ -537,7 +500,7 @@ namespace GcDevicePc.ProThread
...
@@ -537,7 +500,7 @@ namespace GcDevicePc.ProThread
{
{
mydataB
=
mydataB
-
(
oneb
-
saveB
);
mydataB
=
mydataB
-
(
oneb
-
saveB
);
}
}
else
if
(
oneb
<
saveB
)
else
if
(
oneb
<
saveB
)
{
{
mydataB
=
mydataB
+
(
saveB
-
oneb
);
mydataB
=
mydataB
+
(
saveB
-
oneb
);
}
}
...
@@ -627,7 +590,6 @@ namespace GcDevicePc.ProThread
...
@@ -627,7 +590,6 @@ namespace GcDevicePc.ProThread
ackoneB
=
true
;
ackoneB
=
true
;
StepB
++;
StepB
++;
StartTimeB
=
DateTime
.
Now
;
StartTimeB
=
DateTime
.
Now
;
changeB_flag
=
true
;
}
}
}
}
...
...
GcDevicePc/Program.cs
View file @
2f1c2e54
...
@@ -11,27 +11,25 @@ namespace GcDevicePc
...
@@ -11,27 +11,25 @@ namespace GcDevicePc
{
{
Application
.
EnableVisualStyles
();
Application
.
EnableVisualStyles
();
Application
.
SetCompatibleTextRenderingDefault
(
false
);
Application
.
SetCompatibleTextRenderingDefault
(
false
);
bool
createNew
;
bool
createNew
;
//Application.Run(new TestForm());
Application
.
Run
(
new
TestForm
());
{
using
(
System
.
Threading
.
Mutex
mutex
=
new
System
.
Threading
.
Mutex
(
true
,
Application
.
ProductName
,
out
createNew
))
{
{
if
(
createNew
)
//using (System.Threading.Mutex mutex = new System.Threading.Mutex(true, Application.ProductName, out createNew))
{
//{
Application
.
Run
(
new
StartForm
());
// if (createNew)
mutex
.
ReleaseMutex
();
// {
// Application.Run(new MDIBase());
// Application.Run(new StartForm());
}
// mutex.ReleaseMutex();
else
// }
{
// else
MessageBox
.
Show
(
"应用程序已经在运行中..."
);
// {
System
.
Threading
.
Thread
.
Sleep
(
1000
);
// MessageBox.Show("应用程序已经在运行中...");
Application
.
Exit
();
// System.Threading.Thread.Sleep(1000);
System
.
Diagnostics
.
Process
.
GetCurrentProcess
().
Kill
();
// Application.Exit();
// System.Environment.Exit(1);
// System.Diagnostics.Process.GetCurrentProcess().Kill();
}
// // System.Environment.Exit(1);
}
// }
//}
}
}
}
}
}
}
...
...
GcDevicePc/Properties/Resources.Designer.cs
View file @
2f1c2e54
...
@@ -19,7 +19,7 @@ namespace GcDevicePc.Properties {
...
@@ -19,7 +19,7 @@ namespace GcDevicePc.Properties {
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
// (以 /str 作为命令选项),或重新生成 VS 项目。
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"System.Resources.Tools.StronglyTypedResourceBuilder"
,
"
4
.0.0.0"
)]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"System.Resources.Tools.StronglyTypedResourceBuilder"
,
"
16
.0.0.0"
)]
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
()]
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
()]
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
internal
class
Resources
{
internal
class
Resources
{
...
@@ -47,7 +47,7 @@ namespace GcDevicePc.Properties {
...
@@ -47,7 +47,7 @@ namespace GcDevicePc.Properties {
}
}
/// <summary>
/// <summary>
///
使用此强类型资源类,为所有资源查找
///
重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性。
/// 重写当前线程的 CurrentUICulture 属性。
/// </summary>
/// </summary>
[
global
::
System
.
ComponentModel
.
EditorBrowsableAttribute
(
global
::
System
.
ComponentModel
.
EditorBrowsableState
.
Advanced
)]
[
global
::
System
.
ComponentModel
.
EditorBrowsableAttribute
(
global
::
System
.
ComponentModel
.
EditorBrowsableState
.
Advanced
)]
...
@@ -59,5 +59,15 @@ namespace GcDevicePc.Properties {
...
@@ -59,5 +59,15 @@ namespace GcDevicePc.Properties {
resourceCulture
=
value
;
resourceCulture
=
value
;
}
}
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal
static
System
.
Drawing
.
Bitmap
色谱
3
{
get
{
object
obj
=
ResourceManager
.
GetObject
(
"色谱3"
,
resourceCulture
);
return
((
System
.
Drawing
.
Bitmap
)(
obj
));
}
}
}
}
}
}
GcDevicePc/Properties/Resources.resx
View file @
2f1c2e54
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: System.
Runtime.
Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
mimetype: application/x-microsoft.net.object.soap.base64
...
@@ -60,6 +60,7 @@
...
@@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
: and then encoded with base64 encoding.
-->
-->
<xsd:schema
id=
"root"
xmlns=
""
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns:msdata=
"urn:schemas-microsoft-com:xml-msdata"
>
<xsd:schema
id=
"root"
xmlns=
""
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns:msdata=
"urn:schemas-microsoft-com:xml-msdata"
>
<xsd:import
namespace=
"http://www.w3.org/XML/1998/namespace"
/>
<xsd:element
name=
"root"
msdata:IsDataSet=
"true"
>
<xsd:element
name=
"root"
msdata:IsDataSet=
"true"
>
<xsd:complexType>
<xsd:complexType>
<xsd:choice
maxOccurs=
"unbounded"
>
<xsd:choice
maxOccurs=
"unbounded"
>
...
@@ -68,9 +69,10 @@
...
@@ -68,9 +69,10 @@
<xsd:sequence>
<xsd:sequence>
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
/>
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
/>
</xsd:sequence>
</xsd:sequence>
<xsd:attribute
name=
"name"
type=
"xsd:string"
/>
<xsd:attribute
name=
"name"
use=
"required"
type=
"xsd:string"
/>
<xsd:attribute
name=
"type"
type=
"xsd:string"
/>
<xsd:attribute
name=
"type"
type=
"xsd:string"
/>
<xsd:attribute
name=
"mimetype"
type=
"xsd:string"
/>
<xsd:attribute
name=
"mimetype"
type=
"xsd:string"
/>
<xsd:attribute
ref=
"xml:space"
/>
</xsd:complexType>
</xsd:complexType>
</xsd:element>
</xsd:element>
<xsd:element
name=
"assembly"
>
<xsd:element
name=
"assembly"
>
...
@@ -85,9 +87,10 @@
...
@@ -85,9 +87,10 @@
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"1"
/>
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"1"
/>
<xsd:element
name=
"comment"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"2"
/>
<xsd:element
name=
"comment"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"2"
/>
</xsd:sequence>
</xsd:sequence>
<xsd:attribute
name=
"name"
type=
"xsd:string"
msdata:Ordinal=
"1"
/>
<xsd:attribute
name=
"name"
type=
"xsd:string"
use=
"required"
msdata:Ordinal=
"1"
/>
<xsd:attribute
name=
"type"
type=
"xsd:string"
msdata:Ordinal=
"3"
/>
<xsd:attribute
name=
"type"
type=
"xsd:string"
msdata:Ordinal=
"3"
/>
<xsd:attribute
name=
"mimetype"
type=
"xsd:string"
msdata:Ordinal=
"4"
/>
<xsd:attribute
name=
"mimetype"
type=
"xsd:string"
msdata:Ordinal=
"4"
/>
<xsd:attribute
ref=
"xml:space"
/>
</xsd:complexType>
</xsd:complexType>
</xsd:element>
</xsd:element>
<xsd:element
name=
"resheader"
>
<xsd:element
name=
"resheader"
>
...
@@ -109,9 +112,13 @@
...
@@ -109,9 +112,13 @@
<value>
2.0
</value>
<value>
2.0
</value>
</resheader>
</resheader>
<resheader
name=
"reader"
>
<resheader
name=
"reader"
>
<value>
System.Resources.ResXResourceReader, System.Windows.Forms, Version=
2
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
<value>
System.Resources.ResXResourceReader, System.Windows.Forms, Version=
4
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
</resheader>
</resheader>
<resheader
name=
"writer"
>
<resheader
name=
"writer"
>
<value>
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=
2
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
<value>
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=
4
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
</resheader>
</resheader>
<assembly
alias=
"System.Windows.Forms"
name=
"System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
/>
<data
name=
"色谱3"
type=
"System.Resources.ResXFileRef, System.Windows.Forms"
>
<value>
..\UI\picture\色谱3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
</value>
</data>
</root>
</root>
\ No newline at end of file
GcDevicePc/RunTables.Designer.cs
View file @
2f1c2e54
...
@@ -30,7 +30,6 @@
...
@@ -30,7 +30,6 @@
{
{
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
components
=
new
System
.
ComponentModel
.
Container
();
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
RunTables
));
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
RunTables
));
this
.
rtsave
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tabrun
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tabrun
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
LocalMethodView
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
LocalMethodView
=
new
System
.
Windows
.
Forms
.
DataGridView
();
...
@@ -65,16 +64,6 @@
...
@@ -65,16 +64,6 @@
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
LocalRunTableView
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
LocalRunTableView
)).
BeginInit
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// rtsave
//
this
.
rtsave
.
Location
=
new
System
.
Drawing
.
Point
(
448
,
316
);
this
.
rtsave
.
Name
=
"rtsave"
;
this
.
rtsave
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
rtsave
.
TabIndex
=
0
;
this
.
rtsave
.
Text
=
"保存"
;
this
.
rtsave
.
UseVisualStyleBackColor
=
true
;
this
.
rtsave
.
Click
+=
new
System
.
EventHandler
(
this
.
rtsave_Click
);
//
// tabrun
// tabrun
//
//
this
.
tabrun
.
Location
=
new
System
.
Drawing
.
Point
(
539
,
316
);
this
.
tabrun
.
Location
=
new
System
.
Drawing
.
Point
(
539
,
316
);
...
@@ -342,7 +331,6 @@
...
@@ -342,7 +331,6 @@
this
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
tabrun
);
this
.
Controls
.
Add
(
this
.
tabrun
);
this
.
Controls
.
Add
(
this
.
rtsave
);
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
FixedSingle
;
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
FixedSingle
;
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
MaximizeBox
=
false
;
this
.
MaximizeBox
=
false
;
...
@@ -365,8 +353,6 @@
...
@@ -365,8 +353,6 @@
}
}
#
endregion
#
endregion
private
System
.
Windows
.
Forms
.
Button
rtsave
;
private
System
.
Windows
.
Forms
.
Button
tabrun
;
private
System
.
Windows
.
Forms
.
Button
tabrun
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
DataGridView
LocalMethodView
;
private
System
.
Windows
.
Forms
.
DataGridView
LocalMethodView
;
...
...
GcDevicePc/RunTables.cs
View file @
2f1c2e54
...
@@ -304,7 +304,7 @@ namespace GcDevicePc
...
@@ -304,7 +304,7 @@ namespace GcDevicePc
this
.
AddMethodbtn
.
Enabled
=
false
;
this
.
AddMethodbtn
.
Enabled
=
false
;
this
.
RunTableView
.
Enabled
=
false
;
this
.
RunTableView
.
Enabled
=
false
;
this
.
updategv
.
Enabled
=
true
;
this
.
updategv
.
Enabled
=
true
;
this
.
rtsave
.
Enabled
=
false
;
//
this.rtsave.Enabled = false;
}
}
private
void
DelRow_Click
(
object
sender
,
EventArgs
e
)
private
void
DelRow_Click
(
object
sender
,
EventArgs
e
)
...
@@ -381,7 +381,7 @@ namespace GcDevicePc
...
@@ -381,7 +381,7 @@ namespace GcDevicePc
this
.
AddMethodbtn
.
Enabled
=
true
;
this
.
AddMethodbtn
.
Enabled
=
true
;
this
.
RunTableView
.
Enabled
=
true
;
this
.
RunTableView
.
Enabled
=
true
;
this
.
rtsave
.
Enabled
=
true
;
//
this.rtsave.Enabled = true;
this
.
updategv
.
Enabled
=
false
;
this
.
updategv
.
Enabled
=
false
;
this
.
rtbox
.
Text
=
""
;
this
.
rtbox
.
Text
=
""
;
...
@@ -441,13 +441,75 @@ namespace GcDevicePc
...
@@ -441,13 +441,75 @@ namespace GcDevicePc
public
event
SendUpdateCMD
sendupdatecmd
;
public
event
SendUpdateCMD
sendupdatecmd
;
private
void
tabrun_Click
(
object
sender
,
EventArgs
e
)
private
void
tabrun_Click
(
object
sender
,
EventArgs
e
)
{
{
this
.
tabrun
.
Enabled
=
false
;
if
(!
File
.
Exists
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
config_RunTab
))
{
StreamWriter
sw
=
new
StreamWriter
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
config_RunTab
,
false
,
System
.
Text
.
Encoding
.
Unicode
);
sw
.
WriteLine
(
"[运行表]"
);
sw
.
Close
();
}
string
file
=
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
config_RunTab
;
INIOperation
runtable
=
new
INIOperation
(
file
);
string
subkey
;
runtable
.
INIEmptySection
(
file
,
"运行表"
);
runtable
.
INIEmptySection
(
file
,
"循环"
);
runtable
.
INIEmptySection
(
file
,
"运行时间"
);
runtable
.
INIWriteValue
(
file
,
"运行表"
,
"0"
,
"开机"
);
runtable
.
INIWriteValue
(
file
,
"循环"
,
"0"
,
"1"
);
runtable
.
INIWriteValue
(
file
,
"运行时间"
,
"0"
,
"1"
);
runtable
.
INIWriteValue
(
file
,
"间隔时间"
,
"0"
,
"1"
);
bool
rbet
;
FileServerClient
rtclient
=
null
;
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
rtclient
=
new
FileServerClient
();
rtclient
.
WtClientInit
(
globaldata
.
connection_ip
,
globaldata
.
fileserverport
);
}
string
lfilename
;
string
rfilename
;
for
(
int
i
=
0
;
i
<
RunTableView
.
RowCount
;
i
++)
{
subkey
=
(
Convert
.
ToInt32
(
RunTableView
.
Rows
[
i
].
Cells
[
0
].
Value
)
+
1
).
ToString
();
rbet
=
runtable
.
INIWriteValue
(
file
,
"运行表"
,
subkey
,
RunTableView
.
Rows
[
i
].
Cells
[
1
].
Value
.
ToString
());
if
(
RunTableView
.
Rows
[
i
].
Cells
[
3
].
Value
.
ToString
()
==
"-1"
)
rbet
=
runtable
.
INIWriteValue
(
file
,
"循环"
,
subkey
,
"-1"
);
else
if
(
RunTableView
.
Rows
[
i
].
Cells
[
3
].
Value
.
ToString
()
==
"0"
)
rbet
=
runtable
.
INIWriteValue
(
file
,
"循环"
,
subkey
,
"0"
);
else
rbet
=
runtable
.
INIWriteValue
(
file
,
"循环"
,
subkey
,
RunTableView
.
Rows
[
i
].
Cells
[
3
].
Value
.
ToString
());
rbet
=
runtable
.
INIWriteValue
(
file
,
"运行时间"
,
subkey
,
RunTableView
.
Rows
[
i
].
Cells
[
2
].
Value
.
ToString
());
rbet
=
runtable
.
INIWriteValue
(
file
,
"间隔时间"
,
subkey
,
RunTableView
.
Rows
[
i
].
Cells
[
4
].
Value
.
ToString
());
lfilename
=
null
;
rfilename
=
null
;
rfilename
=
RunTableView
.
Rows
[
i
].
Cells
[
1
].
Value
.
ToString
();
lfilename
=
Path
.
Combine
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfolderinfo
.
MethodFolder
,
rfilename
);
if
(
rtclient
!=
null
)
rtclient
.
WtClientCopytoServer
(
rfilename
,
lfilename
,
globaldata
.
remoteFolder
+
"仪器方法\\"
);
}
if
(
rtclient
!=
null
)
rtclient
.
WtClientClose
();
//string message = "运行表保存成功";
//MessageBox.Show(message, "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
if
(
!
String
.
IsNullOrEmpty
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
config_RunTab
)
&&
!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
if
(
!
String
.
IsNullOrEmpty
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
config_RunTab
)
&&
!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
{
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
=
2
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
=
2
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
this
.
tabrun
.
Enabled
=
false
;
if
(
File
.
Exists
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
config_RunTab
))
if
(
File
.
Exists
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
config_RunTab
))
{
{
...
@@ -461,8 +523,8 @@ namespace GcDevicePc
...
@@ -461,8 +523,8 @@ namespace GcDevicePc
}
}
sendupdatecmd
(
false
);
sendupdatecmd
(
false
);
this
.
tabrun
.
Enabled
=
true
;
}
}
this
.
tabrun
.
Enabled
=
true
;
this
.
Close
();
this
.
Close
();
}
}
...
...
GcDevicePc/TestForm.Designer.cs
View file @
2f1c2e54
...
@@ -31,6 +31,8 @@
...
@@ -31,6 +31,8 @@
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
gcTitle1
=
new
GcDevicePc
.
Controls
.
GCTitle
();
this
.
gcTitle1
=
new
GcDevicePc
.
Controls
.
GCTitle
();
this
.
button3
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button4
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// button1
// button1
...
@@ -61,11 +63,33 @@
...
@@ -61,11 +63,33 @@
this
.
gcTitle1
.
Size
=
new
System
.
Drawing
.
Size
(
800
,
20
);
this
.
gcTitle1
.
Size
=
new
System
.
Drawing
.
Size
(
800
,
20
);
this
.
gcTitle1
.
TabIndex
=
2
;
this
.
gcTitle1
.
TabIndex
=
2
;
//
//
// button3
//
this
.
button3
.
Location
=
new
System
.
Drawing
.
Point
(
440
,
364
);
this
.
button3
.
Name
=
"button3"
;
this
.
button3
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button3
.
TabIndex
=
3
;
this
.
button3
.
Text
=
"button3"
;
this
.
button3
.
UseVisualStyleBackColor
=
true
;
this
.
button3
.
Click
+=
new
System
.
EventHandler
(
this
.
Button3_Click
);
//
// button4
//
this
.
button4
.
Location
=
new
System
.
Drawing
.
Point
(
544
,
364
);
this
.
button4
.
Name
=
"button4"
;
this
.
button4
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button4
.
TabIndex
=
4
;
this
.
button4
.
Text
=
"button4"
;
this
.
button4
.
UseVisualStyleBackColor
=
true
;
this
.
button4
.
Click
+=
new
System
.
EventHandler
(
this
.
Button4_Click
);
//
// TestForm
// TestForm
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
800
,
583
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
800
,
583
);
this
.
Controls
.
Add
(
this
.
button4
);
this
.
Controls
.
Add
(
this
.
button3
);
this
.
Controls
.
Add
(
this
.
gcTitle1
);
this
.
Controls
.
Add
(
this
.
gcTitle1
);
this
.
Controls
.
Add
(
this
.
button2
);
this
.
Controls
.
Add
(
this
.
button2
);
this
.
Controls
.
Add
(
this
.
button1
);
this
.
Controls
.
Add
(
this
.
button1
);
...
@@ -80,5 +104,7 @@
...
@@ -80,5 +104,7 @@
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
Button
button2
;
private
System
.
Windows
.
Forms
.
Button
button2
;
private
Controls
.
GCTitle
gcTitle1
;
private
Controls
.
GCTitle
gcTitle1
;
private
System
.
Windows
.
Forms
.
Button
button3
;
private
System
.
Windows
.
Forms
.
Button
button4
;
}
}
}
}
\ No newline at end of file
GcDevicePc/TestForm.cs
View file @
2f1c2e54
using
GcDevicePc.ConfigMethod
;
using
GcDevicePc.Common
;
using
GcDevicePc.ConfigMethod
;
using
GcDevicePc.Controls
;
using
GcDevicePc.Controls
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
@@ -79,6 +80,7 @@ namespace GcDevicePc
...
@@ -79,6 +80,7 @@ namespace GcDevicePc
private
void
btnShow_Click
(
object
sender
,
EventArgs
e
)
private
void
btnShow_Click
(
object
sender
,
EventArgs
e
)
{
{
//loadingCtl.TipsInfo = "提示信息";
//loadingCtl.TipsInfo = "提示信息";
////显示加载动画
////显示加载动画
//loadingCtl.ShowLoading(this);
//loadingCtl.ShowLoading(this);
...
@@ -89,21 +91,28 @@ namespace GcDevicePc
...
@@ -89,21 +91,28 @@ namespace GcDevicePc
//(this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 4;
//(this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 4;
//kailiang
//kailiang
if
(
form1
==
null
)
//if (form1 == null)
{
//{
form1
=
new
Form1
(
"asdasdasdsa"
);
// form1 = new Form1("asdasdasdsa");
form1
.
Show
();
// form1.Show();
//}
//else if(form1.IsDisposed)
//{
// form1 = new Form1("asdasdasdsa");
// form1.Show();
//}
//else
//{
// form1.Activate();
//}
//string savefilename = "C:\\Users\\24042\\Pictures\\新建文件夹\\test11.hw";
//TWFile twfile = new TWFile(savefilename);
//twfile.TW_Open();
//twfile.TW_Close(0);
}
else
if
(
form1
.
IsDisposed
)
{
form1
=
new
Form1
(
"asdasdasdsa"
);
form1
.
Show
();
}
else
{
form1
.
Activate
();
}
}
}
...
@@ -117,5 +126,15 @@ namespace GcDevicePc
...
@@ -117,5 +126,15 @@ namespace GcDevicePc
//LMessageBox box = new LMessageBox();
//LMessageBox box = new LMessageBox();
//box.Show(100, 100, this.Location, true, "1230", "3214", LMessageBox.MessageBoxType.MBT_ButtonOK);
//box.Show(100, 100, this.Location, true, "1230", "3214", LMessageBox.MessageBoxType.MBT_ButtonOK);
}
}
private
void
Button3_Click
(
object
sender
,
EventArgs
e
)
{
}
private
void
Button4_Click
(
object
sender
,
EventArgs
e
)
{
}
}
}
}
}
GcDevicePc/UI/picture/色谱3.png
0 → 100644
View file @
2f1c2e54
170 KB
GcDevicePc/UserConfig.Designer.cs
View file @
2f1c2e54
...
@@ -30,6 +30,8 @@
...
@@ -30,6 +30,8 @@
{
{
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
UserConfig
));
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
UserConfig
));
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
cmbMeshport
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
label15
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label8
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label8
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label7
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label7
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
mac6
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
mac6
=
new
System
.
Windows
.
Forms
.
TextBox
();
...
@@ -69,8 +71,6 @@
...
@@ -69,8 +71,6 @@
this
.
label12
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label12
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox7
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox7
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
permin
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
permin
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
label15
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
cmbMeshport
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
...
@@ -106,6 +106,24 @@
...
@@ -106,6 +106,24 @@
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"通讯配置"
;
this
.
groupBox1
.
Text
=
"通讯配置"
;
//
//
// cmbMeshport
//
this
.
cmbMeshport
.
FormattingEnabled
=
true
;
this
.
cmbMeshport
.
Location
=
new
System
.
Drawing
.
Point
(
97
,
21
);
this
.
cmbMeshport
.
Name
=
"cmbMeshport"
;
this
.
cmbMeshport
.
Size
=
new
System
.
Drawing
.
Size
(
148
,
20
);
this
.
cmbMeshport
.
TabIndex
=
15
;
this
.
cmbMeshport
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
cmbMeshport_SelectedIndexChanged
);
//
// label15
//
this
.
label15
.
AutoSize
=
true
;
this
.
label15
.
Location
=
new
System
.
Drawing
.
Point
(
43
,
26
);
this
.
label15
.
Name
=
"label15"
;
this
.
label15
.
Size
=
new
System
.
Drawing
.
Size
(
47
,
12
);
this
.
label15
.
TabIndex
=
14
;
this
.
label15
.
Text
=
"网 口:"
;
//
// label8
// label8
//
//
this
.
label8
.
AutoSize
=
true
;
this
.
label8
.
AutoSize
=
true
;
...
@@ -313,6 +331,7 @@
...
@@ -313,6 +331,7 @@
// runsingle
// runsingle
//
//
this
.
runsingle
.
AutoSize
=
true
;
this
.
runsingle
.
AutoSize
=
true
;
this
.
runsingle
.
Enabled
=
false
;
this
.
runsingle
.
Location
=
new
System
.
Drawing
.
Point
(
11
,
20
);
this
.
runsingle
.
Location
=
new
System
.
Drawing
.
Point
(
11
,
20
);
this
.
runsingle
.
Name
=
"runsingle"
;
this
.
runsingle
.
Name
=
"runsingle"
;
this
.
runsingle
.
Size
=
new
System
.
Drawing
.
Size
(
72
,
16
);
this
.
runsingle
.
Size
=
new
System
.
Drawing
.
Size
(
72
,
16
);
...
@@ -320,6 +339,7 @@
...
@@ -320,6 +339,7 @@
this
.
runsingle
.
Tag
=
"0"
;
this
.
runsingle
.
Tag
=
"0"
;
this
.
runsingle
.
Text
=
"单次分析"
;
this
.
runsingle
.
Text
=
"单次分析"
;
this
.
runsingle
.
UseVisualStyleBackColor
=
true
;
this
.
runsingle
.
UseVisualStyleBackColor
=
true
;
this
.
runsingle
.
Visible
=
false
;
this
.
runsingle
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
autorun_CheckedChanged
);
this
.
runsingle
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
autorun_CheckedChanged
);
//
//
// groupBox4
// groupBox4
...
@@ -502,24 +522,6 @@
...
@@ -502,24 +522,6 @@
this
.
permin
.
UseVisualStyleBackColor
=
true
;
this
.
permin
.
UseVisualStyleBackColor
=
true
;
this
.
permin
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
permin_CheckedChanged
);
this
.
permin
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
permin_CheckedChanged
);
//
//
// label15
//
this
.
label15
.
AutoSize
=
true
;
this
.
label15
.
Location
=
new
System
.
Drawing
.
Point
(
43
,
26
);
this
.
label15
.
Name
=
"label15"
;
this
.
label15
.
Size
=
new
System
.
Drawing
.
Size
(
47
,
12
);
this
.
label15
.
TabIndex
=
14
;
this
.
label15
.
Text
=
"网 口:"
;
//
// cmbMeshport
//
this
.
cmbMeshport
.
FormattingEnabled
=
true
;
this
.
cmbMeshport
.
Location
=
new
System
.
Drawing
.
Point
(
97
,
21
);
this
.
cmbMeshport
.
Name
=
"cmbMeshport"
;
this
.
cmbMeshport
.
Size
=
new
System
.
Drawing
.
Size
(
148
,
20
);
this
.
cmbMeshport
.
TabIndex
=
15
;
this
.
cmbMeshport
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
cmbMeshport_SelectedIndexChanged
);
//
// UserConfig
// UserConfig
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
...
...
GcDevicePc/UserConfig.cs
View file @
2f1c2e54
...
@@ -42,12 +42,13 @@ namespace GcDevicePc
...
@@ -42,12 +42,13 @@ namespace GcDevicePc
chk
.
Checked
=
false
;
chk
.
Checked
=
false
;
}
}
if
(
int
.
Parse
((
sender
as
CheckBox
).
Tag
.
ToString
())
==
0
)
//
if( int.Parse((sender as CheckBox).Tag.ToString()) == 0)
{
//
{
test
.
INIWriteValue
(
file
,
"StartUp"
,
"打开系统"
,
"1"
);
//
test.INIWriteValue(file, "StartUp", "打开系统", "1");
test
.
INIWriteValue
(
file
,
"StartUp"
,
"运行类型"
,
"0"
);
//
test.INIWriteValue(file, "StartUp", "运行类型", "0");
}
else
if
(
int
.
Parse
((
sender
as
CheckBox
).
Tag
.
ToString
())
==
1
)
//}else
if
(
int
.
Parse
((
sender
as
CheckBox
).
Tag
.
ToString
())
==
1
)
{
{
test
.
INIWriteValue
(
file
,
"StartUp"
,
"打开系统"
,
"1"
);
test
.
INIWriteValue
(
file
,
"StartUp"
,
"打开系统"
,
"1"
);
test
.
INIWriteValue
(
file
,
"StartUp"
,
"运行类型"
,
"1"
);
test
.
INIWriteValue
(
file
,
"StartUp"
,
"运行类型"
,
"1"
);
...
@@ -55,11 +56,12 @@ namespace GcDevicePc
...
@@ -55,11 +56,12 @@ namespace GcDevicePc
{
{
test
.
INIWriteValue
(
file
,
"StartUp"
,
"打开系统"
,
"1"
);
test
.
INIWriteValue
(
file
,
"StartUp"
,
"打开系统"
,
"1"
);
test
.
INIWriteValue
(
file
,
"StartUp"
,
"运行类型"
,
"2"
);
test
.
INIWriteValue
(
file
,
"StartUp"
,
"运行类型"
,
"2"
);
}
else
{
test
.
INIWriteValue
(
file
,
"StartUp"
,
"打开系统"
,
"0"
);
test
.
INIWriteValue
(
file
,
"StartUp"
,
"运行类型"
,
"0"
);
}
}
//else
// {
// test.INIWriteValue(file, "StartUp", "打开系统", "0");
// test.INIWriteValue(file, "StartUp", "运行类型", "0");
// }
}
}
foreach
(
CheckBox
chk
in
this
.
groupBox3
.
Controls
)
foreach
(
CheckBox
chk
in
this
.
groupBox3
.
Controls
)
...
@@ -218,11 +220,12 @@ namespace GcDevicePc
...
@@ -218,11 +220,12 @@ namespace GcDevicePc
if
(
Convert
.
ToInt32
(
opensys
)
==
1
)
if
(
Convert
.
ToInt32
(
opensys
)
==
1
)
{
{
if
(
Convert
.
ToInt32
(
runtype
)
==
0
)
//if(Convert.ToInt32(runtype) == 0)
{
//{
this
.
runsingle
.
Checked
=
true
;
// this.runsingle.Checked = true;
}
//}
else
if
(
Convert
.
ToInt32
(
runtype
)
==
2
)
//else
if
(
Convert
.
ToInt32
(
runtype
)
==
2
)
{
{
this
.
runbat
.
Checked
=
true
;
this
.
runbat
.
Checked
=
true
;
}
}
...
@@ -354,13 +357,25 @@ namespace GcDevicePc
...
@@ -354,13 +357,25 @@ namespace GcDevicePc
//}
//}
bool
ret
=
false
;
bool
ret
=
false
;
string
newMac
=
string
.
Format
(
String
.
Format
(
"{0:X2}:{1:X2}:{2:X2}:{3:X2}:{4:X2}:{5:X2}"
,
mac1
.
Text
,
mac2
.
Text
,
mac3
.
Text
,
mac4
.
Text
,
mac5
.
Text
,
mac6
.
Text
));
//string file = globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.RunFolder + "\\startup.ini";
//string file = globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.RunFolder + "\\startup.ini";
string
file
=
Path
.
Combine
(
Path
.
GetDirectoryName
(
System
.
Windows
.
Forms
.
Application
.
StartupPath
),
"GC_Config\\GC_Set\\启动参数\\startup.ini"
);
string
file
=
Path
.
Combine
(
Path
.
GetDirectoryName
(
System
.
Windows
.
Forms
.
Application
.
StartupPath
),
"GC_Config\\GC_Set\\启动参数\\startup.ini"
);
INIOperation
test
=
new
INIOperation
(
file
);
INIOperation
test
=
new
INIOperation
(
file
);
string
newMac
=
string
.
Empty
;
if
(
string
.
IsNullOrEmpty
(
mac1
.
Text
)
||
string
.
IsNullOrEmpty
(
mac2
.
Text
)
||
string
.
IsNullOrEmpty
(
mac3
.
Text
)
||
string
.
IsNullOrEmpty
(
mac4
.
Text
)
||
string
.
IsNullOrEmpty
(
mac5
.
Text
)
||
string
.
IsNullOrEmpty
(
mac6
.
Text
))
{
ret
=
test
.
INIWriteValue
(
file
,
"NetWorkConfig"
,
"MAC地址"
,
newMac
);
MessageBox
.
Show
(
"mac输入有误,已解除mac绑定,请重启软件"
);
}
else
{
newMac
=
string
.
Format
(
String
.
Format
(
"{0:X2}:{1:X2}:{2:X2}:{3:X2}:{4:X2}:{5:X2}"
,
mac1
.
Text
,
mac2
.
Text
,
mac3
.
Text
,
mac4
.
Text
,
mac5
.
Text
,
mac6
.
Text
));
ret
=
test
.
INIWriteValue
(
file
,
"NetWorkConfig"
,
"MAC地址"
,
newMac
);
ret
=
test
.
INIWriteValue
(
file
,
"NetWorkConfig"
,
"MAC地址"
,
newMac
);
if
(
ret
)
if
(
ret
)
...
@@ -373,6 +388,9 @@ namespace GcDevicePc
...
@@ -373,6 +388,9 @@ namespace GcDevicePc
}
}
}
}
}
private
void
changip_Click
(
object
sender
,
EventArgs
e
)
private
void
changip_Click
(
object
sender
,
EventArgs
e
)
{
{
UdpClient
client
=
new
UdpClient
(
new
IPEndPoint
(
IPAddress
.
Any
,
0
));
UdpClient
client
=
new
UdpClient
(
new
IPEndPoint
(
IPAddress
.
Any
,
0
));
...
@@ -580,7 +598,7 @@ namespace GcDevicePc
...
@@ -580,7 +598,7 @@ namespace GcDevicePc
{
{
//string file = globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.RunFolder + "\\startup.ini";
//string file = globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.RunFolder + "\\startup.ini";
string
file
=
Path
.
Combine
(
Path
.
GetDirectoryName
(
System
.
Windows
.
Forms
.
Application
.
StartupPath
),
"GC_Config\\GC_Set\\启动参数\\startup.ini"
);
string
file
=
Path
.
Combine
(
Path
.
GetDirectoryName
(
Application
.
StartupPath
),
"GC_Config\\GC_Set\\启动参数\\startup.ini"
);
try
try
{
{
...
...
GcDevicePc/auxtool.Designer.cs
View file @
2f1c2e54
...
@@ -64,8 +64,6 @@
...
@@ -64,8 +64,6 @@
this
.
hair_a1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
hair_a1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
hair_h1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
hair_h1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox5
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox5
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
tcdset3
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tcdset2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label13
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label13
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label12
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label12
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
tcddac3
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
tcddac3
=
new
System
.
Windows
.
Forms
.
TextBox
();
...
@@ -74,20 +72,19 @@
...
@@ -74,20 +72,19 @@
this
.
label10
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label10
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label9
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label9
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label8
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label8
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox6
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
tcd2_sw
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tcd2_sw
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tcd3_sw
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tcd3_sw
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tcd1_sw
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tcd1_sw
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tcdset1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tcddac1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
tcddac1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
fidfire
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
fidfire
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
pictureBox1
=
new
System
.
Windows
.
Forms
.
PictureBox
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
groupBox4
.
SuspendLayout
();
this
.
groupBox4
.
SuspendLayout
();
this
.
groupBox8
.
SuspendLayout
();
this
.
groupBox8
.
SuspendLayout
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox6
.
SuspendLayou
t
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
pictureBox1
)).
BeginIni
t
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// groupBox1
// groupBox1
...
@@ -131,7 +128,7 @@
...
@@ -131,7 +128,7 @@
this
.
label14
.
Name
=
"label14"
;
this
.
label14
.
Name
=
"label14"
;
this
.
label14
.
Size
=
new
System
.
Drawing
.
Size
(
119
,
12
);
this
.
label14
.
Size
=
new
System
.
Drawing
.
Size
(
119
,
12
);
this
.
label14
.
TabIndex
=
9
;
this
.
label14
.
TabIndex
=
9
;
this
.
label14
.
Text
=
"第一次点火延时(
m
):"
;
this
.
label14
.
Text
=
"第一次点火延时(
s
):"
;
//
//
// fireupbtn
// fireupbtn
//
//
...
@@ -331,14 +328,14 @@
...
@@ -331,14 +328,14 @@
// label6
// label6
//
//
this
.
label6
.
AutoSize
=
true
;
this
.
label6
.
AutoSize
=
true
;
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
427
,
35
);
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
427
,
16
);
this
.
label6
.
Name
=
"label6"
;
this
.
label6
.
Name
=
"label6"
;
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
0
,
12
);
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
0
,
12
);
this
.
label6
.
TabIndex
=
3
;
this
.
label6
.
TabIndex
=
3
;
//
//
// progressBar2
// progressBar2
//
//
this
.
progressBar2
.
Location
=
new
System
.
Drawing
.
Point
(
73
,
50
);
this
.
progressBar2
.
Location
=
new
System
.
Drawing
.
Point
(
73
,
23
);
this
.
progressBar2
.
Name
=
"progressBar2"
;
this
.
progressBar2
.
Name
=
"progressBar2"
;
this
.
progressBar2
.
Size
=
new
System
.
Drawing
.
Size
(
382
,
16
);
this
.
progressBar2
.
Size
=
new
System
.
Drawing
.
Size
(
382
,
16
);
this
.
progressBar2
.
TabIndex
=
2
;
this
.
progressBar2
.
TabIndex
=
2
;
...
@@ -346,7 +343,7 @@
...
@@ -346,7 +343,7 @@
// label5
// label5
//
//
this
.
label5
.
AutoSize
=
true
;
this
.
label5
.
AutoSize
=
true
;
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
50
);
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
23
);
this
.
label5
.
Name
=
"label5"
;
this
.
label5
.
Name
=
"label5"
;
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
12
);
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
12
);
this
.
label5
.
TabIndex
=
1
;
this
.
label5
.
TabIndex
=
1
;
...
@@ -354,7 +351,7 @@
...
@@ -354,7 +351,7 @@
//
//
// firmwareupdate
// firmwareupdate
//
//
this
.
firmwareupdate
.
Location
=
new
System
.
Drawing
.
Point
(
212
,
16
);
this
.
firmwareupdate
.
Location
=
new
System
.
Drawing
.
Point
(
212
,
55
);
this
.
firmwareupdate
.
Name
=
"firmwareupdate"
;
this
.
firmwareupdate
.
Name
=
"firmwareupdate"
;
this
.
firmwareupdate
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
firmwareupdate
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
firmwareupdate
.
TabIndex
=
0
;
this
.
firmwareupdate
.
TabIndex
=
0
;
...
@@ -417,18 +414,18 @@
...
@@ -417,18 +414,18 @@
//
//
// groupBox5
// groupBox5
//
//
this
.
groupBox5
.
Controls
.
Add
(
this
.
tcdset3
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
pictureBox1
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
tcd
set2
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
tcd
2_sw
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label13
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label13
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
tcd3_sw
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label12
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label12
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
tcd1_sw
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
tcddac3
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
tcddac3
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
tcddac2
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
tcddac2
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label11
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label11
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label10
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label10
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label9
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label9
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label8
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label8
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
groupBox6
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
tcdset1
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
tcddac1
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
tcddac1
);
this
.
groupBox5
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
155
);
this
.
groupBox5
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
155
);
this
.
groupBox5
.
Name
=
"groupBox5"
;
this
.
groupBox5
.
Name
=
"groupBox5"
;
...
@@ -437,26 +434,6 @@
...
@@ -437,26 +434,6 @@
this
.
groupBox5
.
TabStop
=
false
;
this
.
groupBox5
.
TabStop
=
false
;
this
.
groupBox5
.
Text
=
"TCD设置"
;
this
.
groupBox5
.
Text
=
"TCD设置"
;
//
//
// tcdset3
//
this
.
tcdset3
.
Location
=
new
System
.
Drawing
.
Point
(
209
,
92
);
this
.
tcdset3
.
Name
=
"tcdset3"
;
this
.
tcdset3
.
Size
=
new
System
.
Drawing
.
Size
(
51
,
23
);
this
.
tcdset3
.
TabIndex
=
12
;
this
.
tcdset3
.
Text
=
"设置"
;
this
.
tcdset3
.
UseVisualStyleBackColor
=
true
;
this
.
tcdset3
.
Click
+=
new
System
.
EventHandler
(
this
.
tcdset3_Click
);
//
// tcdset2
//
this
.
tcdset2
.
Location
=
new
System
.
Drawing
.
Point
(
207
,
61
);
this
.
tcdset2
.
Name
=
"tcdset2"
;
this
.
tcdset2
.
Size
=
new
System
.
Drawing
.
Size
(
51
,
23
);
this
.
tcdset2
.
TabIndex
=
11
;
this
.
tcdset2
.
Text
=
"设置"
;
this
.
tcdset2
.
UseVisualStyleBackColor
=
true
;
this
.
tcdset2
.
Click
+=
new
System
.
EventHandler
(
this
.
tcdset2_Click
);
//
// label13
// label13
//
//
this
.
label13
.
AutoSize
=
true
;
this
.
label13
.
AutoSize
=
true
;
...
@@ -525,21 +502,9 @@
...
@@ -525,21 +502,9 @@
this
.
label8
.
TabIndex
=
3
;
this
.
label8
.
TabIndex
=
3
;
this
.
label8
.
Text
=
"TCD(前):"
;
this
.
label8
.
Text
=
"TCD(前):"
;
//
//
// groupBox6
//
this
.
groupBox6
.
Controls
.
Add
(
this
.
tcd2_sw
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
tcd3_sw
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
tcd1_sw
);
this
.
groupBox6
.
Location
=
new
System
.
Drawing
.
Point
(
278
,
15
);
this
.
groupBox6
.
Name
=
"groupBox6"
;
this
.
groupBox6
.
Size
=
new
System
.
Drawing
.
Size
(
211
,
105
);
this
.
groupBox6
.
TabIndex
=
2
;
this
.
groupBox6
.
TabStop
=
false
;
this
.
groupBox6
.
Text
=
"桥流开关"
;
//
// tcd2_sw
// tcd2_sw
//
//
this
.
tcd2_sw
.
Location
=
new
System
.
Drawing
.
Point
(
121
,
29
);
this
.
tcd2_sw
.
Location
=
new
System
.
Drawing
.
Point
(
212
,
61
);
this
.
tcd2_sw
.
Name
=
"tcd2_sw"
;
this
.
tcd2_sw
.
Name
=
"tcd2_sw"
;
this
.
tcd2_sw
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
tcd2_sw
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
tcd2_sw
.
TabIndex
=
2
;
this
.
tcd2_sw
.
TabIndex
=
2
;
...
@@ -549,7 +514,7 @@
...
@@ -549,7 +514,7 @@
//
//
// tcd3_sw
// tcd3_sw
//
//
this
.
tcd3_sw
.
Location
=
new
System
.
Drawing
.
Point
(
71
,
70
);
this
.
tcd3_sw
.
Location
=
new
System
.
Drawing
.
Point
(
212
,
92
);
this
.
tcd3_sw
.
Name
=
"tcd3_sw"
;
this
.
tcd3_sw
.
Name
=
"tcd3_sw"
;
this
.
tcd3_sw
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
tcd3_sw
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
tcd3_sw
.
TabIndex
=
1
;
this
.
tcd3_sw
.
TabIndex
=
1
;
...
@@ -559,7 +524,7 @@
...
@@ -559,7 +524,7 @@
//
//
// tcd1_sw
// tcd1_sw
//
//
this
.
tcd1_sw
.
Location
=
new
System
.
Drawing
.
Point
(
19
,
29
);
this
.
tcd1_sw
.
Location
=
new
System
.
Drawing
.
Point
(
212
,
27
);
this
.
tcd1_sw
.
Name
=
"tcd1_sw"
;
this
.
tcd1_sw
.
Name
=
"tcd1_sw"
;
this
.
tcd1_sw
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
tcd1_sw
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
tcd1_sw
.
TabIndex
=
0
;
this
.
tcd1_sw
.
TabIndex
=
0
;
...
@@ -567,16 +532,6 @@
...
@@ -567,16 +532,6 @@
this
.
tcd1_sw
.
UseVisualStyleBackColor
=
true
;
this
.
tcd1_sw
.
UseVisualStyleBackColor
=
true
;
this
.
tcd1_sw
.
Click
+=
new
System
.
EventHandler
(
this
.
tcd1_sw_Click
);
this
.
tcd1_sw
.
Click
+=
new
System
.
EventHandler
(
this
.
tcd1_sw_Click
);
//
//
// tcdset1
//
this
.
tcdset1
.
Location
=
new
System
.
Drawing
.
Point
(
209
,
28
);
this
.
tcdset1
.
Name
=
"tcdset1"
;
this
.
tcdset1
.
Size
=
new
System
.
Drawing
.
Size
(
51
,
23
);
this
.
tcdset1
.
TabIndex
=
1
;
this
.
tcdset1
.
Text
=
"设置"
;
this
.
tcdset1
.
UseVisualStyleBackColor
=
true
;
this
.
tcdset1
.
Click
+=
new
System
.
EventHandler
(
this
.
tcdset1_Click
);
//
// tcddac1
// tcddac1
//
//
this
.
tcddac1
.
Location
=
new
System
.
Drawing
.
Point
(
85
,
29
);
this
.
tcddac1
.
Location
=
new
System
.
Drawing
.
Point
(
85
,
29
);
...
@@ -589,6 +544,16 @@
...
@@ -589,6 +544,16 @@
this
.
fidfire
.
Interval
=
1000
;
this
.
fidfire
.
Interval
=
1000
;
this
.
fidfire
.
Tick
+=
new
System
.
EventHandler
(
this
.
fidfire_Tick
);
this
.
fidfire
.
Tick
+=
new
System
.
EventHandler
(
this
.
fidfire_Tick
);
//
//
// pictureBox1
//
this
.
pictureBox1
.
Image
=
global
::
GcDevicePc
.
Properties
.
Resources
.
色谱
3
;
this
.
pictureBox1
.
Location
=
new
System
.
Drawing
.
Point
(
335
,
12
);
this
.
pictureBox1
.
Name
=
"pictureBox1"
;
this
.
pictureBox1
.
Size
=
new
System
.
Drawing
.
Size
(
139
,
114
);
this
.
pictureBox1
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
StretchImage
;
this
.
pictureBox1
.
TabIndex
=
11
;
this
.
pictureBox1
.
TabStop
=
false
;
//
// auxtool
// auxtool
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
...
@@ -619,7 +584,7 @@
...
@@ -619,7 +584,7 @@
this
.
groupBox8
.
ResumeLayout
(
false
);
this
.
groupBox8
.
ResumeLayout
(
false
);
this
.
groupBox5
.
ResumeLayout
(
false
);
this
.
groupBox5
.
ResumeLayout
(
false
);
this
.
groupBox5
.
PerformLayout
();
this
.
groupBox5
.
PerformLayout
();
this
.
groupBox6
.
ResumeLayout
(
false
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
pictureBox1
)).
EndInit
(
);
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
}
...
@@ -659,8 +624,6 @@
...
@@ -659,8 +624,6 @@
private
System
.
Windows
.
Forms
.
TextBox
firstfiredelay
;
private
System
.
Windows
.
Forms
.
TextBox
firstfiredelay
;
private
System
.
Windows
.
Forms
.
Label
label14
;
private
System
.
Windows
.
Forms
.
Label
label14
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox5
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox5
;
private
System
.
Windows
.
Forms
.
Button
tcdset3
;
private
System
.
Windows
.
Forms
.
Button
tcdset2
;
private
System
.
Windows
.
Forms
.
Label
label13
;
private
System
.
Windows
.
Forms
.
Label
label13
;
private
System
.
Windows
.
Forms
.
Label
label12
;
private
System
.
Windows
.
Forms
.
Label
label12
;
private
System
.
Windows
.
Forms
.
TextBox
tcddac3
;
private
System
.
Windows
.
Forms
.
TextBox
tcddac3
;
...
@@ -669,13 +632,12 @@
...
@@ -669,13 +632,12 @@
private
System
.
Windows
.
Forms
.
Label
label10
;
private
System
.
Windows
.
Forms
.
Label
label10
;
private
System
.
Windows
.
Forms
.
Label
label9
;
private
System
.
Windows
.
Forms
.
Label
label9
;
private
System
.
Windows
.
Forms
.
Label
label8
;
private
System
.
Windows
.
Forms
.
Label
label8
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox6
;
private
System
.
Windows
.
Forms
.
Button
tcd2_sw
;
private
System
.
Windows
.
Forms
.
Button
tcd2_sw
;
private
System
.
Windows
.
Forms
.
Button
tcd3_sw
;
private
System
.
Windows
.
Forms
.
Button
tcd3_sw
;
private
System
.
Windows
.
Forms
.
Button
tcd1_sw
;
private
System
.
Windows
.
Forms
.
Button
tcd1_sw
;
private
System
.
Windows
.
Forms
.
Button
tcdset1
;
private
System
.
Windows
.
Forms
.
TextBox
tcddac1
;
private
System
.
Windows
.
Forms
.
TextBox
tcddac1
;
private
System
.
Windows
.
Forms
.
Button
fireupbtnI
;
private
System
.
Windows
.
Forms
.
Button
fireupbtnI
;
private
System
.
Windows
.
Forms
.
Timer
fidfire
;
private
System
.
Windows
.
Forms
.
Timer
fidfire
;
private
System
.
Windows
.
Forms
.
PictureBox
pictureBox1
;
}
}
}
}
\ No newline at end of file
GcDevicePc/auxtool.cs
View file @
2f1c2e54
...
@@ -41,7 +41,8 @@ namespace GcDevicePc
...
@@ -41,7 +41,8 @@ namespace GcDevicePc
this
.
fireuptime
.
Text
=
time1
.
ToString
();
this
.
fireuptime
.
Text
=
time1
.
ToString
();
this
.
hvalvetime
.
Text
=
time2
.
ToString
();
this
.
hvalvetime
.
Text
=
time2
.
ToString
();
this
.
firstfiredelay
.
Text
=
(
Convert
.
ToDouble
(
time3
)
/
60
).
ToString
();
this
.
firstfiredelay
.
Text
=
time3
.
ToString
();
fidfire
.
Start
();
fidfire
.
Start
();
}
}
...
@@ -50,7 +51,7 @@ namespace GcDevicePc
...
@@ -50,7 +51,7 @@ namespace GcDevicePc
{
{
this
.
fireuptime
.
Text
=
time1
.
ToString
();
this
.
fireuptime
.
Text
=
time1
.
ToString
();
this
.
hvalvetime
.
Text
=
time2
.
ToString
();
this
.
hvalvetime
.
Text
=
time2
.
ToString
();
this
.
firstfiredelay
.
Text
=
(
Convert
.
ToDouble
(
time3
)
/
60
)
.
ToString
();
this
.
firstfiredelay
.
Text
=
time3
.
ToString
();
}
}
...
@@ -125,7 +126,7 @@ namespace GcDevicePc
...
@@ -125,7 +126,7 @@ namespace GcDevicePc
ushort
time1
=
ushort
.
Parse
(
fireuptime
.
Text
);
ushort
time1
=
ushort
.
Parse
(
fireuptime
.
Text
);
ushort
time2
=
ushort
.
Parse
(
hvalvetime
.
Text
);
ushort
time2
=
ushort
.
Parse
(
hvalvetime
.
Text
);
ushort
time3
=
Convert
.
ToUInt16
(
Convert
.
ToInt32
(
firstfiredelay
.
Text
)
*
60
);
ushort
time3
=
ushort
.
Parse
(
firstfiredelay
.
Text
);
if
(
time1
>=
time2
)
if
(
time1
>=
time2
)
{
{
auxtoolforfireup
(
0
,
time1
,
time2
,
time3
);
auxtoolforfireup
(
0
,
time1
,
time2
,
time3
);
...
@@ -575,6 +576,26 @@ namespace GcDevicePc
...
@@ -575,6 +576,26 @@ namespace GcDevicePc
private
void
tcd1_sw_Click
(
object
sender
,
EventArgs
e
)
private
void
tcd1_sw_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
String
.
IsNullOrEmpty
(
tcddac1
.
Text
))
{
MessageBox
.
Show
(
"设置值不能为空!!!"
);
}
else
{
ushort
val
=
ushort
.
Parse
(
tcddac1
.
Text
);
if
(
val
>=
0
&&
val
<
150
)
{
gctcd_setdac
(
0
,
val
);
}
else
{
MessageBox
.
Show
(
"超过设置值(0~150)!!!"
);
}
}
String
tcd1_flag
=
tcd1_sw
.
Text
;
String
tcd1_flag
=
tcd1_sw
.
Text
;
string
[]
sArray
=
tcd1_flag
.
Split
(
new
char
[
2
]
{
'('
,
')'
});
string
[]
sArray
=
tcd1_flag
.
Split
(
new
char
[
2
]
{
'('
,
')'
});
if
(
sArray
[
1
]
==
"关"
)
if
(
sArray
[
1
]
==
"关"
)
...
@@ -591,6 +612,25 @@ namespace GcDevicePc
...
@@ -591,6 +612,25 @@ namespace GcDevicePc
private
void
tcd2_sw_Click
(
object
sender
,
EventArgs
e
)
private
void
tcd2_sw_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
String
.
IsNullOrEmpty
(
tcddac2
.
Text
))
{
MessageBox
.
Show
(
"设置值不能为空!!!"
);
}
else
{
ushort
val
=
ushort
.
Parse
(
tcddac2
.
Text
);
if
(
val
>=
0
&&
val
<
150
)
{
gctcd_setdac
(
1
,
val
);
}
else
{
MessageBox
.
Show
(
"超过设置值(0~150)!!!"
);
}
}
String
tcd2_flag
=
tcd2_sw
.
Text
;
String
tcd2_flag
=
tcd2_sw
.
Text
;
string
[]
sArray
=
tcd2_flag
.
Split
(
new
char
[
2
]
{
'('
,
')'
});
string
[]
sArray
=
tcd2_flag
.
Split
(
new
char
[
2
]
{
'('
,
')'
});
if
(
sArray
[
1
]
==
"关"
)
if
(
sArray
[
1
]
==
"关"
)
...
@@ -607,6 +647,25 @@ namespace GcDevicePc
...
@@ -607,6 +647,25 @@ namespace GcDevicePc
private
void
tcd3_sw_Click
(
object
sender
,
EventArgs
e
)
private
void
tcd3_sw_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
String
.
IsNullOrEmpty
(
tcddac3
.
Text
))
{
MessageBox
.
Show
(
"设置值不能为空!!!"
);
}
else
{
ushort
val
=
ushort
.
Parse
(
tcddac3
.
Text
);
if
(
val
>=
0
&&
val
<
150
)
{
gctcd_setdac
(
2
,
val
);
}
else
{
MessageBox
.
Show
(
"超过设置值(0~150)!!!"
);
}
}
String
tcd3_flag
=
tcd3_sw
.
Text
;
String
tcd3_flag
=
tcd3_sw
.
Text
;
string
[]
sArray
=
tcd3_flag
.
Split
(
new
char
[
2
]
{
'('
,
')'
});
string
[]
sArray
=
tcd3_flag
.
Split
(
new
char
[
2
]
{
'('
,
')'
});
if
(
sArray
[
1
]
==
"关"
)
if
(
sArray
[
1
]
==
"关"
)
...
@@ -633,7 +692,7 @@ namespace GcDevicePc
...
@@ -633,7 +692,7 @@ namespace GcDevicePc
{
{
ushort
time1
=
ushort
.
Parse
(
fireuptime
.
Text
);
ushort
time1
=
ushort
.
Parse
(
fireuptime
.
Text
);
ushort
time2
=
ushort
.
Parse
(
hvalvetime
.
Text
);
ushort
time2
=
ushort
.
Parse
(
hvalvetime
.
Text
);
ushort
time3
=
Convert
.
ToUInt16
(
Convert
.
ToInt32
(
firstfiredelay
.
Text
)
*
60
);
ushort
time3
=
ushort
.
Parse
(
firstfiredelay
.
Text
);
if
(
time1
>=
time2
)
if
(
time1
>=
time2
)
{
{
...
@@ -679,6 +738,8 @@ namespace GcDevicePc
...
@@ -679,6 +738,8 @@ namespace GcDevicePc
}
}
}
}
this
.
tcd1_sw
.
Enabled
=
this
.
tcd2_sw
.
Enabled
=
this
.
tcd3_sw
.
Enabled
=
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
;
}
}
private
void
auxtool_FormClosed
(
object
sender
,
FormClosedEventArgs
e
)
private
void
auxtool_FormClosed
(
object
sender
,
FormClosedEventArgs
e
)
...
...
dll/CKVocAnalyzer.dll
View file @
2f1c2e54
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment