|
|
|
@ -114,10 +114,10 @@ namespace GuideScreen.UI
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
ErrorDialog("获取点位错误:"+ ex.Message);
|
|
|
|
|
ErrorDialog("获取点位错误:" + ex.Message);
|
|
|
|
|
ex.WriteErrorLog();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
@ -138,26 +138,26 @@ namespace GuideScreen.UI
|
|
|
|
|
case 1:
|
|
|
|
|
if (use)
|
|
|
|
|
{
|
|
|
|
|
pBoxManPit1.Image = Resources.pitFull;
|
|
|
|
|
pBoxManPitOne.Image = Resources.man;
|
|
|
|
|
toilets["男厕1"]++;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pBoxManPit1.Image = Resources.pitEmpty;
|
|
|
|
|
pBoxManPitOne.Image = Resources.man_empty;
|
|
|
|
|
}
|
|
|
|
|
pBoxManPit1.Image.RotateFlip(RotateFlipType.Rotate180FlipNone);
|
|
|
|
|
//pBoxManPit1.Image.RotateFlip(RotateFlipType.Rotate180FlipNone);
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
if (use)
|
|
|
|
|
{
|
|
|
|
|
pBoxManPit2.Image = Resources.pitFull;
|
|
|
|
|
pBoxManPitTwo.Image = Resources.man;
|
|
|
|
|
toilets["男厕2"]++;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pBoxManPit2.Image = Resources.pitEmpty;
|
|
|
|
|
pBoxManPitTwo.Image = Resources.man_empty;
|
|
|
|
|
}
|
|
|
|
|
pBoxManPit2.Image.RotateFlip(RotateFlipType.Rotate180FlipNone);
|
|
|
|
|
//pBoxManPit2.Image.RotateFlip(RotateFlipType.Rotate180FlipNone);
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
if (use)
|
|
|
|
@ -206,34 +206,34 @@ namespace GuideScreen.UI
|
|
|
|
|
case 1:
|
|
|
|
|
if (use)
|
|
|
|
|
{
|
|
|
|
|
pBoxPitWoman1.Image = Resources.pitFull;
|
|
|
|
|
pBoxPitWomanOne.Image = Resources.woman;
|
|
|
|
|
toilets["女厕1"]++;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pBoxPitWoman1.Image = Resources.pitEmpty;
|
|
|
|
|
pBoxPitWomanOne.Image = Resources.woman_empty;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
if (use)
|
|
|
|
|
{
|
|
|
|
|
pBoxPitWoman2.Image = Resources.pitFull;
|
|
|
|
|
pBoxPitWomanTwo.Image = Resources.woman;
|
|
|
|
|
toilets["女厕2"]++;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pBoxPitWoman2.Image = Resources.pitEmpty;
|
|
|
|
|
pBoxPitWomanTwo.Image = Resources.woman_empty;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
if (use)
|
|
|
|
|
{
|
|
|
|
|
pBoxPitWoman3.Image = Resources.pitFull;
|
|
|
|
|
pBoxPitWomanThree.Image = Resources.woman;
|
|
|
|
|
toilets["女厕3"]++;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pBoxPitWoman3.Image = Resources.pitEmpty;
|
|
|
|
|
pBoxPitWomanThree.Image = Resources.woman_empty;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
@ -460,8 +460,8 @@ namespace GuideScreen.UI
|
|
|
|
|
lblElectricityMeter.Text = Convert.ToInt32(e.GetValue<float>()).ToString();
|
|
|
|
|
//今日电量
|
|
|
|
|
var str = Convert.ToInt32(plcController.GetTodayElectricityConsumption(e.GetValue<float>())).ToString();
|
|
|
|
|
str= str.Aggregate(string.Empty, (c, i) => c + i + " ");
|
|
|
|
|
lblElectricQuantity.Text = $"今日耗电量 {str} 千瓦时";
|
|
|
|
|
str = str.Aggregate(string.Empty, (c, i) => c + i + " ");
|
|
|
|
|
lblElectricQuantity.Text = $"今日耗电量 {str} 千瓦时";
|
|
|
|
|
break;
|
|
|
|
|
//用水量
|
|
|
|
|
|
|
|
|
@ -471,22 +471,22 @@ namespace GuideScreen.UI
|
|
|
|
|
case PLCPointNameByEnvironmentalMonitoring.Temperature:
|
|
|
|
|
var temperature = e.GetValue<float>();
|
|
|
|
|
lblEnvirTempl.Text = Math.Round(temperature, 1).ToString() + " °C";
|
|
|
|
|
processEnvirTempl.Value=Convert.ToInt32(temperature);
|
|
|
|
|
processEnvirTempl.Value = Convert.ToInt32(temperature);
|
|
|
|
|
break;
|
|
|
|
|
case PLCPointNameByEnvironmentalMonitoring.Humidity:
|
|
|
|
|
var envirHumidity = e.GetValue<float>();
|
|
|
|
|
lblEnvirHumidity.Text = Math.Round(envirHumidity, 1).ToString() + " %";
|
|
|
|
|
processLineEnvirHumidity.Value= Convert.ToInt32(envirHumidity);
|
|
|
|
|
processLineEnvirHumidity.Value = Convert.ToInt32(envirHumidity);
|
|
|
|
|
break;
|
|
|
|
|
case PLCPointNameByEnvironmentalMonitoring.NH3:
|
|
|
|
|
var enviHydrogenSulfide = e.GetValue<float>();
|
|
|
|
|
lblEnviHydrogenSulfide.Text = Math.Round(enviHydrogenSulfide, 2).ToString() + " PPM";
|
|
|
|
|
processEnviHydrogenSulfide.Value=Convert.ToInt32(enviHydrogenSulfide);
|
|
|
|
|
processEnviHydrogenSulfide.Value = Convert.ToInt32(enviHydrogenSulfide);
|
|
|
|
|
break;
|
|
|
|
|
case PLCPointNameByEnvironmentalMonitoring.H2S:
|
|
|
|
|
var ammoniaGas = e.GetValue<float>();
|
|
|
|
|
lblAmmoniaGas.Text = Math.Round(ammoniaGas, 1).ToString() + " PPM";
|
|
|
|
|
processEnviAmmoniaGas.Value= Convert.ToInt32(ammoniaGas);
|
|
|
|
|
processEnviAmmoniaGas.Value = Convert.ToInt32(ammoniaGas);
|
|
|
|
|
break;
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -499,13 +499,13 @@ namespace GuideScreen.UI
|
|
|
|
|
break;
|
|
|
|
|
//运行电流1
|
|
|
|
|
case PLCPointNameByVacuumPumpingStation.RunningCurrent1:
|
|
|
|
|
var runningCurrent = e.GetValue<Int16>();
|
|
|
|
|
analogMeterElectricity1.Value= runningCurrent;
|
|
|
|
|
var runningCurrent = e.GetValue<Int16>();
|
|
|
|
|
analogMeterElectricity1.Value = runningCurrent;
|
|
|
|
|
lblElectricity1.Text = $"{runningCurrent} A";
|
|
|
|
|
break;
|
|
|
|
|
//运行频率1
|
|
|
|
|
case PLCPointNameByVacuumPumpingStation.RunningFrequency1:
|
|
|
|
|
var runningFrequency= e.GetValue<Int16>();
|
|
|
|
|
var runningFrequency = e.GetValue<Int16>();
|
|
|
|
|
analogMeterFrequency1.Value = runningFrequency;
|
|
|
|
|
lblFrequency1.Text = $"{runningFrequency} HZ";
|
|
|
|
|
break;
|
|
|
|
@ -556,7 +556,7 @@ namespace GuideScreen.UI
|
|
|
|
|
//1号泵运行时间
|
|
|
|
|
case PLCPointNameByVacuumPumpingStation.PumpAccumulatedStartTime1:
|
|
|
|
|
var pumpAccumulatedStartTime1 = e.GetValue<Int16>();
|
|
|
|
|
LedDisplayOneTime.Text = pumpAccumulatedStartTime1.ToString("D5")+"H";
|
|
|
|
|
LedDisplayOneTime.Text = pumpAccumulatedStartTime1.ToString("D5") + "H";
|
|
|
|
|
break;
|
|
|
|
|
//2号泵运行时间
|
|
|
|
|
case PLCPointNameByVacuumPumpingStation.PumpAccumulatedStartTime2:
|
|
|
|
@ -650,7 +650,7 @@ namespace GuideScreen.UI
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 模拟今日用水量
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void SetDayWarter()
|
|
|
|
|
private void SetDayWarter()
|
|
|
|
|
{
|
|
|
|
|
var values = toilets.Values.Sum();
|
|
|
|
|
if (values == 0)
|
|
|
|
@ -675,7 +675,8 @@ namespace GuideScreen.UI
|
|
|
|
|
//星期
|
|
|
|
|
lblweek.Text = DateTime.Today.ToString("dddd", new System.Globalization.CultureInfo("zh-CN"));
|
|
|
|
|
//零点以后更新的数据
|
|
|
|
|
if (dateTime.ToString("HH:mm:ss") == zeroTime) {
|
|
|
|
|
if (dateTime.ToString("HH:mm:ss") == zeroTime)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
//更新厕位使用情况
|
|
|
|
|
toilets = plcController.ToiletPositionRecordTotalByToday();
|
|
|
|
@ -731,6 +732,5 @@ namespace GuideScreen.UI
|
|
|
|
|
plcController.Stop();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|