|
|
|
|
using DataBlockHelper.DBHelpers;
|
|
|
|
|
using DevExpress.Utils.Taskbar;
|
|
|
|
|
using ICSharpCode.Core;
|
|
|
|
|
using Mesnac.Action.Base;
|
|
|
|
|
using Mesnac.Action.ChemicalWeighing.LjDeliverPressureSetting.Entity;
|
|
|
|
|
using Mesnac.Controls.Default;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
namespace Mesnac.Action.ChemicalWeighing.LjDeliverPressureSetting
|
|
|
|
|
{
|
|
|
|
|
public class PressureSettingButtonAction : ChemicalWeighingAction, IAction
|
|
|
|
|
{
|
|
|
|
|
MCButtonEntity ButtonE = new MCButtonEntity();
|
|
|
|
|
MCTextboxEntity BoxE = new MCTextboxEntity();
|
|
|
|
|
|
|
|
|
|
List<Control> Controls;
|
|
|
|
|
|
|
|
|
|
public void Run(RuntimeParameter runtime)
|
|
|
|
|
{
|
|
|
|
|
base.RunIni(runtime);
|
|
|
|
|
|
|
|
|
|
Controls = GetAllControls();
|
|
|
|
|
|
|
|
|
|
SetAllControus();
|
|
|
|
|
|
|
|
|
|
ButtonAction(runtime);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SetAllControus()
|
|
|
|
|
{
|
|
|
|
|
ControlsHelper.ControlImport<MCButton>(ButtonE, Controls);
|
|
|
|
|
ControlsHelper.ControlImport<MCTextBox>(BoxE, Controls);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ButtonAction(RuntimeParameter runtime)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ButtonE.Download == runtime.Sender)
|
|
|
|
|
{
|
|
|
|
|
if(MessageBox.Show("确定要下传数据到PLC?", "下传数据确认", MessageBoxButtons.YesNo) == DialogResult.No)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PlcDownload.PressureSettingDownload(BoxE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|