using DataBlockHelper.DBHelpers; using DevExpress.DataAccess.Wizard.Presenters; using DevExpress.XtraEditors.Filtering.Templates; using Mesnac.Action.Base; using Mesnac.Action.ChemicalWeighing.AutoControl.DB; using Mesnac.Action.ChemicalWeighing.AutoControl.Entity; using Mesnac.Action.ChemicalWeighing.FreeDb; using Mesnac.Action.ChemicalWeighing.LjMixManager; using Mesnac.Action.ChemicalWeighing.LjPlanning; using Mesnac.Controls.Base; using Mesnac.Controls.Default; using System; using System.Collections.Generic; using System.Data; using System.Drawing; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Button = System.Windows.Forms.Button; using IAction = Mesnac.Action.Base.IAction; namespace Mesnac.Action.ChemicalWeighing.AutoControl { public class InitAction : ChemicalWeighingAction, IAction { private List McControls; Color backColor = Color.Transparent; MCTextBoxEntity TextE = new MCTextBoxEntity(); MCLabelEntity LabelE = new MCLabelEntity(); MCComboBoxEntity ComboE = new MCComboBoxEntity(); MCRadioButtonEntity RadioE = new MCRadioButtonEntity(); ButtonEntity buttonE = new ButtonEntity(); DB2105Helper dB2105Helper = new DB2105Helper(); DB2104Helper dB2104Helper = new DB2104Helper(); public Timer timer; public void Run(RuntimeParameter runtime) { base.RunIni(runtime); //必须要调用 McControls = GetAllControls(); ControlsHelper.ControlImport(TextE, McControls); // McControls.FirstOrDefault(x => x.Name == name) //TextE.HALeftOrRight = McControls.FirstOrDefault(x => x.Name == "HALeftOrRight") as MCCombobox; //TextE.HBLeftOrRight = McControls.FirstOrDefault(x => x.Name == "HBLeftOrRight") as MCCombobox; //TextE.CALeftOrRight = McControls.FirstOrDefault(x => x.Name == "CALeftOrRight") as MCCombobox; //TextE.CBLeftOrRight = McControls.FirstOrDefault(x => x.Name == "CBLeftOrRight") as MCCombobox; ControlsHelper.ControlImport(ComboE, McControls); ControlsHelper.ControlImport(LabelE, McControls); ControlsHelper.ControlImport(RadioE, McControls); ControlsHelper.ControlImport