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
c3f8262d
Commit
c3f8262d
authored
Aug 30, 2019
by
liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加程序配置管理界面(可配对外通信和第三方通信等),修改仪器配置界面内容,开始停止状态实现同步
parent
d87268a7
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
1901 additions
and
1504 deletions
+1901
-1504
AppInit.cs
GcDevicePc/AppInit.cs
+0
-11
LandIn.cs
GcDevicePc/CK_UI/LandIn.cs
+1
-1
NModbusSlave.cs
GcDevicePc/Common/NModbusSlave.cs
+47
-11
MethodMain.cs
GcDevicePc/ConfigMethod/MethodMain.cs
+4
-2
DataState.cs
GcDevicePc/DataState.cs
+30
-28
ColumnBox.Designer.cs
GcDevicePc/DeviceConfigUI/ColumnBox.Designer.cs
+9
-274
ColumnBox.cs
GcDevicePc/DeviceConfigUI/ColumnBox.cs
+0
-24
ConfigDevice.cs
GcDevicePc/DeviceConfigUI/ConfigDevice.cs
+48
-219
Device.Designer.cs
GcDevicePc/DeviceConfigUI/Device.Designer.cs
+67
-36
Device.cs
GcDevicePc/DeviceConfigUI/Device.cs
+30
-3
Sampling.Designer.cs
GcDevicePc/DeviceConfigUI/Sampling.Designer.cs
+249
-243
Sampling.cs
GcDevicePc/DeviceConfigUI/Sampling.cs
+29
-59
HMIBuffer.cs
GcDevicePc/GCBuffer/HMIBuffer.cs
+2
-2
PCBuffer.cs
GcDevicePc/GCBuffer/PCBuffer.cs
+25
-7
GcDevicePc.csproj
GcDevicePc/GcDevicePc.csproj
+9
-0
MDIBase.Designer.cs
GcDevicePc/MDIBase.Designer.cs
+34
-24
MDIBase.cs
GcDevicePc/MDIBase.cs
+90
-306
HMIControl.cs
GcDevicePc/ProThread/HMIControl.cs
+98
-0
SignalDataToHw.cs
GcDevicePc/ProThread/SignalDataToHw.cs
+2
-2
Program.cs
GcDevicePc/Program.cs
+1
-1
RunTables.cs
GcDevicePc/RunTables.cs
+3
-1
SysConfig.Designer.cs
GcDevicePc/SysConfig.Designer.cs
+541
-0
SysConfig.cs
GcDevicePc/SysConfig.cs
+344
-0
SysConfig.resx
GcDevicePc/SysConfig.resx
+120
-0
UserConfig.Designer.cs
GcDevicePc/UserConfig.Designer.cs
+0
-105
UserConfig.cs
GcDevicePc/UserConfig.cs
+111
-144
globaldata.cs
GcDevicePc/globaldata.cs
+7
-1
No files found.
GcDevicePc/AppInit.cs
View file @
c3f8262d
...
@@ -613,17 +613,6 @@ namespace GcDevicePc
...
@@ -613,17 +613,6 @@ namespace GcDevicePc
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfolderinfo
.
SubStatusFolder
=
Path
.
Combine
(
tmpFolder
,
"子状态"
);
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfolderinfo
.
SubStatusFolder
=
Path
.
Combine
(
tmpFolder
,
"子状态"
);
CheckFolderandFile
(
0
,
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfolderinfo
.
SubStatusFolder
);
CheckFolderandFile
(
0
,
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfolderinfo
.
SubStatusFolder
);
tmpFolder
=
null
;
//string file = Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.StartupPath), "GC_Config\\GC_Set\\启动参数\\startup.ini");
//IniFile ini = new IniFile(file);
//string Version = ini.ReadString("Version", "VersionType");
//if (string.IsNullOrEmpty(Version))
//{
// Version = "1";
//}
globaldata
.
CurrentVersion
=
"1"
;
}
}
/// <summary>
/// <summary>
...
...
GcDevicePc/CK_UI/LandIn.cs
View file @
c3f8262d
...
@@ -11,7 +11,7 @@ namespace GcDevicePc.CK_UI
...
@@ -11,7 +11,7 @@ namespace GcDevicePc.CK_UI
{
{
public
partial
class
LandIn
:
Form
public
partial
class
LandIn
:
Form
{
{
private
string
user
=
"admin"
;
private
string
user
=
globaldata
.
UserName
;
public
static
bool
Island
=
false
;
public
static
bool
Island
=
false
;
private
string
dt
;
private
string
dt
;
CKVocAnalyzer
.
NumForm
form
;
CKVocAnalyzer
.
NumForm
form
;
...
...
GcDevicePc/Common/NModbusSlave.cs
View file @
c3f8262d
...
@@ -67,15 +67,39 @@ namespace GcDevicePc.Common
...
@@ -67,15 +67,39 @@ namespace GcDevicePc.Common
case
ModbusDataType
.
HoldingRegister
:
case
ModbusDataType
.
HoldingRegister
:
for
(
int
i
=
0
;
i
<
e
.
Data
.
B
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
e
.
Data
.
B
.
Count
;
i
++)
{
{
slave
.
DataStore
.
HoldingRegisters
[
e
.
StartAddress
+
i
+
1
]
=
slavereadhreg
(
Convert
.
ToUInt16
(
e
.
StartAddress
+
i
+
1
));
switch
(
globaldata
.
Foreign
)
{
case
0
:
slave
.
DataStore
.
HoldingRegisters
[
e
.
StartAddress
+
i
+
1
]
=
slavereadhreg
(
Convert
.
ToUInt16
(
e
.
StartAddress
+
i
+
1
));
break
;
case
1
:
slave
.
DataStore
.
HoldingRegisters
[
e
.
StartAddress
+
i
+
1
]
=
newslavereadhreg1
(
Convert
.
ToUInt16
(
e
.
StartAddress
+
i
+
1
));
break
;
default
:
//slave.DataStore.HoldingRegisters[e.StartAddress + i + 1] = slavereadhreg(Convert.ToUInt16(e.StartAddress + i + 1));
break
;
}
}
}
break
;
break
;
case
ModbusDataType
.
Coil
:
case
ModbusDataType
.
Coil
:
for
(
int
i
=
0
;
i
<
e
.
Data
.
A
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
e
.
Data
.
A
.
Count
;
i
++)
{
{
switch
(
globaldata
.
Foreign
)
{
case
0
:
slave
.
DataStore
.
CoilDiscretes
[
e
.
StartAddress
+
i
+
1
]
=
slavereadcreg
(
Convert
.
ToUInt16
(
e
.
StartAddress
+
i
+
1
))
==
0
?
false
:
true
;
slave
.
DataStore
.
CoilDiscretes
[
e
.
StartAddress
+
i
+
1
]
=
slavereadcreg
(
Convert
.
ToUInt16
(
e
.
StartAddress
+
i
+
1
))
==
0
?
false
:
true
;
break
;
case
1
:
slave
.
DataStore
.
CoilDiscretes
[
e
.
StartAddress
+
i
+
1
]
=
slavereadcreg
(
Convert
.
ToUInt16
(
e
.
StartAddress
+
i
+
1
))
==
0
?
false
:
true
;
break
;
default
:
break
;
}
}
}
break
;
break
;
}
}
...
@@ -97,7 +121,10 @@ namespace GcDevicePc.Common
...
@@ -97,7 +121,10 @@ namespace GcDevicePc.Common
switch
(
e
.
ModbusDataType
)
switch
(
e
.
ModbusDataType
)
{
{
case
ModbusDataType
.
HoldingRegister
:
case
ModbusDataType
.
HoldingRegister
:
//slavewirtehreg(e.StartAddress, e.Data.B.ToArray());
if
(
globaldata
.
Foreign
==
1
)
{
slavewirtehreg
(
e
.
StartAddress
,
e
.
Data
.
B
.
ToArray
());
}
break
;
break
;
case
ModbusDataType
.
Coil
:
case
ModbusDataType
.
Coil
:
...
@@ -429,14 +456,23 @@ namespace GcDevicePc.Common
...
@@ -429,14 +456,23 @@ namespace GcDevicePc.Common
//value = globaldata.m_dpbuffer.ShowList.showepc.EPC1_3_Cur;
//value = globaldata.m_dpbuffer.ShowList.showepc.EPC1_3_Cur;
break
;
break
;
case
1300
:
case
1020
:
value
=
(
ushort
)
globaldata
.
m_pcbuffer
.
gcpcinfo
.
adjust
.
AdjustType
;
value
=
(
ushort
)
globaldata
.
m_dpbuffer
.
ShowList
.
pwmInfo
.
fDPower
;
break
;
case
1021
:
value
=
(
ushort
)
globaldata
.
m_dpbuffer
.
ShowList
.
pwmInfo
.
iDPower
;
break
;
case
1022
:
value
=
(
ushort
)
globaldata
.
m_dpbuffer
.
ShowList
.
pwmInfo
.
bDPower
;
break
;
case
1023
:
value
=
(
ushort
)
globaldata
.
m_dpbuffer
.
ShowList
.
pwmInfo
.
fSPower
;
break
;
break
;
case
1
301
:
case
1
024
:
value
=
(
ushort
)
globaldata
.
m_
pcbuffer
.
gcpcinfo
.
adjust
.
AdjustOS
;
value
=
(
ushort
)
globaldata
.
m_
dpbuffer
.
ShowList
.
pwmInfo
.
bSPower
;
break
;
break
;
case
1
302
:
case
1
025
:
value
=
(
ushort
)
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
adjust
.
AdjustTime
*
60
)
;
value
=
(
ushort
)
globaldata
.
m_dpbuffer
.
ShowList
.
pwmInfo
.
CbPower
;
break
;
break
;
}
}
}
}
...
@@ -716,7 +752,7 @@ namespace GcDevicePc.Common
...
@@ -716,7 +752,7 @@ namespace GcDevicePc.Common
/// </summary>
/// </summary>
/// <param name="address"></param>
/// <param name="address"></param>
/// <returns></returns>
/// <returns></returns>
static
ushort
newslavereadhreg
2
(
ushort
address
)
static
ushort
newslavereadhreg
1
(
ushort
address
)
{
{
try
try
{
{
...
...
GcDevicePc/ConfigMethod/MethodMain.cs
View file @
c3f8262d
...
@@ -436,9 +436,11 @@ namespace GcDevicePc.ConfigMethod
...
@@ -436,9 +436,11 @@ namespace GcDevicePc.ConfigMethod
globaldata
.
m_configDlg
.
m_AuxDlg
.
reflashContent
();
globaldata
.
m_configDlg
.
m_AuxDlg
.
reflashContent
();
globaldata
.
m_configDlg
.
m_SignalDlg
.
reflashContent
();
globaldata
.
m_configDlg
.
m_SignalDlg
.
reflashContent
();
}
}
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
=
0
;
//
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/DataState.cs
View file @
c3f8262d
...
@@ -1045,6 +1045,14 @@ namespace GcDevicePc
...
@@ -1045,6 +1045,14 @@ namespace GcDevicePc
this
.
datalist
.
BeginUpdate
();
this
.
datalist
.
BeginUpdate
();
this
.
datalist
.
Items
.
Clear
();
this
.
datalist
.
Items
.
Clear
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"系统状态"
;
tempshow
.
Font
=
new
Font
(
tempshow
.
Font
,
tempshow
.
Font
.
Style
|
FontStyle
.
Bold
);
tempshow
.
BackColor
=
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
?
Color
.
LightGreen
:
Color
.
White
;
tempshow
.
SubItems
.
Add
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
?
"打开"
:
"关闭"
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"时间显示(min)"
;
tempshow
.
Text
=
"时间显示(min)"
;
tempshow
.
Font
=
new
Font
(
tempshow
.
Font
,
tempshow
.
Font
.
Style
|
FontStyle
.
Bold
);
tempshow
.
Font
=
new
Font
(
tempshow
.
Font
,
tempshow
.
Font
.
Style
|
FontStyle
.
Bold
);
...
@@ -1057,6 +1065,7 @@ namespace GcDevicePc
...
@@ -1057,6 +1065,7 @@ namespace GcDevicePc
{
{
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtime
.
runtimenow
<=
globaldata
.
m_dpbuffer
.
ShowList
.
showtime
.
alltime
)
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtime
.
runtimenow
<=
globaldata
.
m_dpbuffer
.
ShowList
.
showtime
.
alltime
)
{
{
tempshow
.
SubItems
.
Add
((
globaldata
.
m_dpbuffer
.
ShowList
.
showtime
.
runtimenow
/
60.0f
).
ToString
(
"0.00"
)
+
"/"
+
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtime
.
alltime
/
60.0f
).
ToString
(
"0.0"
));
tempshow
.
SubItems
.
Add
((
globaldata
.
m_dpbuffer
.
ShowList
.
showtime
.
runtimenow
/
60.0f
).
ToString
(
"0.00"
)
+
"/"
+
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtime
.
alltime
/
60.0f
).
ToString
(
"0.0"
));
}
}
else
else
...
@@ -1134,9 +1143,6 @@ namespace GcDevicePc
...
@@ -1134,9 +1143,6 @@ namespace GcDevicePc
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
HmiAbnormal
[
0
]
!=
0
||
globaldata
.
m_hmibuffer
.
gcinfo
.
HmiAbnormal
[
1
]
!=
0
||
globaldata
.
m_hmibuffer
.
gcinfo
.
HmiAbnormal
[
2
]
!=
0
)
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
HmiAbnormal
[
0
]
!=
0
||
globaldata
.
m_hmibuffer
.
gcinfo
.
HmiAbnormal
[
1
]
!=
0
||
globaldata
.
m_hmibuffer
.
gcinfo
.
HmiAbnormal
[
2
]
!=
0
)
{
{
tempshow
=
new
ListViewItem
();
this
.
datalist
.
Items
.
Add
(
tempshow
);
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"异常"
;
tempshow
.
Text
=
"异常"
;
tempshow
.
Font
=
new
Font
(
tempshow
.
Font
,
tempshow
.
Font
.
Style
|
FontStyle
.
Bold
);
tempshow
.
Font
=
new
Font
(
tempshow
.
Font
,
tempshow
.
Font
.
Style
|
FontStyle
.
Bold
);
...
@@ -1179,8 +1185,6 @@ namespace GcDevicePc
...
@@ -1179,8 +1185,6 @@ namespace GcDevicePc
}
}
tempshow
=
new
ListViewItem
();
this
.
datalist
.
Items
.
Add
(
tempshow
);
//温度显示
//温度显示
#
region
温度显示部分
#
region
温度显示部分
...
@@ -1616,8 +1620,6 @@ namespace GcDevicePc
...
@@ -1616,8 +1620,6 @@ namespace GcDevicePc
//阀状态显示
//阀状态显示
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
this
.
datalist
.
Items
.
Add
(
tempshow
);
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"事件显示"
;
tempshow
.
Text
=
"事件显示"
;
tempshow
.
Font
=
new
Font
(
tempshow
.
Font
,
tempshow
.
Font
.
Style
|
FontStyle
.
Bold
);
tempshow
.
Font
=
new
Font
(
tempshow
.
Font
,
tempshow
.
Font
.
Style
|
FontStyle
.
Bold
);
tempshow
.
SubItems
.
Add
(
" "
);
tempshow
.
SubItems
.
Add
(
" "
);
...
@@ -1742,8 +1744,6 @@ namespace GcDevicePc
...
@@ -1742,8 +1744,6 @@ namespace GcDevicePc
//tempshow = new ListViewItem();
//tempshow = new ListViewItem();
//this.datalist.Items.Add(tempshow);
//this.datalist.Items.Add(tempshow);
tempshow
=
new
ListViewItem
();
this
.
datalist
.
Items
.
Add
(
tempshow
);
#
region
检测器状态
#
region
检测器状态
...
@@ -2139,8 +2139,6 @@ namespace GcDevicePc
...
@@ -2139,8 +2139,6 @@ namespace GcDevicePc
#
endregion
#
endregion
tempshow
=
new
ListViewItem
();
this
.
datalist
.
Items
.
Add
(
tempshow
);
//tempshow = new ListViewItem();
//tempshow = new ListViewItem();
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16StartType
==
1
||
CProfileDevice
.
m_DevParam
.
syspara
.
u16StartType
==
3
)
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16StartType
==
1
||
CProfileDevice
.
m_DevParam
.
syspara
.
u16StartType
==
3
)
...
@@ -2163,40 +2161,38 @@ namespace GcDevicePc
...
@@ -2163,40 +2161,38 @@ namespace GcDevicePc
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
}
}
tempshow
=
new
ListViewItem
();
tempshow
.
SubItems
.
Add
(
""
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
GettempName
(
"
6路功率
"
);
tempshow
.
Text
=
GettempName
(
"
六路功率(%)
"
);
tempshow
.
Font
=
new
Font
(
tempshow
.
Font
,
tempshow
.
Font
.
Style
|
FontStyle
.
Bold
);
tempshow
.
Font
=
new
Font
(
tempshow
.
Font
,
tempshow
.
Font
.
Style
|
FontStyle
.
Bold
);
tempshow
.
SubItems
.
Add
(
""
);
tempshow
.
SubItems
.
Add
(
""
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
GettempName
(
"前
检测器功率
"
);
tempshow
.
Text
=
GettempName
(
"前
进样口
"
);
tempshow
.
SubItems
.
Add
(
globaldata
.
m_dpbuffer
.
ShowList
.
pwmInfo
.
fDPower
.
ToString
(
));
tempshow
.
SubItems
.
Add
(
Getpower
(
globaldata
.
m_dpbuffer
.
ShowList
.
pwmInfo
.
fSPower
));
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
GettempName
(
"
中检测器功率
"
);
tempshow
.
Text
=
GettempName
(
"
后进样口
"
);
tempshow
.
SubItems
.
Add
(
globaldata
.
m_dpbuffer
.
ShowList
.
pwmInfo
.
iDPower
.
ToString
(
));
tempshow
.
SubItems
.
Add
(
Getpower
(
globaldata
.
m_dpbuffer
.
ShowList
.
pwmInfo
.
bSPower
));
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
GettempName
(
"
后检测器
功率"
);
tempshow
.
Text
=
GettempName
(
"
柱箱
功率"
);
tempshow
.
SubItems
.
Add
(
globaldata
.
m_dpbuffer
.
ShowList
.
pwmInfo
.
bDPower
.
ToString
(
));
tempshow
.
SubItems
.
Add
(
Getpower
(
globaldata
.
m_dpbuffer
.
ShowList
.
pwmInfo
.
CbPower
));
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
GettempName
(
"前
进样器功率
"
);
tempshow
.
Text
=
GettempName
(
"前
检测器
"
);
tempshow
.
SubItems
.
Add
(
globaldata
.
m_dpbuffer
.
ShowList
.
pwmInfo
.
fSPower
.
ToString
(
));
tempshow
.
SubItems
.
Add
(
Getpower
(
globaldata
.
m_dpbuffer
.
ShowList
.
pwmInfo
.
fDPower
));
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
GettempName
(
"
后进样器功率
"
);
tempshow
.
Text
=
GettempName
(
"
中检测器/辅助一
"
);
tempshow
.
SubItems
.
Add
(
globaldata
.
m_dpbuffer
.
ShowList
.
pwmInfo
.
bSPower
.
ToString
(
));
tempshow
.
SubItems
.
Add
(
Getpower
(
globaldata
.
m_dpbuffer
.
ShowList
.
pwmInfo
.
iDPower
));
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
GettempName
(
"
柱箱功率
"
);
tempshow
.
Text
=
GettempName
(
"
后检测器/辅助二
"
);
tempshow
.
SubItems
.
Add
(
globaldata
.
m_dpbuffer
.
ShowList
.
pwmInfo
.
CbPower
.
ToString
(
));
tempshow
.
SubItems
.
Add
(
Getpower
(
globaldata
.
m_dpbuffer
.
ShowList
.
pwmInfo
.
bDPower
));
this
.
datalist
.
Items
.
Add
(
tempshow
);
this
.
datalist
.
Items
.
Add
(
tempshow
);
#
region
#
region
//if (CProfileDevice.m_DevParam.syspara.u16InjPortCtlMode_Behind == 3 &&
//if (CProfileDevice.m_DevParam.syspara.u16InjPortCtlMode_Behind == 3 &&
// CProfileDevice.m_DevParam.syspara.u16InjPortCtlMode_Front == 3)
// CProfileDevice.m_DevParam.syspara.u16InjPortCtlMode_Front == 3)
...
@@ -2373,6 +2369,12 @@ namespace GcDevicePc
...
@@ -2373,6 +2369,12 @@ namespace GcDevicePc
return
name
;
return
name
;
}
}
private
string
Getpower
(
int
p
)
{
string
kw
=
Convert
.
ToInt32
(((
float
)
p
/
1700f
)
*
100
)
+
"%"
;
return
kw
;
}
public
string
GetValue
(
ushort
num
)
public
string
GetValue
(
ushort
num
)
{
{
return
(
num
/
10.0f
).
ToString
(
"#0.0"
);
return
(
num
/
10.0f
).
ToString
(
"#0.0"
);
...
...
GcDevicePc/DeviceConfigUI/ColumnBox.Designer.cs
View file @
c3f8262d
...
@@ -31,28 +31,6 @@
...
@@ -31,28 +31,6 @@
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
ColumnBox
));
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
ColumnBox
));
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
ColType
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
ColType
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
ChromBehind_Thickness
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
ChromBehind_Caliber
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
ChromBehind_Length
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
ChromBehindType
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
label12
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label11
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label10
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label9
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
ChromBehind
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
label8
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
ChromFront_Thickness
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
ChromFront_Caliber
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
ChromFront_Length
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label7
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label6
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label5
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
ChromFrontType
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
label4
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
ChromFront
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
ChromNum
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
ColPTemp
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
ColPTemp
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
...
@@ -60,13 +38,11 @@
...
@@ -60,13 +38,11 @@
this
.
okbtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
okbtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cancelbtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cancelbtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// groupBox1
// groupBox1
//
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
ColType
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
ColType
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
ColPTemp
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
ColPTemp
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label1
);
...
@@ -74,7 +50,7 @@
...
@@ -74,7 +50,7 @@
this
.
groupBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
11F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
11F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
12
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
12
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
513
,
313
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
373
,
190
);
this
.
groupBox1
.
TabIndex
=
0
;
this
.
groupBox1
.
TabIndex
=
0
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"柱箱单元"
;
this
.
groupBox1
.
Text
=
"柱箱单元"
;
...
@@ -86,231 +62,14 @@
...
@@ -86,231 +62,14 @@
"标准柱箱"
,
"标准柱箱"
,
"小柱箱"
,
"小柱箱"
,
"加热器"
});
"加热器"
});
this
.
ColType
.
Location
=
new
System
.
Drawing
.
Point
(
174
,
30
);
this
.
ColType
.
Location
=
new
System
.
Drawing
.
Point
(
215
,
38
);
this
.
ColType
.
Name
=
"ColType"
;
this
.
ColType
.
Name
=
"ColType"
;
this
.
ColType
.
Size
=
new
System
.
Drawing
.
Size
(
97
,
23
);
this
.
ColType
.
Size
=
new
System
.
Drawing
.
Size
(
97
,
23
);
this
.
ColType
.
TabIndex
=
6
;
this
.
ColType
.
TabIndex
=
6
;
//
//
// groupBox2
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
ChromBehind_Thickness
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
ChromBehind_Caliber
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
ChromBehind_Length
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
ChromBehindType
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label12
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label11
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label10
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label9
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
ChromBehind
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label8
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
ChromFront_Thickness
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
ChromFront_Caliber
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
ChromFront_Length
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label7
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label6
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label5
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
ChromFrontType
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label4
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
ChromFront
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
ChromNum
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label3
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
75
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
501
,
232
);
this
.
groupBox2
.
TabIndex
=
5
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"色谱柱"
;
//
// ChromBehind_Thickness
//
this
.
ChromBehind_Thickness
.
Location
=
new
System
.
Drawing
.
Point
(
332
,
200
);
this
.
ChromBehind_Thickness
.
Name
=
"ChromBehind_Thickness"
;
this
.
ChromBehind_Thickness
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
24
);
this
.
ChromBehind_Thickness
.
TabIndex
=
20
;
//
// ChromBehind_Caliber
//
this
.
ChromBehind_Caliber
.
Location
=
new
System
.
Drawing
.
Point
(
332
,
166
);
this
.
ChromBehind_Caliber
.
Name
=
"ChromBehind_Caliber"
;
this
.
ChromBehind_Caliber
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
24
);
this
.
ChromBehind_Caliber
.
TabIndex
=
19
;
//
// ChromBehind_Length
//
this
.
ChromBehind_Length
.
Location
=
new
System
.
Drawing
.
Point
(
332
,
132
);
this
.
ChromBehind_Length
.
Name
=
"ChromBehind_Length"
;
this
.
ChromBehind_Length
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
24
);
this
.
ChromBehind_Length
.
TabIndex
=
18
;
//
// ChromBehindType
//
this
.
ChromBehindType
.
FormattingEnabled
=
true
;
this
.
ChromBehindType
.
Items
.
AddRange
(
new
object
[]
{
"毛细孔柱"
,
"填充柱"
});
this
.
ChromBehindType
.
Location
=
new
System
.
Drawing
.
Point
(
332
,
98
);
this
.
ChromBehindType
.
Name
=
"ChromBehindType"
;
this
.
ChromBehindType
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
23
);
this
.
ChromBehindType
.
TabIndex
=
17
;
//
// label12
//
this
.
label12
.
AutoSize
=
true
;
this
.
label12
.
Location
=
new
System
.
Drawing
.
Point
(
285
,
203
);
this
.
label12
.
Name
=
"label12"
;
this
.
label12
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label12
.
TabIndex
=
16
;
this
.
label12
.
Text
=
"膜厚:"
;
//
// label11
//
this
.
label11
.
AutoSize
=
true
;
this
.
label11
.
Location
=
new
System
.
Drawing
.
Point
(
285
,
169
);
this
.
label11
.
Name
=
"label11"
;
this
.
label11
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label11
.
TabIndex
=
15
;
this
.
label11
.
Text
=
"口径:"
;
//
// label10
//
this
.
label10
.
AutoSize
=
true
;
this
.
label10
.
Location
=
new
System
.
Drawing
.
Point
(
285
,
135
);
this
.
label10
.
Name
=
"label10"
;
this
.
label10
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label10
.
TabIndex
=
14
;
this
.
label10
.
Text
=
"长度:"
;
//
// label9
//
this
.
label9
.
AutoSize
=
true
;
this
.
label9
.
Location
=
new
System
.
Drawing
.
Point
(
285
,
101
);
this
.
label9
.
Name
=
"label9"
;
this
.
label9
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label9
.
TabIndex
=
13
;
this
.
label9
.
Text
=
"类型:"
;
//
// ChromBehind
//
this
.
ChromBehind
.
AutoSize
=
true
;
this
.
ChromBehind
.
Location
=
new
System
.
Drawing
.
Point
(
285
,
63
);
this
.
ChromBehind
.
Name
=
"ChromBehind"
;
this
.
ChromBehind
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
19
);
this
.
ChromBehind
.
TabIndex
=
12
;
this
.
ChromBehind
.
Text
=
"后色谱柱"
;
this
.
ChromBehind
.
UseVisualStyleBackColor
=
true
;
//
// label8
//
this
.
label8
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
Fixed3D
;
this
.
label8
.
Location
=
new
System
.
Drawing
.
Point
(
252
,
62
);
this
.
label8
.
Name
=
"label8"
;
this
.
label8
.
Size
=
new
System
.
Drawing
.
Size
(
2
,
155
);
this
.
label8
.
TabIndex
=
11
;
//
// ChromFront_Thickness
//
this
.
ChromFront_Thickness
.
Location
=
new
System
.
Drawing
.
Point
(
94
,
200
);
this
.
ChromFront_Thickness
.
Name
=
"ChromFront_Thickness"
;
this
.
ChromFront_Thickness
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
24
);
this
.
ChromFront_Thickness
.
TabIndex
=
10
;
//
// ChromFront_Caliber
//
this
.
ChromFront_Caliber
.
Location
=
new
System
.
Drawing
.
Point
(
94
,
166
);
this
.
ChromFront_Caliber
.
Name
=
"ChromFront_Caliber"
;
this
.
ChromFront_Caliber
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
24
);
this
.
ChromFront_Caliber
.
TabIndex
=
9
;
//
// ChromFront_Length
//
this
.
ChromFront_Length
.
Location
=
new
System
.
Drawing
.
Point
(
94
,
132
);
this
.
ChromFront_Length
.
Name
=
"ChromFront_Length"
;
this
.
ChromFront_Length
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
24
);
this
.
ChromFront_Length
.
TabIndex
=
8
;
//
// label7
//
this
.
label7
.
AutoSize
=
true
;
this
.
label7
.
Location
=
new
System
.
Drawing
.
Point
(
34
,
203
);
this
.
label7
.
Name
=
"label7"
;
this
.
label7
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label7
.
TabIndex
=
7
;
this
.
label7
.
Text
=
"膜厚:"
;
//
// label6
//
this
.
label6
.
AutoSize
=
true
;
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
34
,
169
);
this
.
label6
.
Name
=
"label6"
;
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label6
.
TabIndex
=
6
;
this
.
label6
.
Text
=
"口径:"
;
//
// label5
//
this
.
label5
.
AutoSize
=
true
;
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
34
,
135
);
this
.
label5
.
Name
=
"label5"
;
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label5
.
TabIndex
=
5
;
this
.
label5
.
Text
=
"长度:"
;
//
// ChromFrontType
//
this
.
ChromFrontType
.
FormattingEnabled
=
true
;
this
.
ChromFrontType
.
Items
.
AddRange
(
new
object
[]
{
"毛细孔柱"
,
"填充柱"
});
this
.
ChromFrontType
.
Location
=
new
System
.
Drawing
.
Point
(
94
,
98
);
this
.
ChromFrontType
.
Name
=
"ChromFrontType"
;
this
.
ChromFrontType
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
23
);
this
.
ChromFrontType
.
TabIndex
=
4
;
//
// label4
//
this
.
label4
.
AutoSize
=
true
;
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
34
,
101
);
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label4
.
TabIndex
=
3
;
this
.
label4
.
Text
=
"类型:"
;
//
// ChromFront
//
this
.
ChromFront
.
AutoSize
=
true
;
this
.
ChromFront
.
Location
=
new
System
.
Drawing
.
Point
(
34
,
63
);
this
.
ChromFront
.
Name
=
"ChromFront"
;
this
.
ChromFront
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
19
);
this
.
ChromFront
.
TabIndex
=
2
;
this
.
ChromFront
.
Text
=
"前色谱柱"
;
this
.
ChromFront
.
UseVisualStyleBackColor
=
true
;
//
// ChromNum
//
this
.
ChromNum
.
FormattingEnabled
=
true
;
this
.
ChromNum
.
Items
.
AddRange
(
new
object
[]
{
"0"
,
"1"
,
"2"
});
this
.
ChromNum
.
Location
=
new
System
.
Drawing
.
Point
(
118
,
25
);
this
.
ChromNum
.
Name
=
"ChromNum"
;
this
.
ChromNum
.
Size
=
new
System
.
Drawing
.
Size
(
78
,
23
);
this
.
ChromNum
.
TabIndex
=
1
;
this
.
ChromNum
.
Visible
=
false
;
//
// label3
//
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
28
,
28
);
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
97
,
15
);
this
.
label3
.
TabIndex
=
0
;
this
.
label3
.
Text
=
"色谱柱数目:"
;
this
.
label3
.
Visible
=
false
;
//
// ColPTemp
// ColPTemp
//
//
this
.
ColPTemp
.
Location
=
new
System
.
Drawing
.
Point
(
375
,
28
);
this
.
ColPTemp
.
Location
=
new
System
.
Drawing
.
Point
(
215
,
82
);
this
.
ColPTemp
.
Name
=
"ColPTemp"
;
this
.
ColPTemp
.
Name
=
"ColPTemp"
;
this
.
ColPTemp
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
24
);
this
.
ColPTemp
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
24
);
this
.
ColPTemp
.
TabIndex
=
4
;
this
.
ColPTemp
.
TabIndex
=
4
;
...
@@ -318,7 +77,7 @@
...
@@ -318,7 +77,7 @@
// label2
// label2
//
//
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
304
,
34
);
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
132
,
91
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label2
.
TabIndex
=
3
;
this
.
label2
.
TabIndex
=
3
;
...
@@ -327,7 +86,7 @@
...
@@ -327,7 +86,7 @@
// label1
// label1
//
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
1
03
,
33
);
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
1
27
,
46
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label1
.
TabIndex
=
1
;
this
.
label1
.
TabIndex
=
1
;
...
@@ -336,7 +95,7 @@
...
@@ -336,7 +95,7 @@
// Col
// Col
//
//
this
.
Col
.
AutoSize
=
true
;
this
.
Col
.
AutoSize
=
true
;
this
.
Col
.
Location
=
new
System
.
Drawing
.
Point
(
26
,
33
);
this
.
Col
.
Location
=
new
System
.
Drawing
.
Point
(
50
,
46
);
this
.
Col
.
Name
=
"Col"
;
this
.
Col
.
Name
=
"Col"
;
this
.
Col
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
19
);
this
.
Col
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
19
);
this
.
Col
.
TabIndex
=
0
;
this
.
Col
.
TabIndex
=
0
;
...
@@ -345,7 +104,7 @@
...
@@ -345,7 +104,7 @@
//
//
// okbtn
// okbtn
//
//
this
.
okbtn
.
Location
=
new
System
.
Drawing
.
Point
(
303
,
344
);
this
.
okbtn
.
Location
=
new
System
.
Drawing
.
Point
(
201
,
229
);
this
.
okbtn
.
Name
=
"okbtn"
;
this
.
okbtn
.
Name
=
"okbtn"
;
this
.
okbtn
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
okbtn
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
okbtn
.
TabIndex
=
1
;
this
.
okbtn
.
TabIndex
=
1
;
...
@@ -355,7 +114,7 @@
...
@@ -355,7 +114,7 @@
//
//
// cancelbtn
// cancelbtn
//
//
this
.
cancelbtn
.
Location
=
new
System
.
Drawing
.
Point
(
412
,
344
);
this
.
cancelbtn
.
Location
=
new
System
.
Drawing
.
Point
(
310
,
229
);
this
.
cancelbtn
.
Name
=
"cancelbtn"
;
this
.
cancelbtn
.
Name
=
"cancelbtn"
;
this
.
cancelbtn
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
cancelbtn
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
cancelbtn
.
TabIndex
=
2
;
this
.
cancelbtn
.
TabIndex
=
2
;
...
@@ -368,7 +127,7 @@
...
@@ -368,7 +127,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
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
537
,
388
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
407
,
276
);
this
.
Controls
.
Add
(
this
.
cancelbtn
);
this
.
Controls
.
Add
(
this
.
cancelbtn
);
this
.
Controls
.
Add
(
this
.
okbtn
);
this
.
Controls
.
Add
(
this
.
okbtn
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
...
@@ -379,8 +138,6 @@
...
@@ -379,8 +138,6 @@
this
.
Load
+=
new
System
.
EventHandler
(
this
.
ColumnBox_Load
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
ColumnBox_Load
);
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
PerformLayout
();
this
.
groupBox1
.
PerformLayout
();
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
groupBox2
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
}
...
@@ -392,28 +149,6 @@
...
@@ -392,28 +149,6 @@
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
Label
label2
;
private
System
.
Windows
.
Forms
.
Label
label2
;
private
System
.
Windows
.
Forms
.
TextBox
ColPTemp
;
private
System
.
Windows
.
Forms
.
TextBox
ColPTemp
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox2
;
private
System
.
Windows
.
Forms
.
Label
label3
;
private
System
.
Windows
.
Forms
.
ComboBox
ChromNum
;
private
System
.
Windows
.
Forms
.
CheckBox
ChromFront
;
private
System
.
Windows
.
Forms
.
Label
label4
;
private
System
.
Windows
.
Forms
.
ComboBox
ChromFrontType
;
private
System
.
Windows
.
Forms
.
Label
label7
;
private
System
.
Windows
.
Forms
.
Label
label6
;
private
System
.
Windows
.
Forms
.
Label
label5
;
private
System
.
Windows
.
Forms
.
TextBox
ChromFront_Thickness
;
private
System
.
Windows
.
Forms
.
TextBox
ChromFront_Caliber
;
private
System
.
Windows
.
Forms
.
TextBox
ChromFront_Length
;
private
System
.
Windows
.
Forms
.
Label
label8
;
private
System
.
Windows
.
Forms
.
Label
label12
;
private
System
.
Windows
.
Forms
.
Label
label11
;
private
System
.
Windows
.
Forms
.
Label
label10
;
private
System
.
Windows
.
Forms
.
Label
label9
;
private
System
.
Windows
.
Forms
.
CheckBox
ChromBehind
;
private
System
.
Windows
.
Forms
.
ComboBox
ChromBehindType
;
private
System
.
Windows
.
Forms
.
TextBox
ChromBehind_Thickness
;
private
System
.
Windows
.
Forms
.
TextBox
ChromBehind_Caliber
;
private
System
.
Windows
.
Forms
.
TextBox
ChromBehind_Length
;
private
System
.
Windows
.
Forms
.
Button
okbtn
;
private
System
.
Windows
.
Forms
.
Button
okbtn
;
private
System
.
Windows
.
Forms
.
Button
cancelbtn
;
private
System
.
Windows
.
Forms
.
Button
cancelbtn
;
private
System
.
Windows
.
Forms
.
ComboBox
ColType
;
private
System
.
Windows
.
Forms
.
ComboBox
ColType
;
...
...
GcDevicePc/DeviceConfigUI/ColumnBox.cs
View file @
c3f8262d
...
@@ -38,18 +38,7 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -38,18 +38,7 @@ namespace GcDevicePc.DeviceConfigUI
this
.
ColType
.
SelectedIndex
=
this
.
hWConfig
.
hwconfiginfo
.
u16ColType
;
this
.
ColType
.
SelectedIndex
=
this
.
hWConfig
.
hwconfiginfo
.
u16ColType
;
this
.
ColPTemp
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16ColPTemp
.
ToString
();
this
.
ColPTemp
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16ColPTemp
.
ToString
();
this
.
ChromNum
.
SelectedIndex
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromNum
;
this
.
ChromFront
.
Checked
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront
==
1
?
true
:
false
;
this
.
ChromFrontType
.
SelectedIndex
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFrontType
;
this
.
ChromFront_Length
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront_Length
.
ToString
();
this
.
ChromFront_Caliber
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront_Caliber
.
ToString
();
this
.
ChromFront_Thickness
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront_Thickness
.
ToString
();
this
.
ChromBehind
.
Checked
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehind
==
1
?
true
:
false
;
this
.
ChromBehindType
.
SelectedIndex
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehindType
;
this
.
ChromBehind_Length
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehind_Length
.
ToString
();
this
.
ChromBehind_Caliber
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehind_Caliber
.
ToString
();
this
.
ChromBehind_Thickness
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehind_Thickness
.
ToString
();
}
}
}
}
...
@@ -66,19 +55,6 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -66,19 +55,6 @@ namespace GcDevicePc.DeviceConfigUI
this
.
hWConfig
.
hwconfiginfo
.
u16ColType
=
this
.
ColType
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16ColType
=
this
.
ColType
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16ColPTemp
=
int
.
Parse
(
this
.
ColPTemp
.
Text
);
this
.
hWConfig
.
hwconfiginfo
.
u16ColPTemp
=
int
.
Parse
(
this
.
ColPTemp
.
Text
);
this
.
hWConfig
.
hwconfiginfo
.
u16ChromNum
=
(
this
.
ChromFront
.
Checked
?
1
:
0
)
+
(
this
.
ChromBehind
.
Checked
?
1
:
0
);
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront
=
this
.
ChromFront
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFrontType
=
this
.
ChromFrontType
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront_Length
=
int
.
Parse
(
this
.
ChromFront_Length
.
Text
);
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront_Caliber
=
int
.
Parse
(
this
.
ChromFront_Caliber
.
Text
);
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront_Thickness
=
int
.
Parse
(
this
.
ChromFront_Thickness
.
Text
);
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehind
=
this
.
ChromBehind
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehindType
=
this
.
ChromBehindType
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehind_Length
=
int
.
Parse
(
this
.
ChromBehind_Length
.
Text
);
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehind_Caliber
=
int
.
Parse
(
this
.
ChromBehind_Caliber
.
Text
);
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehind_Thickness
=
int
.
Parse
(
this
.
ChromBehind_Thickness
.
Text
);
}
}
this
.
Close
();
this
.
Close
();
}
}
...
...
GcDevicePc/DeviceConfigUI/ConfigDevice.cs
View file @
c3f8262d
...
@@ -65,75 +65,33 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -65,75 +65,33 @@ namespace GcDevicePc.DeviceConfigUI
//进样单元
//进样单元
TreeNode
sampling_unit
=
new
TreeNode
(
"进样单元"
);
TreeNode
sampling_unit
=
new
TreeNode
(
"进样单元"
);
TreeNode
sampling_unit_sub1
=
new
TreeNode
(
"
前
进样器"
);
TreeNode
sampling_unit_sub1
=
new
TreeNode
(
"进样器"
);
sampling_unit_sub1
.
Tag
=
4
;
sampling_unit_sub1
.
Tag
=
4
;
TreeNode
sampling_unit_sub2
=
new
TreeNode
(
"后进样器"
);
TreeNode
sampling_unit_sub3
=
new
TreeNode
(
"进样阀"
);
sampling_unit_sub2
.
Tag
=
5
;
sampling_unit_sub3
.
Tag
=
5
;
TreeNode
sampling_unit_sub3
=
new
TreeNode
(
"阀1"
);
TreeNode
sampling_unit_sub4
=
new
TreeNode
(
"进样口和色谱柱"
);
sampling_unit_sub3
.
Tag
=
6
;
sampling_unit_sub4
.
Tag
=
6
;
TreeNode
sampling_unit_sub4
=
new
TreeNode
(
"阀2"
);
sampling_unit_sub4
.
Tag
=
7
;
TreeNode
sampling_unit_sub5
=
new
TreeNode
(
"阀3"
);
sampling_unit_sub5
.
Tag
=
8
;
TreeNode
sampling_unit_sub6
=
new
TreeNode
(
"阀4"
);
sampling_unit_sub6
.
Tag
=
9
;
TreeNode
sampling_unit_sub7
=
new
TreeNode
(
"阀5"
);
sampling_unit_sub7
.
Tag
=
10
;
TreeNode
sampling_unit_sub8
=
new
TreeNode
(
"对外IO输出"
);
sampling_unit_sub8
.
Tag
=
11
;
TreeNode
sampling_unit_sub9
=
new
TreeNode
(
"前进样口"
);
sampling_unit_sub9
.
Tag
=
12
;
TreeNode
sampling_unit_sub10
=
new
TreeNode
(
"后进样口"
);
sampling_unit_sub10
.
Tag
=
13
;
TreeNode
sampling_unit_sub11
=
new
TreeNode
(
"进样阀VA1"
);
sampling_unit_sub11
.
Tag
=
14
;
TreeNode
sampling_unit_sub12
=
new
TreeNode
(
"进样阀VA2"
);
sampling_unit_sub12
.
Tag
=
15
;
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub1
);
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub1
);
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub2
);
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub3
);
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub3
);
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub4
);
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub4
);
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub5
);
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub6
);
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub7
);
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub8
);
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub9
);
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub10
);
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub11
);
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub12
);
//柱箱单元
//柱箱单元
TreeNode
columnbox_unit
=
new
TreeNode
(
"柱箱单元"
);
TreeNode
columnbox_unit
=
new
TreeNode
(
"柱箱单元"
);
TreeNode
columnbox_unit_sub1
=
new
TreeNode
(
"柱箱"
);
TreeNode
columnbox_unit_sub1
=
new
TreeNode
(
"柱箱"
);
columnbox_unit_sub1
.
Tag
=
16
;
columnbox_unit_sub1
.
Tag
=
7
;
TreeNode
columnbox_unit_sub2
=
new
TreeNode
(
"前色谱柱"
);
columnbox_unit_sub2
.
Tag
=
17
;
TreeNode
columnbox_unit_sub3
=
new
TreeNode
(
"后色谱柱"
);
columnbox_unit_sub3
.
Tag
=
18
;
columnbox_unit
.
Nodes
.
Add
(
columnbox_unit_sub1
);
columnbox_unit
.
Nodes
.
Add
(
columnbox_unit_sub1
);
columnbox_unit
.
Nodes
.
Add
(
columnbox_unit_sub2
);
columnbox_unit
.
Nodes
.
Add
(
columnbox_unit_sub3
);
//检测单元
//检测单元
TreeNode
detection_unit
=
new
TreeNode
(
"检测单元"
);
TreeNode
detection_unit
=
new
TreeNode
(
"检测单元"
);
TreeNode
detection_unit_sub1
=
new
TreeNode
(
"前检测器"
);
TreeNode
detection_unit_sub1
=
new
TreeNode
(
"检测器"
);
detection_unit_sub1
.
Tag
=
19
;
detection_unit_sub1
.
Tag
=
8
;
TreeNode
detection_unit_sub2
=
new
TreeNode
(
"中检测器"
);
detection_unit_sub2
.
Tag
=
20
;
TreeNode
detection_unit_sub3
=
new
TreeNode
(
"后检测器"
);
detection_unit_sub3
.
Tag
=
21
;
detection_unit
.
Nodes
.
Add
(
detection_unit_sub1
);
detection_unit
.
Nodes
.
Add
(
detection_unit_sub1
);
detection_unit
.
Nodes
.
Add
(
detection_unit_sub2
);
detection_unit
.
Nodes
.
Add
(
detection_unit_sub3
);
//辅助单元
//辅助单元
TreeNode
auxiliary_unit
=
new
TreeNode
(
"辅助单元"
);
TreeNode
auxiliary_unit
=
new
TreeNode
(
"辅助单元"
);
TreeNode
auxiliary_unit_sub1
=
new
TreeNode
(
"加热器1"
);
TreeNode
auxiliary_unit_sub1
=
new
TreeNode
(
"加热器"
);
auxiliary_unit_sub1
.
Tag
=
22
;
auxiliary_unit_sub1
.
Tag
=
9
;
TreeNode
auxiliary_unit_sub2
=
new
TreeNode
(
"加热器2"
);
auxiliary_unit_sub2
.
Tag
=
23
;
auxiliary_unit
.
Nodes
.
Add
(
auxiliary_unit_sub1
);
auxiliary_unit
.
Nodes
.
Add
(
auxiliary_unit_sub1
);
auxiliary_unit
.
Nodes
.
Add
(
auxiliary_unit_sub2
);
SysConfigTree
.
Nodes
.
Add
(
hmi_identifier
);
SysConfigTree
.
Nodes
.
Add
(
hmi_identifier
);
SysConfigTree
.
Nodes
.
Add
(
sampling_unit
);
SysConfigTree
.
Nodes
.
Add
(
sampling_unit
);
...
@@ -162,157 +120,63 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -162,157 +120,63 @@ namespace GcDevicePc.DeviceConfigUI
hmi_identifier
.
Nodes
.
Add
(
hmi_identifier_sub2
);
hmi_identifier
.
Nodes
.
Add
(
hmi_identifier_sub2
);
hmi_identifier
.
Nodes
.
Add
(
hmi_identifier_sub3
);
hmi_identifier
.
Nodes
.
Add
(
hmi_identifier_sub3
);
HMIConfigTree
.
Nodes
.
Add
(
hmi_identifier
);
HMIConfigTree
.
Nodes
.
Add
(
hmi_identifier
);
////////////////////////////////////////////////////////////////////////////////////////////
TreeNode
sampling_unit
=
new
TreeNode
(
"进样单元"
);
TreeNode
sampling_unit
=
new
TreeNode
(
"进样单元"
);
if
(
hWConfig
.
hwconfiginfo
.
u16SampleFront
==
1
)
if
(
hWConfig
.
hwconfiginfo
.
u16SampleFront
==
1
||
hWConfig
.
hwconfiginfo
.
u16SampleBehind
==
1
)
{
{
TreeNode
sampling_unit_sub1
=
new
TreeNode
(
"
前
进样器"
);
TreeNode
sampling_unit_sub1
=
new
TreeNode
(
"进样器"
);
sampling_unit_sub1
.
Tag
=
4
;
sampling_unit_sub1
.
Tag
=
4
;
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub1
);
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub1
);
}
}
if
(
hWConfig
.
hwconfiginfo
.
u16SampleBehind
==
1
)
if
(
hWConfig
.
hwconfiginfo
.
u16ValveOne
==
1
||
hWConfig
.
hwconfiginfo
.
u16ValveTwo
==
1
||
hWConfig
.
hwconfiginfo
.
u16ValveThree
==
1
||
{
hWConfig
.
hwconfiginfo
.
u16ValveFour
==
1
||
hWConfig
.
hwconfiginfo
.
u16ValveFive
==
1
||
hWConfig
.
hwconfiginfo
.
u16ValveSix
==
1
)
TreeNode
sampling_unit_sub2
=
new
TreeNode
(
"后进样器"
);
sampling_unit_sub2
.
Tag
=
5
;
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub2
);
}
if
(
hWConfig
.
hwconfiginfo
.
u16ValveOne
==
1
)
{
{
TreeNode
sampling_unit_sub3
=
new
TreeNode
(
"
阀1
"
);
TreeNode
sampling_unit_sub3
=
new
TreeNode
(
"
进样阀
"
);
sampling_unit_sub3
.
Tag
=
6
;
sampling_unit_sub3
.
Tag
=
5
;
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub3
);
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub3
);
}
}
if
(
hWConfig
.
hwconfiginfo
.
u16ValveTwo
==
1
)
if
(
hWConfig
.
hwconfiginfo
.
u16InjPortFront
==
1
||
hWConfig
.
hwconfiginfo
.
u16InjPortBehind
==
1
||
hWConfig
.
hwconfiginfo
.
u16ChromFront
==
1
||
hWConfig
.
hwconfiginfo
.
u16ChromBehind
==
1
)
{
TreeNode
sampling_unit_sub4
=
new
TreeNode
(
"阀2"
);
sampling_unit_sub4
.
Tag
=
7
;
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub4
);
}
if
(
hWConfig
.
hwconfiginfo
.
u16ValveThree
==
1
)
{
TreeNode
sampling_unit_sub5
=
new
TreeNode
(
"阀3"
);
sampling_unit_sub5
.
Tag
=
8
;
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub5
);
}
if
(
hWConfig
.
hwconfiginfo
.
u16ValveFour
==
1
)
{
TreeNode
sampling_unit_sub6
=
new
TreeNode
(
"阀4"
);
sampling_unit_sub6
.
Tag
=
9
;
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub6
);
}
if
(
hWConfig
.
hwconfiginfo
.
u16ValveFive
==
1
)
{
TreeNode
sampling_unit_sub7
=
new
TreeNode
(
"阀5"
);
sampling_unit_sub7
.
Tag
=
10
;
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub7
);
}
if
(
hWConfig
.
hwconfiginfo
.
u16ValveSix
==
1
)
{
{
TreeNode
sampling_unit_sub8
=
new
TreeNode
(
"对外IO输出"
);
TreeNode
sampling_unit_sub9
=
new
TreeNode
(
"进样口和色谱柱"
);
sampling_unit_sub8
.
Tag
=
11
;
sampling_unit_sub9
.
Tag
=
6
;
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub8
);
}
if
(
hWConfig
.
hwconfiginfo
.
u16InjPortFront
==
1
)
{
TreeNode
sampling_unit_sub9
=
new
TreeNode
(
"前进样口"
);
sampling_unit_sub9
.
Tag
=
12
;
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub9
);
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub9
);
}
}
if
(
hWConfig
.
hwconfiginfo
.
u16InjPortBehind
==
1
)
{
TreeNode
sampling_unit_sub10
=
new
TreeNode
(
"后进样口"
);
sampling_unit_sub10
.
Tag
=
13
;
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub10
);
}
if
(
hWConfig
.
hwconfiginfo
.
u16InjValveVA1
==
1
)
{
TreeNode
sampling_unit_sub11
=
new
TreeNode
(
"进样阀VA1"
);
sampling_unit_sub11
.
Tag
=
14
;
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub11
);
}
if
(
hWConfig
.
hwconfiginfo
.
u16InjValveVA2
==
1
)
{
TreeNode
sampling_unit_sub12
=
new
TreeNode
(
"进样阀VA2"
);
sampling_unit_sub12
.
Tag
=
15
;
sampling_unit
.
Nodes
.
Add
(
sampling_unit_sub12
);
}
HMIConfigTree
.
Nodes
.
Add
(
sampling_unit
);
HMIConfigTree
.
Nodes
.
Add
(
sampling_unit
);
///////////////////////////////////////////////////////////////////////////////////////////
TreeNode
columnbox_unit
=
new
TreeNode
(
"柱箱单元"
);
TreeNode
columnbox_unit
=
new
TreeNode
(
"柱箱单元"
);
if
(
hWConfig
.
hwconfiginfo
.
u16Col
==
1
)
if
(
hWConfig
.
hwconfiginfo
.
u16Col
==
1
)
{
{
TreeNode
columnbox_unit_sub1
=
new
TreeNode
(
"柱箱"
);
TreeNode
columnbox_unit_sub1
=
new
TreeNode
(
"柱箱"
);
columnbox_unit_sub1
.
Tag
=
16
;
columnbox_unit_sub1
.
Tag
=
7
;
columnbox_unit
.
Nodes
.
Add
(
columnbox_unit_sub1
);
columnbox_unit
.
Nodes
.
Add
(
columnbox_unit_sub1
);
}
}
if
(
hWConfig
.
hwconfiginfo
.
u16ChromFront
==
1
)
{
TreeNode
columnbox_unit_sub2
=
new
TreeNode
(
"前色谱柱"
);
columnbox_unit_sub2
.
Tag
=
17
;
columnbox_unit
.
Nodes
.
Add
(
columnbox_unit_sub2
);
}
if
(
hWConfig
.
hwconfiginfo
.
u16ChromBehind
==
1
)
{
TreeNode
columnbox_unit_sub3
=
new
TreeNode
(
"后色谱柱"
);
columnbox_unit_sub3
.
Tag
=
18
;
columnbox_unit
.
Nodes
.
Add
(
columnbox_unit_sub3
);
}
HMIConfigTree
.
Nodes
.
Add
(
columnbox_unit
);
HMIConfigTree
.
Nodes
.
Add
(
columnbox_unit
);
///////////////////////////////////////////////////////////////////////////////////////////////
TreeNode
detection_unit
=
new
TreeNode
(
"检测单元"
);
TreeNode
detection_unit
=
new
TreeNode
(
"检测单元"
);
if
(
hWConfig
.
hwconfiginfo
.
u16DetFront
==
1
)
if
(
hWConfig
.
hwconfiginfo
.
u16DetFront
==
1
||
hWConfig
.
hwconfiginfo
.
u16DetBehind
==
1
||
hWConfig
.
hwconfiginfo
.
u16DetInter
==
1
)
{
{
TreeNode
detection_unit_sub1
=
new
TreeNode
(
"
前
检测器"
);
TreeNode
detection_unit_sub1
=
new
TreeNode
(
"检测器"
);
detection_unit_sub1
.
Tag
=
19
;
detection_unit_sub1
.
Tag
=
8
;
detection_unit
.
Nodes
.
Add
(
detection_unit_sub1
);
detection_unit
.
Nodes
.
Add
(
detection_unit_sub1
);
}
}
if
(
hWConfig
.
hwconfiginfo
.
u16DetInter
==
1
)
{
TreeNode
detection_unit_sub2
=
new
TreeNode
(
"中检测器"
);
detection_unit_sub2
.
Tag
=
20
;
detection_unit
.
Nodes
.
Add
(
detection_unit_sub2
);
}
if
(
hWConfig
.
hwconfiginfo
.
u16DetBehind
==
1
)
{
TreeNode
detection_unit_sub3
=
new
TreeNode
(
"后检测器"
);
detection_unit_sub3
.
Tag
=
21
;
detection_unit
.
Nodes
.
Add
(
detection_unit_sub3
);
}
HMIConfigTree
.
Nodes
.
Add
(
detection_unit
);
HMIConfigTree
.
Nodes
.
Add
(
detection_unit
);
////////////////////////////////////////////////////////////////////////////////////////////////
TreeNode
auxiliary_unit
=
new
TreeNode
(
"辅助单元"
);
TreeNode
auxiliary_unit
=
new
TreeNode
(
"辅助单元"
);
if
(
hWConfig
.
hwconfiginfo
.
u16AuxHeater1
==
1
)
if
(
hWConfig
.
hwconfiginfo
.
u16AuxHeater1
==
1
||
hWConfig
.
hwconfiginfo
.
u16AuxHeater2
==
1
)
{
{
TreeNode
auxiliary_unit_sub1
=
new
TreeNode
(
"加热器
1
"
);
TreeNode
auxiliary_unit_sub1
=
new
TreeNode
(
"加热器"
);
auxiliary_unit_sub1
.
Tag
=
22
;
auxiliary_unit_sub1
.
Tag
=
9
;
auxiliary_unit
.
Nodes
.
Add
(
auxiliary_unit_sub1
);
auxiliary_unit
.
Nodes
.
Add
(
auxiliary_unit_sub1
);
}
}
if
(
hWConfig
.
hwconfiginfo
.
u16AuxHeater2
==
1
)
{
TreeNode
auxiliary_unit_sub2
=
new
TreeNode
(
"加热器2"
);
auxiliary_unit_sub2
.
Tag
=
23
;
auxiliary_unit
.
Nodes
.
Add
(
auxiliary_unit_sub2
);
}
HMIConfigTree
.
Nodes
.
Add
(
auxiliary_unit
);
HMIConfigTree
.
Nodes
.
Add
(
auxiliary_unit
);
HMIConfigTree
.
Nodes
[
no
].
Expand
();
HMIConfigTree
.
Nodes
[
no
].
Expand
();
...
@@ -346,17 +210,17 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -346,17 +210,17 @@ namespace GcDevicePc.DeviceConfigUI
Device
device
=
new
Device
(
ref
hWConfig
);
Device
device
=
new
Device
(
ref
hWConfig
);
device
.
ShowDialog
();
device
.
ShowDialog
();
}
}
else
if
(
nodename
<=
15
)
else
if
(
nodename
<=
6
)
{
{
Sampling
sampling
=
new
Sampling
(
ref
hWConfig
,
nodename
);
Sampling
sampling
=
new
Sampling
(
ref
hWConfig
,
nodename
);
sampling
.
ShowDialog
();
sampling
.
ShowDialog
();
}
}
else
if
(
nodename
<=
18
)
else
if
(
nodename
==
7
)
{
{
ColumnBox
columnBox
=
new
ColumnBox
(
ref
hWConfig
);
ColumnBox
columnBox
=
new
ColumnBox
(
ref
hWConfig
);
columnBox
.
ShowDialog
();
columnBox
.
ShowDialog
();
}
}
else
if
(
nodename
<=
21
)
else
if
(
nodename
==
8
)
{
{
Detection
detection
=
new
Detection
(
ref
hWConfig
);
Detection
detection
=
new
Detection
(
ref
hWConfig
);
detection
.
ShowDialog
();
detection
.
ShowDialog
();
...
@@ -396,63 +260,28 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -396,63 +260,28 @@ namespace GcDevicePc.DeviceConfigUI
case
4
:
case
4
:
hWConfig
.
hwconfiginfo
.
u16SampleFront
=
flag
?
1
:
0
;
hWConfig
.
hwconfiginfo
.
u16SampleFront
=
flag
?
1
:
0
;
break
;
break
;
case
5
:
case
5
:
hWConfig
.
hwconfiginfo
.
u16SampleBehind
=
flag
?
1
:
0
;
break
;
case
6
:
hWConfig
.
hwconfiginfo
.
u16ValveOne
=
flag
?
1
:
0
;
hWConfig
.
hwconfiginfo
.
u16ValveOne
=
flag
?
1
:
0
;
break
;
break
;
case
7
:
hWConfig
.
hwconfiginfo
.
u16ValveTwo
=
flag
?
1
:
0
;
case
6
:
break
;
case
8
:
hWConfig
.
hwconfiginfo
.
u16ValveThree
=
flag
?
1
:
0
;
break
;
case
9
:
hWConfig
.
hwconfiginfo
.
u16ValveFour
=
flag
?
1
:
0
;
break
;
case
10
:
hWConfig
.
hwconfiginfo
.
u16ValveFive
=
flag
?
1
:
0
;
break
;
case
11
:
hWConfig
.
hwconfiginfo
.
u16ValveSix
=
flag
?
1
:
0
;
break
;
case
12
:
hWConfig
.
hwconfiginfo
.
u16InjPortFront
=
flag
?
1
:
0
;
hWConfig
.
hwconfiginfo
.
u16InjPortFront
=
flag
?
1
:
0
;
break
;
case
13
:
hWConfig
.
hwconfiginfo
.
u16InjPortBehind
=
flag
?
1
:
0
;
break
;
case
14
:
hWConfig
.
hwconfiginfo
.
u16InjValveVA1
=
flag
?
1
:
0
;
break
;
case
15
:
hWConfig
.
hwconfiginfo
.
u16InjValveVA2
=
flag
?
1
:
0
;
break
;
case
16
:
hWConfig
.
hwconfiginfo
.
u16Col
=
flag
?
1
:
0
;
break
;
case
17
:
hWConfig
.
hwconfiginfo
.
u16ChromFront
=
flag
?
1
:
0
;
hWConfig
.
hwconfiginfo
.
u16ChromFront
=
flag
?
1
:
0
;
break
;
break
;
case
18
:
hWConfig
.
hwconfiginfo
.
u16ChromBehind
=
flag
?
1
:
0
;
case
7
:
hWConfig
.
hwconfiginfo
.
u16Col
=
flag
?
1
:
0
;
break
;
break
;
case
19
:
case
8
:
hWConfig
.
hwconfiginfo
.
u16DetFront
=
flag
?
1
:
0
;
hWConfig
.
hwconfiginfo
.
u16DetFront
=
flag
?
1
:
0
;
break
;
break
;
case
20
:
hWConfig
.
hwconfiginfo
.
u16DetInter
=
flag
?
1
:
0
;
case
9
:
break
;
case
21
:
hWConfig
.
hwconfiginfo
.
u16DetBehind
=
flag
?
1
:
0
;
break
;
case
22
:
hWConfig
.
hwconfiginfo
.
u16AuxHeater1
=
flag
?
1
:
0
;
hWConfig
.
hwconfiginfo
.
u16AuxHeater1
=
flag
?
1
:
0
;
break
;
break
;
case
23
:
hWConfig
.
hwconfiginfo
.
u16AuxHeater2
=
flag
?
1
:
0
;
break
;
}
}
int
node
=
0
;
int
node
=
0
;
...
@@ -462,15 +291,15 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -462,15 +291,15 @@ namespace GcDevicePc.DeviceConfigUI
{
{
node
=
0
;
node
=
0
;
}
}
else
if
(
no
>=
4
&&
no
<=
15
)
else
if
(
no
>=
4
&&
no
<=
6
)
{
{
node
=
1
;
node
=
1
;
}
}
else
if
(
no
<=
18
)
else
if
(
no
==
7
)
{
{
node
=
2
;
node
=
2
;
}
}
else
if
(
no
<=
21
)
else
if
(
no
==
8
)
{
{
node
=
3
;
node
=
3
;
}
}
...
...
GcDevicePc/DeviceConfigUI/Device.Designer.cs
View file @
c3f8262d
...
@@ -30,72 +30,54 @@
...
@@ -30,72 +30,54 @@
{
{
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
Device
));
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
Device
));
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
StartType
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
GCName
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
GCName
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
GCNum
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
GCNum
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
okbtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
okbtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cancelbtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cancelbtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
radioButton1
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
radioButton2
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
radioButton3
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// groupBox1
// groupBox1
//
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
StartType
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
GCName
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
GCName
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
GCNum
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
GCNum
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label3
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label1
);
this
.
groupBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
11F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
11F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
12
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
12
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
477
,
21
3
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
397
,
22
3
);
this
.
groupBox1
.
TabIndex
=
0
;
this
.
groupBox1
.
TabIndex
=
0
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"仪器配置"
;
this
.
groupBox1
.
Text
=
"仪器配置"
;
//
//
// StartType
//
this
.
StartType
.
FormattingEnabled
=
true
;
this
.
StartType
.
Items
.
AddRange
(
new
object
[]
{
"进样EPC"
,
"机械阀"
,
"全EPC"
});
this
.
StartType
.
Location
=
new
System
.
Drawing
.
Point
(
157
,
143
);
this
.
StartType
.
Name
=
"StartType"
;
this
.
StartType
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
23
);
this
.
StartType
.
TabIndex
=
5
;
//
// GCName
// GCName
//
//
this
.
GCName
.
Location
=
new
System
.
Drawing
.
Point
(
157
,
94
);
this
.
GCName
.
Location
=
new
System
.
Drawing
.
Point
(
157
,
60
);
this
.
GCName
.
Name
=
"GCName"
;
this
.
GCName
.
Name
=
"GCName"
;
this
.
GCName
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
24
);
this
.
GCName
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
24
);
this
.
GCName
.
TabIndex
=
4
;
this
.
GCName
.
TabIndex
=
4
;
//
//
// GCNum
// GCNum
//
//
this
.
GCNum
.
Location
=
new
System
.
Drawing
.
Point
(
157
,
44
);
this
.
GCNum
.
Location
=
new
System
.
Drawing
.
Point
(
157
,
30
);
this
.
GCNum
.
Name
=
"GCNum"
;
this
.
GCNum
.
Name
=
"GCNum"
;
this
.
GCNum
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
24
);
this
.
GCNum
.
ReadOnly
=
true
;
this
.
GCNum
.
Size
=
new
System
.
Drawing
.
Size
(
161
,
24
);
this
.
GCNum
.
TabIndex
=
3
;
this
.
GCNum
.
TabIndex
=
3
;
//
//
// label3
//
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
83
,
146
);
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label3
.
TabIndex
=
2
;
this
.
label3
.
Text
=
"仪器系统:"
;
//
// label2
// label2
//
//
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
83
,
97
);
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
83
,
63
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label2
.
TabIndex
=
1
;
this
.
label2
.
TabIndex
=
1
;
...
@@ -104,7 +86,7 @@
...
@@ -104,7 +86,7 @@
// label1
// label1
//
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
81
,
47
);
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
81
,
33
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label1
.
TabIndex
=
0
;
this
.
label1
.
TabIndex
=
0
;
...
@@ -112,7 +94,7 @@
...
@@ -112,7 +94,7 @@
//
//
// okbtn
// okbtn
//
//
this
.
okbtn
.
Location
=
new
System
.
Drawing
.
Point
(
2
71
,
241
);
this
.
okbtn
.
Location
=
new
System
.
Drawing
.
Point
(
2
03
,
250
);
this
.
okbtn
.
Name
=
"okbtn"
;
this
.
okbtn
.
Name
=
"okbtn"
;
this
.
okbtn
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
okbtn
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
okbtn
.
TabIndex
=
1
;
this
.
okbtn
.
TabIndex
=
1
;
...
@@ -122,7 +104,7 @@
...
@@ -122,7 +104,7 @@
//
//
// cancelbtn
// cancelbtn
//
//
this
.
cancelbtn
.
Location
=
new
System
.
Drawing
.
Point
(
3
85
,
241
);
this
.
cancelbtn
.
Location
=
new
System
.
Drawing
.
Point
(
3
17
,
250
);
this
.
cancelbtn
.
Name
=
"cancelbtn"
;
this
.
cancelbtn
.
Name
=
"cancelbtn"
;
this
.
cancelbtn
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
cancelbtn
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
cancelbtn
.
TabIndex
=
2
;
this
.
cancelbtn
.
TabIndex
=
2
;
...
@@ -130,12 +112,57 @@
...
@@ -130,12 +112,57 @@
this
.
cancelbtn
.
UseVisualStyleBackColor
=
true
;
this
.
cancelbtn
.
UseVisualStyleBackColor
=
true
;
this
.
cancelbtn
.
Click
+=
new
System
.
EventHandler
(
this
.
cancelbtn_Click
);
this
.
cancelbtn
.
Click
+=
new
System
.
EventHandler
(
this
.
cancelbtn_Click
);
//
//
// groupBox2
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
radioButton3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
radioButton2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
radioButton1
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
86
,
92
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
232
,
111
);
this
.
groupBox2
.
TabIndex
=
6
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"仪器模型"
;
//
// radioButton1
//
this
.
radioButton1
.
AutoSize
=
true
;
this
.
radioButton1
.
Location
=
new
System
.
Drawing
.
Point
(
53
,
23
);
this
.
radioButton1
.
Name
=
"radioButton1"
;
this
.
radioButton1
.
Size
=
new
System
.
Drawing
.
Size
(
79
,
19
);
this
.
radioButton1
.
TabIndex
=
0
;
this
.
radioButton1
.
TabStop
=
true
;
this
.
radioButton1
.
Text
=
"进样EPC"
;
this
.
radioButton1
.
UseVisualStyleBackColor
=
true
;
//
// radioButton2
//
this
.
radioButton2
.
AutoSize
=
true
;
this
.
radioButton2
.
Location
=
new
System
.
Drawing
.
Point
(
53
,
48
);
this
.
radioButton2
.
Name
=
"radioButton2"
;
this
.
radioButton2
.
Size
=
new
System
.
Drawing
.
Size
(
70
,
19
);
this
.
radioButton2
.
TabIndex
=
0
;
this
.
radioButton2
.
TabStop
=
true
;
this
.
radioButton2
.
Text
=
"机械阀"
;
this
.
radioButton2
.
UseVisualStyleBackColor
=
true
;
//
// radioButton3
//
this
.
radioButton3
.
AutoSize
=
true
;
this
.
radioButton3
.
Location
=
new
System
.
Drawing
.
Point
(
53
,
73
);
this
.
radioButton3
.
Name
=
"radioButton3"
;
this
.
radioButton3
.
Size
=
new
System
.
Drawing
.
Size
(
64
,
19
);
this
.
radioButton3
.
TabIndex
=
0
;
this
.
radioButton3
.
TabStop
=
true
;
this
.
radioButton3
.
Text
=
"全EPC"
;
this
.
radioButton3
.
UseVisualStyleBackColor
=
true
;
//
// Device
// Device
//
//
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
(
501
,
285
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
422
,
285
);
this
.
Controls
.
Add
(
this
.
cancelbtn
);
this
.
Controls
.
Add
(
this
.
cancelbtn
);
this
.
Controls
.
Add
(
this
.
okbtn
);
this
.
Controls
.
Add
(
this
.
okbtn
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
...
@@ -146,6 +173,8 @@
...
@@ -146,6 +173,8 @@
this
.
Load
+=
new
System
.
EventHandler
(
this
.
Device_Load
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
Device_Load
);
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
PerformLayout
();
this
.
groupBox1
.
PerformLayout
();
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
groupBox2
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
}
...
@@ -155,11 +184,13 @@
...
@@ -155,11 +184,13 @@
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
Button
okbtn
;
private
System
.
Windows
.
Forms
.
Button
okbtn
;
private
System
.
Windows
.
Forms
.
Button
cancelbtn
;
private
System
.
Windows
.
Forms
.
Button
cancelbtn
;
private
System
.
Windows
.
Forms
.
Label
label3
;
private
System
.
Windows
.
Forms
.
Label
label2
;
private
System
.
Windows
.
Forms
.
Label
label2
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
TextBox
GCName
;
private
System
.
Windows
.
Forms
.
TextBox
GCName
;
private
System
.
Windows
.
Forms
.
TextBox
GCNum
;
private
System
.
Windows
.
Forms
.
TextBox
GCNum
;
private
System
.
Windows
.
Forms
.
ComboBox
StartType
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox2
;
private
System
.
Windows
.
Forms
.
RadioButton
radioButton3
;
private
System
.
Windows
.
Forms
.
RadioButton
radioButton2
;
private
System
.
Windows
.
Forms
.
RadioButton
radioButton1
;
}
}
}
}
\ No newline at end of file
GcDevicePc/DeviceConfigUI/Device.cs
View file @
c3f8262d
...
@@ -37,9 +37,24 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -37,9 +37,24 @@ namespace GcDevicePc.DeviceConfigUI
{
{
if
(
hWConfig
!=
null
)
if
(
hWConfig
!=
null
)
{
{
this
.
GCNum
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
GCNum
;
this
.
GCNum
.
Text
=
((
globaldata
.
DeviceInfo
)
globaldata
.
DeviceList
[
0
]).
MacAddr
;
this
.
GCName
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
GCName
;
this
.
GCName
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
GCName
;
this
.
StartType
.
SelectedIndex
=
this
.
hWConfig
.
hwconfiginfo
.
u16StartType
-
1
;
switch
(
this
.
hWConfig
.
hwconfiginfo
.
u16StartType
)
{
case
1
:
this
.
radioButton1
.
Checked
=
true
;
break
;
case
2
:
this
.
radioButton2
.
Checked
=
true
;
break
;
case
3
:
this
.
radioButton3
.
Checked
=
true
;
break
;
default
:
this
.
radioButton2
.
Checked
=
true
;
break
;
}
}
}
}
}
catch
catch
...
@@ -57,7 +72,19 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -57,7 +72,19 @@ namespace GcDevicePc.DeviceConfigUI
{
{
this
.
hWConfig
.
hwconfiginfo
.
GCNum
=
this
.
GCNum
.
Text
;
this
.
hWConfig
.
hwconfiginfo
.
GCNum
=
this
.
GCNum
.
Text
;
this
.
hWConfig
.
hwconfiginfo
.
GCName
=
this
.
GCName
.
Text
;
this
.
hWConfig
.
hwconfiginfo
.
GCName
=
this
.
GCName
.
Text
;
this
.
hWConfig
.
hwconfiginfo
.
u16StartType
=
this
.
StartType
.
SelectedIndex
+
1
;
if
(
this
.
radioButton1
.
Checked
)
{
this
.
hWConfig
.
hwconfiginfo
.
u16StartType
=
1
;
}
else
if
(
this
.
radioButton2
.
Checked
)
{
this
.
hWConfig
.
hwconfiginfo
.
u16StartType
=
2
;
}
else
if
(
this
.
radioButton3
.
Checked
)
{
this
.
hWConfig
.
hwconfiginfo
.
u16StartType
=
3
;
}
}
}
this
.
Close
();
this
.
Close
();
}
}
...
...
GcDevicePc/DeviceConfigUI/Sampling.Designer.cs
View file @
c3f8262d
...
@@ -48,22 +48,6 @@
...
@@ -48,22 +48,6 @@
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
tabPage3
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
tabPage3
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
InjValveLoadGas6
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
InjValveLoadGas5
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
InjValveLoadGas4
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
InjValveLoadGas3
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
InjValveLoadGas2
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
InjValveLoadGas1
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
InjValveLoadGas_VA2
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
InjValveLoadGas_VA1
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
label13
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label12
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
InjValveTemp_VA2
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
InjValveTemp_VA1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label7
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label6
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
InjValveVA1
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
InjValveVA2
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
InjPortLoadGas_Behind
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
InjPortLoadGas_Behind
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
InjPortLoadGas_Front
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
InjPortLoadGas_Front
=
new
System
.
Windows
.
Forms
.
ComboBox
();
...
@@ -82,6 +66,24 @@
...
@@ -82,6 +66,24 @@
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
okbtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
okbtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cancelbtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cancelbtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
ChromFront_Thickness
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
ChromFront_Caliber
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
ChromFront_Length
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label7
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label6
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label12
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
ChromFrontType
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
label13
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
ChromFront
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
ChromBehind_Thickness
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
ChromBehind_Caliber
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
ChromBehind_Length
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
ChromBehindType
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
label14
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label15
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label16
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label17
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
ChromBehind
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
Maintab
.
SuspendLayout
();
this
.
Maintab
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
tabPage2
.
SuspendLayout
();
this
.
tabPage2
.
SuspendLayout
();
...
@@ -125,7 +127,7 @@
...
@@ -125,7 +127,7 @@
this
.
SampleBehindType
.
Items
.
AddRange
(
new
object
[]
{
this
.
SampleBehindType
.
Items
.
AddRange
(
new
object
[]
{
"进样器启动色谱仪"
,
"进样器启动色谱仪"
,
"色谱仪启动进样器"
});
"色谱仪启动进样器"
});
this
.
SampleBehindType
.
Location
=
new
System
.
Drawing
.
Point
(
3
77
,
166
);
this
.
SampleBehindType
.
Location
=
new
System
.
Drawing
.
Point
(
3
27
,
197
);
this
.
SampleBehindType
.
Name
=
"SampleBehindType"
;
this
.
SampleBehindType
.
Name
=
"SampleBehindType"
;
this
.
SampleBehindType
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
23
);
this
.
SampleBehindType
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
23
);
this
.
SampleBehindType
.
TabIndex
=
5
;
this
.
SampleBehindType
.
TabIndex
=
5
;
...
@@ -136,7 +138,7 @@
...
@@ -136,7 +138,7 @@
this
.
SampleFrontType
.
Items
.
AddRange
(
new
object
[]
{
this
.
SampleFrontType
.
Items
.
AddRange
(
new
object
[]
{
"进样器启动色谱仪"
,
"进样器启动色谱仪"
,
"色谱仪启动进样器"
});
"色谱仪启动进样器"
});
this
.
SampleFrontType
.
Location
=
new
System
.
Drawing
.
Point
(
3
80
,
56
);
this
.
SampleFrontType
.
Location
=
new
System
.
Drawing
.
Point
(
3
30
,
87
);
this
.
SampleFrontType
.
Name
=
"SampleFrontType"
;
this
.
SampleFrontType
.
Name
=
"SampleFrontType"
;
this
.
SampleFrontType
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
23
);
this
.
SampleFrontType
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
23
);
this
.
SampleFrontType
.
TabIndex
=
4
;
this
.
SampleFrontType
.
TabIndex
=
4
;
...
@@ -144,39 +146,39 @@
...
@@ -144,39 +146,39 @@
// label2
// label2
//
//
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
229
,
170
);
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
134
,
205
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
1
42
,
15
);
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
1
87
,
15
);
this
.
label2
.
TabIndex
=
3
;
this
.
label2
.
TabIndex
=
3
;
this
.
label2
.
Text
=
"
后
进样器启动方式:"
;
this
.
label2
.
Text
=
"
气体自动
进样器启动方式:"
;
//
//
// label1
// label1
//
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
229
,
61
);
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
134
,
96
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
1
42
,
15
);
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
1
87
,
15
);
this
.
label1
.
TabIndex
=
2
;
this
.
label1
.
TabIndex
=
2
;
this
.
label1
.
Text
=
"
前
进样器启动方式:"
;
this
.
label1
.
Text
=
"
液体自动
进样器启动方式:"
;
//
//
// SampleBehind
// SampleBehind
//
//
this
.
SampleBehind
.
AutoSize
=
true
;
this
.
SampleBehind
.
AutoSize
=
true
;
this
.
SampleBehind
.
Location
=
new
System
.
Drawing
.
Point
(
86
,
170
);
this
.
SampleBehind
.
Location
=
new
System
.
Drawing
.
Point
(
130
,
173
);
this
.
SampleBehind
.
Name
=
"SampleBehind"
;
this
.
SampleBehind
.
Name
=
"SampleBehind"
;
this
.
SampleBehind
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
19
);
this
.
SampleBehind
.
Size
=
new
System
.
Drawing
.
Size
(
131
,
19
);
this
.
SampleBehind
.
TabIndex
=
1
;
this
.
SampleBehind
.
TabIndex
=
1
;
this
.
SampleBehind
.
Text
=
"
后
进样器"
;
this
.
SampleBehind
.
Text
=
"
气体自动
进样器"
;
this
.
SampleBehind
.
UseVisualStyleBackColor
=
true
;
this
.
SampleBehind
.
UseVisualStyleBackColor
=
true
;
//
//
// SampleFront
// SampleFront
//
//
this
.
SampleFront
.
AutoSize
=
true
;
this
.
SampleFront
.
AutoSize
=
true
;
this
.
SampleFront
.
Location
=
new
System
.
Drawing
.
Point
(
86
,
60
);
this
.
SampleFront
.
Location
=
new
System
.
Drawing
.
Point
(
130
,
63
);
this
.
SampleFront
.
Name
=
"SampleFront"
;
this
.
SampleFront
.
Name
=
"SampleFront"
;
this
.
SampleFront
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
19
);
this
.
SampleFront
.
Size
=
new
System
.
Drawing
.
Size
(
131
,
19
);
this
.
SampleFront
.
TabIndex
=
0
;
this
.
SampleFront
.
TabIndex
=
0
;
this
.
SampleFront
.
Text
=
"
前
进样器"
;
this
.
SampleFront
.
Text
=
"
液体自动
进样器"
;
this
.
SampleFront
.
UseVisualStyleBackColor
=
true
;
this
.
SampleFront
.
UseVisualStyleBackColor
=
true
;
//
//
// tabPage2
// tabPage2
...
@@ -297,207 +299,53 @@
...
@@ -297,207 +299,53 @@
//
//
// groupBox3
// groupBox3
//
//
this
.
groupBox3
.
Controls
.
Add
(
this
.
InjValveLoadGas6
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
ChromBehind_Thickness
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
InjValveLoadGas5
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
ChromBehind_Caliber
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
InjValveLoadGas4
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
ChromBehind_Length
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
InjValveLoadGas3
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
ChromBehindType
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
InjValveLoadGas2
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
label14
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
InjValveLoadGas1
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
label15
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
InjValveLoadGas_VA2
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
label16
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
InjValveLoadGas_VA1
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
label17
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
label13
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
ChromBehind
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
label12
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
InjPortLoadGas_Behind
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
Inj
ValveTemp_VA2
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
Inj
PortBehind
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
InjValveTemp_VA
1
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
label1
1
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
label
7
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
label
5
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
label6
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
InjPortBPTemp
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
Inj
ValveVA1
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
Inj
PortType_Behind
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
InjValveVA2
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
label9
);
this
.
groupBox3
.
Location
=
new
System
.
Drawing
.
Point
(
17
,
1
54
);
this
.
groupBox3
.
Location
=
new
System
.
Drawing
.
Point
(
17
,
1
47
);
this
.
groupBox3
.
Name
=
"groupBox3"
;
this
.
groupBox3
.
Name
=
"groupBox3"
;
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
609
,
13
1
);
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
609
,
13
8
);
this
.
groupBox3
.
TabIndex
=
5
;
this
.
groupBox3
.
TabIndex
=
5
;
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
Text
=
"进样阀"
;
this
.
groupBox3
.
Text
=
"后"
;
//
// InjValveLoadGas6
//
this
.
InjValveLoadGas6
.
AutoSize
=
true
;
this
.
InjValveLoadGas6
.
Location
=
new
System
.
Drawing
.
Point
(
533
,
82
);
this
.
InjValveLoadGas6
.
Name
=
"InjValveLoadGas6"
;
this
.
InjValveLoadGas6
.
Size
=
new
System
.
Drawing
.
Size
(
64
,
19
);
this
.
InjValveLoadGas6
.
TabIndex
=
17
;
this
.
InjValveLoadGas6
.
Text
=
"载气6"
;
this
.
InjValveLoadGas6
.
UseVisualStyleBackColor
=
true
;
//
// InjValveLoadGas5
//
this
.
InjValveLoadGas5
.
AutoSize
=
true
;
this
.
InjValveLoadGas5
.
Location
=
new
System
.
Drawing
.
Point
(
465
,
82
);
this
.
InjValveLoadGas5
.
Name
=
"InjValveLoadGas5"
;
this
.
InjValveLoadGas5
.
Size
=
new
System
.
Drawing
.
Size
(
64
,
19
);
this
.
InjValveLoadGas5
.
TabIndex
=
16
;
this
.
InjValveLoadGas5
.
Text
=
"载气5"
;
this
.
InjValveLoadGas5
.
UseVisualStyleBackColor
=
true
;
//
// InjValveLoadGas4
//
this
.
InjValveLoadGas4
.
AutoSize
=
true
;
this
.
InjValveLoadGas4
.
Location
=
new
System
.
Drawing
.
Point
(
397
,
82
);
this
.
InjValveLoadGas4
.
Name
=
"InjValveLoadGas4"
;
this
.
InjValveLoadGas4
.
Size
=
new
System
.
Drawing
.
Size
(
64
,
19
);
this
.
InjValveLoadGas4
.
TabIndex
=
15
;
this
.
InjValveLoadGas4
.
Text
=
"载气4"
;
this
.
InjValveLoadGas4
.
UseVisualStyleBackColor
=
true
;
//
// InjValveLoadGas3
//
this
.
InjValveLoadGas3
.
AutoSize
=
true
;
this
.
InjValveLoadGas3
.
Location
=
new
System
.
Drawing
.
Point
(
533
,
35
);
this
.
InjValveLoadGas3
.
Name
=
"InjValveLoadGas3"
;
this
.
InjValveLoadGas3
.
Size
=
new
System
.
Drawing
.
Size
(
64
,
19
);
this
.
InjValveLoadGas3
.
TabIndex
=
14
;
this
.
InjValveLoadGas3
.
Text
=
"载气3"
;
this
.
InjValveLoadGas3
.
UseVisualStyleBackColor
=
true
;
//
// InjValveLoadGas2
//
this
.
InjValveLoadGas2
.
AutoSize
=
true
;
this
.
InjValveLoadGas2
.
Location
=
new
System
.
Drawing
.
Point
(
465
,
35
);
this
.
InjValveLoadGas2
.
Name
=
"InjValveLoadGas2"
;
this
.
InjValveLoadGas2
.
Size
=
new
System
.
Drawing
.
Size
(
64
,
19
);
this
.
InjValveLoadGas2
.
TabIndex
=
13
;
this
.
InjValveLoadGas2
.
Text
=
"载气2"
;
this
.
InjValveLoadGas2
.
UseVisualStyleBackColor
=
true
;
//
// InjValveLoadGas1
//
this
.
InjValveLoadGas1
.
AutoSize
=
true
;
this
.
InjValveLoadGas1
.
Location
=
new
System
.
Drawing
.
Point
(
397
,
35
);
this
.
InjValveLoadGas1
.
Name
=
"InjValveLoadGas1"
;
this
.
InjValveLoadGas1
.
Size
=
new
System
.
Drawing
.
Size
(
64
,
19
);
this
.
InjValveLoadGas1
.
TabIndex
=
12
;
this
.
InjValveLoadGas1
.
Text
=
"载气1"
;
this
.
InjValveLoadGas1
.
UseVisualStyleBackColor
=
true
;
//
// InjValveLoadGas_VA2
//
this
.
InjValveLoadGas_VA2
.
FormattingEnabled
=
true
;
this
.
InjValveLoadGas_VA2
.
Items
.
AddRange
(
new
object
[]
{
"N2"
,
"H2"
,
"He"
,
"Ar"
});
this
.
InjValveLoadGas_VA2
.
Location
=
new
System
.
Drawing
.
Point
(
319
,
80
);
this
.
InjValveLoadGas_VA2
.
Name
=
"InjValveLoadGas_VA2"
;
this
.
InjValveLoadGas_VA2
.
Size
=
new
System
.
Drawing
.
Size
(
58
,
23
);
this
.
InjValveLoadGas_VA2
.
TabIndex
=
11
;
//
// InjValveLoadGas_VA1
//
this
.
InjValveLoadGas_VA1
.
FormattingEnabled
=
true
;
this
.
InjValveLoadGas_VA1
.
Items
.
AddRange
(
new
object
[]
{
"N2"
,
"H2"
,
"He"
,
"Ar"
});
this
.
InjValveLoadGas_VA1
.
Location
=
new
System
.
Drawing
.
Point
(
319
,
33
);
this
.
InjValveLoadGas_VA1
.
Name
=
"InjValveLoadGas_VA1"
;
this
.
InjValveLoadGas_VA1
.
Size
=
new
System
.
Drawing
.
Size
(
58
,
23
);
this
.
InjValveLoadGas_VA1
.
TabIndex
=
10
;
//
// label13
//
this
.
label13
.
AutoSize
=
true
;
this
.
label13
.
Location
=
new
System
.
Drawing
.
Point
(
244
,
83
);
this
.
label13
.
Name
=
"label13"
;
this
.
label13
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label13
.
TabIndex
=
9
;
this
.
label13
.
Text
=
"载气类型:"
;
//
// label12
//
this
.
label12
.
AutoSize
=
true
;
this
.
label12
.
Location
=
new
System
.
Drawing
.
Point
(
244
,
37
);
this
.
label12
.
Name
=
"label12"
;
this
.
label12
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label12
.
TabIndex
=
8
;
this
.
label12
.
Text
=
"载气类型:"
;
//
// InjValveTemp_VA2
//
this
.
InjValveTemp_VA2
.
Location
=
new
System
.
Drawing
.
Point
(
168
,
80
);
this
.
InjValveTemp_VA2
.
Name
=
"InjValveTemp_VA2"
;
this
.
InjValveTemp_VA2
.
Size
=
new
System
.
Drawing
.
Size
(
57
,
24
);
this
.
InjValveTemp_VA2
.
TabIndex
=
7
;
//
// InjValveTemp_VA1
//
this
.
InjValveTemp_VA1
.
Location
=
new
System
.
Drawing
.
Point
(
168
,
33
);
this
.
InjValveTemp_VA1
.
Name
=
"InjValveTemp_VA1"
;
this
.
InjValveTemp_VA1
.
Size
=
new
System
.
Drawing
.
Size
(
57
,
24
);
this
.
InjValveTemp_VA1
.
TabIndex
=
6
;
//
// label7
//
this
.
label7
.
AutoSize
=
true
;
this
.
label7
.
Location
=
new
System
.
Drawing
.
Point
(
93
,
86
);
this
.
label7
.
Name
=
"label7"
;
this
.
label7
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label7
.
TabIndex
=
5
;
this
.
label7
.
Text
=
"保护温度:"
;
//
// label6
//
this
.
label6
.
AutoSize
=
true
;
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
93
,
37
);
this
.
label6
.
Name
=
"label6"
;
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label6
.
TabIndex
=
4
;
this
.
label6
.
Text
=
"保护温度:"
;
//
// InjValveVA1
//
this
.
InjValveVA1
.
AutoSize
=
true
;
this
.
InjValveVA1
.
Location
=
new
System
.
Drawing
.
Point
(
15
,
35
);
this
.
InjValveVA1
.
Name
=
"InjValveVA1"
;
this
.
InjValveVA1
.
Size
=
new
System
.
Drawing
.
Size
(
95
,
19
);
this
.
InjValveVA1
.
TabIndex
=
2
;
this
.
InjValveVA1
.
Text
=
"进样阀VA1"
;
this
.
InjValveVA1
.
UseVisualStyleBackColor
=
true
;
//
// InjValveVA2
//
this
.
InjValveVA2
.
AutoSize
=
true
;
this
.
InjValveVA2
.
Location
=
new
System
.
Drawing
.
Point
(
15
,
84
);
this
.
InjValveVA2
.
Name
=
"InjValveVA2"
;
this
.
InjValveVA2
.
Size
=
new
System
.
Drawing
.
Size
(
95
,
19
);
this
.
InjValveVA2
.
TabIndex
=
3
;
this
.
InjValveVA2
.
Text
=
"进样阀VA2"
;
this
.
InjValveVA2
.
UseVisualStyleBackColor
=
true
;
//
//
// groupBox2
// groupBox2
//
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
InjPortLoadGas_Behind
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
ChromFront_Thickness
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
ChromFront_Caliber
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
ChromFront_Length
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label7
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label6
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label12
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
ChromFrontType
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label13
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
ChromFront
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
InjPortLoadGas_Front
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
InjPortLoadGas_Front
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label11
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label10
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label10
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
InjPortType_Behind
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
InjPortType_Front
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
InjPortType_Front
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label9
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label8
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label8
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
InjPortBPTemp
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
InjPortFPTemp
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
InjPortFPTemp
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label5
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label4
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label4
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
InjPortFront
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
InjPortFront
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
InjPortBehind
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
17
,
12
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
17
,
12
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
609
,
1
31
);
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
609
,
1
29
);
this
.
groupBox2
.
TabIndex
=
4
;
this
.
groupBox2
.
TabIndex
=
4
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"
进样口
"
;
this
.
groupBox2
.
Text
=
"
前
"
;
//
//
// InjPortLoadGas_Behind
// InjPortLoadGas_Behind
//
//
...
@@ -507,7 +355,7 @@
...
@@ -507,7 +355,7 @@
"H2"
,
"H2"
,
"He"
,
"He"
,
"Ar"
});
"Ar"
});
this
.
InjPortLoadGas_Behind
.
Location
=
new
System
.
Drawing
.
Point
(
472
,
75
);
this
.
InjPortLoadGas_Behind
.
Location
=
new
System
.
Drawing
.
Point
(
472
,
23
);
this
.
InjPortLoadGas_Behind
.
Name
=
"InjPortLoadGas_Behind"
;
this
.
InjPortLoadGas_Behind
.
Name
=
"InjPortLoadGas_Behind"
;
this
.
InjPortLoadGas_Behind
.
Size
=
new
System
.
Drawing
.
Size
(
69
,
23
);
this
.
InjPortLoadGas_Behind
.
Size
=
new
System
.
Drawing
.
Size
(
69
,
23
);
this
.
InjPortLoadGas_Behind
.
TabIndex
=
13
;
this
.
InjPortLoadGas_Behind
.
TabIndex
=
13
;
...
@@ -520,7 +368,7 @@
...
@@ -520,7 +368,7 @@
"H2"
,
"H2"
,
"He"
,
"He"
,
"Ar"
});
"Ar"
});
this
.
InjPortLoadGas_Front
.
Location
=
new
System
.
Drawing
.
Point
(
472
,
2
8
);
this
.
InjPortLoadGas_Front
.
Location
=
new
System
.
Drawing
.
Point
(
472
,
2
3
);
this
.
InjPortLoadGas_Front
.
Name
=
"InjPortLoadGas_Front"
;
this
.
InjPortLoadGas_Front
.
Name
=
"InjPortLoadGas_Front"
;
this
.
InjPortLoadGas_Front
.
Size
=
new
System
.
Drawing
.
Size
(
69
,
23
);
this
.
InjPortLoadGas_Front
.
Size
=
new
System
.
Drawing
.
Size
(
69
,
23
);
this
.
InjPortLoadGas_Front
.
TabIndex
=
12
;
this
.
InjPortLoadGas_Front
.
TabIndex
=
12
;
...
@@ -528,7 +376,7 @@
...
@@ -528,7 +376,7 @@
// label11
// label11
//
//
this
.
label11
.
AutoSize
=
true
;
this
.
label11
.
AutoSize
=
true
;
this
.
label11
.
Location
=
new
System
.
Drawing
.
Point
(
395
,
79
);
this
.
label11
.
Location
=
new
System
.
Drawing
.
Point
(
395
,
27
);
this
.
label11
.
Name
=
"label11"
;
this
.
label11
.
Name
=
"label11"
;
this
.
label11
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label11
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label11
.
TabIndex
=
11
;
this
.
label11
.
TabIndex
=
11
;
...
@@ -537,7 +385,7 @@
...
@@ -537,7 +385,7 @@
// label10
// label10
//
//
this
.
label10
.
AutoSize
=
true
;
this
.
label10
.
AutoSize
=
true
;
this
.
label10
.
Location
=
new
System
.
Drawing
.
Point
(
395
,
32
);
this
.
label10
.
Location
=
new
System
.
Drawing
.
Point
(
395
,
27
);
this
.
label10
.
Name
=
"label10"
;
this
.
label10
.
Name
=
"label10"
;
this
.
label10
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label10
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label10
.
TabIndex
=
10
;
this
.
label10
.
TabIndex
=
10
;
...
@@ -550,7 +398,7 @@
...
@@ -550,7 +398,7 @@
"PIP"
,
"PIP"
,
"SPL"
,
"SPL"
,
"PTV"
});
"PTV"
});
this
.
InjPortType_Behind
.
Location
=
new
System
.
Drawing
.
Point
(
316
,
75
);
this
.
InjPortType_Behind
.
Location
=
new
System
.
Drawing
.
Point
(
316
,
23
);
this
.
InjPortType_Behind
.
Name
=
"InjPortType_Behind"
;
this
.
InjPortType_Behind
.
Name
=
"InjPortType_Behind"
;
this
.
InjPortType_Behind
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
23
);
this
.
InjPortType_Behind
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
23
);
this
.
InjPortType_Behind
.
TabIndex
=
9
;
this
.
InjPortType_Behind
.
TabIndex
=
9
;
...
@@ -562,7 +410,7 @@
...
@@ -562,7 +410,7 @@
"PIP"
,
"PIP"
,
"SPL"
,
"SPL"
,
"PTV"
});
"PTV"
});
this
.
InjPortType_Front
.
Location
=
new
System
.
Drawing
.
Point
(
316
,
2
8
);
this
.
InjPortType_Front
.
Location
=
new
System
.
Drawing
.
Point
(
316
,
2
3
);
this
.
InjPortType_Front
.
Name
=
"InjPortType_Front"
;
this
.
InjPortType_Front
.
Name
=
"InjPortType_Front"
;
this
.
InjPortType_Front
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
23
);
this
.
InjPortType_Front
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
23
);
this
.
InjPortType_Front
.
TabIndex
=
8
;
this
.
InjPortType_Front
.
TabIndex
=
8
;
...
@@ -570,7 +418,7 @@
...
@@ -570,7 +418,7 @@
// label9
// label9
//
//
this
.
label9
.
AutoSize
=
true
;
this
.
label9
.
AutoSize
=
true
;
this
.
label9
.
Location
=
new
System
.
Drawing
.
Point
(
263
,
79
);
this
.
label9
.
Location
=
new
System
.
Drawing
.
Point
(
263
,
27
);
this
.
label9
.
Name
=
"label9"
;
this
.
label9
.
Name
=
"label9"
;
this
.
label9
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label9
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label9
.
TabIndex
=
7
;
this
.
label9
.
TabIndex
=
7
;
...
@@ -579,7 +427,7 @@
...
@@ -579,7 +427,7 @@
// label8
// label8
//
//
this
.
label8
.
AutoSize
=
true
;
this
.
label8
.
AutoSize
=
true
;
this
.
label8
.
Location
=
new
System
.
Drawing
.
Point
(
263
,
32
);
this
.
label8
.
Location
=
new
System
.
Drawing
.
Point
(
263
,
27
);
this
.
label8
.
Name
=
"label8"
;
this
.
label8
.
Name
=
"label8"
;
this
.
label8
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label8
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label8
.
TabIndex
=
6
;
this
.
label8
.
TabIndex
=
6
;
...
@@ -587,14 +435,14 @@
...
@@ -587,14 +435,14 @@
//
//
// InjPortBPTemp
// InjPortBPTemp
//
//
this
.
InjPortBPTemp
.
Location
=
new
System
.
Drawing
.
Point
(
194
,
75
);
this
.
InjPortBPTemp
.
Location
=
new
System
.
Drawing
.
Point
(
200
,
24
);
this
.
InjPortBPTemp
.
Name
=
"InjPortBPTemp"
;
this
.
InjPortBPTemp
.
Name
=
"InjPortBPTemp"
;
this
.
InjPortBPTemp
.
Size
=
new
System
.
Drawing
.
Size
(
57
,
24
);
this
.
InjPortBPTemp
.
Size
=
new
System
.
Drawing
.
Size
(
57
,
24
);
this
.
InjPortBPTemp
.
TabIndex
=
5
;
this
.
InjPortBPTemp
.
TabIndex
=
5
;
//
//
// InjPortFPTemp
// InjPortFPTemp
//
//
this
.
InjPortFPTemp
.
Location
=
new
System
.
Drawing
.
Point
(
194
,
2
8
);
this
.
InjPortFPTemp
.
Location
=
new
System
.
Drawing
.
Point
(
194
,
2
3
);
this
.
InjPortFPTemp
.
Name
=
"InjPortFPTemp"
;
this
.
InjPortFPTemp
.
Name
=
"InjPortFPTemp"
;
this
.
InjPortFPTemp
.
Size
=
new
System
.
Drawing
.
Size
(
57
,
24
);
this
.
InjPortFPTemp
.
Size
=
new
System
.
Drawing
.
Size
(
57
,
24
);
this
.
InjPortFPTemp
.
TabIndex
=
4
;
this
.
InjPortFPTemp
.
TabIndex
=
4
;
...
@@ -602,7 +450,7 @@
...
@@ -602,7 +450,7 @@
// label5
// label5
//
//
this
.
label5
.
AutoSize
=
true
;
this
.
label5
.
AutoSize
=
true
;
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
117
,
79
);
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
117
,
27
);
this
.
label5
.
Name
=
"label5"
;
this
.
label5
.
Name
=
"label5"
;
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label5
.
TabIndex
=
3
;
this
.
label5
.
TabIndex
=
3
;
...
@@ -611,7 +459,7 @@
...
@@ -611,7 +459,7 @@
// label4
// label4
//
//
this
.
label4
.
AutoSize
=
true
;
this
.
label4
.
AutoSize
=
true
;
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
117
,
32
);
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
117
,
27
);
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
15
);
this
.
label4
.
TabIndex
=
2
;
this
.
label4
.
TabIndex
=
2
;
...
@@ -620,7 +468,7 @@
...
@@ -620,7 +468,7 @@
// InjPortFront
// InjPortFront
//
//
this
.
InjPortFront
.
AutoSize
=
true
;
this
.
InjPortFront
.
AutoSize
=
true
;
this
.
InjPortFront
.
Location
=
new
System
.
Drawing
.
Point
(
33
,
30
);
this
.
InjPortFront
.
Location
=
new
System
.
Drawing
.
Point
(
33
,
25
);
this
.
InjPortFront
.
Name
=
"InjPortFront"
;
this
.
InjPortFront
.
Name
=
"InjPortFront"
;
this
.
InjPortFront
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
19
);
this
.
InjPortFront
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
19
);
this
.
InjPortFront
.
TabIndex
=
0
;
this
.
InjPortFront
.
TabIndex
=
0
;
...
@@ -630,7 +478,7 @@
...
@@ -630,7 +478,7 @@
// InjPortBehind
// InjPortBehind
//
//
this
.
InjPortBehind
.
AutoSize
=
true
;
this
.
InjPortBehind
.
AutoSize
=
true
;
this
.
InjPortBehind
.
Location
=
new
System
.
Drawing
.
Point
(
33
,
77
);
this
.
InjPortBehind
.
Location
=
new
System
.
Drawing
.
Point
(
33
,
25
);
this
.
InjPortBehind
.
Name
=
"InjPortBehind"
;
this
.
InjPortBehind
.
Name
=
"InjPortBehind"
;
this
.
InjPortBehind
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
19
);
this
.
InjPortBehind
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
19
);
this
.
InjPortBehind
.
TabIndex
=
1
;
this
.
InjPortBehind
.
TabIndex
=
1
;
...
@@ -668,6 +516,162 @@
...
@@ -668,6 +516,162 @@
this
.
cancelbtn
.
UseVisualStyleBackColor
=
true
;
this
.
cancelbtn
.
UseVisualStyleBackColor
=
true
;
this
.
cancelbtn
.
Click
+=
new
System
.
EventHandler
(
this
.
cancelbtn_Click
);
this
.
cancelbtn
.
Click
+=
new
System
.
EventHandler
(
this
.
cancelbtn_Click
);
//
//
// ChromFront_Thickness
//
this
.
ChromFront_Thickness
.
Location
=
new
System
.
Drawing
.
Point
(
376
,
92
);
this
.
ChromFront_Thickness
.
Name
=
"ChromFront_Thickness"
;
this
.
ChromFront_Thickness
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
24
);
this
.
ChromFront_Thickness
.
TabIndex
=
21
;
//
// ChromFront_Caliber
//
this
.
ChromFront_Caliber
.
Location
=
new
System
.
Drawing
.
Point
(
218
,
92
);
this
.
ChromFront_Caliber
.
Name
=
"ChromFront_Caliber"
;
this
.
ChromFront_Caliber
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
24
);
this
.
ChromFront_Caliber
.
TabIndex
=
20
;
//
// ChromFront_Length
//
this
.
ChromFront_Length
.
Location
=
new
System
.
Drawing
.
Point
(
376
,
62
);
this
.
ChromFront_Length
.
Name
=
"ChromFront_Length"
;
this
.
ChromFront_Length
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
24
);
this
.
ChromFront_Length
.
TabIndex
=
19
;
//
// label7
//
this
.
label7
.
AutoSize
=
true
;
this
.
label7
.
Location
=
new
System
.
Drawing
.
Point
(
331
,
95
);
this
.
label7
.
Name
=
"label7"
;
this
.
label7
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label7
.
TabIndex
=
18
;
this
.
label7
.
Text
=
"膜厚:"
;
//
// label6
//
this
.
label6
.
AutoSize
=
true
;
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
170
,
101
);
this
.
label6
.
Name
=
"label6"
;
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label6
.
TabIndex
=
17
;
this
.
label6
.
Text
=
"口径:"
;
//
// label12
//
this
.
label12
.
AutoSize
=
true
;
this
.
label12
.
Location
=
new
System
.
Drawing
.
Point
(
331
,
65
);
this
.
label12
.
Name
=
"label12"
;
this
.
label12
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label12
.
TabIndex
=
16
;
this
.
label12
.
Text
=
"长度:"
;
//
// ChromFrontType
//
this
.
ChromFrontType
.
FormattingEnabled
=
true
;
this
.
ChromFrontType
.
Items
.
AddRange
(
new
object
[]
{
"毛细孔柱"
,
"填充柱"
});
this
.
ChromFrontType
.
Location
=
new
System
.
Drawing
.
Point
(
184
,
63
);
this
.
ChromFrontType
.
Name
=
"ChromFrontType"
;
this
.
ChromFrontType
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
23
);
this
.
ChromFrontType
.
TabIndex
=
15
;
//
// label13
//
this
.
label13
.
AutoSize
=
true
;
this
.
label13
.
Location
=
new
System
.
Drawing
.
Point
(
138
,
67
);
this
.
label13
.
Name
=
"label13"
;
this
.
label13
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label13
.
TabIndex
=
14
;
this
.
label13
.
Text
=
"类型:"
;
//
// ChromFront
//
this
.
ChromFront
.
AutoSize
=
true
;
this
.
ChromFront
.
Location
=
new
System
.
Drawing
.
Point
(
33
,
66
);
this
.
ChromFront
.
Name
=
"ChromFront"
;
this
.
ChromFront
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
19
);
this
.
ChromFront
.
TabIndex
=
13
;
this
.
ChromFront
.
Text
=
"前色谱柱"
;
this
.
ChromFront
.
UseVisualStyleBackColor
=
true
;
//
// ChromBehind_Thickness
//
this
.
ChromBehind_Thickness
.
Location
=
new
System
.
Drawing
.
Point
(
376
,
91
);
this
.
ChromBehind_Thickness
.
Name
=
"ChromBehind_Thickness"
;
this
.
ChromBehind_Thickness
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
24
);
this
.
ChromBehind_Thickness
.
TabIndex
=
29
;
//
// ChromBehind_Caliber
//
this
.
ChromBehind_Caliber
.
Location
=
new
System
.
Drawing
.
Point
(
218
,
92
);
this
.
ChromBehind_Caliber
.
Name
=
"ChromBehind_Caliber"
;
this
.
ChromBehind_Caliber
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
24
);
this
.
ChromBehind_Caliber
.
TabIndex
=
28
;
//
// ChromBehind_Length
//
this
.
ChromBehind_Length
.
Location
=
new
System
.
Drawing
.
Point
(
376
,
61
);
this
.
ChromBehind_Length
.
Name
=
"ChromBehind_Length"
;
this
.
ChromBehind_Length
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
24
);
this
.
ChromBehind_Length
.
TabIndex
=
27
;
//
// ChromBehindType
//
this
.
ChromBehindType
.
FormattingEnabled
=
true
;
this
.
ChromBehindType
.
Items
.
AddRange
(
new
object
[]
{
"毛细孔柱"
,
"填充柱"
});
this
.
ChromBehindType
.
Location
=
new
System
.
Drawing
.
Point
(
184
,
62
);
this
.
ChromBehindType
.
Name
=
"ChromBehindType"
;
this
.
ChromBehindType
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
23
);
this
.
ChromBehindType
.
TabIndex
=
26
;
//
// label14
//
this
.
label14
.
AutoSize
=
true
;
this
.
label14
.
Location
=
new
System
.
Drawing
.
Point
(
329
,
94
);
this
.
label14
.
Name
=
"label14"
;
this
.
label14
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label14
.
TabIndex
=
25
;
this
.
label14
.
Text
=
"膜厚:"
;
//
// label15
//
this
.
label15
.
AutoSize
=
true
;
this
.
label15
.
Location
=
new
System
.
Drawing
.
Point
(
171
,
95
);
this
.
label15
.
Name
=
"label15"
;
this
.
label15
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label15
.
TabIndex
=
24
;
this
.
label15
.
Text
=
"口径:"
;
//
// label16
//
this
.
label16
.
AutoSize
=
true
;
this
.
label16
.
Location
=
new
System
.
Drawing
.
Point
(
329
,
64
);
this
.
label16
.
Name
=
"label16"
;
this
.
label16
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label16
.
TabIndex
=
23
;
this
.
label16
.
Text
=
"长度:"
;
//
// label17
//
this
.
label17
.
AutoSize
=
true
;
this
.
label17
.
Location
=
new
System
.
Drawing
.
Point
(
138
,
70
);
this
.
label17
.
Name
=
"label17"
;
this
.
label17
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label17
.
TabIndex
=
22
;
this
.
label17
.
Text
=
"类型:"
;
//
// ChromBehind
//
this
.
ChromBehind
.
AutoSize
=
true
;
this
.
ChromBehind
.
Location
=
new
System
.
Drawing
.
Point
(
33
,
69
);
this
.
ChromBehind
.
Name
=
"ChromBehind"
;
this
.
ChromBehind
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
19
);
this
.
ChromBehind
.
TabIndex
=
21
;
this
.
ChromBehind
.
Text
=
"后色谱柱"
;
this
.
ChromBehind
.
UseVisualStyleBackColor
=
true
;
//
// Sampling
// Sampling
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
...
@@ -720,18 +724,12 @@
...
@@ -720,18 +724,12 @@
private
System
.
Windows
.
Forms
.
CheckBox
ValveOne
;
private
System
.
Windows
.
Forms
.
CheckBox
ValveOne
;
private
System
.
Windows
.
Forms
.
CheckBox
ValveSix
;
private
System
.
Windows
.
Forms
.
CheckBox
ValveSix
;
private
System
.
Windows
.
Forms
.
CheckBox
ValveFive
;
private
System
.
Windows
.
Forms
.
CheckBox
ValveFive
;
private
System
.
Windows
.
Forms
.
CheckBox
InjValveVA2
;
private
System
.
Windows
.
Forms
.
CheckBox
InjValveVA1
;
private
System
.
Windows
.
Forms
.
CheckBox
InjPortBehind
;
private
System
.
Windows
.
Forms
.
CheckBox
InjPortBehind
;
private
System
.
Windows
.
Forms
.
CheckBox
InjPortFront
;
private
System
.
Windows
.
Forms
.
CheckBox
InjPortFront
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox3
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox3
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox2
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox2
;
private
System
.
Windows
.
Forms
.
Label
label4
;
private
System
.
Windows
.
Forms
.
Label
label4
;
private
System
.
Windows
.
Forms
.
Label
label7
;
private
System
.
Windows
.
Forms
.
Label
label6
;
private
System
.
Windows
.
Forms
.
Label
label5
;
private
System
.
Windows
.
Forms
.
Label
label5
;
private
System
.
Windows
.
Forms
.
TextBox
InjValveTemp_VA2
;
private
System
.
Windows
.
Forms
.
TextBox
InjValveTemp_VA1
;
private
System
.
Windows
.
Forms
.
TextBox
InjPortBPTemp
;
private
System
.
Windows
.
Forms
.
TextBox
InjPortBPTemp
;
private
System
.
Windows
.
Forms
.
TextBox
InjPortFPTemp
;
private
System
.
Windows
.
Forms
.
TextBox
InjPortFPTemp
;
private
System
.
Windows
.
Forms
.
Label
label9
;
private
System
.
Windows
.
Forms
.
Label
label9
;
...
@@ -742,15 +740,23 @@
...
@@ -742,15 +740,23 @@
private
System
.
Windows
.
Forms
.
Label
label11
;
private
System
.
Windows
.
Forms
.
Label
label11
;
private
System
.
Windows
.
Forms
.
ComboBox
InjPortLoadGas_Behind
;
private
System
.
Windows
.
Forms
.
ComboBox
InjPortLoadGas_Behind
;
private
System
.
Windows
.
Forms
.
ComboBox
InjPortLoadGas_Front
;
private
System
.
Windows
.
Forms
.
ComboBox
InjPortLoadGas_Front
;
private
System
.
Windows
.
Forms
.
Label
label13
;
private
System
.
Windows
.
Forms
.
TextBox
ChromFront_Thickness
;
private
System
.
Windows
.
Forms
.
TextBox
ChromFront_Caliber
;
private
System
.
Windows
.
Forms
.
TextBox
ChromFront_Length
;
private
System
.
Windows
.
Forms
.
Label
label7
;
private
System
.
Windows
.
Forms
.
Label
label6
;
private
System
.
Windows
.
Forms
.
Label
label12
;
private
System
.
Windows
.
Forms
.
Label
label12
;
private
System
.
Windows
.
Forms
.
ComboBox
InjValveLoadGas_VA2
;
private
System
.
Windows
.
Forms
.
ComboBox
ChromFrontType
;
private
System
.
Windows
.
Forms
.
ComboBox
InjValveLoadGas_VA1
;
private
System
.
Windows
.
Forms
.
Label
label13
;
private
System
.
Windows
.
Forms
.
CheckBox
InjValveLoadGas1
;
private
System
.
Windows
.
Forms
.
CheckBox
ChromFront
;
private
System
.
Windows
.
Forms
.
CheckBox
InjValveLoadGas3
;
private
System
.
Windows
.
Forms
.
TextBox
ChromBehind_Thickness
;
private
System
.
Windows
.
Forms
.
CheckBox
InjValveLoadGas2
;
private
System
.
Windows
.
Forms
.
TextBox
ChromBehind_Caliber
;
private
System
.
Windows
.
Forms
.
CheckBox
InjValveLoadGas5
;
private
System
.
Windows
.
Forms
.
TextBox
ChromBehind_Length
;
private
System
.
Windows
.
Forms
.
CheckBox
InjValveLoadGas4
;
private
System
.
Windows
.
Forms
.
ComboBox
ChromBehindType
;
private
System
.
Windows
.
Forms
.
CheckBox
InjValveLoadGas6
;
private
System
.
Windows
.
Forms
.
Label
label14
;
private
System
.
Windows
.
Forms
.
Label
label15
;
private
System
.
Windows
.
Forms
.
Label
label16
;
private
System
.
Windows
.
Forms
.
Label
label17
;
private
System
.
Windows
.
Forms
.
CheckBox
ChromBehind
;
}
}
}
}
\ No newline at end of file
GcDevicePc/DeviceConfigUI/Sampling.cs
View file @
c3f8262d
...
@@ -34,19 +34,15 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -34,19 +34,15 @@ namespace GcDevicePc.DeviceConfigUI
{
{
InitializeComponent
();
InitializeComponent
();
this
.
hWConfig
=
hwconfig
;
this
.
hWConfig
=
hwconfig
;
if
(
type
>=
4
&&
type
<=
5
)
if
(
type
==
4
)
{
{
this
.
sampling_type
=
SamplingDevice
.
Sample
;
this
.
sampling_type
=
SamplingDevice
.
Sample
;
}
}
else
if
(
type
>=
6
&&
type
<=
11
)
else
if
(
type
==
5
)
{
{
this
.
sampling_type
=
SamplingDevice
.
Valve
;
this
.
sampling_type
=
SamplingDevice
.
Valve
;
}
}
else
if
(
type
>=
12
&&
type
<=
13
)
else
if
(
type
==
6
)
{
this
.
sampling_type
=
SamplingDevice
.
InjPortValve
;
}
else
if
(
type
>=
14
&&
type
<=
15
)
{
{
this
.
sampling_type
=
SamplingDevice
.
InjPortValve
;
this
.
sampling_type
=
SamplingDevice
.
InjPortValve
;
}
}
...
@@ -90,45 +86,18 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -90,45 +86,18 @@ namespace GcDevicePc.DeviceConfigUI
this
.
InjPortType_Behind
.
SelectedIndex
=
this
.
hWConfig
.
hwconfiginfo
.
u16InjPortType_Behind
;
this
.
InjPortType_Behind
.
SelectedIndex
=
this
.
hWConfig
.
hwconfiginfo
.
u16InjPortType_Behind
;
this
.
InjPortLoadGas_Behind
.
SelectedIndex
=
this
.
hWConfig
.
hwconfiginfo
.
u16InjPortLoadGas_Behind
;
this
.
InjPortLoadGas_Behind
.
SelectedIndex
=
this
.
hWConfig
.
hwconfiginfo
.
u16InjPortLoadGas_Behind
;
//色谱柱
this
.
ChromFront
.
Checked
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront
==
1
?
true
:
false
;
this
.
ChromFrontType
.
SelectedIndex
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFrontType
;
this
.
ChromFront_Length
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront_Length
.
ToString
();
this
.
ChromFront_Caliber
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront_Caliber
.
ToString
();
this
.
ChromFront_Thickness
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront_Thickness
.
ToString
();
this
.
InjValveVA1
.
Checked
=
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveVA1
==
1
?
true
:
false
;
//VA1阀
this
.
ChromBehind
.
Checked
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehind
==
1
?
true
:
false
;
this
.
InjValveTemp_VA1
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveTemp_VA1
.
ToString
();
//VA1阀保护温度
this
.
ChromBehindType
.
SelectedIndex
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehindType
;
this
.
ChromBehind_Length
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehind_Length
.
ToString
();
this
.
InjValveVA2
.
Checked
=
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveVA2
==
1
?
true
:
false
;
//VA1阀
this
.
ChromBehind_Caliber
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehind_Caliber
.
ToString
();
this
.
InjValveTemp_VA2
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveTemp_VA2
.
ToString
();
//VA1阀保护温度
this
.
ChromBehind_Thickness
.
Text
=
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehind_Thickness
.
ToString
();
//进样阀
if
(
this
.
hWConfig
.
hwconfiginfo
.
u16StartType
==
0
)
{
this
.
InjValveLoadGas_VA1
.
Enabled
=
false
;
//VA1阀载气类型
this
.
InjValveLoadGas1
.
Enabled
=
false
;
//VA1阀载气1
this
.
InjValveLoadGas2
.
Enabled
=
false
;
//VA1阀载气2
this
.
InjValveLoadGas3
.
Enabled
=
false
;
//VA1阀载气3
this
.
InjValveLoadGas_VA2
.
Enabled
=
false
;
//VA1阀载气类型
this
.
InjValveLoadGas4
.
Enabled
=
false
;
//VA1阀载气1
this
.
InjValveLoadGas5
.
Enabled
=
false
;
//VA1阀载气2
this
.
InjValveLoadGas6
.
Enabled
=
false
;
//VA1阀载气3
}
else
{
this
.
InjValveLoadGas_VA1
.
SelectedIndex
=
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveLoadGas_VA1
;
//VA1阀载气类型
this
.
InjValveLoadGas1
.
Checked
=
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveLoadGas1
==
1
?
true
:
false
;
//VA1阀载气1
this
.
InjValveLoadGas2
.
Checked
=
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveLoadGas2
==
1
?
true
:
false
;
//VA1阀载气2
this
.
InjValveLoadGas3
.
Checked
=
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveLoadGas3
==
1
?
true
:
false
;
//VA1阀载气3
this
.
InjValveLoadGas_VA2
.
SelectedIndex
=
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveLoadGas_VA2
;
//VA1阀载气类型
this
.
InjValveLoadGas4
.
Checked
=
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveLoadGas4
==
1
?
true
:
false
;
//VA1阀载气1
this
.
InjValveLoadGas5
.
Checked
=
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveLoadGas5
==
1
?
true
:
false
;
//VA1阀载气2
this
.
InjValveLoadGas6
.
Checked
=
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveLoadGas6
==
1
?
true
:
false
;
//VA1阀载气3
}
}
}
}
}
#
endregion
#
endregion
...
@@ -174,20 +143,21 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -174,20 +143,21 @@ namespace GcDevicePc.DeviceConfigUI
this
.
hWConfig
.
hwconfiginfo
.
u16InjPortType_Behind
=
this
.
InjPortType_Behind
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16InjPortType_Behind
=
this
.
InjPortType_Behind
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16InjPortLoadGas_Behind
=
this
.
InjPortLoadGas_Behind
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16InjPortLoadGas_Behind
=
this
.
InjPortLoadGas_Behind
.
SelectedIndex
;
//色谱柱
this
.
hWConfig
.
hwconfiginfo
.
u16ChromNum
=
(
this
.
ChromFront
.
Checked
?
1
:
0
)
+
(
this
.
ChromBehind
.
Checked
?
1
:
0
);
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront
=
this
.
ChromFront
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFrontType
=
this
.
ChromFrontType
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront_Length
=
int
.
Parse
(
this
.
ChromFront_Length
.
Text
);
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront_Caliber
=
int
.
Parse
(
this
.
ChromFront_Caliber
.
Text
);
this
.
hWConfig
.
hwconfiginfo
.
u16ChromFront_Thickness
=
int
.
Parse
(
this
.
ChromFront_Thickness
.
Text
);
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehind
=
this
.
ChromBehind
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehindType
=
this
.
ChromBehindType
.
SelectedIndex
;
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehind_Length
=
int
.
Parse
(
this
.
ChromBehind_Length
.
Text
);
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehind_Caliber
=
int
.
Parse
(
this
.
ChromBehind_Caliber
.
Text
);
this
.
hWConfig
.
hwconfiginfo
.
u16ChromBehind_Thickness
=
int
.
Parse
(
this
.
ChromBehind_Thickness
.
Text
);
//进样阀
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveVA1
=
this
.
InjValveVA1
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveTemp_VA1
=
int
.
Parse
(
this
.
InjValveTemp_VA1
.
Text
);
//VA1阀保护温度
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveLoadGas_VA1
=
this
.
InjValveLoadGas_VA1
.
SelectedIndex
;
//VA1阀载气类型
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveLoadGas1
=
this
.
InjValveLoadGas1
.
Checked
?
1
:
0
;
//VA1阀载气1
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveLoadGas2
=
this
.
InjValveLoadGas2
.
Checked
?
1
:
0
;
//VA1阀载气2
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveLoadGas3
=
this
.
InjValveLoadGas3
.
Checked
?
1
:
0
;
//VA1阀载气3
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveVA2
=
this
.
InjValveVA2
.
Checked
?
1
:
0
;
//VA1阀
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveTemp_VA2
=
int
.
Parse
(
this
.
InjValveTemp_VA2
.
Text
);
//VA1阀保护温度
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveLoadGas_VA2
=
this
.
InjValveLoadGas_VA2
.
SelectedIndex
;
//VA1阀载气类型
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveLoadGas4
=
this
.
InjValveLoadGas4
.
Checked
?
1
:
0
;
//VA1阀载气1
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveLoadGas5
=
this
.
InjValveLoadGas5
.
Checked
?
1
:
0
;
//VA1阀载气2
this
.
hWConfig
.
hwconfiginfo
.
u16InjValveLoadGas6
=
this
.
InjValveLoadGas6
.
Checked
?
1
:
0
;
//VA1阀载气3
}
}
this
.
Close
();
this
.
Close
();
...
...
GcDevicePc/GCBuffer/HMIBuffer.cs
View file @
c3f8262d
...
@@ -49,9 +49,9 @@ namespace GcDevicePc.GCBuffer
...
@@ -49,9 +49,9 @@ namespace GcDevicePc.GCBuffer
///////////////////////////////////////
///////////////////////////////////////
public
ushort
[]
EPCStatus
;
public
ushort
[]
EPCStatus
;
//epc状态
public
ushort
[]
HmiAbnormal
;
public
ushort
[]
HmiAbnormal
;
//hmi异常报警
}
}
public
hmiinfo
gcinfo
=
new
hmiinfo
();
public
hmiinfo
gcinfo
=
new
hmiinfo
();
...
...
GcDevicePc/GCBuffer/PCBuffer.cs
View file @
c3f8262d
...
@@ -45,6 +45,7 @@ namespace GcDevicePc.GCBuffer
...
@@ -45,6 +45,7 @@ namespace GcDevicePc.GCBuffer
public
ushort
RunType
;
//运行类型 0 打开运行 1 智能运行 2 批处理
public
ushort
RunType
;
//运行类型 0 打开运行 1 智能运行 2 批处理
public
bool
sendtohw
;
public
bool
sendtohw
;
public
bool
sendtoZb
;
public
bool
sendtoZb
;
public
bool
BeamTube
;
public
bool
info_log
;
public
bool
info_log
;
public
bool
error_log
;
public
bool
error_log
;
public
string
hmimac
;
public
string
hmimac
;
...
@@ -124,6 +125,7 @@ namespace GcDevicePc.GCBuffer
...
@@ -124,6 +125,7 @@ namespace GcDevicePc.GCBuffer
gcpcinfo
.
pcworkinfo
.
hmi_log
=
false
;
gcpcinfo
.
pcworkinfo
.
hmi_log
=
false
;
gcpcinfo
.
pcworkinfo
.
sendtoZb
=
false
;
gcpcinfo
.
pcworkinfo
.
sendtoZb
=
false
;
gcpcinfo
.
pcworkinfo
.
sendtohw
=
false
;
gcpcinfo
.
pcworkinfo
.
sendtohw
=
false
;
gcpcinfo
.
pcworkinfo
.
BeamTube
=
false
;
gcpcinfo
.
moduleinfo
.
ip
=
""
;
gcpcinfo
.
moduleinfo
.
ip
=
""
;
gcpcinfo
.
outputinfo
.
port
=
0
;
gcpcinfo
.
outputinfo
.
port
=
0
;
...
@@ -143,10 +145,22 @@ namespace GcDevicePc.GCBuffer
...
@@ -143,10 +145,22 @@ namespace GcDevicePc.GCBuffer
int
opensys
=
ini
.
ReadInteger
(
"StartUp"
,
"打开系统"
);
int
opensys
=
ini
.
ReadInteger
(
"StartUp"
,
"打开系统"
);
int
runtype
=
ini
.
ReadInteger
(
"StartUp"
,
"运行类型"
);
int
runtype
=
ini
.
ReadInteger
(
"StartUp"
,
"运行类型"
);
int
senddatatohw
=
ini
.
ReadInteger
(
"StartUp"
,
"SendDataToHw"
);
int
senddatatozb
=
ini
.
ReadInteger
(
"StartUp"
,
"SendDataToZB"
);
gcpcinfo
.
pcfolderinfo
.
DataFolder
=
ini
.
ReadString
(
"DataFolder"
,
"历史数据"
);
gcpcinfo
.
pcfolderinfo
.
DataFolder
=
ini
.
ReadString
(
"DataFolder"
,
"历史数据"
);
int
Version
=
ini
.
ReadInteger
(
"Version"
,
"VersionType"
);
string
uname
=
ini
.
ReadString
(
"User"
,
"Name"
);
string
upwd
=
ini
.
ReadString
(
"User"
,
"Password"
);
int
dsf
=
ini
.
ReadInteger
(
"SendData"
,
"Thirdparty"
);
int
dw
=
ini
.
ReadInteger
(
"SendData"
,
"Foreign"
);
globaldata
.
UserName
=
uname
;
globaldata
.
UserPwd
=
upwd
;
globaldata
.
CurrentVersion
=
Version
;
globaldata
.
Foreign
=
dw
;
gcpcinfo
.
pcworkinfo
.
hmimac
=
ini
.
ReadString
(
"NetWorkConfig"
,
"MAC地址"
);
gcpcinfo
.
pcworkinfo
.
hmimac
=
ini
.
ReadString
(
"NetWorkConfig"
,
"MAC地址"
);
if
(
opensys
==
1
)
if
(
opensys
==
1
)
...
@@ -158,23 +172,25 @@ namespace GcDevicePc.GCBuffer
...
@@ -158,23 +172,25 @@ namespace GcDevicePc.GCBuffer
gcpcinfo
.
pcworkinfo
.
RunType
=
0
;
gcpcinfo
.
pcworkinfo
.
RunType
=
0
;
}
}
if
(
senddatatohw
==
1
)
if
(
dsf
==
0
)
{
{
gcpcinfo
.
pcworkinfo
.
sendtohw
=
true
;
gcpcinfo
.
pcworkinfo
.
sendtohw
=
true
;
}
}
else
if
(
senddatatozb
==
1
)
else
if
(
dsf
==
1
)
{
{
gcpcinfo
.
pcworkinfo
.
sendtoZb
=
true
;
gcpcinfo
.
pcworkinfo
.
sendtoZb
=
true
;
}
}
else
if
(
dsf
==
2
)
{
gcpcinfo
.
pcworkinfo
.
BeamTube
=
true
;
}
else
else
{
{
gcpcinfo
.
pcworkinfo
.
sendtohw
=
false
;
gcpcinfo
.
pcworkinfo
.
sendtohw
=
false
;
gcpcinfo
.
pcworkinfo
.
sendtoZb
=
false
;
gcpcinfo
.
pcworkinfo
.
sendtoZb
=
false
;
gcpcinfo
.
pcworkinfo
.
BeamTube
=
false
;
}
}
//INIOperation test = new INIOperation(file);
//string opensys = test.INIGetStringValue("StartUp", "打开系统", null);
//string runtype = test.INIGetStringValue("StartUp", "运行类型", null);
string
wtd624x_ip
=
ini
.
ReadString
(
"WTD624X"
,
"IP"
);
string
wtd624x_ip
=
ini
.
ReadString
(
"WTD624X"
,
"IP"
);
string
wtd624x_mask
=
ini
.
ReadString
(
"WTD624X"
,
"MASK"
);
string
wtd624x_mask
=
ini
.
ReadString
(
"WTD624X"
,
"MASK"
);
...
@@ -242,6 +258,7 @@ namespace GcDevicePc.GCBuffer
...
@@ -242,6 +258,7 @@ namespace GcDevicePc.GCBuffer
gcpcinfo
.
pcworkinfo
.
RunType
=
0
;
gcpcinfo
.
pcworkinfo
.
RunType
=
0
;
gcpcinfo
.
pcworkinfo
.
sendtohw
=
false
;
gcpcinfo
.
pcworkinfo
.
sendtohw
=
false
;
gcpcinfo
.
pcworkinfo
.
sendtoZb
=
false
;
gcpcinfo
.
pcworkinfo
.
sendtoZb
=
false
;
gcpcinfo
.
pcworkinfo
.
BeamTube
=
false
;
gcpcinfo
.
pcfolderinfo
.
DataFolder
=
null
;
gcpcinfo
.
pcfolderinfo
.
DataFolder
=
null
;
}
}
}
}
...
@@ -250,5 +267,6 @@ namespace GcDevicePc.GCBuffer
...
@@ -250,5 +267,6 @@ namespace GcDevicePc.GCBuffer
Log
.
Error
(
e
.
Message
);
Log
.
Error
(
e
.
Message
);
}
}
}
}
}
}
}
}
GcDevicePc/GcDevicePc.csproj
View file @
c3f8262d
...
@@ -690,6 +690,12 @@
...
@@ -690,6 +690,12 @@
<Compile
Include=
"StartForm.Designer.cs"
>
<Compile
Include=
"StartForm.Designer.cs"
>
<DependentUpon>
StartForm.cs
</DependentUpon>
<DependentUpon>
StartForm.cs
</DependentUpon>
</Compile>
</Compile>
<Compile
Include=
"SysConfig.cs"
>
<SubType>
Form
</SubType>
</Compile>
<Compile
Include=
"SysConfig.Designer.cs"
>
<DependentUpon>
SysConfig.cs
</DependentUpon>
</Compile>
<Compile
Include=
"TestForm.cs"
>
<Compile
Include=
"TestForm.cs"
>
<SubType>
Form
</SubType>
<SubType>
Form
</SubType>
</Compile>
</Compile>
...
@@ -956,6 +962,9 @@
...
@@ -956,6 +962,9 @@
<EmbeddedResource
Include=
"StartForm.resx"
>
<EmbeddedResource
Include=
"StartForm.resx"
>
<DependentUpon>
StartForm.cs
</DependentUpon>
<DependentUpon>
StartForm.cs
</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<EmbeddedResource
Include=
"SysConfig.resx"
>
<DependentUpon>
SysConfig.cs
</DependentUpon>
</EmbeddedResource>
<EmbeddedResource
Include=
"TestForm.resx"
>
<EmbeddedResource
Include=
"TestForm.resx"
>
<DependentUpon>
TestForm.cs
</DependentUpon>
<DependentUpon>
TestForm.cs
</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
...
...
GcDevicePc/MDIBase.Designer.cs
View file @
c3f8262d
...
@@ -52,6 +52,7 @@
...
@@ -52,6 +52,7 @@
this
.
HistoryDataMenu
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
HistoryDataMenu
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
CalibrationMenu
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
CalibrationMenu
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
HistoryPicMenu
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
HistoryPicMenu
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
数据路径
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
DebugMainMenu
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
DebugMainMenu
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
SingleControlMenu
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
SingleControlMenu
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
SingleStart
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
SingleStart
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
...
@@ -74,7 +75,7 @@
...
@@ -74,7 +75,7 @@
this
.
AdjustStat
=
new
System
.
Windows
.
Forms
.
ToolStripStatusLabel
();
this
.
AdjustStat
=
new
System
.
Windows
.
Forms
.
ToolStripStatusLabel
();
this
.
workProgress
=
new
System
.
Windows
.
Forms
.
ToolStripProgressBar
();
this
.
workProgress
=
new
System
.
Windows
.
Forms
.
ToolStripProgressBar
();
this
.
timer2
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
timer2
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
数据路径
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
sysconfigp
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
menuStrip
.
SuspendLayout
();
this
.
menuStrip
.
SuspendLayout
();
this
.
statusStrip
.
SuspendLayout
();
this
.
statusStrip
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
...
@@ -126,7 +127,8 @@
...
@@ -126,7 +127,8 @@
this
.
SystemStopMenu
,
this
.
SystemStopMenu
,
this
.
AuxToolMenu
,
this
.
AuxToolMenu
,
this
.
ParameterSettingMenu
,
this
.
ParameterSettingMenu
,
this
.
自动校准
ToolStripMenuItem
});
this
.
自动校准
ToolStripMenuItem
,
this
.
sysconfigp
});
this
.
SystemMainMenu
.
Font
=
new
System
.
Drawing
.
Font
(
"Microsoft YaHei UI"
,
12F
);
this
.
SystemMainMenu
.
Font
=
new
System
.
Drawing
.
Font
(
"Microsoft YaHei UI"
,
12F
);
this
.
SystemMainMenu
.
Name
=
"SystemMainMenu"
;
this
.
SystemMainMenu
.
Name
=
"SystemMainMenu"
;
this
.
SystemMainMenu
.
Size
=
new
System
.
Drawing
.
Size
(
54
,
25
);
this
.
SystemMainMenu
.
Size
=
new
System
.
Drawing
.
Size
(
54
,
25
);
...
@@ -135,35 +137,35 @@
...
@@ -135,35 +137,35 @@
// SystemStartMenu
// SystemStartMenu
//
//
this
.
SystemStartMenu
.
Name
=
"SystemStartMenu"
;
this
.
SystemStartMenu
.
Name
=
"SystemStartMenu"
;
this
.
SystemStartMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
SystemStartMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
SystemStartMenu
.
Text
=
"系统开启"
;
this
.
SystemStartMenu
.
Text
=
"系统开启"
;
this
.
SystemStartMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
SystemStartMenu_Click
);
this
.
SystemStartMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
SystemStartMenu_Click
);
//
//
// SystemStopMenu
// SystemStopMenu
//
//
this
.
SystemStopMenu
.
Name
=
"SystemStopMenu"
;
this
.
SystemStopMenu
.
Name
=
"SystemStopMenu"
;
this
.
SystemStopMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
SystemStopMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
SystemStopMenu
.
Text
=
"系统关闭"
;
this
.
SystemStopMenu
.
Text
=
"系统关闭"
;
this
.
SystemStopMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
SystemStopMenu_Click
);
this
.
SystemStopMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
SystemStopMenu_Click
);
//
//
// AuxToolMenu
// AuxToolMenu
//
//
this
.
AuxToolMenu
.
Name
=
"AuxToolMenu"
;
this
.
AuxToolMenu
.
Name
=
"AuxToolMenu"
;
this
.
AuxToolMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
AuxToolMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
AuxToolMenu
.
Text
=
"辅助工具"
;
this
.
AuxToolMenu
.
Text
=
"辅助工具"
;
this
.
AuxToolMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
AuxToolMenu_Click
);
this
.
AuxToolMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
AuxToolMenu_Click
);
//
//
// ParameterSettingMenu
// ParameterSettingMenu
//
//
this
.
ParameterSettingMenu
.
Name
=
"ParameterSettingMenu"
;
this
.
ParameterSettingMenu
.
Name
=
"ParameterSettingMenu"
;
this
.
ParameterSettingMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
ParameterSettingMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
ParameterSettingMenu
.
Text
=
"参数设置"
;
this
.
ParameterSettingMenu
.
Text
=
"参数设置"
;
this
.
ParameterSettingMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
ParameterSettingMenu_Click
);
this
.
ParameterSettingMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
ParameterSettingMenu_Click
);
//
//
// 自动校准ToolStripMenuItem
// 自动校准ToolStripMenuItem
//
//
this
.
自动校准
ToolStripMenuItem
.
Name
=
"自动校准ToolStripMenuItem"
;
this
.
自动校准
ToolStripMenuItem
.
Name
=
"自动校准ToolStripMenuItem"
;
this
.
自动校准
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
自动校准
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
自动校准
ToolStripMenuItem
.
Text
=
"系统校准"
;
this
.
自动校准
ToolStripMenuItem
.
Text
=
"系统校准"
;
this
.
自动校准
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
自动校准
ToolStripMenuItem_Click
);
this
.
自动校准
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
自动校准
ToolStripMenuItem_Click
);
//
//
...
@@ -185,47 +187,47 @@
...
@@ -185,47 +187,47 @@
// NetWorkMenu
// NetWorkMenu
//
//
this
.
NetWorkMenu
.
Name
=
"NetWorkMenu"
;
this
.
NetWorkMenu
.
Name
=
"NetWorkMenu"
;
this
.
NetWorkMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
NetWorkMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
NetWorkMenu
.
Text
=
"通讯设置"
;
this
.
NetWorkMenu
.
Text
=
"通讯设置"
;
this
.
NetWorkMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
NetWorkMenu_Click
);
this
.
NetWorkMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
NetWorkMenu_Click
);
//
//
// MethodBatMenu
// MethodBatMenu
//
//
this
.
MethodBatMenu
.
Name
=
"MethodBatMenu"
;
this
.
MethodBatMenu
.
Name
=
"MethodBatMenu"
;
this
.
MethodBatMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
MethodBatMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
MethodBatMenu
.
Text
=
"方法批处理"
;
this
.
MethodBatMenu
.
Text
=
"方法批处理"
;
this
.
MethodBatMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
MethodBatMenu_Click
);
this
.
MethodBatMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
MethodBatMenu_Click
);
//
//
// NewMethodMenu
// NewMethodMenu
//
//
this
.
NewMethodMenu
.
Name
=
"NewMethodMenu"
;
this
.
NewMethodMenu
.
Name
=
"NewMethodMenu"
;
this
.
NewMethodMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
NewMethodMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
NewMethodMenu
.
Text
=
"新建方法"
;
this
.
NewMethodMenu
.
Text
=
"新建方法"
;
this
.
NewMethodMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
NewMethodMenu_Click
);
this
.
NewMethodMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
NewMethodMenu_Click
);
//
//
// OpenMethodMenu
// OpenMethodMenu
//
//
this
.
OpenMethodMenu
.
Name
=
"OpenMethodMenu"
;
this
.
OpenMethodMenu
.
Name
=
"OpenMethodMenu"
;
this
.
OpenMethodMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
OpenMethodMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
OpenMethodMenu
.
Text
=
"打开方法文件"
;
this
.
OpenMethodMenu
.
Text
=
"打开方法文件"
;
this
.
OpenMethodMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
OpenMethodMenu_Click
);
this
.
OpenMethodMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
OpenMethodMenu_Click
);
//
//
// MethodBrowseMenuItem
// MethodBrowseMenuItem
//
//
this
.
MethodBrowseMenuItem
.
Name
=
"MethodBrowseMenuItem"
;
this
.
MethodBrowseMenuItem
.
Name
=
"MethodBrowseMenuItem"
;
this
.
MethodBrowseMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
MethodBrowseMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
MethodBrowseMenuItem
.
Text
=
"方法查阅"
;
this
.
MethodBrowseMenuItem
.
Text
=
"方法查阅"
;
this
.
MethodBrowseMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
MethodBrowseMenuItem_Click
);
this
.
MethodBrowseMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
MethodBrowseMenuItem_Click
);
//
//
// SettingSeparator
// SettingSeparator
//
//
this
.
SettingSeparator
.
Name
=
"SettingSeparator"
;
this
.
SettingSeparator
.
Name
=
"SettingSeparator"
;
this
.
SettingSeparator
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
this
.
SettingSeparator
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
//
//
// GCConfigMenuItem
// GCConfigMenuItem
//
//
this
.
GCConfigMenuItem
.
Name
=
"GCConfigMenuItem"
;
this
.
GCConfigMenuItem
.
Name
=
"GCConfigMenuItem"
;
this
.
GCConfigMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
GCConfigMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
GCConfigMenuItem
.
Text
=
"仪器配置"
;
this
.
GCConfigMenuItem
.
Text
=
"仪器配置"
;
this
.
GCConfigMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
ConfigCreateSubMenuItem_Click
);
this
.
GCConfigMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
ConfigCreateSubMenuItem_Click
);
//
//
...
@@ -262,6 +264,13 @@
...
@@ -262,6 +264,13 @@
this
.
HistoryPicMenu
.
Text
=
"历史谱图"
;
this
.
HistoryPicMenu
.
Text
=
"历史谱图"
;
this
.
HistoryPicMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
HistoryPicMenu_Click
);
this
.
HistoryPicMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
HistoryPicMenu_Click
);
//
//
// 数据路径ToolStripMenuItem
//
this
.
数据路径
ToolStripMenuItem
.
Name
=
"数据路径ToolStripMenuItem"
;
this
.
数据路径
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
26
);
this
.
数据路径
ToolStripMenuItem
.
Text
=
"数据路径"
;
this
.
数据路径
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
数据路径
ToolStripMenuItem_Click
);
//
// DebugMainMenu
// DebugMainMenu
//
//
this
.
DebugMainMenu
.
DropDownItems
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
this
.
DebugMainMenu
.
DropDownItems
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
...
@@ -279,7 +288,7 @@
...
@@ -279,7 +288,7 @@
this
.
SingleStop
,
this
.
SingleStop
,
this
.
SingleCancel
});
this
.
SingleCancel
});
this
.
SingleControlMenu
.
Name
=
"SingleControlMenu"
;
this
.
SingleControlMenu
.
Name
=
"SingleControlMenu"
;
this
.
SingleControlMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
SingleControlMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
SingleControlMenu
.
Text
=
"单次流程控制"
;
this
.
SingleControlMenu
.
Text
=
"单次流程控制"
;
//
//
// SingleStart
// SingleStart
...
@@ -306,7 +315,7 @@
...
@@ -306,7 +315,7 @@
// testToolStripMenuItem
// testToolStripMenuItem
//
//
this
.
testToolStripMenuItem
.
Name
=
"testToolStripMenuItem"
;
this
.
testToolStripMenuItem
.
Name
=
"testToolStripMenuItem"
;
this
.
testToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
testToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
testToolStripMenuItem
.
Text
=
"test"
;
this
.
testToolStripMenuItem
.
Text
=
"test"
;
this
.
testToolStripMenuItem
.
Visible
=
false
;
this
.
testToolStripMenuItem
.
Visible
=
false
;
this
.
testToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
TestToolStripMenuItem_Click
);
this
.
testToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
TestToolStripMenuItem_Click
);
...
@@ -325,14 +334,14 @@
...
@@ -325,14 +334,14 @@
// AboutMenu
// AboutMenu
//
//
this
.
AboutMenu
.
Name
=
"AboutMenu"
;
this
.
AboutMenu
.
Name
=
"AboutMenu"
;
this
.
AboutMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
AboutMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
AboutMenu
.
Text
=
"关于"
;
this
.
AboutMenu
.
Text
=
"关于"
;
this
.
AboutMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
AboutMenu_Click
);
this
.
AboutMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
AboutMenu_Click
);
//
//
// changeVsi
// changeVsi
//
//
this
.
changeVsi
.
Name
=
"changeVsi"
;
this
.
changeVsi
.
Name
=
"changeVsi"
;
this
.
changeVsi
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
changeVsi
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
changeVsi
.
Text
=
"切换版本"
;
this
.
changeVsi
.
Text
=
"切换版本"
;
this
.
changeVsi
.
Visible
=
false
;
this
.
changeVsi
.
Visible
=
false
;
this
.
changeVsi
.
Click
+=
new
System
.
EventHandler
(
this
.
changeVsi_Click
);
this
.
changeVsi
.
Click
+=
new
System
.
EventHandler
(
this
.
changeVsi_Click
);
...
@@ -340,7 +349,7 @@
...
@@ -340,7 +349,7 @@
// 单位换算ToolStripMenuItem
// 单位换算ToolStripMenuItem
//
//
this
.
单位换算
ToolStripMenuItem
.
Name
=
"单位换算ToolStripMenuItem"
;
this
.
单位换算
ToolStripMenuItem
.
Name
=
"单位换算ToolStripMenuItem"
;
this
.
单位换算
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
单位换算
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
单位换算
ToolStripMenuItem
.
Text
=
"单位换算"
;
this
.
单位换算
ToolStripMenuItem
.
Text
=
"单位换算"
;
this
.
单位换算
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
单位换算
ToolStripMenuItem_Click
);
this
.
单位换算
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
单位换算
ToolStripMenuItem_Click
);
//
//
...
@@ -439,12 +448,12 @@
...
@@ -439,12 +448,12 @@
this
.
timer2
.
Interval
=
1000
;
this
.
timer2
.
Interval
=
1000
;
this
.
timer2
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer2_Tick
);
this
.
timer2
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer2_Tick
);
//
//
//
数据路径ToolStripMenuItem
//
sysconfigp
//
//
this
.
数据路径
ToolStripMenuItem
.
Name
=
"数据路径ToolStripMenuItem
"
;
this
.
sysconfigp
.
Name
=
"sysconfigp
"
;
this
.
数据路径
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
26
);
this
.
sysconfigp
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
26
);
this
.
数据路径
ToolStripMenuItem
.
Text
=
"数据路径
"
;
this
.
sysconfigp
.
Text
=
"选项
"
;
this
.
数据路径
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
数据路径
ToolStripMenuItem_Click
);
this
.
sysconfigp
.
Click
+=
new
System
.
EventHandler
(
this
.
系统配置
ToolStripMenuItem_Click
);
//
//
// MDIBase
// MDIBase
//
//
...
@@ -517,6 +526,7 @@
...
@@ -517,6 +526,7 @@
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
自动校准
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
自动校准
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
testToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
testToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
数据路径
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
数据路径
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
sysconfigp
;
}
}
}
}
...
...
GcDevicePc/MDIBase.cs
View file @
c3f8262d
...
@@ -323,7 +323,7 @@ namespace GcDevicePc
...
@@ -323,7 +323,7 @@ namespace GcDevicePc
_userForm
.
MdiParent
=
this
;
_userForm
.
MdiParent
=
this
;
_userForm
.
Dock
=
DockStyle
.
Fill
;
_userForm
.
Dock
=
DockStyle
.
Fill
;
if
(
globaldata
.
CurrentVersion
==
"1"
)
if
(
globaldata
.
CurrentVersion
==
1
)
{
{
_userForm
.
Show
();
_userForm
.
Show
();
_userForm
.
auto
=
new
CKVocAnalyzer
.
AutoAdjust
();
_userForm
.
auto
=
new
CKVocAnalyzer
.
AutoAdjust
();
...
@@ -381,26 +381,9 @@ namespace GcDevicePc
...
@@ -381,26 +381,9 @@ namespace GcDevicePc
//点火接口
//点火接口
_userForm
.
autofire
+=
new
Fireport
(
fireupopt
);
_userForm
.
autofire
+=
new
Fireport
(
fireupopt
);
//this.a = false;
epcs
=
false
;
epcs
=
false
;
timer2
.
Start
();
timer2
.
Start
();
if
(
globaldata
.
CurrentVersion
==
"1"
)
{
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
)
(
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)
//{
// (this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 0;
//}
//else
//{
// (this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 3;
//}
}
}
private
void
MDIBase_SizeChanged
(
object
sender
,
EventArgs
e
)
private
void
MDIBase_SizeChanged
(
object
sender
,
EventArgs
e
)
...
@@ -412,75 +395,14 @@ namespace GcDevicePc
...
@@ -412,75 +395,14 @@ namespace GcDevicePc
_debugForm
.
Height
=
this
.
ClientSize
.
Height
-
title
.
Height
-
65
;
_debugForm
.
Height
=
this
.
ClientSize
.
Height
-
title
.
Height
-
65
;
_debugForm
.
Width
=
this
.
ClientSize
.
Width
-
5
;
_debugForm
.
Width
=
this
.
ClientSize
.
Width
-
5
;
_debugForm
.
Location
=
new
Point
(
0
,
title
.
Height
);
_debugForm
.
Location
=
new
Point
(
0
,
title
.
Height
);
//_userForm.Height = this.ClientSize.Height - title.Height - 55;
//_userForm.Width = this.ClientSize.Width - 5;
//_userForm.Location = new Point(0, title.Height);
}
}
//private bool a;
//private bool a;
private
void
PictureMenu1_PMSysBtnClicked
(
object
sender
,
EventArgs
e
)
private
void
PictureMenu1_PMSysBtnClicked
(
object
sender
,
EventArgs
e
)
{
{
#
region
//PictureBox picturebtn = (PictureBox)sender;
//int tagnum = Convert.ToInt32(picturebtn.Tag);
//a = !a;
//switch (tagnum)
//{
// case 0:
// SystemStartMenu_Click(sender, e); //开启系统
// break;
//}
//if (a)
//{
// SystemStartMenu_Click(sender, e); //开启系统
//}
//else
//{
// SystemStopMenu_Click(sender, e);
//}
//if (!String.IsNullOrEmpty(globaldata.connection_ip))
//{
// if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.system_Statue)
// {
// DialogResult dr = MessageBox.Show("确定停止系统吗?", "停止系统", MessageBoxButtons.OKCancel);
// if (dr == DialogResult.OK)
// {
// SystemStopMenu_Click(sender, e);
// (this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMSysbtnstatus = 0;
// //MessageBox.Show("系统开启中......");
// //return;
// this.Activate();
// }
// else if (dr == DialogResult.Cancel)
// {
// this.Activate();
// return;
// }
// }
// else
// {
// SystemStartMenu_Click(sender, e); //开启系统
// //MessageBox.Show("......");
// (this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMSysbtnstatus = 1;
// }
//}
//else
//{
// string message = "系统处于离线状态...";
// MessageBox.Show(message, "提示信息", MessageBoxButtons.OK);
// globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.system_Statue = false;
// globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.work_Statue = 0;
//}
#
endregion
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
{
if
(
!
OSflag
)
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
hmistatus
==
0
)
{
{
OSflag
=
!
OSflag
;
hmiopt
.
WriteStopVal
();
hmiopt
.
WriteStopVal
();
WaitHMIFree
();
WaitHMIFree
();
//SetTitleStatueName("系统准备中...", true);
//SetTitleStatueName("系统准备中...", true);
...
@@ -506,11 +428,6 @@ namespace GcDevicePc
...
@@ -506,11 +428,6 @@ namespace GcDevicePc
WaitHMIWork
();
WaitHMIWork
();
Thread
.
Sleep
(
500
);
Thread
.
Sleep
(
500
);
//int tagnum = Convert.ToInt32(((PictureBox)panelMenu.Controls[14]).Tag);
//((PictureBox)panelMenu.Controls[14]).Image = menuList.Images[tagnum + 14];
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptbtnstatus
=
4
;
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMSysbtnstatus
=
1
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
true
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
true
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
...
@@ -526,35 +443,14 @@ namespace GcDevicePc
...
@@ -526,35 +443,14 @@ namespace GcDevicePc
{
{
LMessageBox
dialog
=
new
LMessageBox
(
this
.
Location
,
this
.
Size
,
true
,
"停止系统"
,
"确定停止系统吗?"
,
LMessageBox
.
MessageBoxPosition
.
MBP_Center
);
LMessageBox
dialog
=
new
LMessageBox
(
this
.
Location
,
this
.
Size
,
true
,
"停止系统"
,
"确定停止系统吗?"
,
LMessageBox
.
MessageBoxPosition
.
MBP_Center
);
//if (dialog.ShowDialog() == DialogResult.OK)
//{
//}
//DialogResult dr = MessageBox.Show("确定停止系统吗?", "停止系统", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2, MessageBoxOptions.DefaultDesktopOnly);
if
(
dialog
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dialog
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
OSflag
=
!
OSflag
;
//SetTitleStatueName("系统停止中...", false);
//SetTitleStatueName("系统停止中...", false);
globaldata
.
OS_STOP
=
true
;
globaldata
.
OS_STOP
=
true
;
hmiopt
.
WriteEndVal
();
hmiopt
.
WriteEndVal
();
WaitHMIFree
();
WaitHMIFree
();
//SetTitleStatueName("系统停止...", false);
//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];
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptbtnstatus
=
0
;
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMSysbtnstatus
=
0
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
false
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
false
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
...
@@ -576,7 +472,6 @@ namespace GcDevicePc
...
@@ -576,7 +472,6 @@ namespace GcDevicePc
private
void
PictureMenu1_PMOptBtnClicked
(
object
sender
,
EventArgs
e
)
private
void
PictureMenu1_PMOptBtnClicked
(
object
sender
,
EventArgs
e
)
{
{
//MessageBox.Show((sender as PictureBox).Tag.ToString());
PictureBox
picturebtn
=
(
PictureBox
)
sender
;
PictureBox
picturebtn
=
(
PictureBox
)
sender
;
int
tagnum
=
Convert
.
ToInt32
(
picturebtn
.
Tag
);
int
tagnum
=
Convert
.
ToInt32
(
picturebtn
.
Tag
);
...
@@ -584,8 +479,6 @@ namespace GcDevicePc
...
@@ -584,8 +479,6 @@ namespace GcDevicePc
{
{
case
0
:
case
0
:
SingleStart_Click
(
sender
,
e
);
//开始
SingleStart_Click
(
sender
,
e
);
//开始
//_EPCTipsForm.MyProperty = "开始";
//_EPCTipsForm.Show();
break
;
break
;
case
1
:
case
1
:
SingleStop_Click
(
sender
,
e
);
//停止
SingleStop_Click
(
sender
,
e
);
//停止
...
@@ -677,54 +570,11 @@ namespace GcDevicePc
...
@@ -677,54 +570,11 @@ namespace GcDevicePc
}
}
}
}
private
bool
OSflag
=
false
;
private
void
hmistatus_opensys
()
{
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
if
(
globaldata
.
CurrentVersion
==
"1"
)
{
if
(!
OSflag
)
{
OSflag
=
!
OSflag
;
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
)
{
// hmiopt.WriteSingleVal();
}
//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
{
string
message
=
"系统处于离线状态..."
;
MessageBox
.
Show
(
message
,
"提示信息"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Information
);
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
false
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
}
}
private
void
SetMenu
(
bool
isbool
)
private
void
SetMenu
(
bool
isbool
)
{
{
try
try
{
{
if
(
globaldata
.
CurrentVersion
==
"1"
)
if
(
globaldata
.
CurrentVersion
==
1
)
{
{
if
(
isbool
)
if
(
isbool
)
{
{
...
@@ -740,7 +590,7 @@ namespace GcDevicePc
...
@@ -740,7 +590,7 @@ namespace GcDevicePc
DebugMainMenu
.
Visible
=
true
;
DebugMainMenu
.
Visible
=
true
;
// HmiStatus.Visible = true;
// HmiStatus.Visible = true;
SettingSeparator
.
Visible
=
true
;
SettingSeparator
.
Visible
=
true
;
sysconfigp
.
Visible
=
true
;
}
}
else
else
{
{
...
@@ -754,6 +604,7 @@ namespace GcDevicePc
...
@@ -754,6 +604,7 @@ namespace GcDevicePc
AuxToolMenu
.
Visible
=
false
;
AuxToolMenu
.
Visible
=
false
;
ParameterSettingMenu
.
Visible
=
false
;
ParameterSettingMenu
.
Visible
=
false
;
DebugMainMenu
.
Visible
=
false
;
DebugMainMenu
.
Visible
=
false
;
sysconfigp
.
Visible
=
false
;
// HmiStatus.Visible = false;
// HmiStatus.Visible = false;
SettingSeparator
.
Visible
=
false
;
SettingSeparator
.
Visible
=
false
;
}
}
...
@@ -780,31 +631,12 @@ namespace GcDevicePc
...
@@ -780,31 +631,12 @@ namespace GcDevicePc
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
{
{
this
.
Text
=
String
.
Format
(
"Vocs色谱工作站-1.5.7 {0}"
,
Formstr
);
this
.
Text
=
String
.
Format
(
"Vocs色谱工作站-1.5.7 {0}"
,
Formstr
);
//if (LandIn.Island)
//{
// HmiStatus.Text = String.Format("状态:{0}", statestr);
//}
//else
//{
// float fDetvalue = 0.0f;
// if (globaldata.m_signalbuffer.Draw_Port.Count > 1)
// {
// fDetvalue = globaldata.m_dpbuffer.ShowList.showDet.fDetValue;
// if (fDetvalue != 0.0f)
// fDetvalueold = fDetvalue;
// }
// HmiStatus.Text = String.Format("FID:{0:N3} mV", fDetvalueold);
//}
//(this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).StatusText = statestr;
// toolStripStatusLabeSystme.Text = String.Format("状态:{0}", statestr);
HmiStatus
.
Text
=
String
.
Format
(
"状态:{0}"
,
statestr
);
HmiStatus
.
Text
=
String
.
Format
(
"状态:{0}"
,
statestr
);
timespan
=
System
.
DateTime
.
Now
-
startTime
;
timespan
=
System
.
DateTime
.
Now
-
startTime
;
toolStripStatusLabelusertime
.
Text
=
String
.
Format
(
"运行时间:{0}"
,
toolStripStatusLabelusertime
.
Text
=
String
.
Format
(
"运行时间:{0}"
,
timespan
.
Days
.
ToString
()
+
"天"
+
timespan
.
Hours
.
ToString
()
+
"时"
+
timespan
.
Minutes
.
ToString
()
+
"分"
+
timespan
.
Seconds
.
ToString
()
+
"秒"
);
timespan
.
Days
.
ToString
()
+
"天"
+
timespan
.
Hours
.
ToString
()
+
"时"
+
timespan
.
Minutes
.
ToString
()
+
"分"
+
timespan
.
Seconds
.
ToString
()
+
"秒"
);
// Trace.WriteLine(string.Format("时间{0},状态{1}", getIdleTick(),LandIn.Island),"sys");
//Console.WriteLine(t2.ToString());
//下方状态显示
//下方状态显示
switch
(
CKVocAnalyzer
.
GlobalCKV
.
adjustType
)
switch
(
CKVocAnalyzer
.
GlobalCKV
.
adjustType
)
...
@@ -945,6 +777,7 @@ namespace GcDevicePc
...
@@ -945,6 +777,7 @@ namespace GcDevicePc
{
{
int
ret
=
-
1
;
int
ret
=
-
1
;
BackgroundWorker
worker
=
sender
as
BackgroundWorker
;
BackgroundWorker
worker
=
sender
as
BackgroundWorker
;
Thread
.
Sleep
(
500
);
for
(
int
i
=
0
;
i
<
100
;
i
++)
for
(
int
i
=
0
;
i
<
100
;
i
++)
{
{
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
hmistatus
==
0
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
0
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
7
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
2
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
3
)
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
hmistatus
==
0
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
0
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
7
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
2
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
3
)
...
@@ -975,15 +808,6 @@ namespace GcDevicePc
...
@@ -975,15 +808,6 @@ namespace GcDevicePc
worker
.
ReportProgress
(
i
);
worker
.
ReportProgress
(
i
);
}
}
//if (ret == 0)
//{
// if (globaldata.OS_STOP)
// {
// globaldata.OS_STOP = false;
// }
// worker.ReportProgress(100);
//}
}
}
if
(
worker
.
CancellationPending
)
// 如果用户取消则跳出处理数据代码
if
(
worker
.
CancellationPending
)
// 如果用户取消则跳出处理数据代码
...
@@ -1047,6 +871,7 @@ namespace GcDevicePc
...
@@ -1047,6 +871,7 @@ namespace GcDevicePc
this
.
workProgress
.
Value
=
0
;
this
.
workProgress
.
Value
=
0
;
BackgroundWorker
worker
=
sender
as
BackgroundWorker
;
BackgroundWorker
worker
=
sender
as
BackgroundWorker
;
Thread
.
Sleep
(
500
);
for
(
int
i
=
0
;
i
<
100
;
i
++)
for
(
int
i
=
0
;
i
<
100
;
i
++)
{
{
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
>
0
&&
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
<
5
)
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
>
0
&&
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
<
5
)
...
@@ -1059,7 +884,7 @@ namespace GcDevicePc
...
@@ -1059,7 +884,7 @@ namespace GcDevicePc
{
{
if
(
i
%
20
==
0
&&
i
!=
0
)
if
(
i
%
20
==
0
&&
i
!=
0
)
{
{
if
(
globaldata
.
CurrentVersion
==
"1"
)
if
(
globaldata
.
CurrentVersion
==
1
)
{
{
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
ret
=
hmiopt
.
WriteOpenVal
();
ret
=
hmiopt
.
WriteOpenVal
();
...
@@ -1134,8 +959,9 @@ namespace GcDevicePc
...
@@ -1134,8 +959,9 @@ namespace GcDevicePc
{
{
try
try
{
{
hmiopt
.
WriteStop
Val
();
//hmiopt.WriteEnd
Val();
WaitHMIFree
();
WaitHMIFree
();
WaitHMIWork
();
}
}
catch
catch
{
{
...
@@ -1249,6 +1075,7 @@ namespace GcDevicePc
...
@@ -1249,6 +1075,7 @@ namespace GcDevicePc
Start_Thread
();
Start_Thread
();
WaitHMIWork
();
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
sendtohw
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
sendtohw
)
{
{
...
@@ -1262,9 +1089,12 @@ namespace GcDevicePc
...
@@ -1262,9 +1089,12 @@ namespace GcDevicePc
signalDataTozb
.
DataToZBStart
();
signalDataTozb
.
DataToZBStart
();
}
}
try
try
{
{
if
(
globaldata
.
CurrentVersion
==
"1"
)
if
(
globaldata
.
CurrentVersion
==
1
)
{
{
nmodbusSlave
=
new
NModbusSlave
();
nmodbusSlave
=
new
NModbusSlave
();
}
}
...
@@ -1390,11 +1220,7 @@ namespace GcDevicePc
...
@@ -1390,11 +1220,7 @@ namespace GcDevicePc
dest
[
7
]
=
globaldata
.
m_hmibuffer
.
gcinfo
.
hmistatus
;
dest
[
7
]
=
globaldata
.
m_hmibuffer
.
gcinfo
.
hmistatus
;
dest
[
8
]
=
globaldata
.
m_hmibuffer
.
gcinfo
.
runtime
;
dest
[
8
]
=
globaldata
.
m_hmibuffer
.
gcinfo
.
runtime
;
//if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.system_Statue)
status_flag
=
dest
[
5
];
status_flag
=
dest
[
5
];
//else
// status_flag = 10;
GCstatus
=
dest
[
5
];
GCstatus
=
dest
[
5
];
runtype
=
dest
[
7
];
runtype
=
dest
[
7
];
...
@@ -1438,56 +1264,7 @@ namespace GcDevicePc
...
@@ -1438,56 +1264,7 @@ namespace GcDevicePc
}
}
Status_Show
(
status_flag
,
ref
status_flag_old
);
Status_Show
(
status_flag
,
ref
status_flag_old
);
if
(
status_flag
==
3
)
Menu_status
();
{
if
(
isStart
)
{
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptbtnstatus
=
4
;
}
isStop
=
true
;
}
else
if
(
status_flag
==
4
||
status_flag
==
5
)
{
if
(
isStop
)
{
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptbtnstatus
=
3
;
}
isStart
=
true
;
}
else
{
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptbtnstatus
=
0
;
}
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
)
{
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptbtnstatus
=
0
;
}
if
(
globaldata
.
IsStopOs
)
{
//if (!globaldata.OS_STOP)
{
globaldata
.
IsStopOs
=
!
globaldata
.
IsStopOs
;
globaldata
.
OS_STOP
=
true
;
isone_openos
=
true
;
hmiopt
.
WriteEndVal
();
WaitHMIFree
();
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptbtnstatus
=
0
;
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMSysbtnstatus
=
0
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
false
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
}
}
else
{
if
(
isone_openos
)
{
isone_openos
=
!
isone_openos
;
open
();
}
}
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
)
{
{
...
@@ -1534,6 +1311,46 @@ namespace GcDevicePc
...
@@ -1534,6 +1311,46 @@ namespace GcDevicePc
}
}
}
}
void
Menu_status
()
{
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
hmistatus
!=
0
)
//已开启系统
{
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
true
;
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMSysbtnstatus
=
1
;
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
)
//批处理
{
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptbtnstatus
=
0
;
}
else
{
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
3
)
//已就绪
{
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptbtnstatus
=
4
;
}
else
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
4
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
4
)
{
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptbtnstatus
=
3
;
}
else
{
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptbtnstatus
=
0
;
}
}
}
else
//未开启系统
{
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
false
;
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMSysbtnstatus
=
0
;
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptbtnstatus
=
0
;
}
}
void
DataControl_Status
(
ushort
flag
,
ushort
runtype
)
void
DataControl_Status
(
ushort
flag
,
ushort
runtype
)
{
{
...
@@ -1638,12 +1455,6 @@ namespace GcDevicePc
...
@@ -1638,12 +1455,6 @@ namespace GcDevicePc
case
3
:
case
3
:
status_text
=
"已就绪..."
;
status_text
=
"已就绪..."
;
this
.
HmiStatus
.
BackColor
=
Color
.
LightGreen
;
this
.
HmiStatus
.
BackColor
=
Color
.
LightGreen
;
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
{
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptbtnstatus
=
4
;
isStop
=
false
;
}
break
;
break
;
case
4
:
case
4
:
case
5
:
case
5
:
...
@@ -1705,27 +1516,6 @@ namespace GcDevicePc
...
@@ -1705,27 +1516,6 @@ namespace GcDevicePc
//Console.WriteLine(flag.ToString());
//Console.WriteLine(flag.ToString());
//if (flag!=10 && flag != 0)
//{
// OSflag = true;
// (this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 4;
// (this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMSysbtnstatus = 1;
// //globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.system_Statue = true;
// //globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.work_Statue = 0;
//}
//else
//{
// OSflag = false;
// (this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 0;
// (this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMSysbtnstatus = 0;
// //globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.system_Statue = false;
// //globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.work_Statue = 0;
//}
if
(
oldflag
!=
flag
)
if
(
oldflag
!=
flag
)
{
{
...
@@ -1868,7 +1658,7 @@ namespace GcDevicePc
...
@@ -1868,7 +1658,7 @@ namespace GcDevicePc
count
=
0
;
count
=
0
;
//ret = Slavetest.CModbusSlaveClose();
//ret = Slavetest.CModbusSlaveClose();
if
(
globaldata
.
CurrentVersion
==
"1"
)
if
(
globaldata
.
CurrentVersion
==
1
)
{
{
nmodbusSlave
.
NModbusSlaveClose
();
nmodbusSlave
.
NModbusSlaveClose
();
...
@@ -1936,7 +1726,7 @@ namespace GcDevicePc
...
@@ -1936,7 +1726,7 @@ namespace GcDevicePc
// break;
// break;
// }
// }
//}
//}
if
(
globaldata
.
CurrentVersion
==
"1"
)
if
(
globaldata
.
CurrentVersion
==
1
)
{
{
nmodbusSlave
.
NModbusSlaveClose
();
nmodbusSlave
.
NModbusSlaveClose
();
...
@@ -1993,11 +1783,10 @@ namespace GcDevicePc
...
@@ -1993,11 +1783,10 @@ namespace GcDevicePc
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
{
if
(
globaldata
.
CurrentVersion
==
"1"
)
if
(
globaldata
.
CurrentVersion
==
1
)
{
{
if
(
!
OSflag
)
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
hmistatus
==
0
)
{
{
OSflag
=
!
OSflag
;
hmiopt
.
WriteStopVal
();
hmiopt
.
WriteStopVal
();
statestr
=
"系统准备中..."
;
statestr
=
"系统准备中..."
;
...
@@ -2036,31 +1825,16 @@ namespace GcDevicePc
...
@@ -2036,31 +1825,16 @@ namespace GcDevicePc
}
}
else
else
{
{
OSflag
=
!
OSflag
;
//SetTitleStatueName("系统停止中...", false);
//SetTitleStatueName("系统停止中...", false);
globaldata
.
OS_STOP
=
true
;
globaldata
.
OS_STOP
=
true
;
hmiopt
.
WriteEndVal
();
hmiopt
.
WriteEndVal
();
WaitHMIFree
();
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
.
system_Statue
=
false
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
}
}
}
}
}
}
Console
.
WriteLine
(
""
+
OSflag
);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
@@ -2091,7 +1865,7 @@ namespace GcDevicePc
...
@@ -2091,7 +1865,7 @@ namespace GcDevicePc
private
void
upMethodMain
()
private
void
upMethodMain
()
{
{
hmiopt
.
WriteStopVal
();
//
hmiopt.WriteStopVal();
}
}
/// <summary>
/// <summary>
...
@@ -2180,7 +1954,6 @@ namespace GcDevicePc
...
@@ -2180,7 +1954,6 @@ namespace GcDevicePc
{
{
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
{
OSflag
=
!
OSflag
;
statestr
=
"系统停止中..."
;
statestr
=
"系统停止中..."
;
globaldata
.
OS_STOP
=
true
;
globaldata
.
OS_STOP
=
true
;
hmiopt
.
WriteEndVal
();
hmiopt
.
WriteEndVal
();
...
@@ -2195,7 +1968,6 @@ namespace GcDevicePc
...
@@ -2195,7 +1968,6 @@ 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>
...
@@ -2218,10 +1990,9 @@ namespace GcDevicePc
...
@@ -2218,10 +1990,9 @@ namespace GcDevicePc
public
bool
Isadmin
=
false
;
public
bool
Isadmin
=
false
;
private
void
UserLoginMenu_Click
(
object
sender
,
EventArgs
e
)
private
void
UserLoginMenu_Click
(
object
sender
,
EventArgs
e
)
{
{
string
lgpwd
=
"666666"
;
while
(
true
)
while
(
true
)
{
{
DialogResult
dr
=
new
LandIn
(
"admin"
,
lgp
wd
).
ShowDialog
();
DialogResult
dr
=
new
LandIn
(
globaldata
.
UserName
,
globaldata
.
UserP
wd
).
ShowDialog
();
if
(
dr
==
DialogResult
.
OK
)
if
(
dr
==
DialogResult
.
OK
)
{
{
...
@@ -2549,7 +2320,7 @@ namespace GcDevicePc
...
@@ -2549,7 +2320,7 @@ namespace GcDevicePc
this
.
inifilec
=
true
;
this
.
inifilec
=
true
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
=
0
;
}
}
}
}
...
@@ -2868,22 +2639,21 @@ namespace GcDevicePc
...
@@ -2868,22 +2639,21 @@ namespace GcDevicePc
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
1
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
1
;
}
}
private
bool
isStart
;
private
int
SysStatus
;
private
bool
isStop
;
private
void
SingleStart_Click
(
object
sender
,
EventArgs
e
)
private
void
SingleStart_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
{
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
==
true
&&
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
if
(
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
==
true
)
&&
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
{
{
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
{
{
hmiopt
.
WriteOpenVal
();
hmiopt
.
WriteOpenVal
();
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptbtnstatus
=
3
;
//
(this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 3;
isStart
=
false
;
SysStatus
=
0
;
}
}
hmiopt
.
WriteStartVal
();
hmiopt
.
WriteStartVal
();
...
@@ -2950,12 +2720,9 @@ namespace GcDevicePc
...
@@ -2950,12 +2720,9 @@ namespace GcDevicePc
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
{
{
hmiopt
.
WriteOpenVal
();
hmiopt
.
WriteOpenVal
();
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptbtnstatus
=
4
;
SysStatus
=
1
;
isStop
=
false
;
}
}
stopbtn
();
stopbtn
();
}
}
}
}
...
@@ -2993,11 +2760,9 @@ namespace GcDevicePc
...
@@ -2993,11 +2760,9 @@ namespace GcDevicePc
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
{
{
hmiopt
.
WriteOpenVal
();
hmiopt
.
WriteOpenVal
();
//(this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 4;
SysStatus
=
2
;
}
}
cancelbtn
();
cancelbtn
();
//(this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 0;
}
}
...
@@ -3339,6 +3104,25 @@ namespace GcDevicePc
...
@@ -3339,6 +3104,25 @@ namespace GcDevicePc
{
{
}
}
SysConfig
sysc
;
private
void
系统配置
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
if
(
sysc
==
null
)
{
sysc
=
new
SysConfig
();
sysc
.
Show
();
}
else
if
(
sysc
.
IsDisposed
)
{
sysc
=
null
;
sysc
=
new
SysConfig
();
sysc
.
Show
();
}
else
{
sysc
.
Activate
();
}
}
//private void debugSubMenu_Click(object sender, EventArgs e)
//private void debugSubMenu_Click(object sender, EventArgs e)
// try
// try
...
...
GcDevicePc/ProThread/HMIControl.cs
View file @
c3f8262d
...
@@ -42,8 +42,22 @@ namespace GcDevicePc.ProThread
...
@@ -42,8 +42,22 @@ namespace GcDevicePc.ProThread
{
{
int
ret
=
-
1
;
int
ret
=
-
1
;
ushort
mystate
=
(
ushort
)
0x1
;
ushort
mystate
=
(
ushort
)
0x1
;
//if (this.setflag)
// ret = m_modbus.WriteHoldingReg(147, mystate, this.strIP, this.netPost);
int
count
=
0
;
if
(
this
.
setflag
)
if
(
this
.
setflag
)
{
ret
=
m_modbus
.
WriteHoldingReg
(
147
,
mystate
,
this
.
strIP
,
this
.
netPost
);
ret
=
m_modbus
.
WriteHoldingReg
(
147
,
mystate
,
this
.
strIP
,
this
.
netPost
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
WriteHoldingReg
(
147
,
mystate
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
return
ret
;
return
ret
;
}
}
...
@@ -51,8 +65,22 @@ namespace GcDevicePc.ProThread
...
@@ -51,8 +65,22 @@ namespace GcDevicePc.ProThread
{
{
int
ret
=
-
1
;
int
ret
=
-
1
;
ushort
mystate
=
(
ushort
)
0x1
;
ushort
mystate
=
(
ushort
)
0x1
;
//if (this.setflag)
// ret = m_modbus.WriteHoldingReg(148, mystate, this.strIP, this.netPost);
int
count
=
0
;
if
(
this
.
setflag
)
if
(
this
.
setflag
)
{
ret
=
m_modbus
.
WriteHoldingReg
(
148
,
mystate
,
this
.
strIP
,
this
.
netPost
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
WriteHoldingReg
(
148
,
mystate
,
this
.
strIP
,
this
.
netPost
);
ret
=
m_modbus
.
WriteHoldingReg
(
148
,
mystate
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
return
ret
;
return
ret
;
}
}
...
@@ -60,8 +88,22 @@ namespace GcDevicePc.ProThread
...
@@ -60,8 +88,22 @@ namespace GcDevicePc.ProThread
{
{
int
ret
=
-
1
;
int
ret
=
-
1
;
ushort
mystate
=
(
ushort
)
0x1
;
ushort
mystate
=
(
ushort
)
0x1
;
//if (this.setflag)
// ret = m_modbus.WriteHoldingReg(151, mystate, this.strIP, this.netPost);
int
count
=
0
;
if
(
this
.
setflag
)
if
(
this
.
setflag
)
{
ret
=
m_modbus
.
WriteHoldingReg
(
151
,
mystate
,
this
.
strIP
,
this
.
netPost
);
ret
=
m_modbus
.
WriteHoldingReg
(
151
,
mystate
,
this
.
strIP
,
this
.
netPost
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
WriteHoldingReg
(
151
,
mystate
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
return
ret
;
return
ret
;
}
}
...
@@ -69,8 +111,22 @@ namespace GcDevicePc.ProThread
...
@@ -69,8 +111,22 @@ namespace GcDevicePc.ProThread
{
{
int
ret
=
-
1
;
int
ret
=
-
1
;
ushort
mystate
=
(
ushort
)
0x1
;
ushort
mystate
=
(
ushort
)
0x1
;
//if (this.setflag)
// ret = m_modbus.WriteHoldingReg(150, mystate, this.strIP, this.netPost);
int
count
=
0
;
if
(
this
.
setflag
)
if
(
this
.
setflag
)
{
ret
=
m_modbus
.
WriteHoldingReg
(
150
,
mystate
,
this
.
strIP
,
this
.
netPost
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
WriteHoldingReg
(
150
,
mystate
,
this
.
strIP
,
this
.
netPost
);
ret
=
m_modbus
.
WriteHoldingReg
(
150
,
mystate
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
return
ret
;
return
ret
;
}
}
...
@@ -100,8 +156,22 @@ namespace GcDevicePc.ProThread
...
@@ -100,8 +156,22 @@ namespace GcDevicePc.ProThread
public
int
WriteStartVal
()
public
int
WriteStartVal
()
{
{
int
ret
=
-
1
;
int
ret
=
-
1
;
//if (this.setflag)
// ret = m_modbus.WriteSingleCoil(30, (ushort)65280, this.strIP, this.netPost);
int
count
=
0
;
if
(
this
.
setflag
)
if
(
this
.
setflag
)
{
ret
=
m_modbus
.
WriteSingleCoil
(
30
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
ret
=
m_modbus
.
WriteSingleCoil
(
30
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
WriteSingleCoil
(
30
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
return
ret
;
return
ret
;
}
}
...
@@ -133,16 +203,44 @@ namespace GcDevicePc.ProThread
...
@@ -133,16 +203,44 @@ namespace GcDevicePc.ProThread
public
int
WriteEndVal
()
public
int
WriteEndVal
()
{
{
int
ret
=
-
1
;
int
ret
=
-
1
;
//if (this.setflag)
// ret = m_modbus.WriteSingleCoil(33, (ushort)65280, this.strIP, this.netPost);
int
count
=
0
;
if
(
this
.
setflag
)
if
(
this
.
setflag
)
{
ret
=
m_modbus
.
WriteSingleCoil
(
33
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
ret
=
m_modbus
.
WriteSingleCoil
(
33
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
WriteSingleCoil
(
33
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
return
ret
;
return
ret
;
}
}
public
int
WriteCancalVal
()
public
int
WriteCancalVal
()
{
{
int
ret
=
-
1
;
int
ret
=
-
1
;
//if (this.setflag)
// ret = m_modbus.WriteSingleCoil(32, (ushort)65280, this.strIP, this.netPost);
int
count
=
0
;
if
(
this
.
setflag
)
if
(
this
.
setflag
)
{
ret
=
m_modbus
.
WriteSingleCoil
(
32
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
WriteSingleCoil
(
32
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
ret
=
m_modbus
.
WriteSingleCoil
(
32
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
return
ret
;
return
ret
;
}
}
...
...
GcDevicePc/ProThread/SignalDataToHw.cs
View file @
c3f8262d
GcDevicePc/Program.cs
View file @
c3f8262d
...
@@ -12,7 +12,7 @@ namespace GcDevicePc
...
@@ -12,7 +12,7 @@ namespace GcDevicePc
Application
.
EnableVisualStyles
();
Application
.
EnableVisualStyles
();
Application
.
SetCompatibleTextRenderingDefault
(
false
);
Application
.
SetCompatibleTextRenderingDefault
(
false
);
bool
createNew
;
bool
createNew
;
//Application.Run(new
TestForm
());
//Application.Run(new
SysConfig
());
{
{
using
(
System
.
Threading
.
Mutex
mutex
=
new
System
.
Threading
.
Mutex
(
true
,
Application
.
ProductName
,
out
createNew
))
using
(
System
.
Threading
.
Mutex
mutex
=
new
System
.
Threading
.
Mutex
(
true
,
Application
.
ProductName
,
out
createNew
))
{
{
...
...
GcDevicePc/RunTables.cs
View file @
c3f8262d
...
@@ -598,8 +598,10 @@ namespace GcDevicePc
...
@@ -598,8 +598,10 @@ namespace GcDevicePc
private
void
stopbat_Click
(
object
sender
,
EventArgs
e
)
private
void
stopbat_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
=
0
;
sendstopcmd
();
sendstopcmd
();
}
}
}
private
void
LocalRunTableView_CellDoubleClick
(
object
sender
,
DataGridViewCellEventArgs
e
)
private
void
LocalRunTableView_CellDoubleClick
(
object
sender
,
DataGridViewCellEventArgs
e
)
...
...
GcDevicePc/SysConfig.Designer.cs
0 → 100644
View file @
c3f8262d
namespace
GcDevicePc
{
partial
class
SysConfig
{
/// <summary>
/// Required designer variable.
/// </summary>
private
System
.
ComponentModel
.
IContainer
components
=
null
;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected
override
void
Dispose
(
bool
disposing
)
{
if
(
disposing
&&
(
components
!=
null
))
{
components
.
Dispose
();
}
base
.
Dispose
(
disposing
);
}
#
region
Windows
Form
Designer
generated
code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private
void
InitializeComponent
()
{
this
.
checkBox1
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
radioButton3
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
radioButton2
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
radioButton1
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
radioButton5
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
radioButton6
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
splitContainer1
=
new
System
.
Windows
.
Forms
.
SplitContainer
();
this
.
listBox1
=
new
System
.
Windows
.
Forms
.
ListBox
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panel2
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
textBox3
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
textBox2
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
textBox1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
panel3
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
groupBox7
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
permin
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
runbat
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
runsingle
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
groupBox4
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
appstartup
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
groupBox5
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
panel4
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label4
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label5
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label6
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
splitContainer1
)).
BeginInit
();
this
.
splitContainer1
.
Panel1
.
SuspendLayout
();
this
.
splitContainer1
.
Panel2
.
SuspendLayout
();
this
.
splitContainer1
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
this
.
panel2
.
SuspendLayout
();
this
.
panel3
.
SuspendLayout
();
this
.
groupBox7
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
groupBox4
.
SuspendLayout
();
this
.
groupBox5
.
SuspendLayout
();
this
.
panel4
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// checkBox1
//
this
.
checkBox1
.
AutoSize
=
true
;
this
.
checkBox1
.
Location
=
new
System
.
Drawing
.
Point
(
11
,
20
);
this
.
checkBox1
.
Name
=
"checkBox1"
;
this
.
checkBox1
.
Size
=
new
System
.
Drawing
.
Size
(
72
,
16
);
this
.
checkBox1
.
TabIndex
=
0
;
this
.
checkBox1
.
Text
=
"用户界面"
;
this
.
checkBox1
.
UseVisualStyleBackColor
=
true
;
this
.
checkBox1
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
CheckBox1_CheckedChanged
);
//
// groupBox1
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
radioButton3
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
radioButton2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
radioButton1
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
25
,
18
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
436
,
131
);
this
.
groupBox1
.
TabIndex
=
1
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"第三方通信"
;
//
// radioButton3
//
this
.
radioButton3
.
AutoSize
=
true
;
this
.
radioButton3
.
Location
=
new
System
.
Drawing
.
Point
(
32
,
96
);
this
.
radioButton3
.
Name
=
"radioButton3"
;
this
.
radioButton3
.
Size
=
new
System
.
Drawing
.
Size
(
59
,
16
);
this
.
radioButton3
.
TabIndex
=
0
;
this
.
radioButton3
.
TabStop
=
true
;
this
.
radioButton3
.
Text
=
"SP2120"
;
this
.
radioButton3
.
UseVisualStyleBackColor
=
true
;
this
.
radioButton3
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
Thirdparty_CheckedChanged
);
//
// radioButton2
//
this
.
radioButton2
.
AutoSize
=
true
;
this
.
radioButton2
.
Location
=
new
System
.
Drawing
.
Point
(
32
,
62
);
this
.
radioButton2
.
Name
=
"radioButton2"
;
this
.
radioButton2
.
Size
=
new
System
.
Drawing
.
Size
(
59
,
16
);
this
.
radioButton2
.
TabIndex
=
0
;
this
.
radioButton2
.
TabStop
=
true
;
this
.
radioButton2
.
Text
=
"HL3000"
;
this
.
radioButton2
.
UseVisualStyleBackColor
=
true
;
this
.
radioButton2
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
Thirdparty_CheckedChanged
);
//
// radioButton1
//
this
.
radioButton1
.
AutoSize
=
true
;
this
.
radioButton1
.
Location
=
new
System
.
Drawing
.
Point
(
32
,
30
);
this
.
radioButton1
.
Name
=
"radioButton1"
;
this
.
radioButton1
.
Size
=
new
System
.
Drawing
.
Size
(
59
,
16
);
this
.
radioButton1
.
TabIndex
=
0
;
this
.
radioButton1
.
TabStop
=
true
;
this
.
radioButton1
.
Text
=
"ZB2040"
;
this
.
radioButton1
.
UseVisualStyleBackColor
=
true
;
this
.
radioButton1
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
Thirdparty_CheckedChanged
);
//
// groupBox2
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
radioButton5
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
radioButton6
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
25
,
169
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
436
,
89
);
this
.
groupBox2
.
TabIndex
=
1
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"对外通信协议"
;
//
// radioButton5
//
this
.
radioButton5
.
AutoSize
=
true
;
this
.
radioButton5
.
Location
=
new
System
.
Drawing
.
Point
(
32
,
20
);
this
.
radioButton5
.
Name
=
"radioButton5"
;
this
.
radioButton5
.
Size
=
new
System
.
Drawing
.
Size
(
95
,
16
);
this
.
radioButton5
.
TabIndex
=
0
;
this
.
radioButton5
.
TabStop
=
true
;
this
.
radioButton5
.
Text
=
"污染源(默认)"
;
this
.
radioButton5
.
UseVisualStyleBackColor
=
true
;
this
.
radioButton5
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
Foreign_CheckedChanged
);
//
// radioButton6
//
this
.
radioButton6
.
AutoSize
=
true
;
this
.
radioButton6
.
Location
=
new
System
.
Drawing
.
Point
(
32
,
55
);
this
.
radioButton6
.
Name
=
"radioButton6"
;
this
.
radioButton6
.
Size
=
new
System
.
Drawing
.
Size
(
71
,
16
);
this
.
radioButton6
.
TabIndex
=
0
;
this
.
radioButton6
.
TabStop
=
true
;
this
.
radioButton6
.
Text
=
"环境空气"
;
this
.
radioButton6
.
UseVisualStyleBackColor
=
true
;
this
.
radioButton6
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
Foreign_CheckedChanged
);
//
// splitContainer1
//
this
.
splitContainer1
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
splitContainer1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
splitContainer1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
splitContainer1
.
Name
=
"splitContainer1"
;
//
// splitContainer1.Panel1
//
this
.
splitContainer1
.
Panel1
.
Controls
.
Add
(
this
.
listBox1
);
//
// splitContainer1.Panel2
//
this
.
splitContainer1
.
Panel2
.
Controls
.
Add
(
this
.
panel1
);
this
.
splitContainer1
.
Panel2
.
Controls
.
Add
(
this
.
panel3
);
this
.
splitContainer1
.
Panel2
.
Controls
.
Add
(
this
.
panel2
);
this
.
splitContainer1
.
Size
=
new
System
.
Drawing
.
Size
(
749
,
364
);
this
.
splitContainer1
.
SplitterDistance
=
248
;
this
.
splitContainer1
.
TabIndex
=
2
;
//
// listBox1
//
this
.
listBox1
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
listBox1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
listBox1
.
DrawMode
=
System
.
Windows
.
Forms
.
DrawMode
.
OwnerDrawVariable
;
this
.
listBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
listBox1
.
FormattingEnabled
=
true
;
this
.
listBox1
.
ItemHeight
=
25
;
this
.
listBox1
.
Items
.
AddRange
(
new
object
[]
{
"常规"
,
"安全性"
,
"通信协议"
});
this
.
listBox1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
listBox1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
2
);
this
.
listBox1
.
Name
=
"listBox1"
;
this
.
listBox1
.
Size
=
new
System
.
Drawing
.
Size
(
246
,
362
);
this
.
listBox1
.
TabIndex
=
3
;
this
.
listBox1
.
DrawItem
+=
new
System
.
Windows
.
Forms
.
DrawItemEventHandler
(
this
.
ListBox1_DrawItem
);
this
.
listBox1
.
MeasureItem
+=
new
System
.
Windows
.
Forms
.
MeasureItemEventHandler
(
this
.
ListBox1_MeasureItem
);
this
.
listBox1
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
ListBox1_SelectedIndexChanged
);
//
// panel1
//
this
.
panel1
.
Controls
.
Add
(
this
.
groupBox5
);
this
.
panel1
.
Controls
.
Add
(
this
.
groupBox7
);
this
.
panel1
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
panel1
.
Controls
.
Add
(
this
.
groupBox4
);
this
.
panel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
495
,
362
);
this
.
panel1
.
TabIndex
=
3
;
//
// panel2
//
this
.
panel2
.
Controls
.
Add
(
this
.
label6
);
this
.
panel2
.
Controls
.
Add
(
this
.
label5
);
this
.
panel2
.
Controls
.
Add
(
this
.
label4
);
this
.
panel2
.
Controls
.
Add
(
this
.
textBox3
);
this
.
panel2
.
Controls
.
Add
(
this
.
textBox2
);
this
.
panel2
.
Controls
.
Add
(
this
.
textBox1
);
this
.
panel2
.
Controls
.
Add
(
this
.
label3
);
this
.
panel2
.
Controls
.
Add
(
this
.
label2
);
this
.
panel2
.
Controls
.
Add
(
this
.
label1
);
this
.
panel2
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
panel2
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
panel2
.
Name
=
"panel2"
;
this
.
panel2
.
Size
=
new
System
.
Drawing
.
Size
(
495
,
362
);
this
.
panel2
.
TabIndex
=
3
;
//
// textBox3
//
this
.
textBox3
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
textBox3
.
Location
=
new
System
.
Drawing
.
Point
(
256
,
109
);
this
.
textBox3
.
Name
=
"textBox3"
;
this
.
textBox3
.
PasswordChar
=
'*'
;
this
.
textBox3
.
Size
=
new
System
.
Drawing
.
Size
(
164
,
21
);
this
.
textBox3
.
TabIndex
=
1
;
this
.
textBox3
.
TextChanged
+=
new
System
.
EventHandler
(
this
.
TextBox3_TextChanged
);
//
// textBox2
//
this
.
textBox2
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
textBox2
.
Location
=
new
System
.
Drawing
.
Point
(
256
,
70
);
this
.
textBox2
.
Name
=
"textBox2"
;
this
.
textBox2
.
PasswordChar
=
'*'
;
this
.
textBox2
.
Size
=
new
System
.
Drawing
.
Size
(
164
,
21
);
this
.
textBox2
.
TabIndex
=
1
;
this
.
textBox2
.
TextChanged
+=
new
System
.
EventHandler
(
this
.
TextBox2_TextChanged
);
//
// textBox1
//
this
.
textBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
textBox1
.
Location
=
new
System
.
Drawing
.
Point
(
256
,
33
);
this
.
textBox1
.
Name
=
"textBox1"
;
this
.
textBox1
.
Size
=
new
System
.
Drawing
.
Size
(
164
,
21
);
this
.
textBox1
.
TabIndex
=
1
;
this
.
textBox1
.
TextChanged
+=
new
System
.
EventHandler
(
this
.
TextBox1_TextChanged
);
//
// label3
//
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
26
,
118
);
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
12
);
this
.
label3
.
TabIndex
=
0
;
this
.
label3
.
Text
=
"确认密码:"
;
//
// label2
//
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
26
,
78
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
41
,
12
);
this
.
label2
.
TabIndex
=
0
;
this
.
label2
.
Text
=
"密码:"
;
//
// label1
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
26
,
42
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
41
,
12
);
this
.
label1
.
TabIndex
=
0
;
this
.
label1
.
Text
=
"账号:"
;
//
// panel3
//
this
.
panel3
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
panel3
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
panel3
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
panel3
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
panel3
.
Name
=
"panel3"
;
this
.
panel3
.
Size
=
new
System
.
Drawing
.
Size
(
495
,
362
);
this
.
panel3
.
TabIndex
=
3
;
//
// groupBox7
//
this
.
groupBox7
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox7
.
Controls
.
Add
(
this
.
permin
);
this
.
groupBox7
.
Location
=
new
System
.
Drawing
.
Point
(
22
,
192
);
this
.
groupBox7
.
Name
=
"groupBox7"
;
this
.
groupBox7
.
Size
=
new
System
.
Drawing
.
Size
(
445
,
47
);
this
.
groupBox7
.
TabIndex
=
7
;
this
.
groupBox7
.
TabStop
=
false
;
this
.
groupBox7
.
Text
=
"状态记录"
;
//
// permin
//
this
.
permin
.
AutoSize
=
true
;
this
.
permin
.
Location
=
new
System
.
Drawing
.
Point
(
11
,
18
);
this
.
permin
.
Name
=
"permin"
;
this
.
permin
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
16
);
this
.
permin
.
TabIndex
=
0
;
this
.
permin
.
Text
=
"每分钟记录"
;
this
.
permin
.
UseVisualStyleBackColor
=
true
;
//
// groupBox3
//
this
.
groupBox3
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox3
.
Controls
.
Add
(
this
.
runbat
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
runsingle
);
this
.
groupBox3
.
Location
=
new
System
.
Drawing
.
Point
(
22
,
137
);
this
.
groupBox3
.
Name
=
"groupBox3"
;
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
445
,
49
);
this
.
groupBox3
.
TabIndex
=
6
;
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
Text
=
"开机自动运行"
;
//
// runbat
//
this
.
runbat
.
AutoSize
=
true
;
this
.
runbat
.
Location
=
new
System
.
Drawing
.
Point
(
11
,
20
);
this
.
runbat
.
Name
=
"runbat"
;
this
.
runbat
.
Size
=
new
System
.
Drawing
.
Size
(
60
,
16
);
this
.
runbat
.
TabIndex
=
1
;
this
.
runbat
.
Tag
=
"2"
;
this
.
runbat
.
Text
=
"批处理"
;
this
.
runbat
.
UseVisualStyleBackColor
=
true
;
//
// runsingle
//
this
.
runsingle
.
AutoSize
=
true
;
this
.
runsingle
.
Location
=
new
System
.
Drawing
.
Point
(
182
,
20
);
this
.
runsingle
.
Name
=
"runsingle"
;
this
.
runsingle
.
Size
=
new
System
.
Drawing
.
Size
(
72
,
16
);
this
.
runsingle
.
TabIndex
=
0
;
this
.
runsingle
.
Tag
=
"0"
;
this
.
runsingle
.
Text
=
"开启系统"
;
this
.
runsingle
.
UseVisualStyleBackColor
=
true
;
//
// groupBox4
//
this
.
groupBox4
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox4
.
Controls
.
Add
(
this
.
appstartup
);
this
.
groupBox4
.
Location
=
new
System
.
Drawing
.
Point
(
22
,
84
);
this
.
groupBox4
.
Name
=
"groupBox4"
;
this
.
groupBox4
.
Size
=
new
System
.
Drawing
.
Size
(
445
,
47
);
this
.
groupBox4
.
TabIndex
=
5
;
this
.
groupBox4
.
TabStop
=
false
;
this
.
groupBox4
.
Text
=
"开机配置"
;
//
// appstartup
//
this
.
appstartup
.
AutoSize
=
true
;
this
.
appstartup
.
Location
=
new
System
.
Drawing
.
Point
(
11
,
20
);
this
.
appstartup
.
Name
=
"appstartup"
;
this
.
appstartup
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
16
);
this
.
appstartup
.
TabIndex
=
0
;
this
.
appstartup
.
Text
=
"开机自启动"
;
this
.
appstartup
.
UseVisualStyleBackColor
=
true
;
//
// groupBox5
//
this
.
groupBox5
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox5
.
Controls
.
Add
(
this
.
checkBox1
);
this
.
groupBox5
.
Location
=
new
System
.
Drawing
.
Point
(
22
,
245
);
this
.
groupBox5
.
Name
=
"groupBox5"
;
this
.
groupBox5
.
Size
=
new
System
.
Drawing
.
Size
(
445
,
47
);
this
.
groupBox5
.
TabIndex
=
7
;
this
.
groupBox5
.
TabStop
=
false
;
this
.
groupBox5
.
Text
=
"杂项"
;
//
// panel4
//
this
.
panel4
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
panel4
.
Controls
.
Add
(
this
.
splitContainer1
);
this
.
panel4
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
12
);
this
.
panel4
.
Name
=
"panel4"
;
this
.
panel4
.
Size
=
new
System
.
Drawing
.
Size
(
749
,
364
);
this
.
panel4
.
TabIndex
=
3
;
//
// button1
//
this
.
button1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
543
,
404
);
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button1
.
TabIndex
=
4
;
this
.
button1
.
Text
=
"确认"
;
this
.
button1
.
UseVisualStyleBackColor
=
true
;
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
Button1_Click
);
//
// button2
//
this
.
button2
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
button2
.
Location
=
new
System
.
Drawing
.
Point
(
658
,
404
);
this
.
button2
.
Name
=
"button2"
;
this
.
button2
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button2
.
TabIndex
=
4
;
this
.
button2
.
Text
=
"取消"
;
this
.
button2
.
UseVisualStyleBackColor
=
true
;
this
.
button2
.
Click
+=
new
System
.
EventHandler
(
this
.
Button2_Click
);
//
// label4
//
this
.
label4
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
label4
.
AutoSize
=
true
;
this
.
label4
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label4
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
428
,
41
);
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
41
,
12
);
this
.
label4
.
TabIndex
=
2
;
this
.
label4
.
Text
=
"label4"
;
this
.
label4
.
Visible
=
false
;
//
// label5
//
this
.
label5
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
label5
.
AutoSize
=
true
;
this
.
label5
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label5
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
427
,
78
);
this
.
label5
.
Name
=
"label5"
;
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
41
,
12
);
this
.
label5
.
TabIndex
=
2
;
this
.
label5
.
Text
=
"label4"
;
this
.
label5
.
Visible
=
false
;
//
// label6
//
this
.
label6
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
label6
.
AutoSize
=
true
;
this
.
label6
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label6
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
426
,
118
);
this
.
label6
.
Name
=
"label6"
;
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
41
,
12
);
this
.
label6
.
TabIndex
=
2
;
this
.
label6
.
Text
=
"label4"
;
this
.
label6
.
Visible
=
false
;
//
// SysConfig
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
773
,
451
);
this
.
Controls
.
Add
(
this
.
button2
);
this
.
Controls
.
Add
(
this
.
button1
);
this
.
Controls
.
Add
(
this
.
panel4
);
this
.
Name
=
"SysConfig"
;
this
.
Text
=
"SysConfig"
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
SysConfig_Load
);
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
PerformLayout
();
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
groupBox2
.
PerformLayout
();
this
.
splitContainer1
.
Panel1
.
ResumeLayout
(
false
);
this
.
splitContainer1
.
Panel2
.
ResumeLayout
(
false
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
splitContainer1
)).
EndInit
();
this
.
splitContainer1
.
ResumeLayout
(
false
);
this
.
panel1
.
ResumeLayout
(
false
);
this
.
panel2
.
ResumeLayout
(
false
);
this
.
panel2
.
PerformLayout
();
this
.
panel3
.
ResumeLayout
(
false
);
this
.
groupBox7
.
ResumeLayout
(
false
);
this
.
groupBox7
.
PerformLayout
();
this
.
groupBox3
.
ResumeLayout
(
false
);
this
.
groupBox3
.
PerformLayout
();
this
.
groupBox4
.
ResumeLayout
(
false
);
this
.
groupBox4
.
PerformLayout
();
this
.
groupBox5
.
ResumeLayout
(
false
);
this
.
groupBox5
.
PerformLayout
();
this
.
panel4
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
#
endregion
private
System
.
Windows
.
Forms
.
CheckBox
checkBox1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
RadioButton
radioButton3
;
private
System
.
Windows
.
Forms
.
RadioButton
radioButton2
;
private
System
.
Windows
.
Forms
.
RadioButton
radioButton1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox2
;
private
System
.
Windows
.
Forms
.
RadioButton
radioButton5
;
private
System
.
Windows
.
Forms
.
RadioButton
radioButton6
;
private
System
.
Windows
.
Forms
.
SplitContainer
splitContainer1
;
private
System
.
Windows
.
Forms
.
ListBox
listBox1
;
private
System
.
Windows
.
Forms
.
Panel
panel1
;
private
System
.
Windows
.
Forms
.
Panel
panel2
;
private
System
.
Windows
.
Forms
.
TextBox
textBox3
;
private
System
.
Windows
.
Forms
.
TextBox
textBox2
;
private
System
.
Windows
.
Forms
.
TextBox
textBox1
;
private
System
.
Windows
.
Forms
.
Label
label3
;
private
System
.
Windows
.
Forms
.
Label
label2
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
Panel
panel3
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox5
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox7
;
private
System
.
Windows
.
Forms
.
CheckBox
permin
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox3
;
private
System
.
Windows
.
Forms
.
CheckBox
runbat
;
private
System
.
Windows
.
Forms
.
CheckBox
runsingle
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox4
;
private
System
.
Windows
.
Forms
.
CheckBox
appstartup
;
private
System
.
Windows
.
Forms
.
Panel
panel4
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
Button
button2
;
private
System
.
Windows
.
Forms
.
Label
label6
;
private
System
.
Windows
.
Forms
.
Label
label5
;
private
System
.
Windows
.
Forms
.
Label
label4
;
}
}
\ No newline at end of file
GcDevicePc/SysConfig.cs
0 → 100644
View file @
c3f8262d
using
Ini.Net
;
using
Microsoft.Win32
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.IO
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
namespace
GcDevicePc
{
public
partial
class
SysConfig
:
Form
{
public
SysConfig
()
{
InitializeComponent
();
}
private
void
CheckBox1_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
}
private
void
Thirdparty_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
}
private
void
Foreign_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
}
private
void
ListBox1_DrawItem
(
object
sender
,
DrawItemEventArgs
e
)
{
e
.
Graphics
.
FillRectangle
(
new
SolidBrush
(
e
.
BackColor
),
e
.
Bounds
);
if
(
e
.
Index
>=
0
)
{
StringFormat
sStringFormat
=
new
StringFormat
();
sStringFormat
.
LineAlignment
=
StringAlignment
.
Center
;
e
.
Graphics
.
DrawString
(((
ListBox
)
sender
).
Items
[
e
.
Index
].
ToString
(),
e
.
Font
,
new
SolidBrush
(
e
.
ForeColor
),
e
.
Bounds
,
sStringFormat
);
}
e
.
DrawFocusRectangle
();
}
private
void
ListBox1_MeasureItem
(
object
sender
,
MeasureItemEventArgs
e
)
{
e
.
ItemHeight
=
e
.
ItemHeight
+
12
;
}
private
void
ListBox1_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
{
panel1
.
Visible
=
false
;
panel2
.
Visible
=
false
;
panel3
.
Visible
=
false
;
if
(
this
.
listBox1
.
SelectedIndex
==
0
)
{
panel1
.
Visible
=
true
;
}
else
if
(
this
.
listBox1
.
SelectedIndex
==
1
)
{
panel2
.
Visible
=
true
;
}
else
if
(
this
.
listBox1
.
SelectedIndex
==
2
)
{
panel3
.
Visible
=
true
;
}
}
private
void
SysConfig_Load
(
object
sender
,
EventArgs
e
)
{
string
file
=
Path
.
Combine
(
Path
.
GetDirectoryName
(
System
.
Windows
.
Forms
.
Application
.
StartupPath
),
"GC_Config\\GC_Set\\启动参数\\startup.ini"
);
if
(
File
.
Exists
(
file
))
{
IniFile
ini
=
new
IniFile
(
file
);
string
value
=
ini
.
ReadString
(
"StartUp"
,
"自启动"
);
string
opensys
=
ini
.
ReadString
(
"StartUp"
,
"打开系统"
);
string
runtype
=
ini
.
ReadString
(
"StartUp"
,
"运行类型"
);
string
info_log
=
ini
.
ReadString
(
"Logs"
,
"InfoLog"
);
string
err_log
=
ini
.
ReadString
(
"Logs"
,
"ErrLog"
);
string
hmi_log
=
ini
.
ReadString
(
"Logs"
,
"HmiLog"
);
int
Version
=
ini
.
ReadInteger
(
"Version"
,
"VersionType"
);
string
uname
=
ini
.
ReadString
(
"User"
,
"Name"
);
string
upwd
=
ini
.
ReadString
(
"User"
,
"Password"
);
int
dsf
=
ini
.
ReadInteger
(
"SendData"
,
"Thirdparty"
);
int
dw
=
ini
.
ReadInteger
(
"SendData"
,
"Foreign"
);
if
(
Convert
.
ToInt32
(
value
)
==
1
)
{
this
.
appstartup
.
Checked
=
true
;
}
else
{
this
.
appstartup
.
Checked
=
false
;
}
if
(
Convert
.
ToInt32
(
opensys
)
==
1
)
{
if
(
Convert
.
ToInt32
(
runtype
)
==
2
)
{
this
.
runbat
.
Checked
=
true
;
}
}
if
(
Convert
.
ToInt32
(
info_log
)
==
1
)
{
this
.
permin
.
Checked
=
false
;
}
else
{
this
.
permin
.
Checked
=
true
;
}
if
(
Version
==
1
)
{
this
.
checkBox1
.
Checked
=
true
;
}
else
{
this
.
checkBox1
.
Checked
=
false
;
}
textBox1
.
Text
=
uname
;
textBox2
.
Text
=
upwd
;
textBox3
.
Text
=
upwd
;
switch
(
dsf
)
{
case
0
:
radioButton2
.
Checked
=
true
;
break
;
case
1
:
radioButton1
.
Checked
=
true
;
break
;
case
2
:
radioButton3
.
Checked
=
true
;
break
;
default
:
radioButton1
.
Checked
=
false
;
radioButton2
.
Checked
=
false
;
radioButton3
.
Checked
=
false
;
break
;
}
switch
(
dw
)
{
case
0
:
radioButton5
.
Checked
=
true
;
break
;
case
1
:
radioButton6
.
Checked
=
true
;
break
;
default
:
radioButton5
.
Checked
=
false
;
radioButton5
.
Checked
=
false
;
break
;
}
}
else
{
}
listBox1
.
SelectedIndex
=
0
;
}
private
void
Button1_Click
(
object
sender
,
EventArgs
e
)
{
string
file
=
Path
.
Combine
(
Path
.
GetDirectoryName
(
System
.
Windows
.
Forms
.
Application
.
StartupPath
),
"GC_Config\\GC_Set\\启动参数\\startup.ini"
);
if
(
File
.
Exists
(
file
))
{
IniFile
ini
=
new
IniFile
(
file
);
if
(
appstartup
.
Checked
)
{
ini
.
WriteString
(
"StartUp"
,
"自启动"
,
"1"
);
string
path
=
Application
.
ExecutablePath
;
RegistryKey
rk
=
Registry
.
LocalMachine
;
RegistryKey
rk2
=
rk
.
CreateSubKey
(
@"Software\Microsoft\Windows\CurrentVersion\Run"
);
rk2
.
SetValue
(
"JcShutdown"
,
path
);
rk2
.
Close
();
rk
.
Close
();
}
else
{
ini
.
WriteString
(
"StartUp"
,
"自启动"
,
"0"
);
string
path
=
Application
.
ExecutablePath
;
RegistryKey
rk
=
Registry
.
LocalMachine
;
RegistryKey
rk2
=
rk
.
CreateSubKey
(
@"Software\Microsoft\Windows\CurrentVersion\Run"
);
rk2
.
DeleteValue
(
"JcShutdown"
,
false
);
rk2
.
Close
();
rk
.
Close
();
}
if
(
runbat
.
Checked
)
{
ini
.
WriteString
(
"StartUp"
,
"打开系统"
,
"1"
);
ini
.
WriteString
(
"StartUp"
,
"运行类型"
,
"2"
);
}
else
if
(
runsingle
.
Checked
)
{
ini
.
WriteString
(
"StartUp"
,
"打开系统"
,
"1"
);
ini
.
WriteString
(
"StartUp"
,
"运行类型"
,
"1"
);
}
else
{
ini
.
WriteString
(
"StartUp"
,
"打开系统"
,
"0"
);
ini
.
WriteString
(
"StartUp"
,
"运行类型"
,
"0"
);
}
if
(
this
.
permin
.
Checked
==
true
)
{
ini
.
WriteString
(
"Logs"
,
"HmiLog"
,
"0"
);
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
hmi_log
=
false
;
}
else
{
ini
.
WriteString
(
"Logs"
,
"HmiLog"
,
"1"
);
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
hmi_log
=
true
;
}
if
(
checkBox1
.
Checked
)
{
ini
.
WriteString
(
"Version"
,
"VersionType"
,
"1"
);
}
else
{
ini
.
WriteString
(
"Version"
,
"VersionType"
,
"0"
);
}
if
(
radioButton1
.
Checked
)
{
ini
.
WriteString
(
"SendData"
,
"Thirdparty"
,
"1"
);
//zb
}
else
if
(
radioButton2
.
Checked
)
{
ini
.
WriteString
(
"SendData"
,
"Thirdparty"
,
"0"
);
//hl
}
else
if
(
radioButton3
.
Checked
)
{
ini
.
WriteString
(
"SendData"
,
"Thirdparty"
,
"2"
);
//sp
}
else
{
ini
.
WriteString
(
"SendData"
,
"Thirdparty"
,
"3"
);
//无
}
if
(
radioButton5
.
Checked
)
{
ini
.
WriteString
(
"SendData"
,
"Foreign"
,
"0"
);
//默认
}
else
if
(
radioButton6
.
Checked
)
{
ini
.
WriteString
(
"SendData"
,
"Foreign"
,
"1"
);
//环空
}
else
{
ini
.
WriteString
(
"SendData"
,
"Foreign"
,
"2"
);
//无
}
if
(
label4
.
Visible
||
label5
.
Visible
||
label6
.
Visible
)
{
MessageBox
.
Show
(
"请确保安全性"
);
return
;
}
else
{
ini
.
WriteString
(
"User"
,
"Name"
,
textBox1
.
Text
);
ini
.
WriteString
(
"User"
,
"Password"
,
textBox3
.
Text
);
}
this
.
Close
();
}
else
{
MessageBox
.
Show
(
"配置保存失败"
);
}
}
private
void
TextBox1_TextChanged
(
object
sender
,
EventArgs
e
)
{
if
(
string
.
IsNullOrEmpty
(
textBox1
.
Text
))
{
label4
.
Visible
=
true
;
label4
.
Text
=
"不能为空"
;
}
else
{
label4
.
Visible
=
false
;
label4
.
Text
=
""
;
}
}
private
void
TextBox2_TextChanged
(
object
sender
,
EventArgs
e
)
{
if
(
string
.
IsNullOrEmpty
(
textBox2
.
Text
))
{
label5
.
Visible
=
true
;
label5
.
Text
=
"不能为空"
;
}
else
{
label5
.
Visible
=
false
;
label5
.
Text
=
""
;
}
}
private
void
TextBox3_TextChanged
(
object
sender
,
EventArgs
e
)
{
if
(
string
.
IsNullOrEmpty
(
textBox3
.
Text
))
{
label6
.
Visible
=
true
;
label6
.
Text
=
"不能为空"
;
}
else
if
(!
textBox3
.
Text
.
Equals
(
textBox2
.
Text
))
{
label6
.
Visible
=
true
;
label6
.
Text
=
"密码不一致"
;
}
else
{
label6
.
Visible
=
false
;
label6
.
Text
=
""
;
}
}
private
void
Button2_Click
(
object
sender
,
EventArgs
e
)
{
this
.
Close
();
}
}
}
GcDevicePc/SysConfig.resx
0 → 100644
View file @
c3f8262d
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema
id=
"root"
xmlns=
""
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns:msdata=
"urn:schemas-microsoft-com:xml-msdata"
>
<xsd:import
namespace=
"http://www.w3.org/XML/1998/namespace"
/>
<xsd:element
name=
"root"
msdata:IsDataSet=
"true"
>
<xsd:complexType>
<xsd:choice
maxOccurs=
"unbounded"
>
<xsd:element
name=
"metadata"
>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
/>
</xsd:sequence>
<xsd:attribute
name=
"name"
use=
"required"
type=
"xsd:string"
/>
<xsd:attribute
name=
"type"
type=
"xsd:string"
/>
<xsd:attribute
name=
"mimetype"
type=
"xsd:string"
/>
<xsd:attribute
ref=
"xml:space"
/>
</xsd:complexType>
</xsd:element>
<xsd:element
name=
"assembly"
>
<xsd:complexType>
<xsd:attribute
name=
"alias"
type=
"xsd:string"
/>
<xsd:attribute
name=
"name"
type=
"xsd:string"
/>
</xsd:complexType>
</xsd:element>
<xsd:element
name=
"data"
>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"1"
/>
<xsd:element
name=
"comment"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"2"
/>
</xsd:sequence>
<xsd:attribute
name=
"name"
type=
"xsd:string"
use=
"required"
msdata:Ordinal=
"1"
/>
<xsd:attribute
name=
"type"
type=
"xsd:string"
msdata:Ordinal=
"3"
/>
<xsd:attribute
name=
"mimetype"
type=
"xsd:string"
msdata:Ordinal=
"4"
/>
<xsd:attribute
ref=
"xml:space"
/>
</xsd:complexType>
</xsd:element>
<xsd:element
name=
"resheader"
>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"1"
/>
</xsd:sequence>
<xsd:attribute
name=
"name"
type=
"xsd:string"
use=
"required"
/>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader
name=
"resmimetype"
>
<value>
text/microsoft-resx
</value>
</resheader>
<resheader
name=
"version"
>
<value>
2.0
</value>
</resheader>
<resheader
name=
"reader"
>
<value>
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
</resheader>
<resheader
name=
"writer"
>
<value>
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
</resheader>
</root>
\ No newline at end of file
GcDevicePc/UserConfig.Designer.cs
View file @
c3f8262d
...
@@ -47,11 +47,6 @@
...
@@ -47,11 +47,6 @@
this
.
mac1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
mac1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
appstartup
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
runbat
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
runsingle
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
groupBox4
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox4
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox6
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox6
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
label9
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label9
=
new
System
.
Windows
.
Forms
.
Label
();
...
@@ -69,15 +64,10 @@
...
@@ -69,15 +64,10 @@
this
.
label14
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label14
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label13
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label13
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label12
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label12
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox7
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
permin
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
groupBox4
.
SuspendLayout
();
this
.
groupBox4
.
SuspendLayout
();
this
.
groupBox6
.
SuspendLayout
();
this
.
groupBox6
.
SuspendLayout
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox7
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// groupBox1
// groupBox1
...
@@ -284,64 +274,6 @@
...
@@ -284,64 +274,6 @@
this
.
label1
.
Text
=
"目前MAC绑定:"
;
this
.
label1
.
Text
=
"目前MAC绑定:"
;
this
.
label1
.
Visible
=
false
;
this
.
label1
.
Visible
=
false
;
//
//
// groupBox2
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
appstartup
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
131
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
104
,
47
);
this
.
groupBox2
.
TabIndex
=
1
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"开机配置"
;
//
// appstartup
//
this
.
appstartup
.
AutoSize
=
true
;
this
.
appstartup
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
20
);
this
.
appstartup
.
Name
=
"appstartup"
;
this
.
appstartup
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
16
);
this
.
appstartup
.
TabIndex
=
0
;
this
.
appstartup
.
Text
=
"开机自启动"
;
this
.
appstartup
.
UseVisualStyleBackColor
=
true
;
this
.
appstartup
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
appstartup_CheckedChanged
);
//
// groupBox3
//
this
.
groupBox3
.
Controls
.
Add
(
this
.
runbat
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
runsingle
);
this
.
groupBox3
.
Location
=
new
System
.
Drawing
.
Point
(
122
,
131
);
this
.
groupBox3
.
Name
=
"groupBox3"
;
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
164
,
49
);
this
.
groupBox3
.
TabIndex
=
2
;
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
Text
=
"开机自动运行"
;
//
// runbat
//
this
.
runbat
.
AutoSize
=
true
;
this
.
runbat
.
Location
=
new
System
.
Drawing
.
Point
(
89
,
20
);
this
.
runbat
.
Name
=
"runbat"
;
this
.
runbat
.
Size
=
new
System
.
Drawing
.
Size
(
60
,
16
);
this
.
runbat
.
TabIndex
=
1
;
this
.
runbat
.
Tag
=
"2"
;
this
.
runbat
.
Text
=
"批处理"
;
this
.
runbat
.
UseVisualStyleBackColor
=
true
;
this
.
runbat
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
autorun_CheckedChanged
);
//
// runsingle
//
this
.
runsingle
.
AutoSize
=
true
;
this
.
runsingle
.
Enabled
=
false
;
this
.
runsingle
.
Location
=
new
System
.
Drawing
.
Point
(
11
,
20
);
this
.
runsingle
.
Name
=
"runsingle"
;
this
.
runsingle
.
Size
=
new
System
.
Drawing
.
Size
(
72
,
16
);
this
.
runsingle
.
TabIndex
=
0
;
this
.
runsingle
.
Tag
=
"0"
;
this
.
runsingle
.
Text
=
"单次分析"
;
this
.
runsingle
.
UseVisualStyleBackColor
=
true
;
this
.
runsingle
.
Visible
=
false
;
this
.
runsingle
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
autorun_CheckedChanged
);
//
// groupBox4
// groupBox4
//
//
this
.
groupBox4
.
Controls
.
Add
(
this
.
groupBox6
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
groupBox6
);
...
@@ -501,36 +433,12 @@
...
@@ -501,36 +433,12 @@
this
.
label12
.
TabIndex
=
0
;
this
.
label12
.
TabIndex
=
0
;
this
.
label12
.
Text
=
"设置IP:"
;
this
.
label12
.
Text
=
"设置IP:"
;
//
//
// groupBox7
//
this
.
groupBox7
.
Controls
.
Add
(
this
.
permin
);
this
.
groupBox7
.
Location
=
new
System
.
Drawing
.
Point
(
297
,
133
);
this
.
groupBox7
.
Name
=
"groupBox7"
;
this
.
groupBox7
.
Size
=
new
System
.
Drawing
.
Size
(
118
,
47
);
this
.
groupBox7
.
TabIndex
=
4
;
this
.
groupBox7
.
TabStop
=
false
;
this
.
groupBox7
.
Text
=
"状态记录"
;
//
// permin
//
this
.
permin
.
AutoSize
=
true
;
this
.
permin
.
Location
=
new
System
.
Drawing
.
Point
(
11
,
18
);
this
.
permin
.
Name
=
"permin"
;
this
.
permin
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
16
);
this
.
permin
.
TabIndex
=
0
;
this
.
permin
.
Text
=
"每分钟记录"
;
this
.
permin
.
UseVisualStyleBackColor
=
true
;
this
.
permin
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
permin_CheckedChanged
);
//
// UserConfig
// UserConfig
//
//
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
(
426
,
354
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
426
,
354
);
this
.
Controls
.
Add
(
this
.
groupBox7
);
this
.
Controls
.
Add
(
this
.
groupBox4
);
this
.
Controls
.
Add
(
this
.
groupBox4
);
this
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
FixedSingle
;
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
FixedSingle
;
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
...
@@ -541,17 +449,11 @@
...
@@ -541,17 +449,11 @@
this
.
Load
+=
new
System
.
EventHandler
(
this
.
UserConfig_Load
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
UserConfig_Load
);
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
PerformLayout
();
this
.
groupBox1
.
PerformLayout
();
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
groupBox2
.
PerformLayout
();
this
.
groupBox3
.
ResumeLayout
(
false
);
this
.
groupBox3
.
PerformLayout
();
this
.
groupBox4
.
ResumeLayout
(
false
);
this
.
groupBox4
.
ResumeLayout
(
false
);
this
.
groupBox6
.
ResumeLayout
(
false
);
this
.
groupBox6
.
ResumeLayout
(
false
);
this
.
groupBox6
.
PerformLayout
();
this
.
groupBox6
.
PerformLayout
();
this
.
groupBox5
.
ResumeLayout
(
false
);
this
.
groupBox5
.
ResumeLayout
(
false
);
this
.
groupBox5
.
PerformLayout
();
this
.
groupBox5
.
PerformLayout
();
this
.
groupBox7
.
ResumeLayout
(
false
);
this
.
groupBox7
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
}
...
@@ -561,8 +463,6 @@
...
@@ -561,8 +463,6 @@
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
Label
label2
;
private
System
.
Windows
.
Forms
.
Label
label2
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox2
;
private
System
.
Windows
.
Forms
.
CheckBox
appstartup
;
private
System
.
Windows
.
Forms
.
Button
changemac
;
private
System
.
Windows
.
Forms
.
Button
changemac
;
private
System
.
Windows
.
Forms
.
TextBox
mac4
;
private
System
.
Windows
.
Forms
.
TextBox
mac4
;
private
System
.
Windows
.
Forms
.
TextBox
mac3
;
private
System
.
Windows
.
Forms
.
TextBox
mac3
;
...
@@ -576,9 +476,6 @@
...
@@ -576,9 +476,6 @@
private
System
.
Windows
.
Forms
.
Label
label6
;
private
System
.
Windows
.
Forms
.
Label
label6
;
private
System
.
Windows
.
Forms
.
Label
label5
;
private
System
.
Windows
.
Forms
.
Label
label5
;
private
System
.
Windows
.
Forms
.
Label
label4
;
private
System
.
Windows
.
Forms
.
Label
label4
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox3
;
private
System
.
Windows
.
Forms
.
CheckBox
runbat
;
private
System
.
Windows
.
Forms
.
CheckBox
runsingle
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox4
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox4
;
private
System
.
Windows
.
Forms
.
Label
label9
;
private
System
.
Windows
.
Forms
.
Label
label9
;
private
System
.
Windows
.
Forms
.
Label
label10
;
private
System
.
Windows
.
Forms
.
Label
label10
;
...
@@ -596,8 +493,6 @@
...
@@ -596,8 +493,6 @@
private
System
.
Windows
.
Forms
.
TextBox
localgw
;
private
System
.
Windows
.
Forms
.
TextBox
localgw
;
private
System
.
Windows
.
Forms
.
TextBox
localip
;
private
System
.
Windows
.
Forms
.
TextBox
localip
;
private
System
.
Windows
.
Forms
.
Button
changelocal
;
private
System
.
Windows
.
Forms
.
Button
changelocal
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox7
;
private
System
.
Windows
.
Forms
.
CheckBox
permin
;
private
System
.
Windows
.
Forms
.
ComboBox
cmbMeshport
;
private
System
.
Windows
.
Forms
.
ComboBox
cmbMeshport
;
private
System
.
Windows
.
Forms
.
Label
label15
;
private
System
.
Windows
.
Forms
.
Label
label15
;
}
}
...
...
GcDevicePc/UserConfig.cs
View file @
c3f8262d
...
@@ -26,91 +26,92 @@ namespace GcDevicePc
...
@@ -26,91 +26,92 @@ namespace GcDevicePc
InitializeComponent
();
InitializeComponent
();
}
}
private
void
autorun_CheckedChanged
(
object
sender
,
EventArgs
e
)
//
private void autorun_CheckedChanged(object sender, EventArgs e)
{
//
{
//string file = globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.RunFolder + "\\startup.ini";
//
//string file = globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.RunFolder + "\\startup.ini";
string
file
=
Path
.
Combine
(
Path
.
GetDirectoryName
(
System
.
Windows
.
Forms
.
Application
.
StartupPath
),
"GC_Config\\GC_Set\\启动参数\\startup.ini"
);
//
string file = Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.StartupPath), "GC_Config\\GC_Set\\启动参数\\startup.ini");
INIOperation
test
=
new
INIOperation
(
file
);
//
INIOperation test = new INIOperation(file);
int
count
=
0
;
//
int count = 0;
if
((
sender
as
CheckBox
).
Checked
==
true
)
// if ((sender as CheckBox).Checked == true)
{
// {
foreach
(
CheckBox
chk
in
this
.
groupBox3
.
Controls
)
// foreach (CheckBox chk in this.groupBox3.Controls)
{
// {
if
(
chk
!=
sender
)
//
if (chk != sender)
chk
.
Checked
=
false
;
// chk.Checked = false;
}
//
}
//if( int.Parse((sender as CheckBox).Tag.ToString()) == 0)
// //if( int.Parse((sender as CheckBox).Tag.ToString()) == 0)
//{
// //{
// // test.INIWriteValue(file, "StartUp", "打开系统", "1");
// // test.INIWriteValue(file, "StartUp", "运行类型", "0");
// //}else
// if (int.Parse((sender as CheckBox).Tag.ToString()) == 1)
// {
// test.INIWriteValue(file, "StartUp", "打开系统", "1");
// test.INIWriteValue(file, "StartUp", "打开系统", "1");
// test.INIWriteValue(file, "StartUp", "运行类型", "0");
// test.INIWriteValue(file, "StartUp", "运行类型", "1");
// }
// else if (int.Parse((sender as CheckBox).Tag.ToString()) == 2)
// {
// test.INIWriteValue(file, "StartUp", "打开系统", "1");
// test.INIWriteValue(file, "StartUp", "运行类型", "2");
// }
// //else
// // {
// // test.INIWriteValue(file, "StartUp", "打开系统", "0");
// // test.INIWriteValue(file, "StartUp", "运行类型", "0");
// // }
// }
//}else
// foreach (CheckBox chk in this.groupBox3.Controls)
if
(
int
.
Parse
((
sender
as
CheckBox
).
Tag
.
ToString
())
==
1
)
// {
{
// if (chk.Checked == false)
test
.
INIWriteValue
(
file
,
"StartUp"
,
"打开系统"
,
"1"
);
// count++;
test
.
INIWriteValue
(
file
,
"StartUp"
,
"运行类型"
,
"1"
);
// }
}
else
if
(
int
.
Parse
((
sender
as
CheckBox
).
Tag
.
ToString
())
==
2
)
{
// if (count == 2)
test
.
INIWriteValue
(
file
,
"StartUp"
,
"打开系统"
,
"1"
);
test
.
INIWriteValue
(
file
,
"StartUp"
,
"运行类型"
,
"2"
);
}
//else
// {
// {
// test.INIWriteValue(file, "StartUp", "打开系统", "0");
// test.INIWriteValue(file, "StartUp", "打开系统", "0");
// test.INIWriteValue(file, "StartUp", "运行类型", "0");
// test.INIWriteValue(file, "StartUp", "运行类型", "0");
// }
// }
}
//}
foreach
(
CheckBox
chk
in
this
.
groupBox3
.
Controls
)
{
if
(
chk
.
Checked
==
false
)
count
++;
}
if
(
count
==
3
)
{
test
.
INIWriteValue
(
file
,
"StartUp"
,
"打开系统"
,
"0"
);
test
.
INIWriteValue
(
file
,
"StartUp"
,
"运行类型"
,
"0"
);
}
}
private
void
appstartup_CheckedChanged
(
object
sender
,
EventArgs
e
)
//
private void appstartup_CheckedChanged(object sender, EventArgs e)
{
//
{
//string file = globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.RunFolder + "\\startup.ini";
//
//string file = globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.RunFolder + "\\startup.ini";
string
file
=
Path
.
Combine
(
Path
.
GetDirectoryName
(
System
.
Windows
.
Forms
.
Application
.
StartupPath
),
"GC_Config\\GC_Set\\启动参数\\startup.ini"
);
//
string file = Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.StartupPath), "GC_Config\\GC_Set\\启动参数\\startup.ini");
INIOperation
test
=
new
INIOperation
(
file
);
//
INIOperation test = new INIOperation(file);
string
value
;
//
string value;
if
(
this
.
appstartup
.
Checked
)
//
if(this.appstartup.Checked)
{
//
{
value
=
test
.
INIGetStringValue
(
"StartUp"
,
"自启动"
,
null
);
//
value = test.INIGetStringValue("StartUp", "自启动", null);
if
(
Convert
.
ToInt32
(
value
)
!=
1
)
//
if (Convert.ToInt32(value) != 1)
{
//
{
MessageBox
.
Show
(
"设置开机自启动,需要修改注册表"
,
"提示"
);
//
MessageBox.Show("设置开机自启动,需要修改注册表", "提示");
test
.
INIWriteValue
(
file
,
"StartUp"
,
"自启动"
,
"1"
);
//
test.INIWriteValue(file, "StartUp", "自启动", "1");
string
path
=
Application
.
ExecutablePath
;
//
string path = Application.ExecutablePath;
RegistryKey
rk
=
Registry
.
LocalMachine
;
//
RegistryKey rk = Registry.LocalMachine;
RegistryKey
rk2
=
rk
.
CreateSubKey
(
@"Software\Microsoft\Windows\CurrentVersion\Run"
);
//
RegistryKey rk2 = rk.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run");
rk2
.
SetValue
(
"JcShutdown"
,
path
);
//
rk2.SetValue("JcShutdown", path);
rk2
.
Close
();
//
rk2.Close();
rk
.
Close
();
//
rk.Close();
}
//
}
}
else
//
}else
{
//
{
MessageBox
.
Show
(
"取消开机自启动,需要修改注册表"
,
"提示"
);
//
MessageBox.Show("取消开机自启动,需要修改注册表", "提示");
test
.
INIWriteValue
(
file
,
"StartUp"
,
"自启动"
,
"0"
);
//
test.INIWriteValue(file, "StartUp", "自启动", "0");
string
path
=
Application
.
ExecutablePath
;
//
string path = Application.ExecutablePath;
RegistryKey
rk
=
Registry
.
LocalMachine
;
//
RegistryKey rk = Registry.LocalMachine;
RegistryKey
rk2
=
rk
.
CreateSubKey
(
@"Software\Microsoft\Windows\CurrentVersion\Run"
);
//
RegistryKey rk2 = rk.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run");
rk2
.
DeleteValue
(
"JcShutdown"
,
false
);
//
rk2.DeleteValue("JcShutdown", false);
rk2
.
Close
();
//
rk2.Close();
rk
.
Close
();
//
rk.Close();
}
//
}
}
//
}
private
bool
ChosenAdapter
(
string
localip
)
private
bool
ChosenAdapter
(
string
localip
)
{
{
...
@@ -162,13 +163,7 @@ namespace GcDevicePc
...
@@ -162,13 +163,7 @@ namespace GcDevicePc
INIOperation
test
=
new
INIOperation
(
file
);
INIOperation
test
=
new
INIOperation
(
file
);
string
MAC
=
test
.
INIGetStringValue
(
"NetWorkConfig"
,
"MAC地址"
,
null
);
string
MAC
=
test
.
INIGetStringValue
(
"NetWorkConfig"
,
"MAC地址"
,
null
);
string
Meshport
=
test
.
INIGetStringValue
(
"NetWorkConfig"
,
"网口"
,
null
);
string
Meshport
=
test
.
INIGetStringValue
(
"NetWorkConfig"
,
"网口"
,
null
);
string
value
=
test
.
INIGetStringValue
(
"StartUp"
,
"自启动"
,
null
);
string
opensys
=
test
.
INIGetStringValue
(
"StartUp"
,
"打开系统"
,
null
);
string
runtype
=
test
.
INIGetStringValue
(
"StartUp"
,
"运行类型"
,
null
);
string
info_log
=
test
.
INIGetStringValue
(
"Logs"
,
"InfoLog"
,
null
);
//InfoLog
string
err_log
=
test
.
INIGetStringValue
(
"Logs"
,
"ErrLog"
,
null
);
string
hmi_log
=
test
.
INIGetStringValue
(
"Logs"
,
"HmiLog"
,
null
);
try
try
{
{
...
@@ -210,35 +205,7 @@ namespace GcDevicePc
...
@@ -210,35 +205,7 @@ namespace GcDevicePc
cmbMeshport
.
SelectedText
=
Meshport
;
cmbMeshport
.
SelectedText
=
Meshport
;
}
}
if
(
Convert
.
ToInt32
(
value
)
==
1
)
{
this
.
appstartup
.
Checked
=
true
;
}
else
{
this
.
appstartup
.
Checked
=
false
;
}
if
(
Convert
.
ToInt32
(
opensys
)
==
1
)
{
//if(Convert.ToInt32(runtype) == 0)
//{
// this.runsingle.Checked = true;
//}
//else
if
(
Convert
.
ToInt32
(
runtype
)
==
2
)
{
this
.
runbat
.
Checked
=
true
;
}
}
if
(
Convert
.
ToInt32
(
info_log
)
==
1
)
{
this
.
permin
.
Checked
=
false
;
}
else
{
this
.
permin
.
Checked
=
true
;
}
if
(
globaldata
.
DeviceList
.
Count
>
0
)
if
(
globaldata
.
DeviceList
.
Count
>
0
)
{
{
...
@@ -594,31 +561,31 @@ namespace GcDevicePc
...
@@ -594,31 +561,31 @@ namespace GcDevicePc
/// </summary>
/// </summary>
/// <param name="sender"></param>
/// <param name="sender"></param>
/// <param name="e"></param>
/// <param name="e"></param>
private
void
permin_CheckedChanged
(
object
sender
,
EventArgs
e
)
//
private void permin_CheckedChanged(object sender, EventArgs e)
{
//
{
//string file = globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.RunFolder + "\\startup.ini";
//
//string file = globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.RunFolder + "\\startup.ini";
string
file
=
Path
.
Combine
(
Path
.
GetDirectoryName
(
Application
.
StartupPath
),
"GC_Config\\GC_Set\\启动参数\\startup.ini"
);
//
string file = Path.Combine(Path.GetDirectoryName(Application.StartupPath), "GC_Config\\GC_Set\\启动参数\\startup.ini");
try
//
try
{
//
{
INIOperation
test
=
new
INIOperation
(
file
);
//
INIOperation test = new INIOperation(file);
if
(
this
.
permin
.
Checked
==
true
)
//
if (this.permin.Checked == true)
{
//
{
test
.
INIWriteValue
(
file
,
"Logs"
,
"HmiLog"
,
"0"
);
//
test.INIWriteValue(file, "Logs", "HmiLog", "0");
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
hmi_log
=
false
;
//
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.hmi_log = false;
}
//
}
else
//
else
{
//
{
test
.
INIWriteValue
(
file
,
"Logs"
,
"HmiLog"
,
"1"
);
//
test.INIWriteValue(file, "Logs", "HmiLog", "1");
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
hmi_log
=
true
;
//
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.hmi_log = true;
}
//
}
}
//
}
catch
//
catch
{
//
{
}
//
}
}
//
}
private
void
cmbMeshport_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
private
void
cmbMeshport_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
{
{
...
...
GcDevicePc/globaldata.cs
View file @
c3f8262d
...
@@ -70,7 +70,13 @@ namespace GcDevicePc
...
@@ -70,7 +70,13 @@ namespace GcDevicePc
//public static string cur_RunTab; //当前运行表名
//public static string cur_RunTab; //当前运行表名
//public static string cur_DataName; //保存数据文件名
//public static string cur_DataName; //保存数据文件名
public
static
string
show_MethodName
;
//显示方法名
public
static
string
show_MethodName
;
//显示方法名
public
static
string
CurrentVersion
;
//当前版本
public
static
int
CurrentVersion
;
//当前版本(是否显示用户界面)
public
static
string
UserName
;
//用户名
public
static
string
UserPwd
;
//密码
public
static
int
Foreign
;
//对外通信
//public static bool system_Statue; //系统开启状态
//public static bool system_Statue; //系统开启状态
//public static ushort work_Statue; //系统工作状态
//public static ushort work_Statue; //系统工作状态
...
...
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