|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
using DataBlockHelper.DBHelpers;
|
|
|
|
|
|
|
|
|
|
using DevExpress.XtraEditors.Filtering.Templates;
|
|
|
|
|
|
|
|
|
|
using ICSharpCode.Core;
|
|
|
|
|
using Mesnac.Action.Base;
|
|
|
|
|
|
|
|
|
|
using Mesnac.Action.ChemicalWeighing.LjReport.OpenDoor;
|
|
|
|
|
using Mesnac.Action.ChemicalWeighing.MinAn;
|
|
|
|
|
using Mesnac.Action.ChemicalWeighing.RgvPlc;
|
|
|
|
|
using Mesnac.Basic;
|
|
|
|
|
using Mesnac.Codd.Session;
|
|
|
|
|
using Mesnac.Controls.Base;
|
|
|
|
|
using Mesnac.Controls.ChemicalWeighing;
|
|
|
|
|
using Mesnac.Controls.Default;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Mesnac.Action.ChemicalWeighing.Test
|
|
|
|
|
{
|
|
|
|
|
public class TestAction : DatabaseAction, IAction
|
|
|
|
|
{
|
|
|
|
|
HslLanternAlarm lanternAlarm;
|
|
|
|
|
MCButton mCButton;
|
|
|
|
|
|
|
|
|
|
HslSwitch hslSwitch;
|
|
|
|
|
|
|
|
|
|
public void timer1EventProcessor(object source, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
DB2105Helper db2105Helper = new DB2105Helper();
|
|
|
|
|
var lis = db2105Helper.ReadReadyG1;
|
|
|
|
|
lis = db2105Helper.ReadReadyG2;
|
|
|
|
|
lis = db2105Helper.ReadReadyG3;
|
|
|
|
|
lis = db2105Helper.ReadReadyG4;
|
|
|
|
|
lis = db2105Helper.ReadReadyG5;
|
|
|
|
|
lis = db2105Helper.ReadReadyG6;
|
|
|
|
|
lis = db2105Helper.ReadReadyG7;
|
|
|
|
|
lis = db2105Helper.ReadReadyG8;
|
|
|
|
|
var liss = db2105Helper.ReadReadyM1;
|
|
|
|
|
liss = db2105Helper.ReadReadyM2;
|
|
|
|
|
liss = db2105Helper.ReadReadyM3;
|
|
|
|
|
liss = db2105Helper.ReadReadyM4;
|
|
|
|
|
liss = db2105Helper.ReadReadyM5;
|
|
|
|
|
liss = db2105Helper.ReadReadyM6;
|
|
|
|
|
liss = db2105Helper.ReadReadyM7;
|
|
|
|
|
liss = db2105Helper.ReadReadyM8;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var yw= Db3000Helper.ReadModel();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Run(RuntimeParameter runtime)
|
|
|
|
|
{
|
|
|
|
|
base.RunIni(runtime); //必须调用
|
|
|
|
|
var allDb=GetAllControls();
|
|
|
|
|
mCButton = allDb.FirstOrDefault(x => x.Name == "MCButton1") as MCButton;
|
|
|
|
|
|
|
|
|
|
mCButton.Click += new EventHandler(timer1EventProcessor);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hslSwitch = allDb.FirstOrDefault(x => x.Name == "HsSwitch1") as HslSwitch;
|
|
|
|
|
|
|
|
|
|
hslSwitch.OnSwitchChanged += HslSwitch_OnSwitchChanged;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//MCButton1
|
|
|
|
|
|
|
|
|
|
//OpenDoorService
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void HslSwitch_OnSwitchChanged(object arg1, bool arg2)
|
|
|
|
|
{
|
|
|
|
|
HslSwitch hsl= (HslSwitch)arg1;
|
|
|
|
|
hslSwitch.Text = "测试:"+arg2;
|
|
|
|
|
bool b = arg2;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|