You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
290 lines
8.0 KiB
290 lines
8.0 KiB
5 months ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Text;
|
||
|
using DBFactory;
|
||
|
namespace CommonLib
|
||
|
{
|
||
|
using System;
|
||
|
using System.Data;
|
||
|
using System.ComponentModel;
|
||
|
/// <summary>
|
||
|
/// 20110405�Զ���������ͼ�仯�¼�
|
||
|
/// </summary>
|
||
|
public class CDataChangeEventArgs : EventArgs
|
||
|
{
|
||
|
#region ���ݸ����¼�
|
||
|
private readonly DataView _manDataSource;
|
||
|
|
||
|
public DataView ManDataSource
|
||
|
{
|
||
|
get { return _manDataSource; }
|
||
|
}
|
||
|
|
||
|
private readonly DataView _monDataSource;
|
||
|
|
||
|
public DataView MonDataSource
|
||
|
{
|
||
|
get { return _monDataSource; }
|
||
|
}
|
||
|
|
||
|
public CDataChangeEventArgs(DataView manDataSource,DataView monDataSource)
|
||
|
{
|
||
|
this._manDataSource = manDataSource;
|
||
|
this._monDataSource = monDataSource;
|
||
|
}
|
||
|
#endregion
|
||
|
|
||
|
}
|
||
|
public class CDeviceStateChangeEventArgs : EventArgs
|
||
|
{
|
||
|
#region �豸״̬���ݸ����¼�
|
||
|
Model.MDevice _devinfo;
|
||
|
|
||
|
public Model.MDevice Devinfo
|
||
|
{
|
||
|
get { return _devinfo; }
|
||
|
set { _devinfo = value; }
|
||
|
}
|
||
|
|
||
|
public CDeviceStateChangeEventArgs(Model.MDevice devinfo)
|
||
|
{
|
||
|
this._devinfo = devinfo;
|
||
|
}
|
||
|
#endregion
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
/// <summary>
|
||
|
/// 20110608�Զ����������ݿ��ı仯�¼���ִ��SQL���������ɣ�
|
||
|
/// </summary>
|
||
|
public class CUpdateDBChangeEventArgs : EventArgs
|
||
|
{
|
||
|
|
||
|
#region ���ݿ������¼���ִ��SQL���������ɣ�
|
||
|
private readonly int _taskindex=-1;
|
||
|
|
||
|
public int Taskindex
|
||
|
{
|
||
|
get { return _taskindex; }
|
||
|
}
|
||
|
private readonly int _deviceindex = -1;
|
||
|
|
||
|
public int Deviceindex
|
||
|
{
|
||
|
get { return _deviceindex; }
|
||
|
}
|
||
|
|
||
|
private readonly int _taskstate = -1;
|
||
|
/// <summary>
|
||
|
/// ����ִ��״̬��0���У�1���У�2�������� ������30����
|
||
|
/// </summary>
|
||
|
public int Taskstate
|
||
|
{
|
||
|
get { return _taskstate; }
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// ���翪�ر����ֵ��ֽ�ֵ
|
||
|
/// </summary>
|
||
|
private readonly byte[] _splitbyteValue ;
|
||
|
/// <summary>
|
||
|
/// ����
|
||
|
/// </summary>
|
||
|
public byte[] SplitbyteValue
|
||
|
{
|
||
|
get { return _splitbyteValue; }
|
||
|
}
|
||
|
private readonly DBFactory.DBOperator _dbo;
|
||
|
|
||
|
public DBFactory.DBOperator Dbo
|
||
|
{
|
||
|
get { return _dbo; }
|
||
|
}
|
||
|
|
||
|
private readonly StringBuilder _exeSQL = new StringBuilder();
|
||
|
private readonly byte[] _devicestates;
|
||
|
public byte[] Devicestates
|
||
|
{
|
||
|
get { return _devicestates; }
|
||
|
}
|
||
|
public StringBuilder ExeSQL
|
||
|
{
|
||
|
get { return _exeSQL; }
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
public CUpdateDBChangeEventArgs(DBFactory.DBOperator dbo, StringBuilder exeSQL)
|
||
|
{
|
||
|
_dbo = dbo;
|
||
|
_exeSQL = exeSQL;
|
||
|
}
|
||
|
/// <summary>
|
||
|
///
|
||
|
/// </summary>
|
||
|
/// <param name="deviceindex">�豸����</param>
|
||
|
/// <param name="taskindex">�豸ָ������</param>
|
||
|
/// <param name="taskstate">����ִ��״̬��0���У�1���У�2�������� ������30����</param>
|
||
|
public CUpdateDBChangeEventArgs(int deviceindex, int taskindex, int taskstate)
|
||
|
{
|
||
|
_deviceindex = deviceindex;
|
||
|
_taskindex = taskindex;
|
||
|
_taskstate = taskindex;
|
||
|
}
|
||
|
/// <summary>
|
||
|
///
|
||
|
/// </summary>
|
||
|
/// <param name="deviceindex">�豸����</param>
|
||
|
/// <param name="taskindex">�豸ָ������</param>
|
||
|
/// <param name="taskstate">����ִ��״̬��0���У�1���У�2�������� ������30����</param>
|
||
|
/// <param name="xCoor">X����</param>
|
||
|
/// <param name="yCoor">Y����</param>
|
||
|
public CUpdateDBChangeEventArgs(int deviceindex,byte[] splitbyteValue,byte[] devicestates)
|
||
|
{
|
||
|
|
||
|
_deviceindex = deviceindex;
|
||
|
_splitbyteValue = splitbyteValue;
|
||
|
_devicestates = devicestates;
|
||
|
}
|
||
|
#endregion
|
||
|
}
|
||
|
public class CStringInfoEventArgs : EventArgs
|
||
|
{
|
||
|
|
||
|
private int _deviceindex;
|
||
|
|
||
|
public int Deviceindex
|
||
|
{
|
||
|
get { return _deviceindex; }
|
||
|
set { _deviceindex = value; }
|
||
|
}
|
||
|
private string _barcode;
|
||
|
|
||
|
public string Barcode
|
||
|
{
|
||
|
get { return _barcode; }
|
||
|
set { _barcode = value; }
|
||
|
}
|
||
|
private int _confirm;
|
||
|
|
||
|
public int Confirm
|
||
|
{
|
||
|
get { return _confirm; }
|
||
|
set { _confirm = value; }
|
||
|
}
|
||
|
public CStringInfoEventArgs(int deviceindex, string barcode, int confirm)
|
||
|
{
|
||
|
_deviceindex = deviceindex;
|
||
|
_barcode = barcode;
|
||
|
_confirm = confirm;
|
||
|
}
|
||
|
}
|
||
|
public class CWriteDarkCasketEventArgs : EventArgs
|
||
|
{//20121108
|
||
|
private string _wrnamespace;
|
||
|
|
||
|
public string Wrnamespace
|
||
|
{
|
||
|
get { return _wrnamespace; }
|
||
|
set { _wrnamespace = value; }
|
||
|
}
|
||
|
private string _wrmethod;
|
||
|
|
||
|
public string Wrmethod
|
||
|
{
|
||
|
get { return _wrmethod; }
|
||
|
set { _wrmethod = value; }
|
||
|
}
|
||
|
private string _wrkeyRemark;
|
||
|
|
||
|
public string WrkeyRemark
|
||
|
{
|
||
|
get { return _wrkeyRemark; }
|
||
|
set { _wrkeyRemark = value; }
|
||
|
}
|
||
|
private string _wrdevice;
|
||
|
|
||
|
public string Wrdevice
|
||
|
{
|
||
|
get { return _wrdevice; }
|
||
|
set { _wrdevice = value; }
|
||
|
}
|
||
|
private int[] _wrinfo;
|
||
|
|
||
|
public int[] Wrinfo
|
||
|
{
|
||
|
get { return _wrinfo; }
|
||
|
set { _wrinfo = value; }
|
||
|
}
|
||
|
public CWriteDarkCasketEventArgs(string wrnamespace, string wrmethod,string wrdevice, string wrkeyRemark, int[] wrinfo)
|
||
|
{
|
||
|
_wrnamespace = wrnamespace;
|
||
|
_wrmethod = wrmethod;
|
||
|
_wrdevice = wrdevice;
|
||
|
_wrkeyRemark = wrkeyRemark;
|
||
|
_wrinfo = wrinfo;
|
||
|
}
|
||
|
|
||
|
public CWriteDarkCasketEventArgs(string wrnamespace, string wrmethod, string wrdevice, string wrkeyRemark, byte[] wrinfo)
|
||
|
{
|
||
|
_wrnamespace = wrnamespace;
|
||
|
_wrmethod = wrmethod;
|
||
|
_wrdevice = wrdevice;
|
||
|
_wrkeyRemark = wrkeyRemark;
|
||
|
_wrinfo = new int[wrinfo.Length];
|
||
|
Array.Copy(wrinfo, _wrinfo, wrinfo.Length);
|
||
|
}
|
||
|
}
|
||
|
public class CSendDeviceOrderEventArgs : EventArgs
|
||
|
{//20121108
|
||
|
private int _deviceindex;
|
||
|
|
||
|
public int Deviceindex
|
||
|
{
|
||
|
get { return _deviceindex; }
|
||
|
set { _deviceindex = value; }
|
||
|
}
|
||
|
private string _remoteIP;
|
||
|
|
||
|
public string RemoteIP
|
||
|
{
|
||
|
get { return _remoteIP; }
|
||
|
set { _remoteIP = value; }
|
||
|
}
|
||
|
private int _remotePort;
|
||
|
|
||
|
public int RemotePort
|
||
|
{
|
||
|
get { return _remotePort; }
|
||
|
set { _remotePort = value; }
|
||
|
}
|
||
|
|
||
|
private byte[] _sendrinfo;
|
||
|
|
||
|
public byte[] Sendrinfo
|
||
|
{
|
||
|
get { return _sendrinfo; }
|
||
|
set { _sendrinfo = value; }
|
||
|
}
|
||
|
public CSendDeviceOrderEventArgs(int deviceindex, string remoteIP, int remotePort, byte[] sendrinfo)
|
||
|
{
|
||
|
_deviceindex = deviceindex;
|
||
|
_remoteIP = remoteIP;
|
||
|
_remotePort = remotePort;
|
||
|
_sendrinfo = sendrinfo;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
public delegate void CWriteDarkCasketEventHandler(object sender, CWriteDarkCasketEventArgs e);//20121108
|
||
|
public delegate void CSendDeviceOrderEventHandler(object sender, CSendDeviceOrderEventArgs e);//20121108
|
||
|
public delegate void CDataSourceChangeEventHandler(object sender, CDataChangeEventArgs e);
|
||
|
public delegate void CUpdateDBEventHandler(object sender, CUpdateDBChangeEventArgs e);
|
||
|
public delegate void CDeviceStateChangeEventHandler(object sender,CDeviceStateChangeEventArgs e);
|
||
|
public delegate void CStringInfoEventHandler(object sender,CStringInfoEventArgs e);
|
||
|
|
||
|
//public delegate void MonitorHubToClientEventHandler(object sender, MonitorHubToClientEventArgs e);
|
||
|
}
|