Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
SO1057-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a5a04c66
由
张东亮
编写于
2022-12-13 16:55:37 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
添加温湿度显示以及上报
1 个父辈
04ccfb05
全部展开
显示空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
414 行增加
和
27 行删除
source/Common/bean/Bean.cs
source/DeviceLibrary/Config/Config_BoxEquip.csv
source/DeviceLibrary/storeBean/boxBean/BoxEquip.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
source/DeviceLibrary/storeBean/boxBean/Humiture/HumitureBean.cs
source/DeviceLibrary/storeBean/boxBean/Humiture/HumitureController.cs
source/LoadCVSLibrary/storeConfig/config/BoxEquip_Config.cs
source/XLRStoreClient/FrmReleaseDoor.cs
source/XLRStoreClient/XLRStore.csproj
source/XLRStoreClient/boxForm/FrmBoxEquip.Designer.cs
source/XLRStoreClient/boxForm/FrmBoxEquip.cs
source/XLRStoreClient/useControl/UCHumitempure.Designer.cs
source/XLRStoreClient/useControl/UCHumitempure.cs
source/XLRStoreClient/useControl/UCHumitempure.resx
source/Common/bean/Bean.cs
查看文件 @
a5a04c6
...
@@ -277,5 +277,9 @@ namespace OnlineStore.Common
...
@@ -277,5 +277,9 @@ namespace OnlineStore.Common
public
static
string
executeTime
=
"executeTime "
;
public
static
string
executeTime
=
"executeTime "
;
public
static
string
code
=
"code"
;
public
static
string
code
=
"code"
;
/// <summary>
/// 温湿度列表
/// </summary>
public
static
string
humiAndtempList
=
"humiAndtempList"
;
}
}
}
}
source/DeviceLibrary/Config/Config_BoxEquip.csv
查看文件 @
a5a04c6
...
@@ -11,7 +11,7 @@ AXIS,0,B面移栽旋转轴,MiddleAxis_B,8,HC,,35000,300000,300000,2000,10000,200
...
@@ -11,7 +11,7 @@ AXIS,0,B面移栽旋转轴,MiddleAxis_B,8,HC,,35000,300000,300000,2000,10000,200
AXIS,0,B面移栽压紧轴,ComAxis_B,9,HC,,20000,150000,150000,2000,10000,20000,10,100,0,0
AXIS,0,B面移栽压紧轴,ComAxis_B,9,HC,,20000,150000,150000,2000,10000,20000,10,100,0,0
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,,,,,,,,
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,,,,,,,,
PRO,0,温湿度端口号,Humiture_Port,
0
,,,,,,,,,,,,
PRO,0,温湿度端口号,Humiture_Port,
COM1#COM2#COM3#COM4
,,,,,,,,,,,,
PRO,0,两次吹气间隔(分钟),BlowAir_Interval,0,,,,,,,,,,,,
PRO,0,两次吹气间隔(分钟),BlowAir_Interval,0,,,,,,,,,,,,
PRO,0,每次吹气的时间(分钟),BlowAir_Time,0,,,,,,,,,,,,
PRO,0,每次吹气的时间(分钟),BlowAir_Time,0,,,,,,,,,,,,
PRO,0,氮气安全浓度,Nitrogen_Safe_Maximum,80,,,,,,,,,,,,
PRO,0,氮气安全浓度,Nitrogen_Safe_Maximum,80,,,,,,,,,,,,
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip.cs
查看文件 @
a5a04c6
...
@@ -67,7 +67,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -67,7 +67,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
public
AxisBean
[]
moveAxisArray
;
public
AxisBean
[]
moveAxisArray
;
//温湿度
//温湿度
public
HumitureBean
humBean
=
null
;
//
public HumitureBean humBean = null;
public
string
lastPosId
=
""
;
public
string
lastPosId
=
""
;
public
string
lastBarcode
=
""
;
public
string
lastBarcode
=
""
;
public
string
executeTime
=
""
;
public
string
executeTime
=
""
;
...
@@ -118,7 +118,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -118,7 +118,9 @@ namespace OnlineStore.DeviceLibrary
IoCheckTimer
.
Elapsed
+=
IoCheckTimerProcess
;
IoCheckTimer
.
Elapsed
+=
IoCheckTimerProcess
;
MoveInfo
=
new
DeviceMoveInfo
(
" 存储机构 "
);
MoveInfo
=
new
DeviceMoveInfo
(
" 存储机构 "
);
//温湿度
//温湿度
humBean
=
new
HumitureBean
(
config
.
Humiture_Port
,
Name
);
string
[]
ports
=
config
.
Humiture_Port
.
Split
(
'#'
);
HumitureBean
.
LoadHumitures
(
ports
,
Name
);
//humBean = new HumitureBean(config.Humiture_Port, Name);
InitRowColumnSig
();
InitRowColumnSig
();
InitAllAxis
();
InitAllAxis
();
InitPosititionNumList
();
InitPosititionNumList
();
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
查看文件 @
a5a04c6
...
@@ -47,7 +47,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -47,7 +47,8 @@ namespace OnlineStore.DeviceLibrary
lastConTime
=
DateTime
.
Now
;
lastConTime
=
DateTime
.
Now
;
try
try
{
{
humBean
.
HumidityProcess
(
this
);
//humBean.HumidityProcess(this);
HumitureBean
.
ProcessAllHumidity
(
this
);
if
(
IsDebug
)
if
(
IsDebug
)
{
{
...
@@ -157,18 +158,43 @@ namespace OnlineStore.DeviceLibrary
...
@@ -157,18 +158,43 @@ namespace OnlineStore.DeviceLibrary
//温湿度
//温湿度
//ASTemperateParam param = HumitureServer.GetTemperateParam(Config.Temperate_Serveraddress);
//ASTemperateParam param = HumitureServer.GetTemperateParam(Config.Temperate_Serveraddress);
HumitureParam
param
=
humBean
.
LastData
;
//
HumitureParam param = humBean.LastData;
if
(
param
!=
null
)
//
if (param != null)
{
//
{
boxStatus
.
humidity
=
param
.
Humidity
.
ToString
();
//
boxStatus.humidity = param.Humidity.ToString();
boxStatus
.
temperature
=
param
.
Temperate
.
ToString
();
//
boxStatus.temperature = param.Temperate.ToString();
}
//
}
lineOperation
.
boxStatus
.
Add
(
1
,
boxStatus
);
lineOperation
.
boxStatus
.
Add
(
1
,
boxStatus
);
if
(!
alarmType
.
Equals
(
AlarmType
.
None
))
if
(!
alarmType
.
Equals
(
AlarmType
.
None
))
{
{
lineOperation
.
alarmList
.
Add
(
alarmInfo
);
lineOperation
.
alarmList
.
Add
(
alarmInfo
);
}
}
//添加温湿度列表
try
{
List
<
HumitureParam
>
humitureParams
=
HumitureBean
.
GetHumitureParams
();
if
(
humitureParams
!=
null
)
{
List
<
Dictionary
<
string
,
string
>>
valuePairs
=
new
List
<
Dictionary
<
string
,
string
>>();
for
(
int
i
=
0
;
i
<
humitureParams
.
Count
;
i
++)
{
boxStatus
.
humidity
=
humitureParams
[
i
].
Humidity
.
ToString
();
boxStatus
.
temperature
=
humitureParams
[
i
].
Temperate
.
ToString
();
Dictionary
<
string
,
string
>
vals
=
new
Dictionary
<
string
,
string
>();
vals
.
Add
(
"id"
,
(
i
+
1
).
ToString
());
vals
.
Add
(
"humidity"
,
humitureParams
[
i
].
Humidity
.
ToString
());
vals
.
Add
(
"temperature"
,
humitureParams
[
i
].
Temperate
.
ToString
());
valuePairs
.
Add
(
vals
);
}
boxStatus
.
data
.
Add
(
ParamDefine
.
humiAndtempList
,
JsonHelper
.
SerializeObject
(
valuePairs
));
//LogUtil.info($"上报温湿度数据【{JsonHelper.SerializeObject(valuePairs)}】【{JsonHelper.SerializeObject(boxStatus.data)}】");
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"上报温湿度数据异常"
,
ex
);
}
return
lineOperation
;
return
lineOperation
;
}
}
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
...
@@ -178,7 +204,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -178,7 +204,7 @@ namespace OnlineStore.DeviceLibrary
//构建发送给服务器的对象
//构建发送给服务器的对象
Operation
lineOperation
=
getLineBoxStatus
();
Operation
lineOperation
=
getLineBoxStatus
();
//如果还没湿度范围,先获取
//如果还没湿度范围,先获取
if
(
hum
Bean
.
NeedGetTem
())
if
(
Humiture
Bean
.
NeedGetTem
())
{
{
lineOperation
.
op
=
5
;
lineOperation
.
op
=
5
;
LogUtil
.
error
(
Name
+
"没有湿度预警范围,需要从服务器获取,发送OP="
+
lineOperation
.
op
,
DeviceID
+
105
);
LogUtil
.
error
(
Name
+
"没有湿度预警范围,需要从服务器获取,发送OP="
+
lineOperation
.
op
,
DeviceID
+
105
);
...
@@ -201,7 +227,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -201,7 +227,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
resultOperation
.
op
.
Equals
(
5
))
else
if
(
resultOperation
.
op
.
Equals
(
5
))
{
{
hum
Bean
.
ProcessHumidityCMD
(
resultOperation
);
Humiture
Bean
.
ProcessHumidityCMD
(
resultOperation
);
}
}
else
else
{
{
...
...
source/DeviceLibrary/storeBean/boxBean/Humiture/HumitureBean.cs
查看文件 @
a5a04c6
using
OnlineStore.Common
;
using
Emgu.CV.DepthAI
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
@@ -13,13 +14,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -13,13 +14,20 @@ namespace OnlineStore.DeviceLibrary
private
string
PortName
=
""
;
private
string
PortName
=
""
;
private
string
Name
=
""
;
private
string
Name
=
""
;
public
HumitureParam
LastData
=
new
HumitureParam
(
0
,
0
,
0
);
public
HumitureParam
LastData
=
new
HumitureParam
(
0
,
0
,
0
);
static
List
<
HumitureBean
>
humitureBeans
=
new
List
<
HumitureBean
>();
internal
HumitureBean
(
string
port
,
string
deviceName
)
internal
HumitureBean
(
string
port
,
string
deviceName
)
{
{
this
.
Name
=
deviceName
;
this
.
Name
=
deviceName
;
this
.
PortName
=
port
;
this
.
PortName
=
port
;
HumitureController
.
Init
(
this
.
PortName
);
HumitureController
.
Init
(
this
.
PortName
);
}
}
public
static
void
LoadHumitures
(
string
[]
ports
,
string
deviceName
)
{
for
(
int
i
=
0
;
i
<
ports
.
Length
;
i
++)
{
humitureBeans
.
Add
(
new
HumitureBean
(
ports
[
i
],
deviceName
+
(
i
+
1
)));
}
}
public
HumitureParam
QueryData
()
public
HumitureParam
QueryData
()
{
{
HumitureParam
param
=
HumitureController
.
QueryData
(
PortName
);
HumitureParam
param
=
HumitureController
.
QueryData
(
PortName
);
...
@@ -27,24 +35,37 @@ namespace OnlineStore.DeviceLibrary
...
@@ -27,24 +35,37 @@ namespace OnlineStore.DeviceLibrary
return
LastData
;
return
LastData
;
}
}
internal
void
ProcessHumidityCMD
(
Operation
resultOperation
)
public
static
double
GetMinOxygenV
()
{
double
maxV
=
0.0
;
foreach
(
var
item
in
humitureBeans
)
{
double
val
=
item
.
QueryData
().
OxygenV
;
if
(
val
>
maxV
)
{
maxV
=
val
;
}
}
return
maxV
;
}
internal
static
void
ProcessHumidityCMD
(
Operation
resultOperation
)
{
{
Dictionary
<
string
,
string
>
data
=
resultOperation
.
data
;
Dictionary
<
string
,
string
>
data
=
resultOperation
.
data
;
if
(
data
!=
null
&&
data
.
ContainsKey
(
ParamDefine
.
maxHumidity
)
&&
data
.
ContainsKey
(
ParamDefine
.
maxTemperature
))
if
(
data
!=
null
&&
data
.
ContainsKey
(
ParamDefine
.
maxHumidity
)
&&
data
.
ContainsKey
(
ParamDefine
.
maxTemperature
))
{
{
string
maxHumidity
=
data
[
ParamDefine
.
maxHumidity
];
string
maxHumidity
=
data
[
ParamDefine
.
maxHumidity
];
string
maxTemp
=
data
[
ParamDefine
.
maxTemperature
];
string
maxTemp
=
data
[
ParamDefine
.
maxTemperature
];
LogUtil
.
info
(
Name
+
"收到服务器温湿度预警值:maxHumidity="
+
maxHumidity
+
",maxTemperature="
+
maxTemp
);
LogUtil
.
info
(
"收到服务器温湿度预警值:maxHumidity="
+
maxHumidity
+
",maxTemperature="
+
maxTemp
);
try
try
{
{
this
.
Max_Humidity
=
(
float
)
Convert
.
ToDouble
(
maxHumidity
);
Max_Humidity
=
(
float
)
Convert
.
ToDouble
(
maxHumidity
);
this
.
Max_Temperature
=
(
float
)
Convert
.
ToDouble
(
maxTemp
);
Max_Temperature
=
(
float
)
Convert
.
ToDouble
(
maxTemp
);
LogUtil
.
info
(
Name
+
"保存温湿度预警值:Max_Humidity="
+
Max_Humidity
+
",Max_Temperature="
+
Max_Temperature
);
LogUtil
.
info
(
"保存温湿度预警值:Max_Humidity="
+
Max_Humidity
+
",Max_Temperature="
+
Max_Temperature
);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
LogUtil
.
error
(
Name
+
"转换温湿度失败:"
+
ex
.
ToString
());
LogUtil
.
error
(
"转换温湿度失败:"
+
ex
.
ToString
());
}
}
}
}
}
}
...
@@ -53,11 +74,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -53,11 +74,11 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// <summary>
/// 湿度标准,超过后需要报警
/// 湿度标准,超过后需要报警
/// </summary>
/// </summary>
private
float
Max_Humidity
=
0
;
static
float
Max_Humidity
=
0
;
/// <summary>
/// <summary>
/// 温度标准,超过后需要报警
/// 温度标准,超过后需要报警
/// </summary>
/// </summary>
private
float
Max_Temperature
=
0
;
static
float
Max_Temperature
=
0
;
private
bool
IsInBlowing
=
false
;
private
bool
IsInBlowing
=
false
;
private
DateTime
LastBeginBlowTime
=
DateTime
.
Now
;
private
DateTime
LastBeginBlowTime
=
DateTime
.
Now
;
private
DateTime
LastEndBlowTime
=
new
DateTime
(
1997
,
1
,
1
);
private
DateTime
LastEndBlowTime
=
new
DateTime
(
1997
,
1
,
1
);
...
@@ -69,6 +90,22 @@ namespace OnlineStore.DeviceLibrary
...
@@ -69,6 +90,22 @@ namespace OnlineStore.DeviceLibrary
private
float
StartBlowValue
=
(
float
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
StartBlowValue
);
private
float
StartBlowValue
=
(
float
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
StartBlowValue
);
private
float
StopBlowValue
=
(
float
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
StopBlowValue
);
private
float
StopBlowValue
=
(
float
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
StopBlowValue
);
public
string
currTempStr
=
""
;
public
string
currTempStr
=
""
;
public
static
void
ProcessAllHumidity
(
BoxEquip
box
)
{
foreach
(
var
item
in
humitureBeans
)
{
item
.
HumidityProcess
(
box
);
}
}
public
static
List
<
HumitureParam
>
GetHumitureParams
()
{
List
<
HumitureParam
>
humitureParams
=
new
List
<
HumitureParam
>();
foreach
(
var
item
in
humitureBeans
)
{
humitureParams
.
Add
(
item
.
LastData
);
}
return
humitureParams
;
}
internal
void
HumidityProcess
(
BoxEquip
box
)
internal
void
HumidityProcess
(
BoxEquip
box
)
{
{
if
(
IOManager
.
IOValue
(
IO_Type
.
Air_OpenValve
,
1
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOManager
.
IOValue
(
IO_Type
.
LeftDoor_Limit
,
2
).
Equals
(
IO_VALUE
.
LOW
)
||
IOManager
.
IOValue
(
IO_Type
.
RightDoor_Limit
,
2
).
Equals
(
IO_VALUE
.
LOW
)
||
IOManager
.
IOValue
(
IO_Type
.
BackDoor_Limit
,
2
).
Equals
(
IO_VALUE
.
LOW
))
if
(
IOManager
.
IOValue
(
IO_Type
.
Air_OpenValve
,
1
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOManager
.
IOValue
(
IO_Type
.
LeftDoor_Limit
,
2
).
Equals
(
IO_VALUE
.
LOW
)
||
IOManager
.
IOValue
(
IO_Type
.
RightDoor_Limit
,
2
).
Equals
(
IO_VALUE
.
LOW
)
||
IOManager
.
IOValue
(
IO_Type
.
BackDoor_Limit
,
2
).
Equals
(
IO_VALUE
.
LOW
))
...
@@ -184,7 +221,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -184,7 +221,7 @@ namespace OnlineStore.DeviceLibrary
TempOrHumidityIsAlarm
=
true
;
TempOrHumidityIsAlarm
=
true
;
}
}
internal
bool
NeedGetTem
()
internal
static
bool
NeedGetTem
()
{
{
if
(
Max_Humidity
<=
0
||
(
Max_Temperature
<=
0
))
if
(
Max_Humidity
<=
0
||
(
Max_Temperature
<=
0
))
{
{
...
@@ -255,6 +292,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -255,6 +292,6 @@ namespace OnlineStore.DeviceLibrary
/// 湿度
/// 湿度
/// </summary>
/// </summary>
public
double
Humidity
{
get
;
set
;
}
public
double
Humidity
{
get
;
set
;
}
public
double
OxygenV
{
get
;
set
;
}
public
double
OxygenV
{
get
;
set
;
}
=
100
;
}
}
}
}
source/DeviceLibrary/storeBean/boxBean/Humiture/HumitureController.cs
查看文件 @
a5a04c6
...
@@ -102,6 +102,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -102,6 +102,7 @@ namespace OnlineStore.DeviceLibrary
public
static
HumitureParam
QueryData
(
string
port
)
public
static
HumitureParam
QueryData
(
string
port
)
{
{
HumitureParam
param
=
new
HumitureParam
(
0
,
0
,
0
);
HumitureParam
param
=
new
HumitureParam
(
0
,
0
,
0
);
param
.
DeviceAddress
=
port
;
List
<
double
>
data
=
queryData
(
port
);
List
<
double
>
data
=
queryData
(
port
);
if
(
data
.
Count
.
Equals
(
3
))
if
(
data
.
Count
.
Equals
(
3
))
{
{
...
...
source/LoadCVSLibrary/storeConfig/config/BoxEquip_Config.cs
查看文件 @
a5a04c6
...
@@ -588,6 +588,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -588,6 +588,7 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"Humiture_Port"
,
true
)]
[
ConfigProAttribute
(
"Humiture_Port"
,
true
)]
public
string
Humiture_Port
{
get
;
set
;
}
public
string
Humiture_Port
{
get
;
set
;
}
#
endregion
#
endregion
#
region
列信号开启
#
region
列信号开启
...
...
source/XLRStoreClient/FrmReleaseDoor.cs
查看文件 @
a5a04c6
...
@@ -44,8 +44,8 @@ namespace OnlineStore.XLRStore
...
@@ -44,8 +44,8 @@ namespace OnlineStore.XLRStore
IOManager
.
IOMove
(
IO_Type
.
Air_OpenValve
,
IO_VALUE
.
HIGH
,
1
);
IOManager
.
IOMove
(
IO_Type
.
Air_OpenValve
,
IO_VALUE
.
HIGH
,
1
);
IOManager
.
IOMove
(
IO_Type
.
Nitrogen_OpenValve
,
IO_VALUE
.
LOW
,
1
);
IOManager
.
IOMove
(
IO_Type
.
Nitrogen_OpenValve
,
IO_VALUE
.
LOW
,
1
);
var
dd
=
StoreManager
.
XLRStore
.
boxEquip
.
humBean
.
QueryData
();
var
dd
=
HumitureBean
.
GetMinOxygenV
();
var
nitrogen
=
100
-
dd
.
OxygenV
-
1
;
var
nitrogen
=
100
-
dd
;
if
(
nitrogen
<=
StoreManager
.
XLRStore
.
boxEquip
.
Config
.
Nitrogen_Safe_Maximum
)
{
if
(
nitrogen
<=
StoreManager
.
XLRStore
.
boxEquip
.
Config
.
Nitrogen_Safe_Maximum
)
{
IOManager
.
IOMove
(
IO_Type
.
SafeDoor_Close
,
IO_VALUE
.
LOW
,
1
);
IOManager
.
IOMove
(
IO_Type
.
SafeDoor_Close
,
IO_VALUE
.
LOW
,
1
);
...
...
source/XLRStoreClient/XLRStore.csproj
查看文件 @
a5a04c6
...
@@ -97,6 +97,7 @@
...
@@ -97,6 +97,7 @@
<Reference Include="UserFromControl">
<Reference Include="UserFromControl">
<HintPath>..\..\dll\UserFromControl.dll</HintPath>
<HintPath>..\..\dll\UserFromControl.dll</HintPath>
</Reference>
</Reference>
<Reference Include="XLRStore, Version=1.0.8382.29494, Culture=neutral, PublicKeyToken=null" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile Include="boxForm\FrmAxisMove.cs">
<Compile Include="boxForm\FrmAxisMove.cs">
...
@@ -216,6 +217,12 @@
...
@@ -216,6 +217,12 @@
<Compile Include="useControl\EquipControl.Designer.cs">
<Compile Include="useControl\EquipControl.Designer.cs">
<DependentUpon>EquipControl.cs</DependentUpon>
<DependentUpon>EquipControl.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="useControl\UCHumitempure.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="useControl\UCHumitempure.Designer.cs">
<DependentUpon>UCHumitempure.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="boxForm\FrmAxisMove.resx">
<EmbeddedResource Include="boxForm\FrmAxisMove.resx">
<DependentUpon>FrmAxisMove.cs</DependentUpon>
<DependentUpon>FrmAxisMove.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
...
@@ -295,6 +302,9 @@
...
@@ -295,6 +302,9 @@
<Content Include="model\sr.prototxt">
<Content Include="model\sr.prototxt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</Content>
<EmbeddedResource Include="useControl\UCHumitempure.resx">
<DependentUpon>UCHumitempure.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.manifest" />
<None Include="app.manifest" />
<None Include="packages.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<None Include="Properties\Settings.settings">
...
...
source/XLRStoreClient/boxForm/FrmBoxEquip.Designer.cs
查看文件 @
a5a04c6
此文件的差异被折叠,
点击展开。
source/XLRStoreClient/boxForm/FrmBoxEquip.cs
查看文件 @
a5a04c6
...
@@ -25,6 +25,7 @@ namespace OnlineStore.XLRStore
...
@@ -25,6 +25,7 @@ namespace OnlineStore.XLRStore
FrmAxisMove
frmAxisMove
=
null
;
FrmAxisMove
frmAxisMove
=
null
;
private
bool
IsLoad
=
false
;
private
bool
IsLoad
=
false
;
private
BoxEquip
boxBean
;
private
BoxEquip
boxBean
;
List
<
UCHumitempure
>
humitempures
=
new
List
<
UCHumitempure
>();
internal
FrmBoxEquip
(
BoxEquip
moveEquip
)
internal
FrmBoxEquip
(
BoxEquip
moveEquip
)
{
{
this
.
boxBean
=
moveEquip
;
this
.
boxBean
=
moveEquip
;
...
@@ -37,7 +38,10 @@ namespace OnlineStore.XLRStore
...
@@ -37,7 +38,10 @@ namespace OnlineStore.XLRStore
chbMoveStop
.
Checked
=
boxBean
.
MoveStop
;
chbMoveStop
.
Checked
=
boxBean
.
MoveStop
;
lblStoreStatus
.
Text
=
DeviceBase
.
GetRunStr
(
boxBean
.
runStatus
);
lblStoreStatus
.
Text
=
DeviceBase
.
GetRunStr
(
boxBean
.
runStatus
);
lblThisSta
.
Text
=
boxBean
.
WarnMsg
;
lblThisSta
.
Text
=
boxBean
.
WarnMsg
;
humitempures
.
Add
(
ucHumitempure1
);
humitempures
.
Add
(
ucHumitempure2
);
humitempures
.
Add
(
ucHumitempure3
);
humitempures
.
Add
(
ucHumitempure4
);
lblName
.
Text
=
boxBean
.
Name
;
lblName
.
Text
=
boxBean
.
Name
;
this
.
Text
=
boxBean
.
Name
;
this
.
Text
=
boxBean
.
Name
;
chbDebug
.
Checked
=
boxBean
.
IsDebug
;
chbDebug
.
Checked
=
boxBean
.
IsDebug
;
...
@@ -298,6 +302,14 @@ namespace OnlineStore.XLRStore
...
@@ -298,6 +302,14 @@ namespace OnlineStore.XLRStore
//{
//{
// btnHlhasReel.Visible = false;
// btnHlhasReel.Visible = false;
//}
//}
List
<
HumitureParam
>
huparam
=
HumitureBean
.
GetHumitureParams
();
for
(
int
i
=
0
;
i
<
humitempures
.
Count
;
i
++)
{
humitempures
[
i
].
Humiti
=
huparam
[
i
].
Humidity
;
humitempures
[
i
].
Tempure
=
huparam
[
i
].
Temperate
;
humitempures
[
i
].
Nitrogen
=
100
-
huparam
[
i
].
OxygenV
;
humitempures
[
i
].
HumiName
=
huparam
[
i
].
DeviceAddress
;
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
...
source/XLRStoreClient/useControl/UCHumitempure.Designer.cs
0 → 100644
查看文件 @
a5a04c6
namespace
OnlineStore.XLRStore
{
partial
class
UCHumitempure
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private
System
.
ComponentModel
.
IContainer
components
=
null
;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected
override
void
Dispose
(
bool
disposing
)
{
if
(
disposing
&&
(
components
!=
null
))
{
components
.
Dispose
();
}
base
.
Dispose
(
disposing
);
}
#
region
组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private
void
InitializeComponent
()
{
this
.
lblHumiti
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
lblNitrogen
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblTempure
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox1
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// lblHumiti
//
this
.
lblHumiti
.
AutoSize
=
true
;
this
.
lblHumiti
.
Location
=
new
System
.
Drawing
.
Point
(
15
,
34
);
this
.
lblHumiti
.
Name
=
"lblHumiti"
;
this
.
lblHumiti
.
Size
=
new
System
.
Drawing
.
Size
(
55
,
15
);
this
.
lblHumiti
.
TabIndex
=
0
;
this
.
lblHumiti
.
Text
=
"label1"
;
//
// groupBox1
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
lblNitrogen
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lblTempure
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lblHumiti
);
this
.
groupBox1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
194
,
118
);
this
.
groupBox1
.
TabIndex
=
1
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"温湿度传感器"
;
//
// lblNitrogen
//
this
.
lblNitrogen
.
AutoSize
=
true
;
this
.
lblNitrogen
.
Location
=
new
System
.
Drawing
.
Point
(
15
,
88
);
this
.
lblNitrogen
.
Name
=
"lblNitrogen"
;
this
.
lblNitrogen
.
Size
=
new
System
.
Drawing
.
Size
(
55
,
15
);
this
.
lblNitrogen
.
TabIndex
=
2
;
this
.
lblNitrogen
.
Text
=
"label3"
;
//
// lblTempure
//
this
.
lblTempure
.
AutoSize
=
true
;
this
.
lblTempure
.
Location
=
new
System
.
Drawing
.
Point
(
15
,
61
);
this
.
lblTempure
.
Name
=
"lblTempure"
;
this
.
lblTempure
.
Size
=
new
System
.
Drawing
.
Size
(
55
,
15
);
this
.
lblTempure
.
TabIndex
=
1
;
this
.
lblTempure
.
Text
=
"label2"
;
//
// UCHumitempure
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
8F
,
15F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Name
=
"UCHumitempure"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
194
,
118
);
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
}
#
endregion
private
System
.
Windows
.
Forms
.
Label
lblHumiti
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
Label
lblNitrogen
;
private
System
.
Windows
.
Forms
.
Label
lblTempure
;
}
}
source/XLRStoreClient/useControl/UCHumitempure.cs
0 → 100644
查看文件 @
a5a04c6
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
namespace
OnlineStore.XLRStore
{
public
partial
class
UCHumitempure
:
UserControl
{
public
UCHumitempure
()
{
InitializeComponent
();
}
public
string
HumiName
{
set
{
try
{
this
.
Invoke
(
new
Action
(()
=>
{
groupBox1
.
Text
=
value
;
}));
}
catch
{
}
}
}
public
double
Tempure
{
set
{
try
{
this
.
Invoke
(
new
Action
(()
=>
{
lblTempure
.
Text
=
$
"温度:{value}℃"
;
}));
}
catch
{
}
}
}
public
double
Humiti
{
set
{
try
{
this
.
Invoke
(
new
Action
(()
=>
{
lblHumiti
.
Text
=
$
"湿度:{value}%"
;
}));
}
catch
{
}
}
}
public
double
Nitrogen
{
set
{
try
{
this
.
Invoke
(
new
Action
(()
=>
{
lblNitrogen
.
Text
=
$
"氮气:{value}%"
;
}));
}
catch
{
}
}
}
}
}
source/XLRStoreClient/useControl/UCHumitempure.resx
0 → 100644
查看文件 @
a5a04c6
<?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
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论