|
|
@ -10,6 +10,7 @@ namespace Mesnac.Controls.ChemicalWeighing
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
public partial class ThreeWayValve : ChemicalWeighingControl
|
|
|
|
public partial class ThreeWayValve : ChemicalWeighingControl
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
private object lockobj = new object();
|
|
|
|
public ThreeWayValve()
|
|
|
|
public ThreeWayValve()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
InitializeComponent();
|
|
|
|
InitializeComponent();
|
|
|
@ -43,20 +44,20 @@ namespace Mesnac.Controls.ChemicalWeighing
|
|
|
|
sImages[4] = "Mesnac.Controls.ChemicalWeighing.Resources.ThreeWayValveVError.png";
|
|
|
|
sImages[4] = "Mesnac.Controls.ChemicalWeighing.Resources.ThreeWayValveVError.png";
|
|
|
|
//都报警
|
|
|
|
//都报警
|
|
|
|
sImages[5] = "Mesnac.Controls.ChemicalWeighing.Resources.ThreeWayValveHVError.png";
|
|
|
|
sImages[5] = "Mesnac.Controls.ChemicalWeighing.Resources.ThreeWayValveHVError.png";
|
|
|
|
|
|
|
|
//三个都通
|
|
|
|
sImages[6] = "Mesnac.Controls.ChemicalWeighing.Resources.ThreeWayValveAll.png";
|
|
|
|
sImages[6] = "Mesnac.Controls.ChemicalWeighing.Resources.ThreeWayValveAll.png";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void ReloadStream()
|
|
|
|
private void ReloadStream()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
int defaultIndex = 0;
|
|
|
|
int defaultIndex = 0;
|
|
|
|
//如果出现报警 就去判断是直还是斜
|
|
|
|
//如果出现报警 就去判断是直还是斜
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//直报警 斜报警
|
|
|
|
//直报警 斜报警
|
|
|
|
if (_almtValue && _almdValue)
|
|
|
|
if (_almtValue && _almdValue)
|
|
|
@ -66,48 +67,38 @@ namespace Mesnac.Controls.ChemicalWeighing
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//如果直的报警
|
|
|
|
//如果直的报警
|
|
|
|
if (_almdValue)
|
|
|
|
if (_almdValue && _almtValue == false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
defaultIndex = 3;
|
|
|
|
defaultIndex = 3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//如果斜的报警
|
|
|
|
//如果斜的报警
|
|
|
|
if (_almtValue)
|
|
|
|
if (_almtValue && _almdValue == false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
defaultIndex = 4;
|
|
|
|
defaultIndex = 4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//如果不是故障
|
|
|
|
//如果不是故障
|
|
|
|
if (_almtValue == false && _almdValue == false)
|
|
|
|
if (_almtValue == false && _almdValue == false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (_zltValue && _zldValue == false)
|
|
|
|
|
|
|
|
|
|
|
|
if (_zltValue && _zldValue)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
defaultIndex = 2;
|
|
|
|
defaultIndex = 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (_zltValue == false && _zldValue)
|
|
|
|
if (_zltValue == false && _zldValue)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
defaultIndex = 1;
|
|
|
|
defaultIndex = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//如果都是假 就变成默认值 可能没有数据
|
|
|
|
//如果都是假 就变成默认值 可能没有数据
|
|
|
|
if (_zltValue == false && _zldValue == false)
|
|
|
|
if (_zltValue == false && _zldValue == false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
defaultIndex = 0;
|
|
|
|
defaultIndex = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//如果都是真 就是双通
|
|
|
|
//如果都是真 就是双通
|
|
|
|
if (_zltValue && _zldValue)
|
|
|
|
if (_zltValue && _zldValue)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
defaultIndex = 6;
|
|
|
|
defaultIndex = 6;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -127,8 +118,11 @@ namespace Mesnac.Controls.ChemicalWeighing
|
|
|
|
|
|
|
|
|
|
|
|
private void R()
|
|
|
|
private void R()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ReloadStream();
|
|
|
|
lock (lockobj)
|
|
|
|
Reload();
|
|
|
|
{
|
|
|
|
|
|
|
|
ReloadStream();
|
|
|
|
|
|
|
|
Reload();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -145,8 +139,10 @@ namespace Mesnac.Controls.ChemicalWeighing
|
|
|
|
get => _zltValue;
|
|
|
|
get => _zltValue;
|
|
|
|
set
|
|
|
|
set
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_zltValue = value;
|
|
|
|
if(_zltValue != value) {
|
|
|
|
R();
|
|
|
|
_zltValue = value;
|
|
|
|
|
|
|
|
R();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -163,8 +159,10 @@ namespace Mesnac.Controls.ChemicalWeighing
|
|
|
|
get => _zldValue;
|
|
|
|
get => _zldValue;
|
|
|
|
set
|
|
|
|
set
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_zldValue = value;
|
|
|
|
if( _zldValue != value ) {
|
|
|
|
R();
|
|
|
|
_zldValue = value;
|
|
|
|
|
|
|
|
R();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -181,8 +179,11 @@ namespace Mesnac.Controls.ChemicalWeighing
|
|
|
|
get => _almtValue;
|
|
|
|
get => _almtValue;
|
|
|
|
set
|
|
|
|
set
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_almtValue = value;
|
|
|
|
if( _almtValue != value ) {
|
|
|
|
R();
|
|
|
|
_almtValue = value;
|
|
|
|
|
|
|
|
R();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -199,8 +200,10 @@ namespace Mesnac.Controls.ChemicalWeighing
|
|
|
|
get => _almdValue;
|
|
|
|
get => _almdValue;
|
|
|
|
set
|
|
|
|
set
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_almdValue = value;
|
|
|
|
if( _almdValue != value ) {
|
|
|
|
R();
|
|
|
|
_almdValue = value;
|
|
|
|
|
|
|
|
R();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|