using Bro.Common.Helper;
|
using System;
|
using System.Collections.Generic;
|
using System.Drawing;
|
using System.Reflection;
|
using static Bro.Common.Helper.EnumHelper;
|
|
namespace Bro.Common.Interface
|
{
|
public interface IProcess : ILogger, IExceptionHandler
|
{
|
#region 属性
|
IProcessConfig IConfig { get; set; }
|
|
List<ProcessMethodAttribute> ProcessMethodCollection { get; set; }
|
Dictionary<string, MethodInfo> ProcessMethodDict { get; set; }
|
List<IDevice> DeviceCollection { get; set; }
|
|
string ProductionCode { get; set; }
|
DeviceState ProcessState { get; set; }
|
|
#endregion
|
|
#region 方法
|
/// <summary>
|
/// 打开
|
/// </summary>
|
void Open(bool isServiceMode = false);
|
|
void Open();
|
|
/// <summary>
|
/// 关闭
|
/// </summary>
|
void Close();
|
|
/// <summary>
|
/// 初始化Process
|
/// </summary>
|
void InitialProcess(string configPath);
|
|
void InitialProcess();
|
|
void InitialProcessMethods();
|
#endregion
|
|
#region 事件
|
///// <summary>
|
///// 图像输出事件
|
///// </summary>
|
//event Action<string, Bitmap, string> OnBitmapOutput;
|
|
event Action<DeviceState> OnProcessStateChanged;
|
event Action<string> OnAlarmUpdate;
|
|
Action<DateTime, int> OnUpdateResult { get; set; }
|
Action<float> OnUpdateCT { get; set; }
|
#endregion
|
|
#region 数据库操作
|
void SaveProcessConfig(IProcessConfig config);
|
void CreateNewConfig(IProcessConfig config, string newProductionCode);
|
#endregion
|
}
|
}
|