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
129cc874
Commit
129cc874
authored
Jul 01, 2019
by
liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据林工通信协议修改slave,修改了部分界面,添加了对校零标阀开关问题的逻辑,修改校标零时的问题。
parent
00cc97e1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
1850 additions
and
437 deletions
+1850
-437
AboutForm.cs
GcDevicePc/AboutForm.cs
+1
-1
App.config
GcDevicePc/App.config
+36
-36
InfoBarUser.cs
GcDevicePc/CK_UI/InfoBarUser.cs
+30
-21
GCModbusSlave.cs
GcDevicePc/Common/GCModbusSlave.cs
+37
-36
NModbusSlave.cs
GcDevicePc/Common/NModbusSlave.cs
+845
-44
MethodMain.cs
GcDevicePc/ConfigMethod/MethodMain.cs
+1
-1
IPPIP.Designer.cs
GcDevicePc/ConfigMethod/injectionport/IPPIP.Designer.cs
+20
-2
IPPIP.cs
GcDevicePc/ConfigMethod/injectionport/IPPIP.cs
+3
-2
PrompBox.cs
GcDevicePc/Controls/PrompBox.cs
+1
-1
DataState.cs
GcDevicePc/DataState.cs
+4
-4
Auxiliary.cs
GcDevicePc/DeviceConfigUI/Auxiliary.cs
+4
-1
ConfigDevice.cs
GcDevicePc/DeviceConfigUI/ConfigDevice.cs
+3
-2
FormUser.Designer.cs
GcDevicePc/FormUser.Designer.cs
+0
-1
FormUser.cs
GcDevicePc/FormUser.cs
+22
-20
GCMethodConfig.cs
GcDevicePc/GCBuffer/GCMethodConfig.cs
+10
-1
HMIBuffer.cs
GcDevicePc/GCBuffer/HMIBuffer.cs
+28
-4
MDIBase.Designer.cs
GcDevicePc/MDIBase.Designer.cs
+1
-1
MDIBase.cs
GcDevicePc/MDIBase.cs
+142
-115
MainForm.Designer.cs
GcDevicePc/MainForm.Designer.cs
+1
-1
GcDataTh.cs
GcDevicePc/ProThread/GcDataTh.cs
+2
-2
HMIControl.cs
GcDevicePc/ProThread/HMIControl.cs
+480
-7
SignalDataToHw.cs
GcDevicePc/ProThread/SignalDataToHw.cs
+1
-1
Program.cs
GcDevicePc/Program.cs
+10
-25
Settings.Designer.cs
GcDevicePc/Properties/Settings.Designer.cs
+1
-1
RunTables.Designer.cs
GcDevicePc/RunTables.Designer.cs
+14
-14
StartForm.cs
GcDevicePc/StartForm.cs
+0
-1
TestForm.Designer.cs
GcDevicePc/TestForm.Designer.cs
+36
-27
TestForm.cs
GcDevicePc/TestForm.cs
+9
-13
TestForm.resx
GcDevicePc/TestForm.resx
+3
-0
auxtool.Designer.cs
GcDevicePc/auxtool.Designer.cs
+90
-49
auxtool.cs
GcDevicePc/auxtool.cs
+12
-1
globaldata.cs
GcDevicePc/globaldata.cs
+3
-2
No files found.
GcDevicePc/AboutForm.cs
View file @
129cc874
...
@@ -42,7 +42,7 @@ namespace GcDevicePc
...
@@ -42,7 +42,7 @@ namespace GcDevicePc
this
.
fid1ver
.
Text
=
this
.
FID1version
;
this
.
fid1ver
.
Text
=
this
.
FID1version
;
this
.
fid2ver
.
Text
=
this
.
FID2version
;
this
.
fid2ver
.
Text
=
this
.
FID2version
;
this
.
tcdver
.
Text
=
this
.
TCD1version
;
this
.
tcdver
.
Text
=
this
.
TCD1version
;
this
.
PCver
.
Text
=
this
.
Hmiversion
+
"/1.5.
4
"
;
this
.
PCver
.
Text
=
this
.
Hmiversion
+
"/1.5.
5
"
;
}
}
}
}
}
}
GcDevicePc/App.config
View file @
129cc874
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
configuration
>
<
configSections
>
<
configSections
>
<
section
name
=
"log4net"
type
=
"log4net.Config.Log4NetConfigurationSectionHandler, log4net"
/>
<
section
name
=
"log4net"
type
=
"log4net.Config.Log4NetConfigurationSectionHandler, log4net"
/>
</
configSections
>
</
configSections
>
<
startup
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.5"
/>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.5"
/>
</
startup
>
</
startup
>
<
runtime
>
<
runtime
>
<
legacyUnhandledExceptionPolicy
enabled
=
"true"
/>
<
legacyUnhandledExceptionPolicy
enabled
=
"true"
/>
<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
<
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"System.Data.SQLite"
publicKeyToken
=
"db937bc2d44ff139"
culture
=
"neutral"
/>
<
assemblyIdentity
name
=
"System.Data.SQLite"
publicKeyToken
=
"db937bc2d44ff139"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.0.104.0"
newVersion
=
"1.0.104.0"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.0.104.0"
newVersion
=
"1.0.104.0"
/>
</
dependentAssembly
>
</
dependentAssembly
>
</
assemblyBinding
>
</
assemblyBinding
>
</
runtime
>
</
runtime
>
<
log4net
>
<
log4net
>
<
logger
name
=
"Log"
>
<
logger
name
=
"Log"
>
<
level
value
=
"INFO"
/>
<
level
value
=
"INFO"
/>
<
appender
-
ref
ref
=
"RollingLog"
/>
<
appender
-
ref
ref
=
"RollingLog"
/>
</
logger
>
</
logger
>
<
logger
name
=
"Err"
>
<
logger
name
=
"Err"
>
<
level
value
=
"ERROR"
/>
<
level
value
=
"ERROR"
/>
<
appender
-
ref
ref
=
"RollingErr"
/>
<
appender
-
ref
ref
=
"RollingErr"
/>
</
logger
>
</
logger
>
<
logger
name
=
"HmiInfo"
>
<
logger
name
=
"HmiInfo"
>
<
level
value
=
"INFO"
/>
<
level
value
=
"INFO"
/>
<
appender
-
ref
ref
=
"HmiRollingLog"
/>
<
appender
-
ref
ref
=
"HmiRollingLog"
/>
</
logger
>
</
logger
>
<
appender
name
=
"RollingLog"
type
=
"log4net.Appender.RollingFileAppender"
>
<
appender
name
=
"RollingLog"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"..\GC_User\Logs\InfoLog_"
/>
<
file
value
=
"..\GC_User\Logs\InfoLog_"
/>
<
appendToFile
value
=
"true"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyyMMdd'.txt'"
/>
<
datePattern
value
=
"yyyyMMdd'.txt'"
/>
<
staticLogFileName
value
=
"false"
/>
<
staticLogFileName
value
=
"false"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"Record Time:%d Thread ID:[%thread]- Info:%m%n"
/>
<
conversionPattern
value
=
"Record Time:%d Thread ID:[%thread]- Info:%m%n"
/>
</
layout
>
</
layout
>
<
filter
type
=
"log4net.Filter.LevelRangeFilter"
>
<
filter
type
=
"log4net.Filter.LevelRangeFilter"
>
<
param
name
=
"LevelMin"
value
=
"INFO"
/>
<
param
name
=
"LevelMin"
value
=
"INFO"
/>
<
param
name
=
"LevelMax"
value
=
"INFO"
/>
<
param
name
=
"LevelMax"
value
=
"INFO"
/>
</
filter
>
</
filter
>
</
appender
>
</
appender
>
<
appender
name
=
"HmiRollingLog"
type
=
"log4net.Appender.RollingFileAppender"
>
<
appender
name
=
"HmiRollingLog"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"..\GC_User\Logs\HmiLog_"
/>
<
file
value
=
"..\GC_User\Logs\HmiLog_"
/>
<
appendToFile
value
=
"true"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyyMMdd'.txt'"
/>
<
datePattern
value
=
"yyyyMMdd'.txt'"
/>
<
staticLogFileName
value
=
"false"
/>
<
staticLogFileName
value
=
"false"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"Record Time:%d Info:%m%n"
/>
<
conversionPattern
value
=
"Record Time:%d Info:%m%n"
/>
</
layout
>
</
layout
>
<
filter
type
=
"log4net.Filter.LevelRangeFilter"
>
<
filter
type
=
"log4net.Filter.LevelRangeFilter"
>
<
param
name
=
"LevelMin"
value
=
"INFO"
/>
<
param
name
=
"LevelMin"
value
=
"INFO"
/>
<
param
name
=
"LevelMax"
value
=
"INFO"
/>
<
param
name
=
"LevelMax"
value
=
"INFO"
/>
</
filter
>
</
filter
>
</
appender
>
</
appender
>
<
appender
name
=
"RollingErr"
type
=
"log4net.Appender.RollingFileAppender"
>
<
appender
name
=
"RollingErr"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"..\GC_User\Logs\ErrLog_"
/>
<
file
value
=
"..\GC_User\Logs\ErrLog_"
/>
<
appendToFile
value
=
"true"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyyMMdd'.txt'"
/>
<
datePattern
value
=
"yyyyMMdd'.txt'"
/>
<
staticLogFileName
value
=
"false"
/>
<
staticLogFileName
value
=
"false"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"Record Time:%d Thread ID:[%thread]- Error:%m%n"
/>
<
conversionPattern
value
=
"Record Time:%d Thread ID:[%thread]- Error:%m%n"
/>
</
layout
>
</
layout
>
<
filter
type
=
"log4net.Filter.LevelRangeFilter"
>
<
filter
type
=
"log4net.Filter.LevelRangeFilter"
>
<
param
name
=
"LevelMin"
value
=
"ERROR"
/>
<
param
name
=
"LevelMin"
value
=
"ERROR"
/>
<
param
name
=
"LevelMax"
value
=
"ERROR"
/>
<
param
name
=
"LevelMax"
value
=
"ERROR"
/>
</
filter
>
</
filter
>
</
appender
>
</
appender
>
</
log4net
>
</
log4net
>
...
...
GcDevicePc/CK_UI/InfoBarUser.cs
View file @
129cc874
...
@@ -7,6 +7,7 @@ using System.Linq;
...
@@ -7,6 +7,7 @@ using System.Linq;
using
System.Text
;
using
System.Text
;
using
System.Windows.Forms
;
using
System.Windows.Forms
;
using
System.Diagnostics
;
using
System.Diagnostics
;
using
GcDevicePc.IniParam
;
namespace
GcDevicePc.CK_UI
namespace
GcDevicePc.CK_UI
{
{
...
@@ -31,7 +32,8 @@ namespace GcDevicePc.CK_UI
...
@@ -31,7 +32,8 @@ namespace GcDevicePc.CK_UI
//前进样口
//前进样口
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortFront
==
1
)
{
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPSetTemp
==
0.0f
)
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPSetTemp
==
0.0f
)
{
{
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
>=
1001.0f
)
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
>=
1001.0f
)
...
@@ -68,6 +70,13 @@ namespace GcDevicePc.CK_UI
...
@@ -68,6 +70,13 @@ namespace GcDevicePc.CK_UI
textBoxport
.
BackColor
=
waringcolor
;
textBoxport
.
BackColor
=
waringcolor
;
}
}
}
else
{
textBoxport
.
Text
=
""
;
textBoxport
.
BackColor
=
Color
.
LightGray
;
}
//柱箱
//柱箱
...
...
GcDevicePc/Common/GCModbusSlave.cs
View file @
129cc874
...
@@ -88,7 +88,7 @@ namespace GcDevicePc.Common
...
@@ -88,7 +88,7 @@ namespace GcDevicePc.Common
public
void
CModbusSlaveInit
(
ushort
hstartaddr
,
ushort
hnreg
,
ushort
cstartaddr
,
ushort
cnreg
)
public
void
CModbusSlaveInit
(
ushort
hstartaddr
,
ushort
hnreg
,
ushort
cstartaddr
,
ushort
cnreg
)
{
{
//
setHoldingRegisterFunc(hstartaddr, hnreg);
setHoldingRegisterFunc
(
hstartaddr
,
hnreg
);
setCoilsRegisterFunc
(
cstartaddr
,
cnreg
);
setCoilsRegisterFunc
(
cstartaddr
,
cnreg
);
...
@@ -138,8 +138,8 @@ namespace GcDevicePc.Common
...
@@ -138,8 +138,8 @@ namespace GcDevicePc.Common
f
[
0
]
=
float
.
Parse
(
SharedSpace
.
Data
.
listValue
[
readnum
].
vale
.
ToString
());
f
[
0
]
=
float
.
Parse
(
SharedSpace
.
Data
.
listValue
[
readnum
].
vale
.
ToString
());
Buffer
.
BlockCopy
(
f
,
2
,
s
,
0
,
2
);
Buffer
.
BlockCopy
(
f
,
2
,
s
,
0
,
2
);
Buffer
.
BlockCopy
(
f
,
0
,
s
,
2
,
2
);
Buffer
.
BlockCopy
(
f
,
0
,
s
,
2
,
2
);
//
value = s[(address - baseaddress) % 2];
value
=
s
[(
address
-
baseaddress
)
%
2
];
value
=
address
;
//
value = address;
}
}
else
else
{
{
...
@@ -265,18 +265,18 @@ namespace GcDevicePc.Common
...
@@ -265,18 +265,18 @@ namespace GcDevicePc.Common
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortFront
==
1
)
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortFront
==
1
)
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
0
)
//
if (CProfileDevice.m_DevParam.syspara.u16DetFrontType == 0)
{
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
*
10
);
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
*
10
);
}
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
1
)
//
else if (CProfileDevice.m_DevParam.syspara.u16DetFrontType == 1)
{
//
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
*
10
);
//
value = (ushort)(globaldata.m_dpbuffer.ShowList.showtemp.fDetActualTemp * 10);
}
//
}
else
//
else
{
//
{
value
=
0
;
//
value = 0;
}
//
}
}
}
else
else
{
{
...
@@ -288,18 +288,18 @@ namespace GcDevicePc.Common
...
@@ -288,18 +288,18 @@ namespace GcDevicePc.Common
{
{
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)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
*
10
);
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
1
)
{
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
*
10
);
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
*
10
);
}
}
else
//else if (CProfileDevice.m_DevParam.syspara.u16DetInterType == 1)
{
//{
value
=
0
;
// value = (ushort)(globaldata.m_dpbuffer.ShowList.showtemp.iDetActualTemp * 10);
}
//}
//else
//{
// value = 0;
//}
}
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16AuxHeater1
==
1
)
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16AuxHeater1
==
1
)
{
{
...
@@ -315,13 +315,19 @@ namespace GcDevicePc.Common
...
@@ -315,13 +315,19 @@ namespace GcDevicePc.Common
{
{
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)
{
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetActualTemp
*
10
);
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetActualTemp
*
10
);
}
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehindType
==
1
)
//else if (CProfileDevice.m_DevParam.syspara.u16DetBehindType == 1)
{
//{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetActualTemp
*
10
);
// value = (ushort)(globaldata.m_dpbuffer.ShowList.showtemp.bDetActualTemp * 10);
//}
//else
//{
// value = 0;
//}
}
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16AuxHeater2
==
1
)
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16AuxHeater2
==
1
)
{
{
...
@@ -332,11 +338,6 @@ namespace GcDevicePc.Common
...
@@ -332,11 +338,6 @@ namespace GcDevicePc.Common
value
=
0
;
value
=
0
;
}
}
}
}
else
{
value
=
0
;
}
}
break
;
break
;
case
15
:
//前点火信号
case
15
:
//前点火信号
{
{
...
@@ -631,11 +632,11 @@ namespace GcDevicePc.Common
...
@@ -631,11 +632,11 @@ namespace GcDevicePc.Common
{
{
if
(
value
==
1
)
if
(
value
==
1
)
{
{
CurveDisPlay
.
curdisp
.
SetAutoAdjust
(
);
//CurveDisPlay.curdisp.SetAutoAdjust(0
);
}
}
else
if
(
value
==
0
)
else
if
(
value
==
0
)
{
{
CurveDisPlay
.
curdisp
.
StopAutoAdjust
();
//
CurveDisPlay.curdisp.StopAutoAdjust();
}
}
}
}
...
...
GcDevicePc/Common/NModbusSlave.cs
View file @
129cc874
This diff is collapsed.
Click to expand it.
GcDevicePc/ConfigMethod/MethodMain.cs
View file @
129cc874
...
@@ -435,7 +435,7 @@ namespace GcDevicePc.ConfigMethod
...
@@ -435,7 +435,7 @@ namespace GcDevicePc.ConfigMethod
}
}
SignalDataToHw
.
methodconfig
=
this
.
gcmethodconfig
;
SignalDataToHw
.
methodconfig
=
this
.
gcmethodconfig
;
SendDataToZB
.
methodconfig
=
this
.
gcmethodconfig
;
//
SendDataToZB.methodconfig = this.gcmethodconfig;
//string message = "提交成功!";
//string message = "提交成功!";
//MessageBox.Show(message, "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
//MessageBox.Show(message, "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
...
...
GcDevicePc/ConfigMethod/injectionport/IPPIP.Designer.cs
View file @
129cc874
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
textBox1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
textBox1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label5
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label5
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label6
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// label1
// label1
...
@@ -73,13 +74,16 @@
...
@@ -73,13 +74,16 @@
// cbHeater
// cbHeater
//
//
this
.
cbHeater
.
AutoSize
=
true
;
this
.
cbHeater
.
AutoSize
=
true
;
this
.
cbHeater
.
Checked
=
true
;
this
.
cbHeater
.
CheckState
=
System
.
Windows
.
Forms
.
CheckState
.
Checked
;
this
.
cbHeater
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
11F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
cbHeater
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
11F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
cbHeater
.
Location
=
new
System
.
Drawing
.
Point
(
169
,
155
);
this
.
cbHeater
.
Location
=
new
System
.
Drawing
.
Point
(
67
,
153
);
this
.
cbHeater
.
Name
=
"cbHeater"
;
this
.
cbHeater
.
Name
=
"cbHeater"
;
this
.
cbHeater
.
Size
=
new
System
.
Drawing
.
Size
(
71
,
19
);
this
.
cbHeater
.
Size
=
new
System
.
Drawing
.
Size
(
71
,
19
);
this
.
cbHeater
.
TabIndex
=
3
;
this
.
cbHeater
.
TabIndex
=
3
;
this
.
cbHeater
.
Text
=
"加热器"
;
this
.
cbHeater
.
Text
=
"加热器"
;
this
.
cbHeater
.
UseVisualStyleBackColor
=
true
;
this
.
cbHeater
.
UseVisualStyleBackColor
=
true
;
this
.
cbHeater
.
Visible
=
false
;
//
//
// txtHeater
// txtHeater
//
//
...
@@ -237,10 +241,12 @@
...
@@ -237,10 +241,12 @@
//
//
// textBox1
// textBox1
//
//
this
.
textBox1
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
None
;
this
.
textBox1
.
Enabled
=
false
;
this
.
textBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
11F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
textBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
11F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
textBox1
.
Location
=
new
System
.
Drawing
.
Point
(
367
,
58
);
this
.
textBox1
.
Location
=
new
System
.
Drawing
.
Point
(
367
,
58
);
this
.
textBox1
.
Name
=
"textBox1"
;
this
.
textBox1
.
Name
=
"textBox1"
;
this
.
textBox1
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
24
);
this
.
textBox1
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
17
);
this
.
textBox1
.
TabIndex
=
4
;
this
.
textBox1
.
TabIndex
=
4
;
//
//
// label5
// label5
...
@@ -253,12 +259,23 @@
...
@@ -253,12 +259,23 @@
this
.
label5
.
TabIndex
=
16
;
this
.
label5
.
TabIndex
=
16
;
this
.
label5
.
Text
=
"℃"
;
this
.
label5
.
Text
=
"℃"
;
//
//
// label6
//
this
.
label6
.
AutoSize
=
true
;
this
.
label6
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
11F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
188
,
159
);
this
.
label6
.
Name
=
"label6"
;
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label6
.
TabIndex
=
31
;
this
.
label6
.
Text
=
"温度:"
;
//
// IPPIP
// IPPIP
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
592
,
332
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
592
,
332
);
this
.
Controls
.
Add
(
this
.
label6
);
this
.
Controls
.
Add
(
this
.
label3
);
this
.
Controls
.
Add
(
this
.
label3
);
this
.
Controls
.
Add
(
this
.
combSampleCarrierGas
);
this
.
Controls
.
Add
(
this
.
combSampleCarrierGas
);
this
.
Controls
.
Add
(
this
.
label21
);
this
.
Controls
.
Add
(
this
.
label21
);
...
@@ -309,5 +326,6 @@
...
@@ -309,5 +326,6 @@
private
System
.
Windows
.
Forms
.
Label
label3
;
private
System
.
Windows
.
Forms
.
Label
label3
;
private
System
.
Windows
.
Forms
.
TextBox
textBox1
;
private
System
.
Windows
.
Forms
.
TextBox
textBox1
;
private
System
.
Windows
.
Forms
.
Label
label5
;
private
System
.
Windows
.
Forms
.
Label
label5
;
private
System
.
Windows
.
Forms
.
Label
label6
;
}
}
}
}
\ No newline at end of file
GcDevicePc/ConfigMethod/injectionport/IPPIP.cs
View file @
129cc874
...
@@ -48,7 +48,7 @@ namespace GcDevicePc.ConfigMethod.injectionport
...
@@ -48,7 +48,7 @@ namespace GcDevicePc.ConfigMethod.injectionport
txtHeater
.
Text
=
this
.
methodconfig
.
port
[
index
].
HeaterTmpActual
.
ToString
();
txtHeater
.
Text
=
this
.
methodconfig
.
port
[
index
].
HeaterTmpActual
.
ToString
();
textBox1
.
Text
=
configTemp
.
ToString
();
if
(
this
.
hwconfig
.
hwconfiginfo
.
u16StartType
==
1
||
this
.
hwconfig
.
hwconfiginfo
.
u16StartType
==
3
)
if
(
this
.
hwconfig
.
hwconfiginfo
.
u16StartType
==
1
||
this
.
hwconfig
.
hwconfiginfo
.
u16StartType
==
3
)
{
{
...
@@ -227,6 +227,8 @@ namespace GcDevicePc.ConfigMethod.injectionport
...
@@ -227,6 +227,8 @@ namespace GcDevicePc.ConfigMethod.injectionport
txtSeptumBlowingflow
.
Enabled
=
false
;
txtSeptumBlowingflow
.
Enabled
=
false
;
}
}
textBox1
.
Text
=
configTemp
.
ToString
();
//txtFlow.Text = this.methodconfig.auxs[index].pipFlowActual.ToString();
//txtFlow.Text = this.methodconfig.auxs[index].pipFlowActual.ToString();
txtHeater
.
Text
=
this
.
methodconfig
.
auxs
[
index
].
HeaterTmpActual
.
ToString
();
txtHeater
.
Text
=
this
.
methodconfig
.
auxs
[
index
].
HeaterTmpActual
.
ToString
();
//txtPressure.Text = this.methodconfig.auxs[index].pipPressureActual.ToString();
//txtPressure.Text = this.methodconfig.auxs[index].pipPressureActual.ToString();
...
@@ -324,7 +326,6 @@ namespace GcDevicePc.ConfigMethod.injectionport
...
@@ -324,7 +326,6 @@ namespace GcDevicePc.ConfigMethod.injectionport
this
.
methodconfig
.
port
[
index
].
pipSeptumBlowFlow
=
1
;
this
.
methodconfig
.
port
[
index
].
pipSeptumBlowFlow
=
1
;
#
region
旧代码
#
region
旧代码
//int index;
//int index;
...
...
GcDevicePc/Controls/PrompBox.cs
View file @
129cc874
...
@@ -35,7 +35,7 @@ namespace GcDevicePc.Controls
...
@@ -35,7 +35,7 @@ namespace GcDevicePc.Controls
PictureBox
pictureBox_Loading
=
new
PictureBox
();
PictureBox
pictureBox_Loading
=
new
PictureBox
();
pictureBox_Loading
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
pictureBox_Loading
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
pictureBox_Loading
.
Image
=
Image
.
FromFile
(
"C:\\Users\\24042\\Pictures\\052124596426732.gif"
);
//
pictureBox_Loading.Image = Image.FromFile("C:\\Users\\24042\\Pictures\\052124596426732.gif");
pictureBox_Loading
.
Name
=
"pictureBox_Loading"
;
pictureBox_Loading
.
Name
=
"pictureBox_Loading"
;
pictureBox_Loading
.
Size
=
new
System
.
Drawing
.
Size
(
48
,
48
);
pictureBox_Loading
.
Size
=
new
System
.
Drawing
.
Size
(
48
,
48
);
pictureBox_Loading
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
AutoSize
;
pictureBox_Loading
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
AutoSize
;
...
...
GcDevicePc/DataState.cs
View file @
129cc874
...
@@ -1200,8 +1200,8 @@ namespace GcDevicePc
...
@@ -1200,8 +1200,8 @@ namespace GcDevicePc
{
{
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"前进样口"
;
tempshow
.
Text
=
"前进样口"
;
//
tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.FPActualTemp) + " / " + globaldata.m_dpbuffer.ShowList.showtemp.FPSetTemp.ToString("0"));
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
)
+
" / "
+
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPSetTemp
.
ToString
(
"0"
));
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
)
+
" / "
+
CProfileDevice
.
m_DevParam
.
port
[
0
].
fHeaterSetTemp
.
ToString
(
"0"
));
//
tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.FPActualTemp) + " / " + CProfileDevice.m_DevParam.port[0].fHeaterSetTemp.ToString("0"));
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
<
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16InjPortFPTemp
+
1
)
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
<
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16InjPortFPTemp
+
1
)
{
{
...
@@ -1252,8 +1252,8 @@ namespace GcDevicePc
...
@@ -1252,8 +1252,8 @@ namespace GcDevicePc
{
{
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"后进样口"
;
tempshow
.
Text
=
"后进样口"
;
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
)
+
" / "
+
CProfileDevice
.
m_DevParam
.
port
[
1
].
fHeaterSetTemp
.
ToString
(
"0"
));
//
tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.BPActualTemp) + " / " + CProfileDevice.m_DevParam.port[1].fHeaterSetTemp.ToString("0"));
//
tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.BPActualTemp) + " / " + globaldata.m_dpbuffer.ShowList.showtemp.BPSetTemp.ToString("0"));
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
)
+
" / "
+
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPSetTemp
.
ToString
(
"0"
));
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
<
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16InjPortBPTemp
+
1
)
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
<
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16InjPortBPTemp
+
1
)
{
{
...
...
GcDevicePc/DeviceConfigUI/Auxiliary.cs
View file @
129cc874
...
@@ -53,7 +53,10 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -53,7 +53,10 @@ namespace GcDevicePc.DeviceConfigUI
{
{
if
(
this
.
hWConfig
!=
null
)
if
(
this
.
hWConfig
!=
null
)
{
{
//this.hWConfig.hwconfiginfo.u16AuxHeaterNum = this.AuxHeaterNum.SelectedIndex;
//this.hWConfig.hwconfiginfo.u16AuxHeaterNum = this.AuxHeaterNum.SelectedIndex;.
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeater
=
this
.
AuxHeater1
.
Checked
||
this
.
AuxHeater2
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeaterNum
=
(
this
.
AuxHeater1
.
Checked
?
1
:
0
)
+
(
this
.
AuxHeater2
.
Checked
?
1
:
0
);
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeaterNum
=
(
this
.
AuxHeater1
.
Checked
?
1
:
0
)
+
(
this
.
AuxHeater2
.
Checked
?
1
:
0
);
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeater1
=
this
.
AuxHeater1
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeater1
=
this
.
AuxHeater1
.
Checked
?
1
:
0
;
...
...
GcDevicePc/DeviceConfigUI/ConfigDevice.cs
View file @
129cc874
...
@@ -516,7 +516,6 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -516,7 +516,6 @@ namespace GcDevicePc.DeviceConfigUI
//DialogResult dr = saveDialog.ShowDialog();
//DialogResult dr = saveDialog.ShowDialog();
//if (dr == DialogResult.OK)
//if (dr == DialogResult.OK)
try
try
{
{
...
@@ -537,6 +536,8 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -537,6 +536,8 @@ namespace GcDevicePc.DeviceConfigUI
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
==
false
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
==
false
)
{
{
savebtn
.
Enabled
=
false
;
SCclient
.
WtClientInit
(
ip
,
globaldata
.
fileserverport
);
SCclient
.
WtClientInit
(
ip
,
globaldata
.
fileserverport
);
SCclient
.
WtClientCopytoServer
(
"DevStatus.ini"
,
sendfilename
,
globaldata
.
remoteFolder
+
"仪器状态\\"
);
SCclient
.
WtClientCopytoServer
(
"DevStatus.ini"
,
sendfilename
,
globaldata
.
remoteFolder
+
"仪器状态\\"
);
//MessageBox.Show("更新配置完成!");
//MessageBox.Show("更新配置完成!");
...
@@ -549,7 +550,7 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -549,7 +550,7 @@ namespace GcDevicePc.DeviceConfigUI
ret
=
SCclient
.
WtHMIRunPro
(
"GcDevice.exe"
,
globaldata
.
exeremoteFolder
);
ret
=
SCclient
.
WtHMIRunPro
(
"GcDevice.exe"
,
globaldata
.
exeremoteFolder
);
if
(
ret
==
1
)
if
(
ret
==
1
)
{
{
savebtn
.
Enabled
=
true
;
DialogResult
result
=
MessageBox
.
Show
(
"HMI自重启成功,是否重启PC软件以同步?"
,
"提示信息"
,
MessageBoxButtons
.
OKCancel
,
MessageBoxIcon
.
None
,
MessageBoxDefaultButton
.
Button1
,
MessageBoxOptions
.
ServiceNotification
);
DialogResult
result
=
MessageBox
.
Show
(
"HMI自重启成功,是否重启PC软件以同步?"
,
"提示信息"
,
MessageBoxButtons
.
OKCancel
,
MessageBoxIcon
.
None
,
MessageBoxDefaultButton
.
Button1
,
MessageBoxOptions
.
ServiceNotification
);
if
(
result
==
DialogResult
.
OK
)
if
(
result
==
DialogResult
.
OK
)
{
{
...
...
GcDevicePc/FormUser.Designer.cs
View file @
129cc874
...
@@ -103,6 +103,5 @@
...
@@ -103,6 +103,5 @@
private
System
.
Windows
.
Forms
.
Button
buttonFID
;
private
System
.
Windows
.
Forms
.
Button
buttonFID
;
private
System
.
Windows
.
Forms
.
Button
buttonauto
;
private
System
.
Windows
.
Forms
.
Button
buttonauto
;
private
CK_UI
.
InfoBarUser
infoBarUser1
;
private
CK_UI
.
InfoBarUser
infoBarUser1
;
}
}
}
}
\ No newline at end of file
GcDevicePc/FormUser.cs
View file @
129cc874
...
@@ -37,23 +37,23 @@ namespace GcDevicePc
...
@@ -37,23 +37,23 @@ namespace GcDevicePc
// MessageBox.Show("停用");
// MessageBox.Show("停用");
Console
.
WriteLine
(
"停用"
);
Console
.
WriteLine
(
"停用"
);
}
}
public
bool
isFire
;
//
public bool isFire;
public
double
time
;
//
public double time;
public
event
Fireport
autofire
;
public
event
Fireport
autofire
;
//点火操作
//点火操作
private
void
buttonFID_Click
(
object
sender
,
EventArgs
e
)
private
void
buttonFID_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
isFire
)
//
if (isFire)
{
{
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetStatue
!=
2
)
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetStatue
!=
2
)
autofire
(
0
,
10
,
5
);
autofire
(
0
,
10
,
5
);
else
else
MessageBox
.
Show
(
"点火操作禁止,FID已经点火成功"
);
MessageBox
.
Show
(
"点火操作禁止,FID已经点火成功"
);
}
}
else
//
else
{
//
{
MessageBox
.
Show
(
"请"
+
time
+
"分钟后在点火"
);
//
MessageBox.Show("请"+ time + "分钟后在点火");
}
//
}
//if (globaldata.m_dpbuffer.ShowList.showDet.fDetStatue != 2)
//if (globaldata.m_dpbuffer.ShowList.showDet.fDetStatue != 2)
// autofire(0, 10, 5);
// autofire(0, 10, 5);
//else
//else
...
@@ -63,25 +63,27 @@ namespace GcDevicePc
...
@@ -63,25 +63,27 @@ namespace GcDevicePc
//自动校准
//自动校准
private
void
buttonauto_Click
(
object
sender
,
EventArgs
e
)
private
void
buttonauto_Click
(
object
sender
,
EventArgs
e
)
{
{
DialogResult
dr
=
new
CK_UI
.
LandIn
(
"calibration"
,
DateTime
.
Now
.
ToString
(
"HHmm"
)).
ShowDialog
();
//
DialogResult dr = new CK_UI.LandIn("calibration", DateTime.Now.ToString("HHmm")).ShowDialog();
if
(
dr
==
DialogResult
.
OK
)
//
if (dr == DialogResult.OK)
{
//
{
if
(
CK_UI
.
LandIn
.
Island
)
//
if (CK_UI.LandIn.Island)
{
{
//CKVocAnalyzer.CtrlUserAdjust auto = new CKVocAnalyzer.CtrlUserAdjust(CKVocAnalyzer.CtrlUserAdjust.AdjustType.AT_Yang);
CKVocAnalyzer
.
AutoAdjust
auto
=
new
CKVocAnalyzer
.
AutoAdjust
();
CKVocAnalyzer
.
AutoAdjust
auto
=
new
CKVocAnalyzer
.
AutoAdjust
();
auto
.
Show
();
auto
.
Show
();
Trace
.
WriteLine
(
string
.
Format
(
"用户{0},进入自动校准模式"
,
"calibration"
),
"sys"
);
//Trace.WriteLine(string.Format("用户{0},进入自动校准模式", "calibration"), "sys");
}
else
{
MessageBox
.
Show
(
"无权限操作!!!!"
);
}
}
}
//else
// {
if
(
dr
==
DialogResult
.
No
)
{
// MessageBox.Show("无权限操作!!!!");
// MessageBox.Show("无权限操作!!!!");
}
// }
//}
//if (dr == DialogResult.No)
//{
// // MessageBox.Show("无权限操作!!!!");
//}
}
}
...
...
GcDevicePc/GCBuffer/GCMethodConfig.cs
View file @
129cc874
...
@@ -1105,7 +1105,6 @@ namespace GcDevicePc.GCBuffer
...
@@ -1105,7 +1105,6 @@ namespace GcDevicePc.GCBuffer
savemethodconfig
.
WriteProfileInt
(
strKey
,
"控制方式"
,
auxs
[
cFront
].
ControlMode
);
savemethodconfig
.
WriteProfileInt
(
strKey
,
"控制方式"
,
auxs
[
cFront
].
ControlMode
);
savemethodconfig
.
WriteProfileInt
(
strKey
,
"加热器开关"
,
auxs
[
cFront
].
Heater
);
savemethodconfig
.
WriteProfileInt
(
strKey
,
"加热器开关"
,
auxs
[
cFront
].
Heater
);
savemethodconfig
.
WriteProfileInt
(
"辅助"
,
"辅助加热区1"
,
auxs
[
cFront
].
Heater
);
savemethodconfig
.
WriteProfileInt
(
"辅助"
,
"辅助加热区1"
,
auxs
[
cFront
].
Heater
);
savemethodconfig
.
WriteProfileInt
(
"辅助"
,
"加热开关"
,
auxs
[
cFront
].
Heater
);
savemethodconfig
.
WriteProfileFloat
(
"辅助"
,
"辅助加热区1设定温度"
,
auxs
[
cFront
].
HeaterTmpSet
);
savemethodconfig
.
WriteProfileFloat
(
"辅助"
,
"辅助加热区1设定温度"
,
auxs
[
cFront
].
HeaterTmpSet
);
savemethodconfig
.
WriteProfileFloat
(
strKey
,
"压力值"
,
auxs
[
cFront
].
pipPressureSet
);
savemethodconfig
.
WriteProfileFloat
(
strKey
,
"压力值"
,
auxs
[
cFront
].
pipPressureSet
);
savemethodconfig
.
WriteProfileFloat
(
strKey
,
"流量值"
,
auxs
[
cFront
].
pipFlowSet
);
savemethodconfig
.
WriteProfileFloat
(
strKey
,
"流量值"
,
auxs
[
cFront
].
pipFlowSet
);
...
@@ -1128,6 +1127,16 @@ namespace GcDevicePc.GCBuffer
...
@@ -1128,6 +1127,16 @@ namespace GcDevicePc.GCBuffer
savemethodconfig
.
WriteProfileInt
(
strKey
,
"隔垫吹扫流量开关"
,
auxs
[
cBehind
].
pipSeptumBlowFlow
);
savemethodconfig
.
WriteProfileInt
(
strKey
,
"隔垫吹扫流量开关"
,
auxs
[
cBehind
].
pipSeptumBlowFlow
);
savemethodconfig
.
WriteProfileFloat
(
strKey
,
"隔垫吹扫流量值"
,
auxs
[
cBehind
].
pipSeptumBlowFlowSet
);
savemethodconfig
.
WriteProfileFloat
(
strKey
,
"隔垫吹扫流量值"
,
auxs
[
cBehind
].
pipSeptumBlowFlowSet
);
if
(
auxs
[
cFront
].
Heater
==
1
||
auxs
[
cBehind
].
Heater
==
1
)
{
savemethodconfig
.
WriteProfileInt
(
"辅助"
,
"加热开关"
,
1
);
}
else
{
savemethodconfig
.
WriteProfileInt
(
"辅助"
,
"加热开关"
,
0
);
}
...
...
GcDevicePc/GCBuffer/HMIBuffer.cs
View file @
129cc874
...
@@ -56,6 +56,21 @@ namespace GcDevicePc.GCBuffer
...
@@ -56,6 +56,21 @@ namespace GcDevicePc.GCBuffer
public
hmiinfo
gcinfo
=
new
hmiinfo
();
public
hmiinfo
gcinfo
=
new
hmiinfo
();
public
struct
adjust
{
public
float
setpotency
;
//设定浓度
public
float
trackpotency
;
//跟踪浓度
public
long
settime
;
//设定时间
public
long
executefun
;
//执行功能
public
long
funrun
;
//功能启停
public
long
runtime
;
//运行时间
public
long
executestat
;
//执行状态
//
public
int
currentstate
;
//当前状态
}
public
adjust
gcadjust
=
new
adjust
();
public
HMIBuffer
()
public
HMIBuffer
()
{
{
gcinfo
.
batno
=
0
;
gcinfo
.
batno
=
0
;
...
@@ -66,14 +81,23 @@ namespace GcDevicePc.GCBuffer
...
@@ -66,14 +81,23 @@ namespace GcDevicePc.GCBuffer
gcinfo
.
waitstart
=
0
;
gcinfo
.
waitstart
=
0
;
gcinfo
.
hmistatus
=
0
;
gcinfo
.
hmistatus
=
0
;
gcinfo
.
runtime
=
0
;
gcinfo
.
runtime
=
0
;
gcinfo
.
TenRelay
=
new
byte
[
1
0
];
gcinfo
.
TenRelay
=
new
byte
[
1
2
];
gcinfo
.
FireStatus
=
new
ushort
[
4
]
{
0
,
0
,
0
,
0
};
gcinfo
.
FireStatus
=
new
ushort
[
4
]
{
0
,
0
,
0
,
0
};
gcinfo
.
DACStatus
=
new
ushort
[
6
]
{
0
,
0
,
0
,
0
,
0
,
0
};
gcinfo
.
DACStatus
=
new
ushort
[
6
]
{
0
,
0
,
0
,
0
,
0
,
0
};
gcinfo
.
ErrorStatus
=
new
byte
[
9
];
gcinfo
.
ErrorStatus
=
new
byte
[
9
];
gcinfo
.
hmioffline
=
false
;
gcinfo
.
hmioffline
=
false
;
gcinfo
.
HMIMac
=
new
ushort
[
3
]
{
0
,
0
,
0
};
gcinfo
.
HMIMac
=
new
ushort
[
3
]
{
0
,
0
,
0
};
gcinfo
.
EPCStatus
=
new
ushort
[
16
]
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
gcinfo
.
EPCStatus
=
new
ushort
[
16
]
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
gcinfo
.
HmiAbnormal
=
new
ushort
[
3
]
{
0
,
0
,
0
};
gcinfo
.
HmiAbnormal
=
new
ushort
[
3
]
{
0
,
0
,
0
};
gcadjust
.
executefun
=
0
;
gcadjust
.
executestat
=
0
;
gcadjust
.
runtime
=
0
;
gcadjust
.
funrun
=
0
;
gcadjust
.
setpotency
=
0
;
gcadjust
.
settime
=
1800
;
gcadjust
.
trackpotency
=
0
;
gcadjust
.
currentstate
=
0
;
}
}
~
HMIBuffer
()
~
HMIBuffer
()
...
...
GcDevicePc/MDIBase.Designer.cs
View file @
129cc874
...
@@ -337,7 +337,7 @@
...
@@ -337,7 +337,7 @@
// timerWorker
// timerWorker
//
//
this
.
timerWorker
.
Enabled
=
true
;
this
.
timerWorker
.
Enabled
=
true
;
this
.
timerWorker
.
Interval
=
5
000
;
this
.
timerWorker
.
Interval
=
1
000
;
this
.
timerWorker
.
Tick
+=
new
System
.
EventHandler
(
this
.
timerWorker_Tick
);
this
.
timerWorker
.
Tick
+=
new
System
.
EventHandler
(
this
.
timerWorker_Tick
);
//
//
// toolStripStatusLabelusertime
// toolStripStatusLabelusertime
...
...
GcDevicePc/MDIBase.cs
View file @
129cc874
This diff is collapsed.
Click to expand it.
GcDevicePc/MainForm.Designer.cs
View file @
129cc874
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1008
,
730
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1008
,
730
);
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Name
=
"MainForm"
;
this
.
Name
=
"MainForm"
;
this
.
Text
=
"Tetchrom色谱工作站-1.5.
4
用户界面"
;
this
.
Text
=
"Tetchrom色谱工作站-1.5.
5
用户界面"
;
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
this
.
PerformLayout
();
...
...
GcDevicePc/ProThread/GcDataTh.cs
View file @
129cc874
...
@@ -612,7 +612,7 @@ namespace GcDevicePc.ProThread
...
@@ -612,7 +612,7 @@ namespace GcDevicePc.ProThread
private
bool
GetALLSWState
(
ref
byte
[]
state
)
private
bool
GetALLSWState
(
ref
byte
[]
state
)
{
{
int
ret
=
-
1
;
int
ret
=
-
1
;
ret
=
GetCState
(
16
,
1
0
,
ref
state
);
ret
=
GetCState
(
16
,
1
2
,
ref
state
);
return
ret
==
0
?
true
:
false
;
return
ret
==
0
?
true
:
false
;
}
}
...
@@ -785,7 +785,7 @@ namespace GcDevicePc.ProThread
...
@@ -785,7 +785,7 @@ namespace GcDevicePc.ProThread
if
(
GetALLSWState
(
ref
tenstate
))
if
(
GetALLSWState
(
ref
tenstate
))
{
{
for
(
int
i
=
0
;
i
<
1
0
;
i
++)
for
(
int
i
=
0
;
i
<
1
2
;
i
++)
{
{
if
(
i
<
8
)
if
(
i
<
8
)
globaldata
.
m_hmibuffer
.
gcinfo
.
TenRelay
[
i
]
=
(
byte
)((((
tenstate
[
0
]
>>
i
)
&
0x1
)
==
1
)
?
1
:
0
);
globaldata
.
m_hmibuffer
.
gcinfo
.
TenRelay
[
i
]
=
(
byte
)((((
tenstate
[
0
]
>>
i
)
&
0x1
)
==
1
)
?
1
:
0
);
...
...
GcDevicePc/ProThread/HMIControl.cs
View file @
129cc874
This diff is collapsed.
Click to expand it.
GcDevicePc/ProThread/SignalDataToHw.cs
View file @
129cc874
...
@@ -11,7 +11,7 @@ namespace GcDevicePc.ProThread
...
@@ -11,7 +11,7 @@ namespace GcDevicePc.ProThread
{
{
class
SignalDataToHw
class
SignalDataToHw
{
{
[
DllImport
(
@"HWSendData.dll"
)]
[
DllImport
(
@"HWSendData.dll"
,
EntryPoint
=
"SendDataToHW"
)]
public
static
extern
void
GCSendDataToHW
(
Int32
data1
,
Int32
data2
,
Int32
data3
);
public
static
extern
void
GCSendDataToHW
(
Int32
data1
,
Int32
data2
,
Int32
data3
);
#
region
私有变量
#
region
私有变量
ManualResetEvent
datamre
=
new
ManualResetEvent
(
false
);
ManualResetEvent
datamre
=
new
ManualResetEvent
(
false
);
...
...
GcDevicePc/Program.cs
View file @
129cc874
using
System
;
using
System
;
using
System.Linq
;
using
System.Windows.Forms
;
using
System.Windows.Forms
;
namespace
GcDevicePc
namespace
GcDevicePc
...
@@ -15,36 +14,22 @@ namespace GcDevicePc
...
@@ -15,36 +14,22 @@ namespace GcDevicePc
bool
createNew
;
bool
createNew
;
//Application.Run(new TestForm());
//Application.Run(new TestForm());
{
{
int
num
=
System
.
Diagnostics
.
Process
.
GetProcessesByName
(
Application
.
ProductName
).
ToList
().
Count
;
using
(
System
.
Threading
.
Mutex
mutex
=
new
System
.
Threading
.
Mutex
(
true
,
Application
.
ProductName
,
out
createNew
))
if
(
num
>
2
)
{
if
(
createNew
)
{
Application
.
Run
(
new
StartForm
());
mutex
.
ReleaseMutex
();
}
else
{
{
MessageBox
.
Show
(
"应用程序已多开
..."
);
MessageBox
.
Show
(
"应用程序已经在运行中
..."
);
System
.
Threading
.
Thread
.
Sleep
(
1000
);
System
.
Threading
.
Thread
.
Sleep
(
1000
);
Application
.
Exit
();
Application
.
Exit
();
System
.
Diagnostics
.
Process
.
GetCurrentProcess
().
Kill
();
System
.
Diagnostics
.
Process
.
GetCurrentProcess
().
Kill
();
// System.Environment.Exit(1);
// System.Environment.Exit(1);
}
}
else
{
//存在
using
(
System
.
Threading
.
Mutex
mutex
=
new
System
.
Threading
.
Mutex
(
true
,
Application
.
ProductName
,
out
createNew
))
{
//if (createNew)
//{
Application
.
Run
(
new
StartForm
());
mutex
.
ReleaseMutex
();
//}
//else
//{
// MessageBox.Show("应用程序已经在运行中...");
// System.Threading.Thread.Sleep(1000);
// Application.Exit();
// System.Diagnostics.Process.GetCurrentProcess().Kill();
// // System.Environment.Exit(1);
//}
}
}
}
}
}
}
}
}
}
...
...
GcDevicePc/Properties/Settings.Designer.cs
View file @
129cc874
...
@@ -12,7 +12,7 @@ namespace GcDevicePc.Properties {
...
@@ -12,7 +12,7 @@ namespace GcDevicePc.Properties {
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator"
,
"1
6.1
.0.0"
)]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator"
,
"1
2.0
.0.0"
)]
internal
sealed
partial
class
Settings
:
global
::
System
.
Configuration
.
ApplicationSettingsBase
{
internal
sealed
partial
class
Settings
:
global
::
System
.
Configuration
.
ApplicationSettingsBase
{
private
static
Settings
defaultInstance
=
((
Settings
)(
global
::
System
.
Configuration
.
ApplicationSettingsBase
.
Synchronized
(
new
Settings
())));
private
static
Settings
defaultInstance
=
((
Settings
)(
global
::
System
.
Configuration
.
ApplicationSettingsBase
.
Synchronized
(
new
Settings
())));
...
...
GcDevicePc/RunTables.Designer.cs
View file @
129cc874
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
//
//
// tabrun
// tabrun
//
//
this
.
tabrun
.
Location
=
new
System
.
Drawing
.
Point
(
539
,
316
);
this
.
tabrun
.
Location
=
new
System
.
Drawing
.
Point
(
362
,
316
);
this
.
tabrun
.
Name
=
"tabrun"
;
this
.
tabrun
.
Name
=
"tabrun"
;
this
.
tabrun
.
Size
=
new
System
.
Drawing
.
Size
(
93
,
23
);
this
.
tabrun
.
Size
=
new
System
.
Drawing
.
Size
(
93
,
23
);
this
.
tabrun
.
TabIndex
=
1
;
this
.
tabrun
.
TabIndex
=
1
;
...
@@ -100,7 +100,6 @@
...
@@ -100,7 +100,6 @@
//
//
// groupBox2
// groupBox2
//
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
updategv
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
rdbox
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
rdbox
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
rcbox
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
rcbox
);
...
@@ -117,7 +116,7 @@
...
@@ -117,7 +116,7 @@
//
//
// updategv
// updategv
//
//
this
.
updategv
.
Location
=
new
System
.
Drawing
.
Point
(
320
,
235
);
this
.
updategv
.
Location
=
new
System
.
Drawing
.
Point
(
514
,
316
);
this
.
updategv
.
Name
=
"updategv"
;
this
.
updategv
.
Name
=
"updategv"
;
this
.
updategv
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
23
);
this
.
updategv
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
23
);
this
.
updategv
.
TabIndex
=
7
;
this
.
updategv
.
TabIndex
=
7
;
...
@@ -127,7 +126,7 @@
...
@@ -127,7 +126,7 @@
//
//
// rdbox
// rdbox
//
//
this
.
rdbox
.
Location
=
new
System
.
Drawing
.
Point
(
272
,
237
);
this
.
rdbox
.
Location
=
new
System
.
Drawing
.
Point
(
340
,
237
);
this
.
rdbox
.
Name
=
"rdbox"
;
this
.
rdbox
.
Name
=
"rdbox"
;
this
.
rdbox
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
21
);
this
.
rdbox
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
21
);
this
.
rdbox
.
TabIndex
=
6
;
this
.
rdbox
.
TabIndex
=
6
;
...
@@ -135,7 +134,7 @@
...
@@ -135,7 +134,7 @@
// label3
// label3
//
//
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
2
11
,
240
);
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
2
79
,
240
);
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
12
);
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
12
);
this
.
label3
.
TabIndex
=
5
;
this
.
label3
.
TabIndex
=
5
;
...
@@ -143,7 +142,7 @@
...
@@ -143,7 +142,7 @@
//
//
// rcbox
// rcbox
//
//
this
.
rcbox
.
Location
=
new
System
.
Drawing
.
Point
(
168
,
237
);
this
.
rcbox
.
Location
=
new
System
.
Drawing
.
Point
(
209
,
237
);
this
.
rcbox
.
Name
=
"rcbox"
;
this
.
rcbox
.
Name
=
"rcbox"
;
this
.
rcbox
.
Size
=
new
System
.
Drawing
.
Size
(
37
,
21
);
this
.
rcbox
.
Size
=
new
System
.
Drawing
.
Size
(
37
,
21
);
this
.
rcbox
.
TabIndex
=
4
;
this
.
rcbox
.
TabIndex
=
4
;
...
@@ -151,7 +150,7 @@
...
@@ -151,7 +150,7 @@
// label2
// label2
//
//
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
97
,
240
);
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
138
,
240
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
12
);
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
12
);
this
.
label2
.
TabIndex
=
3
;
this
.
label2
.
TabIndex
=
3
;
...
@@ -159,7 +158,7 @@
...
@@ -159,7 +158,7 @@
//
//
// rtbox
// rtbox
//
//
this
.
rtbox
.
Location
=
new
System
.
Drawing
.
Point
(
63
,
237
);
this
.
rtbox
.
Location
=
new
System
.
Drawing
.
Point
(
77
,
237
);
this
.
rtbox
.
Name
=
"rtbox"
;
this
.
rtbox
.
Name
=
"rtbox"
;
this
.
rtbox
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
21
);
this
.
rtbox
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
21
);
this
.
rtbox
.
TabIndex
=
2
;
this
.
rtbox
.
TabIndex
=
2
;
...
@@ -167,7 +166,7 @@
...
@@ -167,7 +166,7 @@
// label1
// label1
//
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
240
);
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
20
,
240
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
12
);
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
12
);
this
.
label1
.
TabIndex
=
1
;
this
.
label1
.
TabIndex
=
1
;
...
@@ -196,11 +195,11 @@
...
@@ -196,11 +195,11 @@
//
//
// AddMethodbtn
// AddMethodbtn
//
//
this
.
AddMethodbtn
.
Location
=
new
System
.
Drawing
.
Point
(
3
57
,
316
);
this
.
AddMethodbtn
.
Location
=
new
System
.
Drawing
.
Point
(
3
08
,
92
);
this
.
AddMethodbtn
.
Name
=
"AddMethodbtn"
;
this
.
AddMethodbtn
.
Name
=
"AddMethodbtn"
;
this
.
AddMethodbtn
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
AddMethodbtn
.
Size
=
new
System
.
Drawing
.
Size
(
37
,
30
);
this
.
AddMethodbtn
.
TabIndex
=
4
;
this
.
AddMethodbtn
.
TabIndex
=
4
;
this
.
AddMethodbtn
.
Text
=
"
添加
"
;
this
.
AddMethodbtn
.
Text
=
"
>>>
"
;
this
.
AddMethodbtn
.
UseVisualStyleBackColor
=
true
;
this
.
AddMethodbtn
.
UseVisualStyleBackColor
=
true
;
this
.
AddMethodbtn
.
Click
+=
new
System
.
EventHandler
(
this
.
AddMethodbtn_Click
);
this
.
AddMethodbtn
.
Click
+=
new
System
.
EventHandler
(
this
.
AddMethodbtn_Click
);
//
//
...
@@ -250,9 +249,9 @@
...
@@ -250,9 +249,9 @@
//
//
// stopbat
// stopbat
//
//
this
.
stopbat
.
Location
=
new
System
.
Drawing
.
Point
(
6
48
,
316
);
this
.
stopbat
.
Location
=
new
System
.
Drawing
.
Point
(
6
21
,
316
);
this
.
stopbat
.
Name
=
"stopbat"
;
this
.
stopbat
.
Name
=
"stopbat"
;
this
.
stopbat
.
Size
=
new
System
.
Drawing
.
Size
(
85
,
23
);
this
.
stopbat
.
Size
=
new
System
.
Drawing
.
Size
(
104
,
23
);
this
.
stopbat
.
TabIndex
=
5
;
this
.
stopbat
.
TabIndex
=
5
;
this
.
stopbat
.
Text
=
"停止批处理"
;
this
.
stopbat
.
Text
=
"停止批处理"
;
this
.
stopbat
.
UseVisualStyleBackColor
=
true
;
this
.
stopbat
.
UseVisualStyleBackColor
=
true
;
...
@@ -322,6 +321,7 @@
...
@@ -322,6 +321,7 @@
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
750
,
380
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
750
,
380
);
this
.
Controls
.
Add
(
this
.
updategv
);
this
.
Controls
.
Add
(
this
.
label4
);
this
.
Controls
.
Add
(
this
.
label4
);
this
.
Controls
.
Add
(
this
.
addRunTable
);
this
.
Controls
.
Add
(
this
.
addRunTable
);
this
.
Controls
.
Add
(
this
.
delRunTable
);
this
.
Controls
.
Add
(
this
.
delRunTable
);
...
...
GcDevicePc/StartForm.cs
View file @
129cc874
...
@@ -109,7 +109,6 @@ namespace GcDevicePc
...
@@ -109,7 +109,6 @@ namespace GcDevicePc
_opacityTimer
.
Interval
=
30
;
_opacityTimer
.
Interval
=
30
;
_opacityTimer
.
Elapsed
+=
new
System
.
Timers
.
ElapsedEventHandler
(
OpacityTimerProcOpen
);
_opacityTimer
.
Elapsed
+=
new
System
.
Timers
.
ElapsedEventHandler
(
OpacityTimerProcOpen
);
_opacityTimer
.
Start
();
_opacityTimer
.
Start
();
//globaldata.ProgramCount = num;
}
}
private
void
MainFrmStartProc
()
private
void
MainFrmStartProc
()
...
...
GcDevicePc/TestForm.Designer.cs
View file @
129cc874
...
@@ -28,28 +28,30 @@
...
@@ -28,28 +28,30 @@
/// </summary>
/// </summary>
private
void
InitializeComponent
()
private
void
InitializeComponent
()
{
{
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
gcTitle1
=
new
GcDevicePc
.
Controls
.
GCTitle
();
this
.
gcTitle1
=
new
GcDevicePc
.
Controls
.
GCTitle
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
button3
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button3
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button4
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button4
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
textBox1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
button5
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
textBox2
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
button6
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// button1
// button1
//
//
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
331
,
364
);
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
110
,
156
);
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button1
.
TabIndex
=
0
;
this
.
button1
.
TabIndex
=
0
;
this
.
button1
.
Text
=
"
button1
"
;
this
.
button1
.
Text
=
"
24
"
;
this
.
button1
.
UseVisualStyleBackColor
=
true
;
this
.
button1
.
UseVisualStyleBackColor
=
true
;
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
btnShow_Click
);
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
btnShow_Click
);
//
//
// button2
// button2
//
//
this
.
button2
.
Location
=
new
System
.
Drawing
.
Point
(
2
41
,
318
);
this
.
button2
.
Location
=
new
System
.
Drawing
.
Point
(
2
50
,
364
);
this
.
button2
.
Name
=
"button2"
;
this
.
button2
.
Name
=
"button2"
;
this
.
button2
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button2
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button2
.
TabIndex
=
1
;
this
.
button2
.
TabIndex
=
1
;
...
@@ -65,47 +67,54 @@
...
@@ -65,47 +67,54 @@
this
.
gcTitle1
.
Size
=
new
System
.
Drawing
.
Size
(
800
,
20
);
this
.
gcTitle1
.
Size
=
new
System
.
Drawing
.
Size
(
800
,
20
);
this
.
gcTitle1
.
TabIndex
=
2
;
this
.
gcTitle1
.
TabIndex
=
2
;
//
//
// timer1
//
this
.
timer1
.
Interval
=
5000
;
this
.
timer1
.
Tick
+=
new
System
.
EventHandler
(
this
.
Timer1_Tick
);
//
// button3
// button3
//
//
this
.
button3
.
Location
=
new
System
.
Drawing
.
Point
(
440
,
364
);
this
.
button3
.
Location
=
new
System
.
Drawing
.
Point
(
191
,
156
);
this
.
button3
.
Name
=
"button3"
;
this
.
button3
.
Name
=
"button3"
;
this
.
button3
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button3
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button3
.
TabIndex
=
3
;
this
.
button3
.
TabIndex
=
3
;
this
.
button3
.
Text
=
"
button3
"
;
this
.
button3
.
Text
=
"
25
"
;
this
.
button3
.
UseVisualStyleBackColor
=
true
;
this
.
button3
.
UseVisualStyleBackColor
=
true
;
this
.
button3
.
Click
+=
new
System
.
EventHandler
(
this
.
Button3_Click
);
//
//
// button4
// button4
//
//
this
.
button4
.
Location
=
new
System
.
Drawing
.
Point
(
544
,
364
);
this
.
button4
.
Location
=
new
System
.
Drawing
.
Point
(
272
,
156
);
this
.
button4
.
Name
=
"button4"
;
this
.
button4
.
Name
=
"button4"
;
this
.
button4
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button4
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button4
.
TabIndex
=
4
;
this
.
button4
.
TabIndex
=
3
;
this
.
button4
.
Text
=
"button
4
"
;
this
.
button4
.
Text
=
"button
3
"
;
this
.
button4
.
UseVisualStyleBackColor
=
true
;
this
.
button4
.
UseVisualStyleBackColor
=
true
;
this
.
button4
.
Click
+=
new
System
.
EventHandler
(
this
.
Button4_Click
);
//
//
//
textBox1
//
button5
//
//
this
.
textBox1
.
Location
=
new
System
.
Drawing
.
Point
(
241
,
274
);
this
.
button5
.
Location
=
new
System
.
Drawing
.
Point
(
353
,
156
);
this
.
textBox1
.
Name
=
"textBox1"
;
this
.
button5
.
Name
=
"button5"
;
this
.
textBox1
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
21
);
this
.
button5
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
textBox1
.
TabIndex
=
5
;
this
.
button5
.
TabIndex
=
3
;
this
.
button5
.
Text
=
"button3"
;
this
.
button5
.
UseVisualStyleBackColor
=
true
;
//
//
//
textBox2
//
button6
//
//
this
.
textBox2
.
Location
=
new
System
.
Drawing
.
Point
(
357
,
274
);
this
.
button6
.
Location
=
new
System
.
Drawing
.
Point
(
434
,
156
);
this
.
textBox2
.
Name
=
"textBox2"
;
this
.
button6
.
Name
=
"button6"
;
this
.
textBox2
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
21
);
this
.
button6
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
textBox2
.
TabIndex
=
5
;
this
.
button6
.
TabIndex
=
3
;
this
.
button6
.
Text
=
"button3"
;
this
.
button6
.
UseVisualStyleBackColor
=
true
;
//
//
// TestForm
// TestForm
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
800
,
583
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
800
,
583
);
this
.
Controls
.
Add
(
this
.
textBox2
);
this
.
Controls
.
Add
(
this
.
button6
);
this
.
Controls
.
Add
(
this
.
textBox1
);
this
.
Controls
.
Add
(
this
.
button5
);
this
.
Controls
.
Add
(
this
.
button4
);
this
.
Controls
.
Add
(
this
.
button4
);
this
.
Controls
.
Add
(
this
.
button3
);
this
.
Controls
.
Add
(
this
.
button3
);
this
.
Controls
.
Add
(
this
.
gcTitle1
);
this
.
Controls
.
Add
(
this
.
gcTitle1
);
...
@@ -114,7 +123,6 @@
...
@@ -114,7 +123,6 @@
this
.
Name
=
"TestForm"
;
this
.
Name
=
"TestForm"
;
this
.
Text
=
"TestForm"
;
this
.
Text
=
"TestForm"
;
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
}
}
...
@@ -123,9 +131,10 @@
...
@@ -123,9 +131,10 @@
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
Button
button2
;
private
System
.
Windows
.
Forms
.
Button
button2
;
private
Controls
.
GCTitle
gcTitle1
;
private
Controls
.
GCTitle
gcTitle1
;
private
System
.
Windows
.
Forms
.
Timer
timer1
;
private
System
.
Windows
.
Forms
.
Button
button3
;
private
System
.
Windows
.
Forms
.
Button
button3
;
private
System
.
Windows
.
Forms
.
Button
button4
;
private
System
.
Windows
.
Forms
.
Button
button4
;
private
System
.
Windows
.
Forms
.
TextBox
textBox1
;
private
System
.
Windows
.
Forms
.
Button
button5
;
private
System
.
Windows
.
Forms
.
TextBox
textBox2
;
private
System
.
Windows
.
Forms
.
Button
button6
;
}
}
}
}
\ No newline at end of file
GcDevicePc/TestForm.cs
View file @
129cc874
using
GcDevicePc.Common
;
using
GcDevicePc.Common
;
using
GcDevicePc.ConfigMethod
;
using
GcDevicePc.ConfigMethod
;
using
GcDevicePc.Controls
;
using
GcDevicePc.Controls
;
using
GcDevicePc.ProThread
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.ComponentModel
;
...
@@ -81,7 +80,6 @@ namespace GcDevicePc
...
@@ -81,7 +80,6 @@ namespace GcDevicePc
private
void
btnShow_Click
(
object
sender
,
EventArgs
e
)
private
void
btnShow_Click
(
object
sender
,
EventArgs
e
)
{
{
//loadingCtl.TipsInfo = "提示信息";
//loadingCtl.TipsInfo = "提示信息";
////显示加载动画
////显示加载动画
//loadingCtl.ShowLoading(this);
//loadingCtl.ShowLoading(this);
...
@@ -114,9 +112,12 @@ namespace GcDevicePc
...
@@ -114,9 +112,12 @@ namespace GcDevicePc
//twfile.TW_Close(0);
//twfile.TW_Close(0);
//int i = 100 % 1;
//timer1.Enabled = true;
}
}
HMIControl
hMI
=
new
HMIControl
(
"172.16.1.58"
,
502
);
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
{
{
//MessageBox.Show("asd");
//MessageBox.Show("asd");
...
@@ -127,18 +128,13 @@ namespace GcDevicePc
...
@@ -127,18 +128,13 @@ namespace GcDevicePc
//LMessageBox box = new LMessageBox();
//LMessageBox box = new LMessageBox();
//box.Show(100, 100, this.Location, true, "1230", "3214", LMessageBox.MessageBoxType.MBT_ButtonOK);
//box.Show(100, 100, this.Location, true, "1230", "3214", LMessageBox.MessageBoxType.MBT_ButtonOK);
NModbusSlave
N
=
new
NModbusSlave
();
hMI
.
testr12
(
Convert
.
ToUInt16
(
textBox1
.
Text
),
Convert
.
ToUInt16
(
textBox2
.
Text
));
}
}
int
i
=
0
;
private
void
Button3_Click
(
object
sender
,
EventArgs
e
)
private
void
Timer1_Tick
(
object
sender
,
EventArgs
e
)
{
}
private
void
Button4_Click
(
object
sender
,
EventArgs
e
)
{
{
i
++;
}
}
}
}
...
...
GcDevicePc/TestForm.resx
View file @
129cc874
...
@@ -117,4 +117,7 @@
...
@@ -117,4 +117,7 @@
<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=
"timer1.TrayLocation"
type=
"System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>
<value>
17, 17
</value>
</metadata>
</root>
</root>
\ No newline at end of file
GcDevicePc/auxtool.Designer.cs
View file @
129cc874
This diff is collapsed.
Click to expand it.
GcDevicePc/auxtool.cs
View file @
129cc874
...
@@ -22,7 +22,7 @@ namespace GcDevicePc
...
@@ -22,7 +22,7 @@ namespace GcDevicePc
public
delegate
void
TCD_SetDAC
(
ushort
port
,
ushort
val
);
public
delegate
void
TCD_SetDAC
(
ushort
port
,
ushort
val
);
public
delegate
void
HAir_SW
(
int
val
);
public
delegate
void
HAir_SW
(
int
val
);
public
delegate
void
Adjust_SW
(
int
val
);
public
partial
class
auxtool
:
Form
public
partial
class
auxtool
:
Form
{
{
private
string
HmiIP
=
null
;
private
string
HmiIP
=
null
;
...
@@ -747,6 +747,17 @@ namespace GcDevicePc
...
@@ -747,6 +747,17 @@ namespace GcDevicePc
fidfire
.
Stop
();
fidfire
.
Stop
();
}
}
public
event
Adjust_SW
adsw
;
private
void
Button1_Click
(
object
sender
,
EventArgs
e
)
{
adsw
(
1
);
}
private
void
Button2_Click
(
object
sender
,
EventArgs
e
)
{
adsw
(
0
);
}
//private void fireupbtnb_Click(object sender, EventArgs e)
//private void fireupbtnb_Click(object sender, EventArgs e)
//{
//{
// if (String.IsNullOrEmpty(fireuptime.Text) || String.IsNullOrEmpty(hvalvetime.Text))
// if (String.IsNullOrEmpty(fireuptime.Text) || String.IsNullOrEmpty(hvalvetime.Text))
...
...
GcDevicePc/globaldata.cs
View file @
129cc874
...
@@ -95,7 +95,7 @@ namespace GcDevicePc
...
@@ -95,7 +95,7 @@ namespace GcDevicePc
public
static
PCBuffer
m_pcbuffer
=
new
PCBuffer
();
public
static
PCBuffer
m_pcbuffer
=
new
PCBuffer
();
public
static
SignalBuffer
m_signalbuffer
=
new
SignalBuffer
();
public
static
SignalBuffer
m_signalbuffer
=
new
SignalBuffer
();
//public static int ProgramCount = 0;
//
//
public
static
HWConfig
m_hwconfig
=
new
HWConfig
();
public
static
HWConfig
m_hwconfig
=
new
HWConfig
();
...
@@ -118,6 +118,7 @@ namespace GcDevicePc
...
@@ -118,6 +118,7 @@ namespace GcDevicePc
public
static
int
check_link
=
0
;
public
static
int
check_link
=
0
;
public
static
bool
IsStopOs
=
false
;
///////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
//public static CProfileDevice open_profileMethod = new CProfileDevice();
//public static CProfileDevice open_profileMethod = new CProfileDevice();
//public static MethodConfig open_configDlg = new MethodConfig();
//public static MethodConfig open_configDlg = new MethodConfig();
...
...
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