|
|
|
@ -123,6 +123,7 @@ namespace Aucma.Core.Palletiz.ViewModels
|
|
|
|
|
string ip1 = Appsettings.app("Middleware", "Scanner1", "Ip");
|
|
|
|
|
bool flag1 = true;// MvCodeHelper.ConnectionStatus(ip1);
|
|
|
|
|
Scanner1State(flag1);
|
|
|
|
|
Scanner2State(flag1);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -419,13 +420,13 @@ namespace Aucma.Core.Palletiz.ViewModels
|
|
|
|
|
{
|
|
|
|
|
if (type)
|
|
|
|
|
{
|
|
|
|
|
Scanner1UIStatusWb = "扫码器1连接成功";
|
|
|
|
|
Scanner1UIStatusWb = "A区域扫码器";
|
|
|
|
|
Scanner1UIColor = "Green";
|
|
|
|
|
Scanner1UIIcon = "Assets/Images/Green.png";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Scanner1UIStatusWb = "扫码器1状态异常";
|
|
|
|
|
Scanner1UIStatusWb = "A区域扫码器";
|
|
|
|
|
Scanner1UIColor = "Red";
|
|
|
|
|
Scanner1UIIcon = "Assets/Images/Red.png";
|
|
|
|
|
}
|
|
|
|
@ -433,6 +434,67 @@ namespace Aucma.Core.Palletiz.ViewModels
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 扫码器2状态
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// UI 展示状态-文字
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string _scanner2UIStatusWb;
|
|
|
|
|
public string Scanner2UIStatusWb
|
|
|
|
|
{
|
|
|
|
|
//get { return plcUIStatusWb; }
|
|
|
|
|
//set { plcUIStatusWb = value; RaisePropertyChanged("PlcUIStatusWb"); }
|
|
|
|
|
get => _scanner2UIStatusWb;
|
|
|
|
|
set => SetProperty(ref _scanner2UIStatusWb, value);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// UI 展示状态-颜色
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string _scanner2UIColor;
|
|
|
|
|
public string Scanner2UIColor
|
|
|
|
|
{
|
|
|
|
|
//get { return plcUIColor; }
|
|
|
|
|
//set { plcUIColor = value; RaisePropertyChanged("PlcUIColor"); }
|
|
|
|
|
get => _scanner2UIColor;
|
|
|
|
|
set => SetProperty(ref _scanner2UIColor, value);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// UI 展示状态-图标
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string _scanner2UIIcon;
|
|
|
|
|
public string Scanner2UIIcon
|
|
|
|
|
{
|
|
|
|
|
//get { return plcUIIcon; }
|
|
|
|
|
//set { plcUIIcon = value; RaisePropertyChanged("plcUIIcon"); }
|
|
|
|
|
get => _scanner2UIIcon;
|
|
|
|
|
set => SetProperty(ref _scanner2UIIcon, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 扫码器1连接状态-true:连接成功;false:失败
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="type"></param>
|
|
|
|
|
public void Scanner2State(bool type)
|
|
|
|
|
{
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
if (type)
|
|
|
|
|
{
|
|
|
|
|
Scanner1UIStatusWb = "B区域扫码器";
|
|
|
|
|
Scanner1UIColor = "Green";
|
|
|
|
|
Scanner1UIIcon = "Assets/Images/Green.png";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Scanner1UIStatusWb = "B区域扫码器";
|
|
|
|
|
Scanner1UIColor = "Red";
|
|
|
|
|
Scanner1UIIcon = "Assets/Images/Red.png";
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 刷新时间
|
|
|
|
|
|
|
|
|
|
public string _currentDateTime;
|
|
|
|
|