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
14a202a3
Commit
14a202a3
authored
Apr 23, 2019
by
liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
辅助工具添加中fid点火,和点火限制,右侧显示栏显示,主界面部分小修改
parent
521df5d2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
293 additions
and
148 deletions
+293
-148
DataState.cs
GcDevicePc/DataState.cs
+26
-16
MDIBase.Designer.cs
GcDevicePc/MDIBase.Designer.cs
+2
-2
MDIBase.cs
GcDevicePc/MDIBase.cs
+147
-128
auxtool.Designer.cs
GcDevicePc/auxtool.Designer.cs
+24
-2
auxtool.cs
GcDevicePc/auxtool.cs
+91
-0
auxtool.resx
GcDevicePc/auxtool.resx
+3
-0
No files found.
GcDevicePc/DataState.cs
View file @
14a202a3
...
@@ -1480,9 +1480,10 @@ namespace GcDevicePc
...
@@ -1480,9 +1480,10 @@ namespace GcDevicePc
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFront
==
1
)
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFront
==
1
)
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
0
&&
//if (CProfileDevice.m_DevParam.syspara.u16DetFrontType == 0 &&
CProfileDevice
.
m_DevParam
.
tcd
[
0
].
u16HeaterSel
>
0
)
//TCD
// CProfileDevice.m_DevParam.tcd[0].u16HeaterSel > 0) //TCD
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
0
)
//TCD
{
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"TCD1"
;
tempshow
.
Text
=
"TCD1"
;
{
{
...
@@ -1515,9 +1516,12 @@ namespace GcDevicePc
...
@@ -1515,9 +1516,12 @@ namespace GcDevicePc
tempshow
.
SubItems
.
Add
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetStatue
.
ToString
());
tempshow
.
SubItems
.
Add
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetStatue
.
ToString
());
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
}
}
else
if
((
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
1
||
else
if
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
3
)
&&
//((CProfileDevice.m_DevParam.syspara.u16DetFrontType == 1 ||
CProfileDevice
.
m_DevParam
.
fid
[
0
].
u16KeyHeater
>
0
)
// CProfileDevice.m_DevParam.syspara.u16DetFrontType == 3) &&
// CProfileDevice.m_DevParam.fid[0].u16KeyHeater > 0)
((
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
1
||
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
3
))
{
{
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
...
@@ -1619,9 +1623,10 @@ namespace GcDevicePc
...
@@ -1619,9 +1623,10 @@ namespace GcDevicePc
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInter
==
1
)
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInter
==
1
)
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
0
&&
//if (CProfileDevice.m_DevParam.syspara.u16DetInterType == 0 &&
CProfileDevice
.
m_DevParam
.
tcd
[
1
].
u16HeaterSel
>
0
)
//TCD
// CProfileDevice.m_DevParam.tcd[1].u16HeaterSel > 0) //TCD
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
0
)
//TCD
{
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"TCD2(mV)"
;
tempshow
.
Text
=
"TCD2(mV)"
;
...
@@ -1656,9 +1661,11 @@ namespace GcDevicePc
...
@@ -1656,9 +1661,11 @@ namespace GcDevicePc
tempshow
.
SubItems
.
Add
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
iDetStatue
.
ToString
());
tempshow
.
SubItems
.
Add
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
iDetStatue
.
ToString
());
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
}
}
else
if
((
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
1
||
//else if ((CProfileDevice.m_DevParam.syspara.u16DetInterType == 1 ||
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
3
)
&&
// CProfileDevice.m_DevParam.syspara.u16DetInterType == 3) &&
CProfileDevice
.
m_DevParam
.
fid
[
1
].
u16KeyHeater
>
0
)
// CProfileDevice.m_DevParam.fid[1].u16KeyHeater > 0)
else
if
((
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
1
||
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
3
))
{
{
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
...
@@ -1737,8 +1744,9 @@ namespace GcDevicePc
...
@@ -1737,8 +1744,9 @@ namespace GcDevicePc
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehind
==
1
)
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehind
==
1
)
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehindType
==
0
&&
//if (CProfileDevice.m_DevParam.syspara.u16DetBehindType == 0 &&
CProfileDevice
.
m_DevParam
.
tcd
[
2
].
u16HeaterSel
>
0
)
//TCD
// CProfileDevice.m_DevParam.tcd[2].u16HeaterSel > 0) //TCD
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehindType
==
00
)
//TCD
{
{
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"TCD3"
;
tempshow
.
Text
=
"TCD3"
;
...
@@ -1777,9 +1785,11 @@ namespace GcDevicePc
...
@@ -1777,9 +1785,11 @@ namespace GcDevicePc
tempshow
.
SubItems
.
Add
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
bDetStatue
.
ToString
());
tempshow
.
SubItems
.
Add
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
bDetStatue
.
ToString
());
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
}
}
//else if ((CProfileDevice.m_DevParam.syspara.u16DetBehindType == 1 ||
// CProfileDevice.m_DevParam.syspara.u16DetBehindType == 3) &&
// CProfileDevice.m_DevParam.fid[2].u16KeyHeater > 0)
else
if
((
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehindType
==
1
||
else
if
((
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehindType
==
1
||
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehindType
==
3
)
&&
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehindType
==
3
))
CProfileDevice
.
m_DevParam
.
fid
[
2
].
u16KeyHeater
>
0
)
{
{
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehindType
==
1
)
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehindType
==
1
)
...
...
GcDevicePc/MDIBase.Designer.cs
View file @
14a202a3
...
@@ -106,14 +106,14 @@
...
@@ -106,14 +106,14 @@
// UserLoginMenu
// UserLoginMenu
//
//
this
.
UserLoginMenu
.
Name
=
"UserLoginMenu"
;
this
.
UserLoginMenu
.
Name
=
"UserLoginMenu"
;
this
.
UserLoginMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
UserLoginMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
UserLoginMenu
.
Text
=
"用户登录"
;
this
.
UserLoginMenu
.
Text
=
"用户登录"
;
this
.
UserLoginMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
UserLoginMenu_Click
);
this
.
UserLoginMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
UserLoginMenu_Click
);
//
//
// UserLogoutMenu
// UserLogoutMenu
//
//
this
.
UserLogoutMenu
.
Name
=
"UserLogoutMenu"
;
this
.
UserLogoutMenu
.
Name
=
"UserLogoutMenu"
;
this
.
UserLogoutMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
UserLogoutMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
UserLogoutMenu
.
Text
=
"用户注销"
;
this
.
UserLogoutMenu
.
Text
=
"用户注销"
;
this
.
UserLogoutMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
UserLogoutMenu_Click
);
this
.
UserLogoutMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
UserLogoutMenu_Click
);
//
//
...
...
GcDevicePc/MDIBase.cs
View file @
14a202a3
...
@@ -380,11 +380,13 @@ namespace GcDevicePc
...
@@ -380,11 +380,13 @@ namespace GcDevicePc
epcs
=
false
;
epcs
=
false
;
timer2
.
Start
();
timer2
.
Start
();
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
)
if
(
globaldata
.
CurrentVersion
==
"1"
)
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMSysbtnstatus
=
1
;
{
else
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
)
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMSysbtnstatus
=
0
;
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMSysbtnstatus
=
1
;
else
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMSysbtnstatus
=
0
;
}
//if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 2)
//if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 2)
//{
//{
// (this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 0;
// (this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 0;
...
@@ -474,24 +476,26 @@ namespace GcDevicePc
...
@@ -474,24 +476,26 @@ namespace GcDevicePc
{
{
OSflag
=
!
OSflag
;
OSflag
=
!
OSflag
;
hmiopt
.
WriteStopVal
();
hmiopt
.
WriteStopVal
();
//SetTitleStatueName("系统准备中...", true);
WaitHMIFree
();
WaitHMIFree
();
//SetTitleStatueName("系统准备中...", true);
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
)
//if (globaldata.CurrentVersion == "1"
)
{
{
hmiopt
.
WriteBatVal
();
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
)
}
{
hmiopt
.
WriteBatVal
();
}
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
();
Thread
.
Sleep
(
500
);
Thread
.
Sleep
(
500
);
...
@@ -649,10 +653,10 @@ namespace GcDevicePc
...
@@ -649,10 +653,10 @@ namespace GcDevicePc
open
();
open
();
}
}
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
!=
0
)
//
if (globaldata.m_hmibuffer.gcinfo.methodstatus != 0)
{
//
{
hmistatus_opensys
();
//
hmistatus_opensys();
}
//
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
@@ -665,31 +669,34 @@ namespace GcDevicePc
...
@@ -665,31 +669,34 @@ namespace GcDevicePc
{
{
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
{
if
(
!
OSflag
)
if
(
globaldata
.
CurrentVersion
==
"1"
)
{
{
OSflag
=
!
OSflag
;
if
(!
OSflag
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
)
{
{
// hmiopt.WriteBatVal();
OSflag
=
!
OSflag
;
}
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
)
{
{
hmiopt
.
WriteOpenVal
();
// hmiopt.WriteBatVal();
}
;
}
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
1
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
{
{
// hmiopt.WriteSingle
Val();
hmiopt
.
WriteOpen
Val
();
}
}
//int tagnum = Convert.ToInt32(((PictureBox)panelMenu.Controls[14]).Tag);
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
1
)
//((PictureBox)panelMenu.Controls[14]).Image = menuList.Images[tagnum + 14];
{
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
true
;
// hmiopt.WriteSingleVal();
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
}
}
//int tagnum = Convert.ToInt32(((PictureBox)panelMenu.Controls[14]).Tag);
//((PictureBox)panelMenu.Controls[14]).Image = menuList.Images[tagnum + 14];
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
true
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
}
}
}
}
else
else
{
{
...
@@ -826,36 +833,39 @@ namespace GcDevicePc
...
@@ -826,36 +833,39 @@ namespace GcDevicePc
public
void
SendPCCMD
(
bool
flag
)
public
void
SendPCCMD
(
bool
flag
)
{
{
if
(
flag
)
//打开运行
//if (globaldata.CurrentVersion == "1")
{
{
hmiopt
.
WriteStopVal
();
if
(
flag
)
//打开运行
WaitHMIFree
();
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
)
{
{
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
hmiopt
.
WriteStopVal
();
hmiopt
.
WriteOpenVal
();
WaitHMIFree
();
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
1
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
)
hmiopt
.
WriteSingleVal
();
{
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
hmiopt
.
WriteOpenVal
();
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
1
)
hmiopt
.
WriteSingleVal
();
}
WaitHMIWork
();
WaitHMIWork
();
}
}
}
else
//批处理
else
//批处理
{
hmiopt
.
WriteStopVal
();
WaitHMIFree
();
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
)
{
{
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
)
hmiopt
.
WriteStopVal
();
WaitHMIFree
();
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
)
{
{
hmiopt
.
WriteBatVal
();
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
)
hmiopt
.
WriteStartVal
();
{
WaitHMIWork
();
hmiopt
.
WriteBatVal
();
}
hmiopt
.
WriteStartVal
();
WaitHMIWork
();
}
}
}
}
}
}
}
}
...
@@ -999,17 +1009,20 @@ namespace GcDevicePc
...
@@ -999,17 +1009,20 @@ namespace GcDevicePc
}
else
{
}
else
{
if
(
i
%
20
==
0
&&
i
!=
0
)
if
(
i
%
20
==
0
&&
i
!=
0
)
{
{
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
if
(
globaldata
.
CurrentVersion
==
"1"
)
ret
=
hmiopt
.
WriteOpenVal
();
{
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
ret
=
hmiopt
.
WriteOpenVal
();
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
1
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
1
)
ret
=
hmiopt
.
WriteSingleVal
();
ret
=
hmiopt
.
WriteSingleVal
();
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
)
{
{
ret
=
hmiopt
.
WriteBatVal
();
ret
=
hmiopt
.
WriteBatVal
();
if
(
ret
==
0
)
if
(
ret
==
0
)
ret
=
hmiopt
.
WriteStartVal
();
ret
=
hmiopt
.
WriteStartVal
();
}
}
}
}
}
...
@@ -1128,11 +1141,12 @@ namespace GcDevicePc
...
@@ -1128,11 +1141,12 @@ 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"
)
tmpname
=
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
?
{
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_BATMethodName
:
tmpname
=
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
?
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_BATMethodName
:
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_MethodName
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_MethodName
;
}
if
(!
String
.
IsNullOrEmpty
(
tmpname
))
if
(!
String
.
IsNullOrEmpty
(
tmpname
))
{
{
globaldata
.
show_MethodName
=
tmpname
;
globaldata
.
show_MethodName
=
tmpname
;
...
@@ -1326,7 +1340,6 @@ namespace GcDevicePc
...
@@ -1326,7 +1340,6 @@ namespace GcDevicePc
if
((
dest
[
5
]
==
4
||
dest
[
5
]
==
5
)
&&
dest
[
7
]
==
4
&&
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
!=
1
)
if
((
dest
[
5
]
==
4
||
dest
[
5
]
==
5
)
&&
dest
[
7
]
==
4
&&
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
!=
1
)
{
{
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
=
0
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
=
0
;
}
}
...
@@ -1589,7 +1602,7 @@ namespace GcDevicePc
...
@@ -1589,7 +1602,7 @@ namespace GcDevicePc
color_flag
=
false
;
color_flag
=
false
;
break
;
break
;
case
10
:
case
10
:
if
(
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16StartType
==
0
)
if
(
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16StartType
==
2
)
{
{
status_text
=
"设备等待"
;
status_text
=
"设备等待"
;
}
}
...
@@ -1887,70 +1900,75 @@ namespace GcDevicePc
...
@@ -1887,70 +1900,75 @@ namespace GcDevicePc
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
{
if
(!
OSflag
)
{
OSflag
=
!
OSflag
;
hmiopt
.
WriteStopVal
();
statestr
=
"系统准备中..."
;
WaitHMIFree
();
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
)
{
hmiopt
.
WriteBatVal
();
}
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
{
hmiopt
.
WriteOpenVal
();
}
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
1
)
if
(
globaldata
.
CurrentVersion
==
"1"
)
{
if
(!
OSflag
)
{
{
hmiopt
.
WriteSingleVal
();
OSflag
=
!
OSflag
;
}
hmiopt
.
WriteStopVal
();
//Console.WriteLine("WaitHMIWork ");
statestr
=
"系统准备中..."
;
WaitHMIWork
();
//Console.WriteLine("WaitHMIWork End");
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
true
;
WaitHMIFree
();
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
{
//globaldata.starttimer = 0;
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
)
//globaldata.startimerIsSet = true;
{
hmiopt
.
WriteBatVal
();
}
globaldata
.
starttimer
=
0
;
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
{
hmiopt
.
WriteOpenVal
();
}
globaldata
.
startimerIsSet
=
true
;
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
1
)
globaldata
.
startimerIsSet1
=
true
;
{
globaldata
.
startimerIsSet2
=
true
;
hmiopt
.
WriteSingleVal
();
globaldata
.
startimerIsSet3
=
true
;
}
}
}
else
//Console.WriteLine("WaitHMIWork ");
{
WaitHMIWork
();
//Console.WriteLine("WaitHMIWork End");
OSflag
=
!
OSflag
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
true
;
//SetTitleStatueName("系统停止中...", false);
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
globaldata
.
OS_STOP
=
true
;
//globaldata.starttimer = 0;
hmiopt
.
WriteEndVal
();
//globaldata.startimerIsSet = true;
WaitHMIFree
();
//SetTitleStatueName("系统停止...", false);
//int tagnum = Convert.ToInt32(((PictureBox)panelMenu.Controls[14]).Tag);
globaldata
.
starttimer
=
0
;
//((PictureBox)panelMenu.Controls[14]).Image = menuList.Images[tagnum];
//((PictureBox)panelMenu.Controls[0]).Enabled = false;
globaldata
.
startimerIsSet
=
true
;
//((PictureBox)panelMenu.Controls[0]).Image = menuList.Images[14];
globaldata
.
startimerIsSet1
=
true
;
//((PictureBox)panelMenu.Controls[1]).Enabled = false;
globaldata
.
startimerIsSet2
=
true
;
//((PictureBox)panelMenu.Controls[1]).Image = menuList.Images[15];
globaldata
.
startimerIsSet3
=
true
;
//((PictureBox)panelMenu.Controls[2]).Enabled = false;
}
//((PictureBox)panelMenu.Controls[2]).Image = menuList.Images[16];
else
{
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
false
;
OSflag
=
!
OSflag
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
//SetTitleStatueName("系统停止中...", false);
globaldata
.
OS_STOP
=
true
;
hmiopt
.
WriteEndVal
();
WaitHMIFree
();
//SetTitleStatueName("系统停止...", false);
//int tagnum = Convert.ToInt32(((PictureBox)panelMenu.Controls[14]).Tag);
//((PictureBox)panelMenu.Controls[14]).Image = menuList.Images[tagnum];
//((PictureBox)panelMenu.Controls[0]).Enabled = false;
//((PictureBox)panelMenu.Controls[0]).Image = menuList.Images[14];
//((PictureBox)panelMenu.Controls[1]).Enabled = false;
//((PictureBox)panelMenu.Controls[1]).Image = menuList.Images[15];
//((PictureBox)panelMenu.Controls[2]).Enabled = false;
//((PictureBox)panelMenu.Controls[2]).Image = menuList.Images[16];
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
false
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
}
}
}
}
}
Console
.
WriteLine
(
""
+
OSflag
);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
@@ -2080,6 +2098,7 @@ namespace GcDevicePc
...
@@ -2080,6 +2098,7 @@ namespace GcDevicePc
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
false
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
false
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
}
}
Console
.
WriteLine
(
""
+
OSflag
);
}
}
/// <summary>
/// <summary>
...
...
GcDevicePc/auxtool.Designer.cs
View file @
14a202a3
...
@@ -28,8 +28,10 @@
...
@@ -28,8 +28,10 @@
/// </summary>
/// </summary>
private
void
InitializeComponent
()
private
void
InitializeComponent
()
{
{
this
.
components
=
new
System
.
ComponentModel
.
Container
();
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
auxtool
));
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
auxtool
));
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
fireupbtnI
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
firstfiredelay
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
firstfiredelay
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label14
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label14
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
fireupbtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
fireupbtn
=
new
System
.
Windows
.
Forms
.
Button
();
...
@@ -78,6 +80,7 @@
...
@@ -78,6 +80,7 @@
this
.
tcd1_sw
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tcd1_sw
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tcdset1
=
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
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
...
@@ -89,6 +92,7 @@
...
@@ -89,6 +92,7 @@
//
//
// groupBox1
// groupBox1
//
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
fireupbtnI
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
firstfiredelay
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
firstfiredelay
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label14
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label14
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
fireupbtn
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
fireupbtn
);
...
@@ -103,6 +107,16 @@
...
@@ -103,6 +107,16 @@
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"点火设置"
;
this
.
groupBox1
.
Text
=
"点火设置"
;
//
//
// fireupbtnI
//
this
.
fireupbtnI
.
Location
=
new
System
.
Drawing
.
Point
(
134
,
108
);
this
.
fireupbtnI
.
Name
=
"fireupbtnI"
;
this
.
fireupbtnI
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
fireupbtnI
.
TabIndex
=
11
;
this
.
fireupbtnI
.
Text
=
"点火(中)"
;
this
.
fireupbtnI
.
UseVisualStyleBackColor
=
true
;
this
.
fireupbtnI
.
Click
+=
new
System
.
EventHandler
(
this
.
fireupbtnI_Click
);
//
// firstfiredelay
// firstfiredelay
//
//
this
.
firstfiredelay
.
Location
=
new
System
.
Drawing
.
Point
(
139
,
81
);
this
.
firstfiredelay
.
Location
=
new
System
.
Drawing
.
Point
(
139
,
81
);
...
@@ -121,11 +135,11 @@
...
@@ -121,11 +135,11 @@
//
//
// fireupbtn
// fireupbtn
//
//
this
.
fireupbtn
.
Location
=
new
System
.
Drawing
.
Point
(
82
,
108
);
this
.
fireupbtn
.
Location
=
new
System
.
Drawing
.
Point
(
59
,
108
);
this
.
fireupbtn
.
Name
=
"fireupbtn"
;
this
.
fireupbtn
.
Name
=
"fireupbtn"
;
this
.
fireupbtn
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
23
);
this
.
fireupbtn
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
23
);
this
.
fireupbtn
.
TabIndex
=
4
;
this
.
fireupbtn
.
TabIndex
=
4
;
this
.
fireupbtn
.
Text
=
"点火"
;
this
.
fireupbtn
.
Text
=
"点火
(前)
"
;
this
.
fireupbtn
.
UseVisualStyleBackColor
=
true
;
this
.
fireupbtn
.
UseVisualStyleBackColor
=
true
;
this
.
fireupbtn
.
Click
+=
new
System
.
EventHandler
(
this
.
fireupbtn_Click
);
this
.
fireupbtn
.
Click
+=
new
System
.
EventHandler
(
this
.
fireupbtn_Click
);
//
//
...
@@ -570,6 +584,11 @@
...
@@ -570,6 +584,11 @@
this
.
tcddac1
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
21
);
this
.
tcddac1
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
21
);
this
.
tcddac1
.
TabIndex
=
0
;
this
.
tcddac1
.
TabIndex
=
0
;
//
//
// fidfire
//
this
.
fidfire
.
Interval
=
1000
;
this
.
fidfire
.
Tick
+=
new
System
.
EventHandler
(
this
.
fidfire_Tick
);
//
// auxtool
// auxtool
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
...
@@ -588,6 +607,7 @@
...
@@ -588,6 +607,7 @@
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
Text
=
"辅助工具"
;
this
.
Text
=
"辅助工具"
;
this
.
TopMost
=
true
;
this
.
TopMost
=
true
;
this
.
FormClosed
+=
new
System
.
Windows
.
Forms
.
FormClosedEventHandler
(
this
.
auxtool_FormClosed
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
auxtool_Load
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
auxtool_Load
);
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
PerformLayout
();
this
.
groupBox1
.
PerformLayout
();
...
@@ -655,5 +675,7 @@
...
@@ -655,5 +675,7 @@
private
System
.
Windows
.
Forms
.
Button
tcd1_sw
;
private
System
.
Windows
.
Forms
.
Button
tcd1_sw
;
private
System
.
Windows
.
Forms
.
Button
tcdset1
;
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
.
Timer
fidfire
;
}
}
}
}
\ No newline at end of file
GcDevicePc/auxtool.cs
View file @
14a202a3
...
@@ -32,6 +32,7 @@ namespace GcDevicePc
...
@@ -32,6 +32,7 @@ namespace GcDevicePc
public
auxtool
()
public
auxtool
()
{
{
InitializeComponent
();
InitializeComponent
();
fidfire
.
Start
();
}
}
public
auxtool
(
ushort
time1
,
ushort
time2
,
ushort
time3
)
public
auxtool
(
ushort
time1
,
ushort
time2
,
ushort
time3
)
...
@@ -41,6 +42,7 @@ namespace GcDevicePc
...
@@ -41,6 +42,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
=
(
Convert
.
ToDouble
(
time3
)
/
60
).
ToString
();
fidfire
.
Start
();
}
}
...
@@ -127,6 +129,8 @@ namespace GcDevicePc
...
@@ -127,6 +129,8 @@ namespace GcDevicePc
if
(
time1
>=
time2
)
if
(
time1
>=
time2
)
{
{
auxtoolforfireup
(
0
,
time1
,
time2
,
time3
);
auxtoolforfireup
(
0
,
time1
,
time2
,
time3
);
this
.
fireupbtnI
.
Enabled
=
false
;
}
}
else
else
{
{
...
@@ -617,5 +621,92 @@ namespace GcDevicePc
...
@@ -617,5 +621,92 @@ namespace GcDevicePc
gctcd_sw
(
2
);
gctcd_sw
(
2
);
}
}
private
void
fireupbtnI_Click
(
object
sender
,
EventArgs
e
)
{
//if (min >= 30)
{
if
(
String
.
IsNullOrEmpty
(
fireuptime
.
Text
)
||
String
.
IsNullOrEmpty
(
hvalvetime
.
Text
))
{
MessageBox
.
Show
(
"点火时间 和 氢气阀时间不能为空!!!"
);
}
else
{
ushort
time1
=
ushort
.
Parse
(
fireuptime
.
Text
);
ushort
time2
=
ushort
.
Parse
(
hvalvetime
.
Text
);
ushort
time3
=
Convert
.
ToUInt16
(
Convert
.
ToInt32
(
firstfiredelay
.
Text
)
*
60
);
if
(
time1
>=
time2
)
{
auxtoolforfireup
(
1
,
time1
,
time2
,
time3
);
this
.
fireupbtn
.
Enabled
=
false
;
}
else
{
MessageBox
.
Show
(
"点火时间需大于等于氢气阀时间!!!"
);
}
}
}
//else
//{
// MessageBox.Show("请在三十分钟后在点火!");
//}
}
private
void
fidfire_Tick
(
object
sender
,
EventArgs
e
)
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
1
)
{
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
iDetStatue
==
1
)
{
this
.
fireupbtn
.
Enabled
=
false
;
}
else
{
this
.
fireupbtn
.
Enabled
=
true
;
}
}
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
1
)
{
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetStatue
==
1
)
{
this
.
fireupbtnI
.
Enabled
=
false
;
}
else
{
this
.
fireupbtnI
.
Enabled
=
true
;
}
}
}
private
void
auxtool_FormClosed
(
object
sender
,
FormClosedEventArgs
e
)
{
fidfire
.
Stop
();
}
//private void fireupbtnb_Click(object sender, EventArgs e)
//{
// if (String.IsNullOrEmpty(fireuptime.Text) || String.IsNullOrEmpty(hvalvetime.Text))
// {
// MessageBox.Show("点火时间 和 氢气阀时间不能为空!!!");
// }
// else
// {
// ushort time1 = ushort.Parse(fireuptime.Text);
// ushort time2 = ushort.Parse(hvalvetime.Text);
// ushort time3 = ushort.Parse(firstfiredelay.Text);
// if (time1 >= time2)
// {
// auxtoolforfireup(2, time1, time2, time3);
// }
// else
// {
// MessageBox.Show("点火时间需大于等于氢气阀时间!!!");
// }
// }
//}
}
}
}
}
GcDevicePc/auxtool.resx
View file @
14a202a3
...
@@ -117,6 +117,9 @@
...
@@ -117,6 +117,9 @@
<resheader
name=
"writer"
>
<resheader
name=
"writer"
>
<value>
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.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>
<metadata
name=
"fidfire.TrayLocation"
type=
"System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>
<value>
17, 17
</value>
</metadata>
<assembly
alias=
"System.Drawing"
name=
"System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
/>
<assembly
alias=
"System.Drawing"
name=
"System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
/>
<data
name=
"$this.Icon"
type=
"System.Drawing.Icon, System.Drawing"
mimetype=
"application/x-microsoft.net.object.bytearray.base64"
>
<data
name=
"$this.Icon"
type=
"System.Drawing.Icon, System.Drawing"
mimetype=
"application/x-microsoft.net.object.bytearray.base64"
>
<value>
<value>
...
...
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