|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
public void timer1EventProcessor(object source, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
lanternAlarm.IsAlarm = !lanternAlarm.IsAlarm;
|
|
|
|
|
|
|
|
|
|
//DialogResult result =
|
|
|
|
|
// MessageBox.Show("正在上料", "温馨提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
|
|
//if (result == DialogResult.OK)
|
|
|
|
|
//{
|
|
|
|
|
// return;
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
string a = MinAnPlc.Heir1.ToString();
|
|
|
|
|
string b = MinAnPlc.Heir2.ToString();
|
|
|
|
|
string c = MinAnPlc.Heir3.ToString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var list = RgvPlcUtil.GetRGVAllError();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lanternAlarm = allDb.FirstOrDefault(x => x.Name == "HslLanternAlarm1") as HslLanternAlarm;
|
|
|
|
|
|
|
|
|
|
lanternAlarm.NormalColor = System.Drawing.Color.Green;
|
|
|
|
|
lanternAlarm.AlarmColor = System.Drawing.Color.Red;
|
|
|
|
|
lanternAlarm.IsAlarm = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//MCButton1
|
|
|
|
|
|
|
|
|
|
//OpenDoorService
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|