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
eb024034
Commit
eb024034
authored
Sep 07, 2018
by
wangjunqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加线程监控
parent
634de4fb
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1273 additions
and
215 deletions
+1273
-215
AppInit.cs
GcDevicePc/AppInit.cs
+10
-0
MoudbusOperation.cs
GcDevicePc/Common/MoudbusOperation.cs
+600
-0
ValveTab.designer.cs
GcDevicePc/ConfigMethod/ValveTab.designer.cs
+128
-197
DataState.cs
GcDevicePc/DataState.cs
+7
-10
GcDevicePc.csproj
GcDevicePc/GcDevicePc.csproj
+5
-0
MDIBase.cs
GcDevicePc/MDIBase.cs
+8
-6
ChannelDataTh.cs
GcDevicePc/ProThread/ChannelDataTh.cs
+107
-0
DisplayDataTh.cs
GcDevicePc/ProThread/DisplayDataTh.cs
+114
-0
HmiStatueTh.cs
GcDevicePc/ProThread/HmiStatueTh.cs
+108
-0
ThreadMonitor.cs
GcDevicePc/ProThread/ThreadMonitor.cs
+180
-0
StartForm.cs
GcDevicePc/StartForm.cs
+2
-0
globaldata.cs
GcDevicePc/globaldata.cs
+4
-2
No files found.
GcDevicePc/AppInit.cs
View file @
eb024034
...
...
@@ -316,5 +316,15 @@ namespace GcDevicePc
}
}
public
void
StartDataThread
()
{
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
MoudbusOperation
.
GetInstance
().
SetModbusIP
(
globaldata
.
connection_ip
);
ThreadMonitor
.
GetInstance
().
StartALLCommunication
();
ThreadMonitor
.
GetInstance
().
MonitorThStart
();
}
}
}
}
GcDevicePc/Common/MoudbusOperation.cs
0 → 100644
View file @
eb024034
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Runtime.InteropServices
;
using
System.Text
;
using
System.Threading.Tasks
;
using
GcDevicePc.ProThread
;
namespace
GcDevicePc.Common
{
class
MoudbusOperation
{
private
static
MoudbusOperation
instance
=
null
;
//静态私有成员变量
/// <summary>
/// 单实例对象锁
/// </summary>
private
static
object
_lock
=
new
object
();
#
region
单实例实现
public
static
MoudbusOperation
GetInstance
()
{
if
(
instance
==
null
)
{
lock
(
_lock
)
{
if
(
instance
==
null
)
{
instance
=
new
MoudbusOperation
();
}
}
}
return
instance
;
}
#
endregion
#
region
基础参数
flag
private
string
strIP
=
null
;
// private ushort netPost = 0;
private
bool
setflag
=
false
;
/// <summary>
/// 排序最大参数
/// </summary>
private
UInt32
fDetMax_Time
=
0
;
private
int
LoseNum
=
0
;
#
endregion
#
region
转换参数
private
struct
stFloat
{
public
ushort
usCurFloat_Word1
;
public
ushort
usCurFloat_Word2
;
}
[
StructLayout
(
LayoutKind
.
Explicit
,
Size
=
8
)]
private
struct
UNION_FLOAT
{
[
FieldOffset
(
0
)]
public
float
fCurFloat
;
[
FieldOffset
(
0
)]
public
stFloat
t
;
}
UNION_FLOAT
channel1_value
;
UNION_FLOAT
utemp
;
#
endregion
#
region
常量
private
const
ushort
modbus_port
=
502
;
//modbus端口
//Modbus地址
private
const
ushort
temp_start
=
100
;
private
const
ushort
temp_num
=
24
;
private
const
ushort
status_start
=
124
;
private
const
ushort
value_status
=
16
;
private
const
ushort
value_num
=
4
;
private
const
ushort
tenvalue_status
=
16
;
private
const
ushort
tenvalue_num
=
10
;
private
const
ushort
detfire_status
=
3
;
private
const
ushort
detfire_num
=
3
;
private
const
ushort
fireup_status
=
155
;
private
const
ushort
fireup_num
=
4
;
private
const
ushort
hmi_status
=
144
;
private
const
ushort
hmistatus_num
=
9
;
private
const
ushort
error_status
=
36
;
private
const
ushort
error_num
=
9
;
private
const
ushort
channel_start
=
160
;
private
const
ushort
channel_num
=
120
;
#
endregion
#
region
设置函数
public
void
SetModbusIP
(
string
ip
)
{
this
.
strIP
=
ip
;
this
.
setflag
=
true
;
}
#
endregion
#
region
转换函数
private
void
BubbleSort
(
ref
UInt32
[]
arr
,
ref
float
[]
value
,
int
len
,
ushort
useflag
)
{
int
i
=
0
;
int
j
=
0
;
int
k
=
len
-
1
;
int
n
=
0
;
for
(
i
=
0
;
i
<
len
-
1
;
i
++)
{
int
flag
=
1
;
n
=
0
;
for
(
j
=
0
;
j
<
k
;
j
++)
{
UInt32
tmp
=
0
;
float
tmpv
=
0.0f
;
if
(
arr
[
j
]
>
arr
[
j
+
1
])
{
tmp
=
arr
[
j
];
tmpv
=
value
[
j
];
arr
[
j
]
=
arr
[
j
+
1
];
value
[
j
]
=
value
[
j
+
1
];
arr
[
j
+
1
]
=
tmp
;
value
[
j
+
1
]
=
tmpv
;
flag
=
0
;
n
=
j
;
}
}
if
(
flag
==
1
)
break
;
k
=
n
;
}
if
(
useflag
==
0
)
{
if
((
Int32
)(
arr
[
0
]
-
fDetMax_Time
)
<
-
100000
)
{
fDetMax_Time
=
arr
[
0
];
}
}
}
#
endregion
#
region
通用函数
private
int
GetHoldingRegFloatTemp
(
ushort
address
,
ushort
num
,
ref
float
[]
temp
)
{
UInt16
[]
dest
=
new
UInt16
[
num
];
int
ret
=
0
;
if
(
setflag
)
{
ret
=
globaldata
.
global_moudbus
.
ReadHoldingReg
(
address
,
num
,
this
.
strIP
,
modbus_port
,
ref
dest
);
if
(
ret
==
0
)
{
//实时温度
for
(
int
i
=
0
;
i
<
12
;
i
+=
2
)
{
utemp
.
t
.
usCurFloat_Word1
=
dest
[
i
];
utemp
.
t
.
usCurFloat_Word2
=
dest
[
i
+
1
];
temp
[
i
/
2
]
=
utemp
.
fCurFloat
;
}
//设置温度
int
no
=
6
;
for
(
int
j
=
16
;
j
<
22
;
j
++)
{
temp
[
no
]
=
(
dest
[
j
]);
no
++;
}
}
else
{
Log
.
Info
(
"读取温度数据失败"
);
}
}
return
ret
;
}
private
int
GetHoldingReg
(
ushort
address
,
ushort
num
,
ref
UInt16
[]
state
)
{
int
ret
=
-
1
;
int
count
=
0
;
if
(
setflag
)
{
ret
=
globaldata
.
global_moudbus
.
ReadHoldingReg
(
address
,
num
,
this
.
strIP
,
modbus_port
,
ref
state
);
while
(
ret
!=
0
)
{
count
++;
if
(
count
>
3
)
break
;
ret
=
globaldata
.
global_moudbus
.
ReadHoldingReg
(
address
,
num
,
this
.
strIP
,
modbus_port
,
ref
state
);
}
}
return
ret
;
}
private
int
GetCoil
(
ushort
address
,
ushort
num
,
ref
byte
[]
temp
)
{
int
ret
=
-
1
;
if
(
setflag
)
{
ret
=
globaldata
.
global_moudbus
.
ReadCoilStatus
(
address
,
num
,
this
.
strIP
,
modbus_port
,
ref
temp
);
}
return
ret
;
}
/// <summary>
/// 获取方法开始时间
/// </summary>
/// <returns></returns>
private
UInt32
Get_Method_StartTime
()
{
UInt32
time
=
0
;
UInt32
tmp
=
0
;
int
ret
=
0
;
int
count
=
0
;
UInt16
[]
dest
=
new
UInt16
[
2
];
if
(
setflag
)
{
ret
=
globaldata
.
global_moudbus
.
ReadHoldingReg
(
88
,
2
,
this
.
strIP
,
modbus_port
,
ref
dest
);
while
(
ret
!=
0
)
{
count
++;
if
(
count
>
3
)
break
;
ret
=
globaldata
.
global_moudbus
.
ReadHoldingReg
(
88
,
2
,
this
.
strIP
,
modbus_port
,
ref
dest
);
}
if
(
ret
==
0
)
{
tmp
=
dest
[
1
];
tmp
<<=
16
;
tmp
=
tmp
+
dest
[
0
];
time
=
tmp
;
}
else
{
time
=
0
;
}
}
return
time
;
}
/// <summary>
/// 获取方法结束时间
/// </summary>
/// <returns></returns>
private
UInt32
Get_Method_EndTime
()
{
UInt32
time
=
0
;
UInt32
tmp
=
0
;
int
ret
=
0
;
int
count
=
0
;
UInt16
[]
dest
=
new
UInt16
[
2
];
if
(
this
.
setflag
)
{
ret
=
globaldata
.
global_moudbus
.
ReadHoldingReg
(
90
,
2
,
this
.
strIP
,
modbus_port
,
ref
dest
);
while
(
ret
!=
0
)
{
count
++;
if
(
count
>
3
)
break
;
ret
=
globaldata
.
global_moudbus
.
ReadHoldingReg
(
90
,
2
,
this
.
strIP
,
modbus_port
,
ref
dest
);
}
if
(
ret
==
0
)
{
tmp
=
dest
[
1
];
tmp
<<=
16
;
tmp
=
tmp
+
dest
[
0
];
time
=
tmp
;
}
else
{
time
=
0
;
}
}
return
time
;
}
#
endregion
#
region
功能函数
public
void
Get_Channel_Data
()
{
UInt16
[]
dest
=
new
UInt16
[
channel_num
];
UInt32
[]
timev
=
new
UInt32
[
30
];
float
[]
fidv
=
new
float
[
30
];
int
ret
;
if
(
this
.
setflag
)
{
ret
=
globaldata
.
global_moudbus
.
ReadHoldingReg
(
channel_start
,
channel_num
,
this
.
strIP
,
modbus_port
,
ref
dest
);
if
(
ret
==
0
)
{
UInt32
tmp
;
for
(
int
start
=
0
,
i
=
0
;
start
<
channel_num
;)
{
tmp
=
dest
[
start
+
1
];
tmp
<<=
16
;
tmp
=
tmp
+
dest
[
start
];
timev
[
i
]
=
tmp
;
channel1_value
.
t
.
usCurFloat_Word1
=
dest
[
start
+
2
];
channel1_value
.
t
.
usCurFloat_Word2
=
dest
[
start
+
3
];
fidv
[
i
]
=
channel1_value
.
fCurFloat
;
start
+=
4
;
i
++;
}
BubbleSort
(
ref
timev
,
ref
fidv
,
channel_num
/
4
,
0
);
for
(
int
i
=
0
;
i
<
channel_num
/
4
;
i
++)
{
tmp
=
timev
[
i
];
if
(
tmp
>
fDetMax_Time
)
{
fDetMax_Time
=
tmp
;
globaldata
.
m_signalbuffer
.
Channel1_Port
.
ctimer
=
tmp
;
globaldata
.
m_signalbuffer
.
Channel1_Port
.
cdata
=
fidv
[
i
];
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetValue
=
fidv
[
i
]
*
1000.0f
;
globaldata
.
m_signalbuffer
.
Draw_Port
.
Add
(
globaldata
.
m_signalbuffer
.
Channel1_Port
);
}
}
}
else
{
Log
.
Info
(
"读取信号数据失败"
);
}
}
}
/// <summary>
/// 读取所有温度
/// </summary>
public
void
GetGCTemp
()
{
float
[]
gctemp
=
new
float
[
12
]
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
try
{
if
(
GetHoldingRegFloatTemp
(
temp_start
,
temp_num
,
ref
gctemp
)
==
0
)
{
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
=
gctemp
[
0
];
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
=
gctemp
[
4
];
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPSetTemp
=
gctemp
[
6
];
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPSetTemp
=
gctemp
[
10
];
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
ColActualTemp
=
gctemp
[
3
];
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
ColSetTemp
=
gctemp
[
9
];
//前检测器
if
(
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16DetFront
==
1
)
{
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
=
gctemp
[
1
];
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetSetTemp
=
gctemp
[
7
];
}
//中检测器
if
(
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16DetInter
==
1
)
{
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
=
gctemp
[
2
];
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetSetTemp
=
gctemp
[
8
];
}
//后检测器
if
(
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16DetBehind
==
1
)
{
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetActualTemp
=
gctemp
[
5
];
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetSetTemp
=
gctemp
[
11
];
}
//辅助加热器
if
(
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16AuxHeaterNum
>
0
)
{
//共享中检测器
if
(
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16AuxHeater1
==
1
)
//TCD
{
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp1
=
gctemp
[
2
];
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxSetTemp1
=
gctemp
[
8
];
}
//共享后检测器
if
(
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16AuxHeater2
==
1
)
{
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp2
=
gctemp
[
5
];
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxSetTemp2
=
gctemp
[
11
];
}
}
}
}
catch
(
Exception
e
)
{
Log
.
Error
(
e
.
Message
);
}
}
/// <summary>
/// 读取阀状态
/// </summary>
public
void
GetValveState
()
{
byte
[]
valvestate
=
new
byte
[
4
];
try
{
if
(
GetCoil
(
value_status
,
value_num
,
ref
valvestate
)
==
0
)
{
globaldata
.
m_dpbuffer
.
ShowList
.
showValve
.
u16ValveOne
=
(((
valvestate
[
0
]
>>
0
)
&
0x1
)
==
1
)
?
true
:
false
;
globaldata
.
m_dpbuffer
.
ShowList
.
showValve
.
u16ValveTwo
=
(((
valvestate
[
0
]
>>
1
)
&
0x1
)
==
1
)
?
true
:
false
;
globaldata
.
m_dpbuffer
.
ShowList
.
showValve
.
u16ValveThree
=
(((
valvestate
[
0
]
>>
2
)
&
0x1
)
==
1
)
?
true
:
false
;
globaldata
.
m_dpbuffer
.
ShowList
.
showValve
.
u16ValveFour
=
(((
valvestate
[
0
]
>>
3
)
&
0x1
)
==
1
)
?
true
:
false
;
}
else
{
Log
.
Info
(
"阀数据读取失败"
);
}
}
catch
(
Exception
e
)
{
Log
.
Error
(
e
.
Message
);
}
}
/// <summary>
///
/// </summary>
public
void
GetALLSWState
()
{
byte
[]
tenstate
=
new
byte
[
2
]
{
0
,
0
};
try
{
if
(
GetCoil
(
tenvalue_status
,
tenvalue_num
,
ref
tenstate
)
==
0
)
{
//十路阀
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
if
(
i
<
8
)
globaldata
.
m_hmibuffer
.
gcinfo
.
TenRelay
[
i
]
=
(
byte
)((((
tenstate
[
0
]
>>
i
)
&
0x1
)
==
1
)
?
1
:
0
);
else
globaldata
.
m_hmibuffer
.
gcinfo
.
TenRelay
[
i
]
=
(
byte
)((((
tenstate
[
1
]
>>
(
i
-
8
))
&
0x1
)
==
1
)
?
1
:
0
);
}
//扩展阀5,6
globaldata
.
m_dpbuffer
.
ShowList
.
showValve
.
u16ValveFive
=
(((
tenstate
[
1
]
>>
1
)
&
0x1
)
==
1
)
?
true
:
false
;
globaldata
.
m_dpbuffer
.
ShowList
.
showValve
.
u16ValveSix
=
(((
tenstate
[
1
]
>>
0
)
&
0x1
)
==
1
)
?
true
:
false
;
}
}
catch
(
Exception
e
)
{
Log
.
Error
(
e
.
Message
);
}
}
/// <summary>
/// 点火状态
/// </summary>
public
void
GetFireState
()
{
byte
[]
detstate
=
new
byte
[
3
];
ushort
[]
firestate
=
new
ushort
[
4
];
try
{
//开关状态
if
(
GetCoil
(
detfire_status
,
detfire_num
,
ref
detstate
)
==
0
)
{
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetSwitch
=
((((
detstate
[
0
]
>>
0
)
&
0x1
)
==
1
)
?
true
:
false
);
}
else
{
Log
.
Info
(
"点火获取失败"
);
}
if
(
GetHoldingReg
(
fireup_status
,
fireup_num
,
ref
firestate
)
==
0
)
{
globaldata
.
m_hmibuffer
.
gcinfo
.
FireStatus
[
0
]
=
firestate
[
0
];
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetStatue
=
firestate
[
0
];
}
else
{
Log
.
Info
(
"点火状态获取失败"
);
}
}
catch
(
Exception
e
)
{
Log
.
Error
(
e
.
Message
);
}
}
public
void
GetErrorState
()
{
byte
[]
errstate
=
new
byte
[
2
]
{
0
,
0
};
try
{
if
(
GetCoil
(
error_status
,
error_num
,
ref
errstate
)
==
0
)
{
for
(
int
i
=
0
;
i
<
error_num
;
i
++)
{
globaldata
.
m_hmibuffer
.
gcinfo
.
ErrorStatus
[
i
]
=
(
byte
)((((
errstate
[
0
]
>>
i
)
&
0x1
)
==
1
)
?
1
:
0
);
}
}
}
catch
(
Exception
e
)
{
Log
.
Error
(
e
.
Message
);
}
}
private
int
GetHMIState
(
ref
ushort
[]
state
)
{
int
ret
=
-
1
;
try
{
ret
=
GetHoldingReg
(
hmi_status
,
hmistatus_num
,
ref
state
);
if
(
ret
!=
0
)
{
LoseNum
++;
if
(
LoseNum
>
5
)
{
globaldata
.
m_hmibuffer
.
gcinfo
.
hmioffline
=
true
;
}
}
else
{
globaldata
.
m_hmibuffer
.
gcinfo
.
hmioffline
=
false
;
LoseNum
=
0
;
}
}
catch
(
Exception
e
)
{
Log
.
Error
(
e
.
Message
);
}
return
ret
;
}
/// <summary>
/// 获取HMI状态
/// </summary>
public
void
GetHMIStatusData
()
{
UInt16
[]
hmistate
=
new
UInt16
[
9
];
int
ret
=
-
1
;
ret
=
GetHMIState
(
ref
hmistate
);
if
(
ret
==
0
)
{
globaldata
.
m_hmibuffer
.
gcinfo
.
batno
=
hmistate
[
0
];
globaldata
.
m_hmibuffer
.
gcinfo
.
batruncount
=
hmistate
[
1
];
globaldata
.
m_hmibuffer
.
gcinfo
.
oneruntime
=
hmistate
[
2
];
globaldata
.
m_hmibuffer
.
gcinfo
.
singlerun
=
hmistate
[
3
];
globaldata
.
m_hmibuffer
.
gcinfo
.
batrun
=
hmistate
[
4
];
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
=
hmistate
[
5
];
globaldata
.
m_hmibuffer
.
gcinfo
.
waitstart
=
hmistate
[
6
];
globaldata
.
m_hmibuffer
.
gcinfo
.
hmistatus
=
hmistate
[
7
];
globaldata
.
m_hmibuffer
.
gcinfo
.
runtime
=
hmistate
[
8
];
//额外设置
globaldata
.
m_dpbuffer
.
ShowList
.
showtime
.
runtimenow
=
hmistate
[
2
];
globaldata
.
m_dpbuffer
.
ShowList
.
showtime
.
alltime
=
hmistate
[
8
];
//获取开始时间
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
4
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
5
)
{
globaldata
.
m_hmibuffer
.
gcinfo
.
NowStartTime
=
Get_Method_StartTime
();
}
//获取结束时间
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
<=
3
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
>
5
)
{
globaldata
.
m_hmibuffer
.
gcinfo
.
NowEndTime
=
Get_Method_EndTime
();
}
}
else
{
Log
.
Info
(
"HMI状态获取失败"
);
}
}
#
endregion
}
}
GcDevicePc/ConfigMethod/ValveTab.designer.cs
View file @
eb024034
...
...
@@ -101,20 +101,18 @@
// label1
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
48
,
22
);
this
.
label1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
0
,
4
,
0
);
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
32
,
13
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
73
,
20
);
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
12
);
this
.
label1
.
TabIndex
=
0
;
this
.
label1
.
Text
=
"阀数量:"
;
//
// Valvenum
//
this
.
Valvenum
.
AutoSize
=
true
;
this
.
Valvenum
.
Location
=
new
System
.
Drawing
.
Point
(
142
,
22
);
this
.
Valvenum
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
0
,
4
,
0
);
this
.
Valvenum
.
Location
=
new
System
.
Drawing
.
Point
(
95
,
13
);
this
.
Valvenum
.
Name
=
"Valvenum"
;
this
.
Valvenum
.
Size
=
new
System
.
Drawing
.
Size
(
1
8
,
20
);
this
.
Valvenum
.
Size
=
new
System
.
Drawing
.
Size
(
1
1
,
12
);
this
.
Valvenum
.
TabIndex
=
0
;
this
.
Valvenum
.
Text
=
"0"
;
//
...
...
@@ -129,94 +127,83 @@
this
.
groupBox1
.
Controls
.
Add
(
this
.
valve_1_start3
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
valve_1_start1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
valvesw1
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
15
,
70
);
this
.
groupBox1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
42
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
267
,
197
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
178
,
118
);
this
.
groupBox1
.
TabIndex
=
1
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"阀1"
;
//
// valve_1_end2
//
this
.
valve_1_end2
.
Location
=
new
System
.
Drawing
.
Point
(
75
,
135
);
this
.
valve_1_end2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_1_end2
.
Location
=
new
System
.
Drawing
.
Point
(
50
,
81
);
this
.
valve_1_end2
.
Name
=
"valve_1_end2"
;
this
.
valve_1_end2
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_1_end2
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_1_end2
.
TabIndex
=
2
;
this
.
valve_1_end2
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_1_start2
//
this
.
valve_1_start2
.
Location
=
new
System
.
Drawing
.
Point
(
75
,
75
);
this
.
valve_1_start2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_1_start2
.
Location
=
new
System
.
Drawing
.
Point
(
50
,
45
);
this
.
valve_1_start2
.
Name
=
"valve_1_start2"
;
this
.
valve_1_start2
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_1_start2
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_1_start2
.
TabIndex
=
2
;
this
.
valve_1_start2
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_1_end4
//
this
.
valve_1_end4
.
Location
=
new
System
.
Drawing
.
Point
(
204
,
135
);
this
.
valve_1_end4
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_1_end4
.
Location
=
new
System
.
Drawing
.
Point
(
136
,
81
);
this
.
valve_1_end4
.
Name
=
"valve_1_end4"
;
this
.
valve_1_end4
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_1_end4
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_1_end4
.
TabIndex
=
2
;
this
.
valve_1_end4
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_1_end3
//
this
.
valve_1_end3
.
Location
=
new
System
.
Drawing
.
Point
(
140
,
135
);
this
.
valve_1_end3
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_1_end3
.
Location
=
new
System
.
Drawing
.
Point
(
93
,
81
);
this
.
valve_1_end3
.
Name
=
"valve_1_end3"
;
this
.
valve_1_end3
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_1_end3
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_1_end3
.
TabIndex
=
2
;
this
.
valve_1_end3
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_1_start4
//
this
.
valve_1_start4
.
Location
=
new
System
.
Drawing
.
Point
(
204
,
75
);
this
.
valve_1_start4
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_1_start4
.
Location
=
new
System
.
Drawing
.
Point
(
136
,
45
);
this
.
valve_1_start4
.
Name
=
"valve_1_start4"
;
this
.
valve_1_start4
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_1_start4
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_1_start4
.
TabIndex
=
2
;
this
.
valve_1_start4
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_1_end1
//
this
.
valve_1_end1
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
135
);
this
.
valve_1_end1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_1_end1
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
81
);
this
.
valve_1_end1
.
Name
=
"valve_1_end1"
;
this
.
valve_1_end1
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_1_end1
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_1_end1
.
TabIndex
=
2
;
this
.
valve_1_end1
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_1_start3
//
this
.
valve_1_start3
.
Location
=
new
System
.
Drawing
.
Point
(
140
,
75
);
this
.
valve_1_start3
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_1_start3
.
Location
=
new
System
.
Drawing
.
Point
(
93
,
45
);
this
.
valve_1_start3
.
Name
=
"valve_1_start3"
;
this
.
valve_1_start3
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_1_start3
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_1_start3
.
TabIndex
=
2
;
this
.
valve_1_start3
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_1_start1
//
this
.
valve_1_start1
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
75
);
this
.
valve_1_start1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_1_start1
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
45
);
this
.
valve_1_start1
.
Name
=
"valve_1_start1"
;
this
.
valve_1_start1
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_1_start1
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_1_start1
.
TabIndex
=
2
;
this
.
valve_1_start1
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valvesw1
//
this
.
valvesw1
.
AutoSize
=
true
;
this
.
valvesw1
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
33
);
this
.
valvesw1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valvesw1
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
20
);
this
.
valvesw1
.
Name
=
"valvesw1"
;
this
.
valvesw1
.
Size
=
new
System
.
Drawing
.
Size
(
83
,
24
);
this
.
valvesw1
.
Size
=
new
System
.
Drawing
.
Size
(
60
,
16
);
this
.
valvesw1
.
TabIndex
=
0
;
this
.
valvesw1
.
Tag
=
"1"
;
this
.
valvesw1
.
Text
=
"阀开关"
;
...
...
@@ -233,94 +220,83 @@
this
.
groupBox2
.
Controls
.
Add
(
this
.
valve_2_start3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
valve_2_start1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
valvesw2
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
309
,
70
);
this
.
groupBox2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
206
,
42
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
267
,
197
);
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
178
,
118
);
this
.
groupBox2
.
TabIndex
=
1
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"阀2"
;
//
// valve_2_end2
//
this
.
valve_2_end2
.
Location
=
new
System
.
Drawing
.
Point
(
76
,
135
);
this
.
valve_2_end2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_2_end2
.
Location
=
new
System
.
Drawing
.
Point
(
51
,
81
);
this
.
valve_2_end2
.
Name
=
"valve_2_end2"
;
this
.
valve_2_end2
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_2_end2
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_2_end2
.
TabIndex
=
2
;
this
.
valve_2_end2
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_2_start2
//
this
.
valve_2_start2
.
Location
=
new
System
.
Drawing
.
Point
(
76
,
72
);
this
.
valve_2_start2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_2_start2
.
Location
=
new
System
.
Drawing
.
Point
(
51
,
43
);
this
.
valve_2_start2
.
Name
=
"valve_2_start2"
;
this
.
valve_2_start2
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_2_start2
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_2_start2
.
TabIndex
=
2
;
this
.
valve_2_start2
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_2_end4
//
this
.
valve_2_end4
.
Location
=
new
System
.
Drawing
.
Point
(
206
,
135
);
this
.
valve_2_end4
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_2_end4
.
Location
=
new
System
.
Drawing
.
Point
(
137
,
81
);
this
.
valve_2_end4
.
Name
=
"valve_2_end4"
;
this
.
valve_2_end4
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_2_end4
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_2_end4
.
TabIndex
=
2
;
this
.
valve_2_end4
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_2_end3
//
this
.
valve_2_end3
.
Location
=
new
System
.
Drawing
.
Point
(
141
,
135
);
this
.
valve_2_end3
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_2_end3
.
Location
=
new
System
.
Drawing
.
Point
(
94
,
81
);
this
.
valve_2_end3
.
Name
=
"valve_2_end3"
;
this
.
valve_2_end3
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_2_end3
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_2_end3
.
TabIndex
=
2
;
this
.
valve_2_end3
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_2_start4
//
this
.
valve_2_start4
.
Location
=
new
System
.
Drawing
.
Point
(
206
,
72
);
this
.
valve_2_start4
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_2_start4
.
Location
=
new
System
.
Drawing
.
Point
(
137
,
43
);
this
.
valve_2_start4
.
Name
=
"valve_2_start4"
;
this
.
valve_2_start4
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_2_start4
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_2_start4
.
TabIndex
=
2
;
this
.
valve_2_start4
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_2_end1
//
this
.
valve_2_end1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
135
);
this
.
valve_2_end1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_2_end1
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
81
);
this
.
valve_2_end1
.
Name
=
"valve_2_end1"
;
this
.
valve_2_end1
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_2_end1
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_2_end1
.
TabIndex
=
2
;
this
.
valve_2_end1
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_2_start3
//
this
.
valve_2_start3
.
Location
=
new
System
.
Drawing
.
Point
(
141
,
72
);
this
.
valve_2_start3
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_2_start3
.
Location
=
new
System
.
Drawing
.
Point
(
94
,
43
);
this
.
valve_2_start3
.
Name
=
"valve_2_start3"
;
this
.
valve_2_start3
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_2_start3
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_2_start3
.
TabIndex
=
2
;
this
.
valve_2_start3
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_2_start1
//
this
.
valve_2_start1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
72
);
this
.
valve_2_start1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_2_start1
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
43
);
this
.
valve_2_start1
.
Name
=
"valve_2_start1"
;
this
.
valve_2_start1
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_2_start1
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_2_start1
.
TabIndex
=
2
;
this
.
valve_2_start1
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valvesw2
//
this
.
valvesw2
.
AutoSize
=
true
;
this
.
valvesw2
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
33
);
this
.
valvesw2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valvesw2
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
20
);
this
.
valvesw2
.
Name
=
"valvesw2"
;
this
.
valvesw2
.
Size
=
new
System
.
Drawing
.
Size
(
83
,
24
);
this
.
valvesw2
.
Size
=
new
System
.
Drawing
.
Size
(
60
,
16
);
this
.
valvesw2
.
TabIndex
=
0
;
this
.
valvesw2
.
Tag
=
"2"
;
this
.
valvesw2
.
Text
=
"阀开关"
;
...
...
@@ -337,94 +313,83 @@
this
.
groupBox4
.
Controls
.
Add
(
this
.
valve_4_start3
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
valve_4_start1
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
valvesw4
);
this
.
groupBox4
.
Location
=
new
System
.
Drawing
.
Point
(
15
,
310
);
this
.
groupBox4
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
groupBox4
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
186
);
this
.
groupBox4
.
Name
=
"groupBox4"
;
this
.
groupBox4
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
groupBox4
.
Size
=
new
System
.
Drawing
.
Size
(
267
,
197
);
this
.
groupBox4
.
Size
=
new
System
.
Drawing
.
Size
(
178
,
118
);
this
.
groupBox4
.
TabIndex
=
1
;
this
.
groupBox4
.
TabStop
=
false
;
this
.
groupBox4
.
Text
=
"阀4"
;
//
// valve_4_end2
//
this
.
valve_4_end2
.
Location
=
new
System
.
Drawing
.
Point
(
75
,
137
);
this
.
valve_4_end2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_4_end2
.
Location
=
new
System
.
Drawing
.
Point
(
50
,
82
);
this
.
valve_4_end2
.
Name
=
"valve_4_end2"
;
this
.
valve_4_end2
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_4_end2
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_4_end2
.
TabIndex
=
2
;
this
.
valve_4_end2
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_4_start2
//
this
.
valve_4_start2
.
Location
=
new
System
.
Drawing
.
Point
(
75
,
73
);
this
.
valve_4_start2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_4_start2
.
Location
=
new
System
.
Drawing
.
Point
(
50
,
44
);
this
.
valve_4_start2
.
Name
=
"valve_4_start2"
;
this
.
valve_4_start2
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_4_start2
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_4_start2
.
TabIndex
=
2
;
this
.
valve_4_start2
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_4_end4
//
this
.
valve_4_end4
.
Location
=
new
System
.
Drawing
.
Point
(
204
,
137
);
this
.
valve_4_end4
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_4_end4
.
Location
=
new
System
.
Drawing
.
Point
(
136
,
82
);
this
.
valve_4_end4
.
Name
=
"valve_4_end4"
;
this
.
valve_4_end4
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_4_end4
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_4_end4
.
TabIndex
=
2
;
this
.
valve_4_end4
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_4_end3
//
this
.
valve_4_end3
.
Location
=
new
System
.
Drawing
.
Point
(
140
,
137
);
this
.
valve_4_end3
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_4_end3
.
Location
=
new
System
.
Drawing
.
Point
(
93
,
82
);
this
.
valve_4_end3
.
Name
=
"valve_4_end3"
;
this
.
valve_4_end3
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_4_end3
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_4_end3
.
TabIndex
=
2
;
this
.
valve_4_end3
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_4_start4
//
this
.
valve_4_start4
.
Location
=
new
System
.
Drawing
.
Point
(
204
,
73
);
this
.
valve_4_start4
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_4_start4
.
Location
=
new
System
.
Drawing
.
Point
(
136
,
44
);
this
.
valve_4_start4
.
Name
=
"valve_4_start4"
;
this
.
valve_4_start4
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_4_start4
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_4_start4
.
TabIndex
=
2
;
this
.
valve_4_start4
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_4_end1
//
this
.
valve_4_end1
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
137
);
this
.
valve_4_end1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_4_end1
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
82
);
this
.
valve_4_end1
.
Name
=
"valve_4_end1"
;
this
.
valve_4_end1
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_4_end1
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_4_end1
.
TabIndex
=
2
;
this
.
valve_4_end1
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_4_start3
//
this
.
valve_4_start3
.
Location
=
new
System
.
Drawing
.
Point
(
140
,
73
);
this
.
valve_4_start3
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_4_start3
.
Location
=
new
System
.
Drawing
.
Point
(
93
,
44
);
this
.
valve_4_start3
.
Name
=
"valve_4_start3"
;
this
.
valve_4_start3
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_4_start3
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_4_start3
.
TabIndex
=
2
;
this
.
valve_4_start3
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_4_start1
//
this
.
valve_4_start1
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
73
);
this
.
valve_4_start1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_4_start1
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
44
);
this
.
valve_4_start1
.
Name
=
"valve_4_start1"
;
this
.
valve_4_start1
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_4_start1
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_4_start1
.
TabIndex
=
2
;
this
.
valve_4_start1
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valvesw4
//
this
.
valvesw4
.
AutoSize
=
true
;
this
.
valvesw4
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
30
);
this
.
valvesw4
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valvesw4
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
18
);
this
.
valvesw4
.
Name
=
"valvesw4"
;
this
.
valvesw4
.
Size
=
new
System
.
Drawing
.
Size
(
83
,
24
);
this
.
valvesw4
.
Size
=
new
System
.
Drawing
.
Size
(
60
,
16
);
this
.
valvesw4
.
TabIndex
=
0
;
this
.
valvesw4
.
Tag
=
"4"
;
this
.
valvesw4
.
Text
=
"阀开关"
;
...
...
@@ -433,10 +398,9 @@
// valvesw3
//
this
.
valvesw3
.
AutoSize
=
true
;
this
.
valvesw3
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
33
);
this
.
valvesw3
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valvesw3
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
20
);
this
.
valvesw3
.
Name
=
"valvesw3"
;
this
.
valvesw3
.
Size
=
new
System
.
Drawing
.
Size
(
83
,
24
);
this
.
valvesw3
.
Size
=
new
System
.
Drawing
.
Size
(
60
,
16
);
this
.
valvesw3
.
TabIndex
=
0
;
this
.
valvesw3
.
Tag
=
"3"
;
this
.
valvesw3
.
Text
=
"阀开关"
;
...
...
@@ -444,73 +408,65 @@
//
// valve_3_start1
//
this
.
valve_3_start1
.
Location
=
new
System
.
Drawing
.
Point
(
14
,
73
);
this
.
valve_3_start1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_3_start1
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
44
);
this
.
valve_3_start1
.
Name
=
"valve_3_start1"
;
this
.
valve_3_start1
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_3_start1
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_3_start1
.
TabIndex
=
2
;
this
.
valve_3_start1
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_3_start3
//
this
.
valve_3_start3
.
Location
=
new
System
.
Drawing
.
Point
(
142
,
73
);
this
.
valve_3_start3
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_3_start3
.
Location
=
new
System
.
Drawing
.
Point
(
95
,
44
);
this
.
valve_3_start3
.
Name
=
"valve_3_start3"
;
this
.
valve_3_start3
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_3_start3
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_3_start3
.
TabIndex
=
2
;
this
.
valve_3_start3
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_3_end1
//
this
.
valve_3_end1
.
Location
=
new
System
.
Drawing
.
Point
(
14
,
135
);
this
.
valve_3_end1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_3_end1
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
81
);
this
.
valve_3_end1
.
Name
=
"valve_3_end1"
;
this
.
valve_3_end1
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_3_end1
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_3_end1
.
TabIndex
=
2
;
this
.
valve_3_end1
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_3_start4
//
this
.
valve_3_start4
.
Location
=
new
System
.
Drawing
.
Point
(
207
,
73
);
this
.
valve_3_start4
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_3_start4
.
Location
=
new
System
.
Drawing
.
Point
(
138
,
44
);
this
.
valve_3_start4
.
Name
=
"valve_3_start4"
;
this
.
valve_3_start4
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_3_start4
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_3_start4
.
TabIndex
=
2
;
this
.
valve_3_start4
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_3_end3
//
this
.
valve_3_end3
.
Location
=
new
System
.
Drawing
.
Point
(
142
,
135
);
this
.
valve_3_end3
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_3_end3
.
Location
=
new
System
.
Drawing
.
Point
(
95
,
81
);
this
.
valve_3_end3
.
Name
=
"valve_3_end3"
;
this
.
valve_3_end3
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_3_end3
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_3_end3
.
TabIndex
=
2
;
this
.
valve_3_end3
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_3_end4
//
this
.
valve_3_end4
.
Location
=
new
System
.
Drawing
.
Point
(
207
,
135
);
this
.
valve_3_end4
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_3_end4
.
Location
=
new
System
.
Drawing
.
Point
(
138
,
81
);
this
.
valve_3_end4
.
Name
=
"valve_3_end4"
;
this
.
valve_3_end4
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_3_end4
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_3_end4
.
TabIndex
=
2
;
this
.
valve_3_end4
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_3_start2
//
this
.
valve_3_start2
.
Location
=
new
System
.
Drawing
.
Point
(
78
,
73
);
this
.
valve_3_start2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_3_start2
.
Location
=
new
System
.
Drawing
.
Point
(
52
,
44
);
this
.
valve_3_start2
.
Name
=
"valve_3_start2"
;
this
.
valve_3_start2
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_3_start2
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_3_start2
.
TabIndex
=
2
;
this
.
valve_3_start2
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_3_end2
//
this
.
valve_3_end2
.
Location
=
new
System
.
Drawing
.
Point
(
78
,
135
);
this
.
valve_3_end2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_3_end2
.
Location
=
new
System
.
Drawing
.
Point
(
52
,
81
);
this
.
valve_3_end2
.
Name
=
"valve_3_end2"
;
this
.
valve_3_end2
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_3_end2
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_3_end2
.
TabIndex
=
2
;
this
.
valve_3_end2
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
...
...
@@ -525,11 +481,9 @@
this
.
groupBox3
.
Controls
.
Add
(
this
.
valve_3_start3
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
valve_3_start1
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
valvesw3
);
this
.
groupBox3
.
Location
=
new
System
.
Drawing
.
Point
(
603
,
70
);
this
.
groupBox3
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
groupBox3
.
Location
=
new
System
.
Drawing
.
Point
(
402
,
42
);
this
.
groupBox3
.
Name
=
"groupBox3"
;
this
.
groupBox3
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
267
,
197
);
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
178
,
118
);
this
.
groupBox3
.
TabIndex
=
1
;
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
Text
=
"阀3"
;
...
...
@@ -545,94 +499,83 @@
this
.
groupBox5
.
Controls
.
Add
(
this
.
valve_5_start2
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
valve_5_start1
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
valvesw5
);
this
.
groupBox5
.
Location
=
new
System
.
Drawing
.
Point
(
309
,
310
);
this
.
groupBox5
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
groupBox5
.
Location
=
new
System
.
Drawing
.
Point
(
206
,
186
);
this
.
groupBox5
.
Name
=
"groupBox5"
;
this
.
groupBox5
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
groupBox5
.
Size
=
new
System
.
Drawing
.
Size
(
267
,
197
);
this
.
groupBox5
.
Size
=
new
System
.
Drawing
.
Size
(
178
,
118
);
this
.
groupBox5
.
TabIndex
=
2
;
this
.
groupBox5
.
TabStop
=
false
;
this
.
groupBox5
.
Text
=
"阀5"
;
//
// valve_5_end4
//
this
.
valve_5_end4
.
Location
=
new
System
.
Drawing
.
Point
(
206
,
137
);
this
.
valve_5_end4
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_5_end4
.
Location
=
new
System
.
Drawing
.
Point
(
137
,
82
);
this
.
valve_5_end4
.
Name
=
"valve_5_end4"
;
this
.
valve_5_end4
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_5_end4
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_5_end4
.
TabIndex
=
8
;
this
.
valve_5_end4
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_5_end3
//
this
.
valve_5_end3
.
Location
=
new
System
.
Drawing
.
Point
(
141
,
137
);
this
.
valve_5_end3
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_5_end3
.
Location
=
new
System
.
Drawing
.
Point
(
94
,
82
);
this
.
valve_5_end3
.
Name
=
"valve_5_end3"
;
this
.
valve_5_end3
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_5_end3
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_5_end3
.
TabIndex
=
7
;
this
.
valve_5_end3
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_5_end2
//
this
.
valve_5_end2
.
Location
=
new
System
.
Drawing
.
Point
(
76
,
137
);
this
.
valve_5_end2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_5_end2
.
Location
=
new
System
.
Drawing
.
Point
(
51
,
82
);
this
.
valve_5_end2
.
Name
=
"valve_5_end2"
;
this
.
valve_5_end2
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_5_end2
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_5_end2
.
TabIndex
=
6
;
this
.
valve_5_end2
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_5_end1
//
this
.
valve_5_end1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
137
);
this
.
valve_5_end1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_5_end1
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
82
);
this
.
valve_5_end1
.
Name
=
"valve_5_end1"
;
this
.
valve_5_end1
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_5_end1
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_5_end1
.
TabIndex
=
5
;
this
.
valve_5_end1
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_5_start4
//
this
.
valve_5_start4
.
Location
=
new
System
.
Drawing
.
Point
(
206
,
73
);
this
.
valve_5_start4
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_5_start4
.
Location
=
new
System
.
Drawing
.
Point
(
137
,
44
);
this
.
valve_5_start4
.
Name
=
"valve_5_start4"
;
this
.
valve_5_start4
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_5_start4
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_5_start4
.
TabIndex
=
4
;
this
.
valve_5_start4
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_5_start3
//
this
.
valve_5_start3
.
Location
=
new
System
.
Drawing
.
Point
(
141
,
73
);
this
.
valve_5_start3
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_5_start3
.
Location
=
new
System
.
Drawing
.
Point
(
94
,
44
);
this
.
valve_5_start3
.
Name
=
"valve_5_start3"
;
this
.
valve_5_start3
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_5_start3
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_5_start3
.
TabIndex
=
3
;
this
.
valve_5_start3
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_5_start2
//
this
.
valve_5_start2
.
Location
=
new
System
.
Drawing
.
Point
(
76
,
73
);
this
.
valve_5_start2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_5_start2
.
Location
=
new
System
.
Drawing
.
Point
(
51
,
44
);
this
.
valve_5_start2
.
Name
=
"valve_5_start2"
;
this
.
valve_5_start2
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_5_start2
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_5_start2
.
TabIndex
=
2
;
this
.
valve_5_start2
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_5_start1
//
this
.
valve_5_start1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
73
);
this
.
valve_5_start1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_5_start1
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
44
);
this
.
valve_5_start1
.
Name
=
"valve_5_start1"
;
this
.
valve_5_start1
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_5_start1
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_5_start1
.
TabIndex
=
1
;
this
.
valve_5_start1
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valvesw5
//
this
.
valvesw5
.
AutoSize
=
true
;
this
.
valvesw5
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
32
);
this
.
valvesw5
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valvesw5
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
19
);
this
.
valvesw5
.
Name
=
"valvesw5"
;
this
.
valvesw5
.
Size
=
new
System
.
Drawing
.
Size
(
83
,
24
);
this
.
valvesw5
.
Size
=
new
System
.
Drawing
.
Size
(
60
,
16
);
this
.
valvesw5
.
TabIndex
=
0
;
this
.
valvesw5
.
Tag
=
"5"
;
this
.
valvesw5
.
Text
=
"阀开关"
;
...
...
@@ -649,105 +592,94 @@
this
.
groupBox6
.
Controls
.
Add
(
this
.
valve_6_start2
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
valve_6_start1
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
valvesw6
);
this
.
groupBox6
.
Location
=
new
System
.
Drawing
.
Point
(
603
,
310
);
this
.
groupBox6
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
groupBox6
.
Location
=
new
System
.
Drawing
.
Point
(
402
,
186
);
this
.
groupBox6
.
Name
=
"groupBox6"
;
this
.
groupBox6
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
groupBox6
.
Size
=
new
System
.
Drawing
.
Size
(
267
,
197
);
this
.
groupBox6
.
Size
=
new
System
.
Drawing
.
Size
(
178
,
118
);
this
.
groupBox6
.
TabIndex
=
3
;
this
.
groupBox6
.
TabStop
=
false
;
this
.
groupBox6
.
Text
=
"
阀6
"
;
this
.
groupBox6
.
Text
=
"
对外输出IO
"
;
//
// valve_6_end4
//
this
.
valve_6_end4
.
Location
=
new
System
.
Drawing
.
Point
(
207
,
137
);
this
.
valve_6_end4
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_6_end4
.
Location
=
new
System
.
Drawing
.
Point
(
138
,
82
);
this
.
valve_6_end4
.
Name
=
"valve_6_end4"
;
this
.
valve_6_end4
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_6_end4
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_6_end4
.
TabIndex
=
8
;
this
.
valve_6_end4
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_6_end3
//
this
.
valve_6_end3
.
Location
=
new
System
.
Drawing
.
Point
(
142
,
137
);
this
.
valve_6_end3
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_6_end3
.
Location
=
new
System
.
Drawing
.
Point
(
95
,
82
);
this
.
valve_6_end3
.
Name
=
"valve_6_end3"
;
this
.
valve_6_end3
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_6_end3
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_6_end3
.
TabIndex
=
7
;
this
.
valve_6_end3
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_6_end2
//
this
.
valve_6_end2
.
Location
=
new
System
.
Drawing
.
Point
(
78
,
137
);
this
.
valve_6_end2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_6_end2
.
Location
=
new
System
.
Drawing
.
Point
(
52
,
82
);
this
.
valve_6_end2
.
Name
=
"valve_6_end2"
;
this
.
valve_6_end2
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_6_end2
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_6_end2
.
TabIndex
=
6
;
this
.
valve_6_end2
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_6_end1
//
this
.
valve_6_end1
.
Location
=
new
System
.
Drawing
.
Point
(
14
,
137
);
this
.
valve_6_end1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_6_end1
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
82
);
this
.
valve_6_end1
.
Name
=
"valve_6_end1"
;
this
.
valve_6_end1
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_6_end1
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_6_end1
.
TabIndex
=
5
;
this
.
valve_6_end1
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_6_start3
//
this
.
valve_6_start3
.
Location
=
new
System
.
Drawing
.
Point
(
142
,
73
);
this
.
valve_6_start3
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_6_start3
.
Location
=
new
System
.
Drawing
.
Point
(
95
,
44
);
this
.
valve_6_start3
.
Name
=
"valve_6_start3"
;
this
.
valve_6_start3
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_6_start3
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_6_start3
.
TabIndex
=
4
;
this
.
valve_6_start3
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_6_start4
//
this
.
valve_6_start4
.
Location
=
new
System
.
Drawing
.
Point
(
207
,
73
);
this
.
valve_6_start4
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_6_start4
.
Location
=
new
System
.
Drawing
.
Point
(
138
,
44
);
this
.
valve_6_start4
.
Name
=
"valve_6_start4"
;
this
.
valve_6_start4
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_6_start4
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_6_start4
.
TabIndex
=
3
;
this
.
valve_6_start4
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_6_start2
//
this
.
valve_6_start2
.
Location
=
new
System
.
Drawing
.
Point
(
78
,
73
);
this
.
valve_6_start2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_6_start2
.
Location
=
new
System
.
Drawing
.
Point
(
52
,
44
);
this
.
valve_6_start2
.
Name
=
"valve_6_start2"
;
this
.
valve_6_start2
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_6_start2
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_6_start2
.
TabIndex
=
2
;
this
.
valve_6_start2
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valve_6_start1
//
this
.
valve_6_start1
.
Location
=
new
System
.
Drawing
.
Point
(
14
,
73
);
this
.
valve_6_start1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valve_6_start1
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
44
);
this
.
valve_6_start1
.
Name
=
"valve_6_start1"
;
this
.
valve_6_start1
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
26
);
this
.
valve_6_start1
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
21
);
this
.
valve_6_start1
.
TabIndex
=
1
;
this
.
valve_6_start1
.
KeyPress
+=
new
System
.
Windows
.
Forms
.
KeyPressEventHandler
(
this
.
TextBoxDec_KeyPress
);
//
// valvesw6
//
this
.
valvesw6
.
AutoSize
=
true
;
this
.
valvesw6
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
30
);
this
.
valvesw6
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
valvesw6
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
18
);
this
.
valvesw6
.
Name
=
"valvesw6"
;
this
.
valvesw6
.
Size
=
new
System
.
Drawing
.
Size
(
83
,
24
);
this
.
valvesw6
.
Size
=
new
System
.
Drawing
.
Size
(
48
,
16
);
this
.
valvesw6
.
TabIndex
=
0
;
this
.
valvesw6
.
Tag
=
"6"
;
this
.
valvesw6
.
Text
=
"
阀开关
"
;
this
.
valvesw6
.
Text
=
"
IO口
"
;
this
.
valvesw6
.
UseVisualStyleBackColor
=
true
;
//
// ValveTab
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
9F
,
20
F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12
F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
888
,
553
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
592
,
332
);
this
.
Controls
.
Add
(
this
.
groupBox6
);
this
.
Controls
.
Add
(
this
.
groupBox5
);
this
.
Controls
.
Add
(
this
.
groupBox4
);
...
...
@@ -757,7 +689,6 @@
this
.
Controls
.
Add
(
this
.
Valvenum
);
this
.
Controls
.
Add
(
this
.
label1
);
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
None
;
this
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
Name
=
"ValveTab"
;
this
.
Text
=
"ValveTab"
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
InjValveDlg_Load
);
...
...
GcDevicePc/DataState.cs
View file @
eb024034
...
...
@@ -19,8 +19,7 @@ namespace GcDevicePc
public
Thread
updateth
;
// GcDataReq m_data;
GcDataTh
mymodbus
;
// GcDataTh mymodbus;
public
DataState
()
{
...
...
@@ -34,8 +33,8 @@ namespace GcDevicePc
{
try
{
if
(
mymodbus
!=
null
)
mymodbus
.
ShowDataStop
();
//
if (mymodbus != null)
//
mymodbus.ShowDataStop();
}
catch
(
Exception
e
)
{
...
...
@@ -48,8 +47,8 @@ namespace GcDevicePc
{
try
{
if
(
mymodbus
!=
null
)
mymodbus
.
ShowDataStop
();
//
if (mymodbus != null)
//
mymodbus.ShowDataStop();
}
catch
(
Exception
e
)
{
...
...
@@ -67,11 +66,9 @@ namespace GcDevicePc
globaldata
.
m_profileMethod
.
GetDevState
();
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
//m_data = new GcDataReq(globaldata.connection_ip, globaldata.datamodbusport);
//m_data.Start();
mymodbus
=
new
GcDataTh
(
globaldata
.
connection_ip
,
globaldata
.
datamodbusport
);
mymodbus
.
ShowDataStart
();
//
mymodbus = new GcDataTh(globaldata.connection_ip, globaldata.datamodbusport);
//
mymodbus.ShowDataStart();
System
.
Windows
.
Forms
.
Timer
T
=
new
System
.
Windows
.
Forms
.
Timer
();
T
.
Interval
=
100
;
...
...
GcDevicePc/GcDevicePc.csproj
View file @
eb024034
...
...
@@ -203,6 +203,7 @@
<Compile
Include=
"Common\FileHelper.cs"
/>
<Compile
Include=
"Common\GCModbusSlave485.cs"
/>
<Compile
Include=
"Common\Log.cs"
/>
<Compile
Include=
"Common\MoudbusOperation.cs"
/>
<Compile
Include=
"Common\RunTableHelper.cs"
/>
<Compile
Include=
"Common\SendDataToHW.cs"
/>
<Compile
Include=
"ConfigDlg\ChromeDlg.cs"
>
...
...
@@ -480,12 +481,16 @@
<Compile
Include=
"Program.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
<Compile
Include=
"ProThread\ChannelDataSave.cs"
/>
<Compile
Include=
"ProThread\ChannelDataTh.cs"
/>
<Compile
Include=
"ProThread\CKvocUpdata.cs"
/>
<Compile
Include=
"ProThread\DataOutput.cs"
/>
<Compile
Include=
"ProThread\DataRcv.cs"
/>
<Compile
Include=
"ProThread\DisplayDataTh.cs"
/>
<Compile
Include=
"ProThread\GcDataTh.cs"
/>
<Compile
Include=
"ProThread\HMIControl.cs"
/>
<Compile
Include=
"ProThread\HMISearch.cs"
/>
<Compile
Include=
"ProThread\HmiStatueTh.cs"
/>
<Compile
Include=
"ProThread\ThreadMonitor.cs"
/>
<Compile
Include=
"QuitForm.cs"
>
<SubType>
Form
</SubType>
</Compile>
...
...
GcDevicePc/MDIBase.cs
View file @
eb024034
...
...
@@ -755,9 +755,9 @@ namespace GcDevicePc
statestr
=
"设备联机"
;
IsStateColor
=
true
;
hmiopt
=
null
;
hmiopt
=
new
HMIControl
(
globaldata
.
connection_ip
,
globaldata
.
datamodbusport
);
mymodbus
=
null
;
mymodbus
=
new
GcDataTh
(
globaldata
.
connection_ip
,
globaldata
.
datamodbusport
);
...
...
@@ -800,8 +800,8 @@ namespace GcDevicePc
// mydatasave.ChannelDataStart();
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
mymodbus
.
HmiStatueStart
();
mymodbus
.
ChannelDataStart
();
//
mymodbus.HmiStatueStart();
//
mymodbus.ChannelDataStart();
}
dataVOC
.
CKvocUpdataStart
();
...
...
@@ -820,8 +820,10 @@ namespace GcDevicePc
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
mymodbus
.
HmiStatueStop
();
mymodbus
.
ChannelDataStop
();
// mymodbus.HmiStatueStop();
// mymodbus.ChannelDataStop();
ThreadMonitor
.
GetInstance
().
MonitorThStop
();
ThreadMonitor
.
GetInstance
().
StopALLCommunication
();
}
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
moduleinfo
.
ip
))
...
...
GcDevicePc/ProThread/ChannelDataTh.cs
0 → 100644
View file @
eb024034
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
GcDevicePc.Common
;
namespace
GcDevicePc.ProThread
{
class
ChannelDataTh
{
/// <summary>
/// 单实例对象
/// </summary>
private
static
ChannelDataTh
instance
=
null
;
//静态私有成员变量
/// <summary>
/// 单实例对象锁
/// </summary>
private
static
object
_lock
=
new
object
();
/// <summary>
/// 数据锁
/// </summary>
private
static
object
_datalock
=
new
object
();
#
region
单实例实现
public
static
ChannelDataTh
GetInstance
()
{
if
(
instance
==
null
)
{
lock
(
_lock
)
{
if
(
instance
==
null
)
{
instance
=
new
ChannelDataTh
();
}
}
}
return
instance
;
}
#
endregion
#
region
分析仪数据读取线程
private
Thread
_tGetChannelData
;
//分析仪读取线程
private
ManualResetEvent
channeldata_mre
=
new
ManualResetEvent
(
false
);
//信号控制量
#
endregion
public
void
ChannelDataThStart
()
{
if
(
channeldata_mre
!=
null
)
{
channeldata_mre
.
Reset
();
}
if
(
_tGetChannelData
!=
null
)
{
_tGetChannelData
.
Abort
();
}
_tGetChannelData
=
new
Thread
(
ChannelDataThProc
);
_tGetChannelData
.
Priority
=
ThreadPriority
.
Highest
;
// _tGetAnalyzerData.IsBackground = true;
_tGetChannelData
.
Start
();
}
/// <summary>
/// 判断线程工作状态
/// </summary>
/// <returns></returns>
public
bool
ThreadWorking
()
{
if
(
_tGetChannelData
!=
null
)
{
if
(
_tGetChannelData
.
ThreadState
==
ThreadState
.
Running
||
(
_tGetChannelData
.
ThreadState
&
ThreadState
.
WaitSleepJoin
)
!=
0
)
return
true
;
else
return
false
;
}
return
false
;
}
/// <summary>
/// 线程停止
/// </summary>
public
void
ChannelDataThStop
()
{
channeldata_mre
.
Set
();
}
/// <summary>
/// 线程工作函数
/// </summary>
private
void
ChannelDataThProc
()
{
while
(!
channeldata_mre
.
WaitOne
(
500
))
{
ReadChannelData
();
}
}
private
void
ReadChannelData
()
{
MoudbusOperation
.
GetInstance
().
Get_Channel_Data
();
}
}
}
GcDevicePc/ProThread/DisplayDataTh.cs
0 → 100644
View file @
eb024034
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
GcDevicePc.Common
;
namespace
GcDevicePc.ProThread
{
class
DisplayDataTh
{
/// <summary>
/// 单实例对象
/// </summary>
private
static
DisplayDataTh
instance
=
null
;
//静态私有成员变量
/// <summary>
/// 单实例对象锁
/// </summary>
private
static
object
_lock
=
new
object
();
/// <summary>
/// 数据锁
/// </summary>
private
static
object
_datalock
=
new
object
();
#
region
单实例实现
public
static
DisplayDataTh
GetInstance
()
{
if
(
instance
==
null
)
{
lock
(
_lock
)
{
if
(
instance
==
null
)
{
instance
=
new
DisplayDataTh
();
}
}
}
return
instance
;
}
#
endregion
#
region
分析仪数据读取线程
private
Thread
_tGetDisplayData
;
//分析仪读取线程
private
ManualResetEvent
displaydata_mre
=
new
ManualResetEvent
(
false
);
//信号控制量
#
endregion
public
void
DisplayDataThStart
()
{
if
(
displaydata_mre
!=
null
)
{
displaydata_mre
.
Reset
();
}
if
(
_tGetDisplayData
!=
null
)
{
_tGetDisplayData
.
Abort
();
}
_tGetDisplayData
=
new
Thread
(
DisplayDataThProc
);
_tGetDisplayData
.
Priority
=
ThreadPriority
.
Highest
;
// _tGetAnalyzerData.IsBackground = true;
_tGetDisplayData
.
Start
();
}
/// <summary>
/// 判断线程工作状态
/// </summary>
/// <returns></returns>
public
bool
ThreadWorking
()
{
if
(
_tGetDisplayData
!=
null
)
{
if
(
_tGetDisplayData
.
ThreadState
==
ThreadState
.
Running
||
(
_tGetDisplayData
.
ThreadState
&
ThreadState
.
WaitSleepJoin
)
!=
0
)
return
true
;
else
return
false
;
}
return
false
;
}
/// <summary>
/// 线程停止
/// </summary>
public
void
DisplayDataThStop
()
{
displaydata_mre
.
Set
();
}
/// <summary>
/// 线程工作函数
/// </summary>
private
void
DisplayDataThProc
()
{
while
(!
displaydata_mre
.
WaitOne
(
1000
))
{
ReadDisplayData
();
}
}
private
void
ReadDisplayData
()
{
MoudbusOperation
.
GetInstance
().
GetGCTemp
();
MoudbusOperation
.
GetInstance
().
GetValveState
();
MoudbusOperation
.
GetInstance
().
GetALLSWState
();
MoudbusOperation
.
GetInstance
().
GetFireState
();
MoudbusOperation
.
GetInstance
().
GetErrorState
();
}
}
}
GcDevicePc/ProThread/HmiStatueTh.cs
0 → 100644
View file @
eb024034
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
GcDevicePc.Common
;
namespace
GcDevicePc.ProThread
{
class
HmiStatueTh
{
/// <summary>
/// 单实例对象
/// </summary>
private
static
HmiStatueTh
instance
=
null
;
//静态私有成员变量
/// <summary>
/// 单实例对象锁
/// </summary>
private
static
object
_lock
=
new
object
();
/// <summary>
/// 数据锁
/// </summary>
private
static
object
_datalock
=
new
object
();
#
region
单实例实现
public
static
HmiStatueTh
GetInstance
()
{
if
(
instance
==
null
)
{
lock
(
_lock
)
{
if
(
instance
==
null
)
{
instance
=
new
HmiStatueTh
();
}
}
}
return
instance
;
}
#
endregion
#
region
分析仪数据读取线程
private
Thread
_tGetHmiStatue
;
//分析仪读取线程
private
ManualResetEvent
hmistatus_mre
=
new
ManualResetEvent
(
false
);
//信号控制量
#
endregion
public
void
HmiStatueThStart
()
{
if
(
hmistatus_mre
!=
null
)
{
hmistatus_mre
.
Reset
();
}
if
(
_tGetHmiStatue
!=
null
)
{
_tGetHmiStatue
.
Abort
();
}
_tGetHmiStatue
=
new
Thread
(
HmiStatueThProc
);
_tGetHmiStatue
.
Priority
=
ThreadPriority
.
Highest
;
// _tGetAnalyzerData.IsBackground = true;
_tGetHmiStatue
.
Start
();
}
/// <summary>
/// 判断线程工作状态
/// </summary>
/// <returns></returns>
public
bool
ThreadWorking
()
{
if
(
_tGetHmiStatue
!=
null
)
{
if
(
_tGetHmiStatue
.
ThreadState
==
ThreadState
.
Running
||
(
_tGetHmiStatue
.
ThreadState
&
ThreadState
.
WaitSleepJoin
)
!=
0
)
return
true
;
else
return
false
;
}
return
false
;
}
/// <summary>
/// 线程停止
/// </summary>
public
void
HmiStatueThStop
()
{
hmistatus_mre
.
Set
();
}
/// <summary>
/// 线程工作函数
/// </summary>
private
void
HmiStatueThProc
()
{
while
(!
hmistatus_mre
.
WaitOne
(
1000
))
{
ReadHmiStatue
();
}
}
private
void
ReadHmiStatue
()
{
MoudbusOperation
.
GetInstance
().
GetHMIStatusData
();
}
}
}
GcDevicePc/ProThread/ThreadMonitor.cs
0 → 100644
View file @
eb024034
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
GcDevicePc.Common
;
namespace
GcDevicePc.ProThread
{
class
ThreadMonitor
{
#
region
检查线程时间
private
ushort
monitortimer
=
1000
*
30
;
//线程检查时间
#
endregion
#
region
单实例实现
private
static
ThreadMonitor
instance
=
null
;
//静态私有成员变量
private
static
object
_lock
=
new
object
();
public
static
ThreadMonitor
GetInstance
()
{
if
(
instance
==
null
)
{
lock
(
_lock
)
{
if
(
instance
==
null
)
{
instance
=
new
ThreadMonitor
();
}
}
}
return
instance
;
}
#
endregion
#
region
连接中心初始化所有读取线程
/// <summary>
/// 显示数据
/// </summary>
private
DisplayDataTh
displayDataTh
=
DisplayDataTh
.
GetInstance
();
/// <summary>
/// 状态数据
/// </summary>
private
HmiStatueTh
hmiStatueTh
=
HmiStatueTh
.
GetInstance
();
/// <summary>
/// 信号数据
/// </summary>
private
ChannelDataTh
channelDataTh
=
ChannelDataTh
.
GetInstance
();
#
endregion
#
region
通讯中心功能函数
/// <summary>
/// 开启所有通讯线程
/// </summary>
public
void
StartALLCommunication
()
{
if
(!
displayDataTh
.
ThreadWorking
())
displayDataTh
.
DisplayDataThStart
();
if
(!
hmiStatueTh
.
ThreadWorking
())
hmiStatueTh
.
HmiStatueThStart
();
if
(!
channelDataTh
.
ThreadWorking
())
channelDataTh
.
ChannelDataThStart
();
}
/// <summary>
/// 关闭所有通讯线程
/// </summary>
public
void
StopALLCommunication
()
{
if
(
displayDataTh
.
ThreadWorking
())
displayDataTh
.
DisplayDataThStop
();
if
(
hmiStatueTh
.
ThreadWorking
())
hmiStatueTh
.
HmiStatueThStop
();
if
(
channelDataTh
.
ThreadWorking
())
channelDataTh
.
ChannelDataThStop
();
}
#
endregion
#
region
通讯中心线程检查进程
private
Thread
_tThreadMonitor
;
//分析仪读取线程
private
ManualResetEvent
monitor_mre
=
new
ManualResetEvent
(
false
);
//信号控制量
public
void
MonitorThStart
()
{
if
(
monitor_mre
!=
null
)
{
monitor_mre
.
Reset
();
}
if
(
_tThreadMonitor
!=
null
)
{
_tThreadMonitor
.
Abort
();
}
_tThreadMonitor
=
new
Thread
(
MonitorThProc
);
// _tThreadMonitor.IsBackground = true;
_tThreadMonitor
.
Start
();
}
public
bool
ThreadWorking
()
{
if
(
_tThreadMonitor
!=
null
)
{
if
(
_tThreadMonitor
.
ThreadState
==
ThreadState
.
Running
||
(
_tThreadMonitor
.
ThreadState
&
ThreadState
.
WaitSleepJoin
)
!=
0
)
return
true
;
else
return
false
;
}
return
false
;
}
public
void
MonitorThStop
()
{
monitor_mre
.
Set
();
}
/// <summary>
/// 判断是否所有通讯线程已经退出
/// </summary>
/// <returns></returns>
public
bool
AllIsClosed
()
{
int
ret
=
0
;
if
(
displayDataTh
.
ThreadWorking
())
{
ret
+=
1
;
}
if
(
hmiStatueTh
.
ThreadWorking
())
{
ret
+=
1
;
}
if
(
channelDataTh
.
ThreadWorking
())
{
ret
+=
1
;
}
return
ret
==
0
?
true
:
false
;
}
/// <summary>
/// 每一分钟监测一次 最小做样是2min
/// </summary>
private
void
MonitorThProc
()
{
while
(!
monitor_mre
.
WaitOne
(
monitortimer
))
{
if
(!
displayDataTh
.
ThreadWorking
())
{
Log
.
Info
(
"数据显示线程 重启"
);
displayDataTh
.
DisplayDataThStart
();
}
if
(!
hmiStatueTh
.
ThreadWorking
())
{
Log
.
Info
(
"HMI状态线程 重启"
);
hmiStatueTh
.
HmiStatueThStart
();
}
if
(!
channelDataTh
.
ThreadWorking
())
{
Log
.
Info
(
"信号线程线程 重启"
);
channelDataTh
.
ChannelDataThStart
();
}
}
}
#
endregion
}
}
GcDevicePc/StartForm.cs
View file @
eb024034
...
...
@@ -156,6 +156,8 @@ namespace GcDevicePc
globaldata
.
m_appinit
.
InitAppFolderGC
();
_appInitInfo
=
"载入方法配置"
;
globaldata
.
m_appinit
.
InitAppDefaultConfig
();
_appInitInfo
=
"启动检测线程"
;
globaldata
.
m_appinit
.
StartDataThread
();
}
private
void
StartFormbgWorker_DoWork
(
object
sender
,
DoWorkEventArgs
e
)
...
...
GcDevicePc/globaldata.cs
View file @
eb024034
...
...
@@ -3,7 +3,7 @@ using System.Collections;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
GcDevicePc.Common
;
using
GcDevicePc.IniParam
;
using
GcDevicePc.GCBuffer
;
...
...
@@ -149,8 +149,10 @@ namespace GcDevicePc
public
static
bool
startflag
=
false
;
//开始按键的标志位
public
static
bool
startclear
=
false
;
//清除开始按键之前的数据
public
static
bool
stopflag
=
false
;
//停止按键的标志位
public
static
bool
stopflag
=
false
;
//停止按键的标志位
public
static
bool
cancelflag
=
false
;
//取消按键的标志位
public
static
GCModbus
global_moudbus
=
new
GCModbus
();
}
}
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