You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lj_plc/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/ControlsHelper.cs

40 lines
1.1 KiB
C#

using Mesnac.Action.ChemicalWeighing.Report;
using Mesnac.Action.ChemicalWeighing.Util;
using Mesnac.Controls.Default;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
{
public class ControlsHelper : ControlsImprot
{
public static void ModeLogInsert(MCLabel old, bool now, int deviceNo, int deviceKind)
{
if (!ConvertStringToBool(old.MCValue.ToString()) && now)
{
LjLogControl.ManualLogControl("手动切换到自动", deviceNo, deviceKind);
}
else if (ConvertStringToBool(old.MCValue.ToString()) && !now)
{
LjLogControl.ManualLogControl("自动切换到手动", deviceNo, deviceKind);
}
}
public static bool ConvertStringToBool(string value)
{
if (value == "自动")
{
return true;
}
else if (value == "手动")
{
return false;
}
return false;
}
}
}