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/AutoControl/InitAction.cs

37 lines
1.2 KiB
C#

using Mesnac.Action.Base;
using Mesnac.Action.ChemicalWeighing.AutoControl.DB;
using Mesnac.Action.ChemicalWeighing.AutoControl.Entity;
using Mesnac.Controls.Default;
using Microsoft.Office.Interop.Excel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using IAction = Mesnac.Action.Base.IAction;
namespace Mesnac.Action.ChemicalWeighing.AutoControl
{
public class InitAction : ChemicalWeighingAction, IAction
{
GelerWeterControlsEntity ControlsEntity = new GelerWeterControlsEntity();
private List<Control> McControls;
public void Run(RuntimeParameter runtime)
{
base.RunIni(runtime); //必须要调用
McControls = GetAllControls();
ControlsEntity.ChooseMaterial1 = McControls.First(x => x.Name == "ChooseMaterial1") as MCCombobox;
ControlsEntity.ChooseMaterial2 = McControls.First(x => x.Name == "ChooseMaterial2") as MCCombobox;
ControlsEntity.ChooseMaterial1.DataSource = StockMaterrialDbHelp.GetSiloMaterrial();
ControlsEntity.ChooseMaterial2.DataSource = StockMaterrialDbHelp.GetSiloMaterrial();
}
}
}