using Mesnac.Action.ChemicalWeighing.AutoControl.Entity; using Mesnac.Action.ChemicalWeighing.Util; using Mesnac.Controls.Base; using Mesnac.Controls.ChemicalWeighing; using Mesnac.Controls.Default; using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Mesnac.Action.ChemicalWeighing.AutoControl { public class ControlsHelper : ControlsImprot { /// /// 单选选择 /// /// 返回单选的产线号 如果未选择返回0 public static int SingleSelect(MCRadioButtonEntity RadioE) { int no = 0; if (Convert.ToBoolean(RadioE.Line1.MCValue)) { no = 1; } else if (Convert.ToBoolean(RadioE.Line2.MCValue)) { no = 2; } else if (Convert.ToBoolean(RadioE.Line3.MCValue)) { no = 3; } else if (Convert.ToBoolean(RadioE.Line4.MCValue)) { no = 4; } else if (Convert.ToBoolean(RadioE.Line5.MCValue)) { no = 5; } else if (Convert.ToBoolean(RadioE.Line6.MCValue)) { no = 6; } else if (Convert.ToBoolean(RadioE.Line7.MCValue)) { no = 7; } else if (Convert.ToBoolean(RadioE.Line8.MCValue)) { no = 8; } return no; } /// /// 单混机单选选择 /// /// public static int DrySelect(MCRadioButtonEntity RadioE) { if (Convert.ToBoolean(RadioE.Dry1.MCValue) == true) { return 1; } else if (Convert.ToBoolean(RadioE.Dry2.MCValue) == true) { return 2; } else if (Convert.ToBoolean(RadioE.Dry3.MCValue) == true) { return 3; } else if (Convert.ToBoolean(RadioE.Dry4.MCValue) == true) { return 4; } else { return 0; } } } }