|
|
|
@ -27,6 +27,7 @@ using Mesnac.Action.ChemicalWeighing.MinAn;
|
|
|
|
|
using HslCommunication.Core;
|
|
|
|
|
using Mesnac.Action.ChemicalWeighing.FreeDb;
|
|
|
|
|
using Mesnac.Action.ChemicalWeighing.ManualControl;
|
|
|
|
|
using DevExpress.Pdf.Native;
|
|
|
|
|
|
|
|
|
|
namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
{
|
|
|
|
@ -285,7 +286,7 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
|
|
|
|
|
private void RGVRecord(List<RGVEntity> RGVEs, List<bool> Mixes)
|
|
|
|
|
{
|
|
|
|
|
if(RGVEs.Count == 0 || Mixes.Count == 0)
|
|
|
|
|
if (RGVEs.Count == 0 || Mixes.Count == 0)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -360,26 +361,32 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
LabelE.WetWait1.Text = MixWaitTime(record);
|
|
|
|
|
LabelE.WetWait1.ForeColor = MixTimeBackColor(record);
|
|
|
|
|
LabelE.RGVWait1.Text = "0";
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
LabelE.WetWait2.Text = MixWaitTime(record);
|
|
|
|
|
LabelE.WetWait2.ForeColor = MixTimeBackColor(record);
|
|
|
|
|
LabelE.RGVWait2.Text = "0";
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
LabelE.WetWait3.Text = MixWaitTime(record);
|
|
|
|
|
LabelE.WetWait3.ForeColor = MixTimeBackColor(record);
|
|
|
|
|
LabelE.RGVWait3.Text = "0";
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
LabelE.WetWait4.Text = MixWaitTime(record);
|
|
|
|
|
LabelE.WetWait4.ForeColor = MixTimeBackColor(record);
|
|
|
|
|
LabelE.RGVWait4.Text = "0";
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
LabelE.WetWait5.Text = MixWaitTime(record);
|
|
|
|
|
LabelE.WetWait5.ForeColor = MixTimeBackColor(record);
|
|
|
|
|
LabelE.RGVWait5.Text = "0";
|
|
|
|
|
break;
|
|
|
|
|
case 6:
|
|
|
|
|
LabelE.WetWait6.Text = MixWaitTime(record);
|
|
|
|
|
LabelE.WetWait6.ForeColor = MixTimeBackColor(record);
|
|
|
|
|
LabelE.RGVWait6.Text = "0";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
@ -392,21 +399,27 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
LabelE.RGVWait1.Text = RGVWaitTime(record);
|
|
|
|
|
LabelE.WetWait1.ForeColor = RGVTimeBackColor(record);
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
LabelE.RGVWait2.Text = RGVWaitTime(record);
|
|
|
|
|
LabelE.WetWait2.ForeColor = RGVTimeBackColor(record);
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
LabelE.RGVWait3.Text = RGVWaitTime(record);
|
|
|
|
|
LabelE.WetWait3.ForeColor = RGVTimeBackColor(record);
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
LabelE.RGVWait4.Text = RGVWaitTime(record);
|
|
|
|
|
LabelE.WetWait4.ForeColor = RGVTimeBackColor(record);
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
LabelE.RGVWait5.Text = RGVWaitTime(record);
|
|
|
|
|
LabelE.WetWait5.ForeColor = RGVTimeBackColor(record);
|
|
|
|
|
break;
|
|
|
|
|
case 6:
|
|
|
|
|
LabelE.RGVWait6.Text = RGVWaitTime(record);
|
|
|
|
|
LabelE.WetWait6.ForeColor = RGVTimeBackColor(record);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
@ -428,6 +441,35 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
return SecondToMinute(t);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Color RGVTimeBackColor(Lj_RGVTimeRecord record)
|
|
|
|
|
{
|
|
|
|
|
int t = Convert.ToInt32((DateTime.Now - record.RGVReachTime).TotalSeconds);
|
|
|
|
|
return SelectColor(t);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Color MixTimeBackColor(Lj_RGVTimeRecord record)
|
|
|
|
|
{
|
|
|
|
|
int t = Convert.ToInt32((DateTime.Now - record.MixReadyStartTime).TotalSeconds);
|
|
|
|
|
return SelectColor(t);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Color SelectColor(int t)
|
|
|
|
|
{
|
|
|
|
|
int m = t / 60;
|
|
|
|
|
if (m >= 10 && m < 20)
|
|
|
|
|
{
|
|
|
|
|
return Color.Yellow;
|
|
|
|
|
}
|
|
|
|
|
else if (m >= 20)
|
|
|
|
|
{
|
|
|
|
|
return Color.Red;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return Color.White;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string SecondToMinute(int t)
|
|
|
|
|
{
|
|
|
|
|
int m = t / 60;
|
|
|
|
|