Commit 7f2cff8f 张东亮

存储机构-添加监控相机

1 个父辈 90ae9aa6
此文件类型无法预览
<?xml version="1.0"?>
<doc>
<assembly>
<name>Asa.CameraFactory</name>
</assembly>
<members>
</members>
</doc>
此文件类型无法预览
<?xml version="1.0"?>
<doc>
<assembly>
<name>Asa.HIK.IPCamera</name>
</assembly>
<members>
<member name="T:Asa.HIK.API">
<summary>
CHCNetSDK 的摘要说明。
</summary>
</member>
<member name="F:Asa.HIK.API.NET_DVR_IPADDR.sIpV4">
char[16]
</member>
<member name="F:Asa.HIK.API.NET_DVR_IPADDR.byRes">
BYTE[128]
</member>
<member name="F:Asa.HIK.API.NET_DVR_ATM_FRAMEFORMAT_V30.byRes1">
输入方式:0-网络监听、1网络协议、2-串口监听、3-串口协议
</member>
<member name="F:Asa.HIK.API.NET_VCA_POLYGON.dwPointNum">
DWORD->unsigned int
</member>
<member name="F:Asa.HIK.API.MAX_OVERLAP_ITEM_NUM">
抓拍机
</member>
<!-- Badly formed XML comment ignored for member "F:Asa.HIK.API.NET_DVR_DIAGNOSIS_UPLOAD.sMonitorIP" -->
<!-- Badly formed XML comment ignored for member "F:Asa.HIK.API.NET_DVR_DIAGNOSIS_UPLOAD.dwChanIndex" -->
<!-- Badly formed XML comment ignored for member "F:Asa.HIK.API.NET_DVR_DIAGNOSIS_UPLOAD.dwWidth" -->
<!-- Badly formed XML comment ignored for member "F:Asa.HIK.API.NET_DVR_DIAGNOSIS_UPLOAD.dwHeight" -->
<!-- Badly formed XML comment ignored for member "F:Asa.HIK.API.NET_DVR_DIAGNOSIS_UPLOAD.struCheckTime" -->
<!-- Badly formed XML comment ignored for member "F:Asa.HIK.API.NET_DVR_DIAGNOSIS_UPLOAD.byResult" -->
<member name="F:Asa.HIK.API.NET_DVR_DIAGNOSIS_UPLOAD.bySignalResult">
0-未检测 1-正常 2-异常 3-登录失败 4-取流异常
</member>
<!-- Badly formed XML comment ignored for member "F:Asa.HIK.API.NET_DVR_DIAGNOSIS_UPLOAD.byBlurResult" -->
<!-- Badly formed XML comment ignored for member "F:Asa.HIK.API.NET_DVR_DIAGNOSIS_UPLOAD.byLumaResult" -->
<!-- Badly formed XML comment ignored for member "F:Asa.HIK.API.NET_DVR_DIAGNOSIS_UPLOAD.byChromaResult" -->
<!-- Badly formed XML comment ignored for member "F:Asa.HIK.API.NET_DVR_DIAGNOSIS_UPLOAD.bySnowResult" -->
<!-- Badly formed XML comment ignored for member "F:Asa.HIK.API.NET_DVR_DIAGNOSIS_UPLOAD.byStreakResult" -->
<!-- Badly formed XML comment ignored for member "F:Asa.HIK.API.NET_DVR_DIAGNOSIS_UPLOAD.byFreezeResult" -->
<!-- Badly formed XML comment ignored for member "F:Asa.HIK.API.NET_DVR_DIAGNOSIS_UPLOAD.byPTZResult" -->
<!-- Badly formed XML comment ignored for member "F:Asa.HIK.API.NET_DVR_DIAGNOSIS_UPLOAD.byContrastResult" -->
<member name="T:Asa.HIK.IPCamera">
<summary>
网络监控摄像机
</summary>
</member>
<member name="M:Asa.HIK.IPCamera.#ctor(System.String,System.String)">
<summary>
网络监控摄像机
</summary>
<param name="configPath"></param>
<param name="logName"></param>
</member>
<member name="P:Asa.HIK.IPCamera.Name">
<summary>
相机名称
</summary>
</member>
<member name="P:Asa.HIK.IPCamera.Count">
<summary>
相机总数
</summary>
</member>
<member name="P:Asa.HIK.IPCamera.IsOpen">
<summary>
相机是否打开
</summary>
</member>
<member name="P:Asa.HIK.IPCamera.Size">
<summary>
图像分辨率
</summary>
</member>
<member name="P:Asa.HIK.IPCamera.Image">
<summary>
相机获取到的图像
</summary>
</member>
<member name="M:Asa.HIK.IPCamera.Load">
<summary>
加载
</summary>
<returns></returns>
</member>
<member name="M:Asa.HIK.IPCamera.Dispose">
<summary>
释放所有
</summary>
</member>
<member name="M:Asa.HIK.IPCamera.OpenAll">
<summary>
打开所有摄像机
</summary>
<returns></returns>
</member>
<member name="M:Asa.HIK.IPCamera.CloseAll">
<summary>
关闭所有摄像机
</summary>
</member>
<member name="M:Asa.HIK.IPCamera.Open(System.Int32)">
<summary>
打开摄像机
</summary>
<param name="cameraIndex"></param>
<returns></returns>
</member>
<member name="M:Asa.HIK.IPCamera.Close(System.Int32)">
<summary>
关闭摄像机
</summary>
<param name="cameraIndex"></param>
</member>
<member name="M:Asa.HIK.IPCamera.GrabOne(System.Drawing.Bitmap[]@)">
<summary>
抓取所有摄像机一张图像
</summary>
<param name="bmp"></param>
<returns></returns>
</member>
<member name="M:Asa.HIK.IPCamera.GrabOne(System.Int32)">
<summary>
抓取一张图像
</summary>
<param name="cameraIndex">相机索引</param>
<returns></returns>
</member>
<member name="M:Asa.HIK.IPCamera.GrabOne(System.Int32,System.Drawing.Bitmap@)">
<summary>
抓取一张图像
</summary>
<param name="cameraIndex">相机索引</param>
<param name="bmp">Bitmap图像</param>
<returns></returns>
</member>
<member name="M:Asa.HIK.IPCamera.GrabOne(System.Int32,System.Byte[]@,System.Drawing.Imaging.PixelFormat@)">
<summary>
抓取一张图像字节
</summary>
<param name="cameraIndex">相机索引</param>
<param name="buff">图像字节数组</param>
<param name="format"></param>
<returns></returns>
</member>
<member name="M:Asa.HIK.IPCamera.GrabOne(System.Int32,System.IntPtr@,System.Drawing.Imaging.PixelFormat@)">
<summary>
抓取一张图像指针
</summary>
<param name="cameraIndex"></param>
<param name="handle"></param>
<param name="format"></param>
<returns></returns>
</member>
<member name="T:Asa.HIK.LoginInfo">
<summary>
登录信息
</summary>
</member>
</members>
</doc>
{
"HIKIPCamera":
[
{
"Name":"box_A",
"IP":"192.168.9.64",
"User":"admin",
"Pwd":"acc12345678",
"Port":"8000"
},
{"Name":"box_B",
"IP":"192.168.9.65",
"User":"admin",
"Pwd":"acc12345678",
"Port":"8000"
}
]
}
\ No newline at end of file
......@@ -36,6 +36,9 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Asa.HIK.IPCamera">
<HintPath>..\..\dll\Asa.HIK.IPCamera.dll</HintPath>
</Reference>
<Reference Include="Asa.RFID.HiStation">
<HintPath>..\..\dll\RFID\Asa.RFID.HiStation.dll</HintPath>
</Reference>
......@@ -79,6 +82,7 @@
<Compile Include="manager\StoreManager.cs" />
<Compile Include="deviceLibrary\RFID\RFIDManagercs.cs" />
<Compile Include="manager\SServerManager.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_Camera.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_ConnectServerTimer.cs" />
<Compile Include="storeBean\boxBean\AutoInoutInfo.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_InExecute.cs" />
......@@ -208,6 +212,9 @@
<Content Include="Config\linePositions.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="Config\box_Cameras.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
<Content Include="SDK\MotorMaster.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
......
......@@ -108,7 +108,7 @@ namespace OnlineStore.DeviceLibrary
InitAllAxis();
InitPosititionNumList();
InitDrawInfos();
LoadCameraConfig();
}
void InitRowColumnSig()
{
......@@ -187,6 +187,7 @@ namespace OnlineStore.DeviceLibrary
CloseAllAxis();
return false;
}
StartCamera();
SetAllTimer(false);
SetConnectServerTimer(false);
MoveInfo.EndMove();
......@@ -496,6 +497,7 @@ namespace OnlineStore.DeviceLibrary
SetAllTimer(false);
StopMove();
SetBoxStatus(DeviceStatus.None,RunStatus.Wait);
StopCamera();
}
public override string GetMoveStr()
......
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
partial class BoxEquip
{
Thread[] camerathread;
Asa.HIK.IPCamera camera;
bool loadCameraState = false;
public delegate void CameraAcqEventHandler(CameraArgs cameraArgs);
public event CameraAcqEventHandler camera_event;
void LoadCameraConfig(string id = "")
{
string path = @".\Config\box_Cameras.json";
if (!File.Exists(path))
{
LogUtil.error(Name + "找不到监控相机配置文件" + path);
}
camera = new Asa.HIK.IPCamera(path);
bool rtn = camera.Load();
if (!rtn)
LogUtil.error(Name + "加载监控相机配置文件失败");
camerathread = new Thread[camera.Count];
//pictureBox1.Image = bmp;
loadCameraState = true;
}
void StartCamera()
{
for (int i = 0; i < camera.Count; i++)
{
camerathread[i] = new Thread(new ParameterizedThreadStart(startMonitor));
camerathread[i].IsBackground = true;
camerathread[i].Start(i);
}
}
void startMonitor(object obj)
{
if (!loadCameraState)
{
LogUtil.error(Name + "监控相机初始化失败,无法开启");
return;
}
int idx = (int)obj;
var rtn = camera.Open(idx);
if (!rtn)
LogUtil.error(Name + "打开监控" + idx + "相机失败");
while (camera.IsOpen[idx])
{
rtn = camera.GrabOne(idx, out Bitmap bmp);
if (rtn)
{
camera_event?.Invoke(new CameraArgs(idx, bmp));
}
Thread.Sleep(1000 / 10);
}
}
void StopCamera()
{
for (int i = 0; i < camera.Count; i++)
{
try
{
if (camera.IsOpen[i])
{
camera.Close(i);
camerathread[i].Join();
}
}
catch (Exception e)
{
LogUtil.error($"关闭[{i}]相机失败", e);
}
}
camera.Dispose();
}
public bool AcqImage(int idx,out Bitmap img)
{
return camera.GrabOne(idx, out img);
}
}
public class CameraArgs : EventArgs
{
/// <summary>
/// 相机序号
/// </summary>
public int Index { get; set; }
/// <summary>
/// 相机采集的图片
/// </summary>
public Bitmap Image { get; set; }
public CameraArgs(int idx, Bitmap img)
{
Index = idx;
Image = img;
}
}
}
......@@ -53,6 +53,17 @@
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.button14 = new System.Windows.Forms.Button();
this.button13 = new System.Windows.Forms.Button();
this.label21 = new System.Windows.Forms.Label();
this.txtMark_Y_err = new System.Windows.Forms.TextBox();
this.label20 = new System.Windows.Forms.Label();
this.txtMark_X_err = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label();
this.txtMark_Y = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.txtMark_X = new System.Windows.Forms.TextBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.button6 = new System.Windows.Forms.Button();
......@@ -83,11 +94,13 @@
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.label22 = new System.Windows.Forms.Label();
this.tableLayoutPanel1.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.tabPage2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.tabPage3.SuspendLayout();
this.tabPage4.SuspendLayout();
this.groupBox1.SuspendLayout();
......@@ -333,6 +346,18 @@
//
// tabPage2
//
this.tabPage2.Controls.Add(this.label22);
this.tabPage2.Controls.Add(this.button14);
this.tabPage2.Controls.Add(this.button13);
this.tabPage2.Controls.Add(this.label21);
this.tabPage2.Controls.Add(this.txtMark_Y_err);
this.tabPage2.Controls.Add(this.label20);
this.tabPage2.Controls.Add(this.txtMark_X_err);
this.tabPage2.Controls.Add(this.label19);
this.tabPage2.Controls.Add(this.txtMark_Y);
this.tabPage2.Controls.Add(this.label17);
this.tabPage2.Controls.Add(this.txtMark_X);
this.tabPage2.Controls.Add(this.pictureBox1);
this.tabPage2.Controls.Add(this.label4);
this.tabPage2.Controls.Add(this.label3);
this.tabPage2.Controls.Add(this.button6);
......@@ -344,10 +369,106 @@
this.tabPage2.Text = "配置模板抽屉位置";
this.tabPage2.UseVisualStyleBackColor = true;
//
// button14
//
this.button14.Location = new System.Drawing.Point(570, 140);
this.button14.Name = "button14";
this.button14.Size = new System.Drawing.Size(147, 45);
this.button14.TabIndex = 13;
this.button14.Text = "保存Mark点参数";
this.button14.UseVisualStyleBackColor = true;
this.button14.Click += new System.EventHandler(this.button14_Click);
//
// button13
//
this.button13.Location = new System.Drawing.Point(570, 71);
this.button13.Name = "button13";
this.button13.Size = new System.Drawing.Size(147, 45);
this.button13.TabIndex = 12;
this.button13.Text = "取像并获取Mark点坐标";
this.button13.UseVisualStyleBackColor = true;
this.button13.Click += new System.EventHandler(this.button13_Click);
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(262, 202);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(159, 17);
this.label21.TabIndex = 11;
this.label21.Text = "抽屉Mark_Y坐标误差范围:";
//
// txtMark_Y_err
//
this.txtMark_Y_err.Location = new System.Drawing.Point(425, 196);
this.txtMark_Y_err.Name = "txtMark_Y_err";
this.txtMark_Y_err.Size = new System.Drawing.Size(100, 23);
this.txtMark_Y_err.TabIndex = 10;
this.txtMark_Y_err.Text = "1";
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(261, 154);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(160, 17);
this.label20.TabIndex = 9;
this.label20.Text = "抽屉Mark_X坐标误差范围:";
//
// txtMark_X_err
//
this.txtMark_X_err.Location = new System.Drawing.Point(425, 151);
this.txtMark_X_err.Name = "txtMark_X_err";
this.txtMark_X_err.Size = new System.Drawing.Size(100, 23);
this.txtMark_X_err.TabIndex = 8;
this.txtMark_X_err.Text = "1";
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(297, 114);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(111, 17);
this.label19.TabIndex = 7;
this.label19.Text = "抽屉Mark_Y坐标:";
//
// txtMark_Y
//
this.txtMark_Y.Location = new System.Drawing.Point(425, 114);
this.txtMark_Y.Name = "txtMark_Y";
this.txtMark_Y.Size = new System.Drawing.Size(100, 23);
this.txtMark_Y.TabIndex = 6;
this.txtMark_Y.Text = "1";
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(286, 71);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(112, 17);
this.label17.TabIndex = 5;
this.label17.Text = "抽屉Mark_X坐标:";
//
// txtMark_X
//
this.txtMark_X.Location = new System.Drawing.Point(425, 71);
this.txtMark_X.Name = "txtMark_X";
this.txtMark_X.Size = new System.Drawing.Size(100, 23);
this.txtMark_X.TabIndex = 4;
this.txtMark_X.Text = "1";
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(6, 71);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(249, 223);
this.pictureBox1.TabIndex = 3;
this.pictureBox1.TabStop = false;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(177, 231);
this.label4.Location = new System.Drawing.Point(404, 28);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(368, 17);
this.label4.TabIndex = 2;
......@@ -356,7 +477,7 @@
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(318, 40);
this.label3.Location = new System.Drawing.Point(15, 14);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(43, 17);
this.label3.TabIndex = 1;
......@@ -364,9 +485,9 @@
//
// button6
//
this.button6.Location = new System.Drawing.Point(273, 103);
this.button6.Location = new System.Drawing.Point(251, 14);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(169, 61);
this.button6.Size = new System.Drawing.Size(147, 45);
this.button6.TabIndex = 0;
this.button6.Text = "打开伺服调试界面";
this.button6.UseVisualStyleBackColor = true;
......@@ -640,6 +761,15 @@
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(289, 265);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(98, 17);
this.label22.TabIndex = 14;
this.label22.Text = "获取mark点结果";
//
// FrmAutoFindPos
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
......@@ -657,6 +787,7 @@
this.groupBox2.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.tabPage3.ResumeLayout(false);
this.tabPage3.PerformLayout();
this.tabPage4.ResumeLayout(false);
......@@ -722,5 +853,17 @@
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Button button12;
private System.Windows.Forms.Button button11;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.TextBox txtMark_Y_err;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.TextBox txtMark_X_err;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.TextBox txtMark_Y;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox txtMark_X;
private System.Windows.Forms.Button button14;
private System.Windows.Forms.Button button13;
private System.Windows.Forms.Label label22;
}
}
\ No newline at end of file
......@@ -70,6 +70,10 @@ namespace OnlineStore.XLRStore
txtRowSpacing.Text = boxEquip.Config.Row_Spacing.ToString();
txtDrawerRows.Text = boxEquip.Config.Drawer_Rows.ToString();
txtDrawerColumns.Text = boxEquip.Config.Drawer_Columns.ToString();
txtMark_X.Text = boxEquip.Config.Drawer_X.ToString();
txtMark_Y.Text = boxEquip.Config.Drawer_Y.ToString();
txtMark_X_err.Text = boxEquip.Config.Drawer_X_Error.ToString();
txtMark_Y_err.Text = boxEquip.Config.Drawer_Y_Error.ToString();
button9.Enabled = false;
button11.Enabled = false;
button12.Enabled = false;
......@@ -260,5 +264,53 @@ namespace OnlineStore.XLRStore
button11.Enabled = false;
button12.Enabled = false;
}
/// <summary>
/// 取像并获取mark点坐标
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button13_Click(object sender, EventArgs e)
{
Bitmap bitmap = null;
bool rtn = false ;
if(posSide.Equals("AA"))
{
rtn=boxEquip.AcqImage(0,out bitmap);
}
else
{
rtn = boxEquip.AcqImage(1, out bitmap);
}
if(rtn)
{
int res = AutoFindPos.GetMarkInfo(bitmap, out eyemLib_Sharp.EyemLibDemo.EyemOcsFXYR eyemOcsFXYR);
if (res == 0)
{
txtMark_X.Text = eyemOcsFXYR.fX.ToString("f2");
txtMark_Y.Text = eyemOcsFXYR.fY.ToString("f2");
label22.Text = "获取mark点信息成功";
label22.BackColor = Color.Green;
}
else
{
label22.Text = "获取mark点信息失败,异常码:" + res;
label22.BackColor = Color.Red;
}
}
else
{
label22.Text = "取像失败,请检查相机参数";
label22.BackColor = Color.Red;
}
}
private void button14_Click(object sender, EventArgs e)
{
boxEquip.Config.Drawer_X = float.Parse(txtMark_X.Text);
boxEquip.Config.Drawer_Y=float.Parse(txtMark_Y.Text);
boxEquip.Config.Drawer_X_Error=float.Parse(txtMark_X_err.Text);
boxEquip.Config.Drawer_Y_Error=float.Parse(txtMark_Y_err.Text);
StoreManager.SaveBoxConfig(boxEquip.Config);
}
}
}
......@@ -43,13 +43,17 @@
this.lblInstoreList = new System.Windows.Forms.Label();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.panBase = new System.Windows.Forms.Panel();
this.btnDebugAxis = new System.Windows.Forms.Button();
this.chbMoveStop = new System.Windows.Forms.CheckBox();
this.lblName = new System.Windows.Forms.Label();
this.chbDebug = new System.Windows.Forms.CheckBox();
this.lblStoreStatus = new System.Windows.Forms.Label();
this.btnStart = new System.Windows.Forms.Button();
this.btnStop = new System.Windows.Forms.Button();
this.btnDebugAxis = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout();
......@@ -58,6 +62,10 @@
this.groupBox6.SuspendLayout();
this.tabPage1.SuspendLayout();
this.panBase.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
this.SuspendLayout();
//
// timer1
......@@ -284,7 +292,7 @@
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(244, 140);
this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(724, 28);
this.lblThisSta.Size = new System.Drawing.Size(736, 28);
this.lblThisSta.TabIndex = 246;
this.lblThisSta.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -304,6 +312,8 @@
//
// tabPage3
//
this.tabPage3.Controls.Add(this.groupBox5);
this.tabPage3.Controls.Add(this.groupBox2);
this.tabPage3.Controls.Add(this.groupBox6);
this.tabPage3.Location = new System.Drawing.Point(4, 26);
this.tabPage3.Name = "tabPage3";
......@@ -314,16 +324,14 @@
//
// groupBox6
//
this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox6.Controls.Add(this.lblInoutInfo);
this.groupBox6.Controls.Add(this.lblMoveInfo);
this.groupBox6.Controls.Add(this.lblInstoreList);
this.groupBox6.Controls.Add(this.lblThisSta);
this.groupBox6.Location = new System.Drawing.Point(7, 3);
this.groupBox6.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox6.Location = new System.Drawing.Point(0, 0);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(973, 176);
this.groupBox6.Size = new System.Drawing.Size(985, 176);
this.groupBox6.TabIndex = 278;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "当前状态";
......@@ -335,7 +343,7 @@
this.lblInoutInfo.ForeColor = System.Drawing.Color.Green;
this.lblInoutInfo.Location = new System.Drawing.Point(2, 21);
this.lblInoutInfo.Name = "lblInoutInfo";
this.lblInoutInfo.Size = new System.Drawing.Size(965, 23);
this.lblInoutInfo.Size = new System.Drawing.Size(977, 23);
this.lblInoutInfo.TabIndex = 281;
this.lblInoutInfo.Text = "当前出入库:";
//
......@@ -359,7 +367,7 @@
this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblInstoreList.Location = new System.Drawing.Point(244, 57);
this.lblInstoreList.Name = "lblInstoreList";
this.lblInstoreList.Size = new System.Drawing.Size(724, 74);
this.lblInstoreList.Size = new System.Drawing.Size(736, 74);
this.lblInstoreList.TabIndex = 277;
//
// tabPage1
......@@ -393,6 +401,19 @@
this.panBase.Size = new System.Drawing.Size(997, 50);
this.panBase.TabIndex = 260;
//
// btnDebugAxis
//
this.btnDebugAxis.BackColor = System.Drawing.Color.White;
this.btnDebugAxis.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDebugAxis.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDebugAxis.Location = new System.Drawing.Point(240, 3);
this.btnDebugAxis.Name = "btnDebugAxis";
this.btnDebugAxis.Size = new System.Drawing.Size(105, 40);
this.btnDebugAxis.TabIndex = 263;
this.btnDebugAxis.Text = "点位调试";
this.btnDebugAxis.UseVisualStyleBackColor = false;
this.btnDebugAxis.Click += new System.EventHandler(this.btnDebugAxis_Click);
//
// chbMoveStop
//
this.chbMoveStop.AutoSize = true;
......@@ -468,18 +489,45 @@
this.btnStop.UseVisualStyleBackColor = false;
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
//
// btnDebugAxis
//
this.btnDebugAxis.BackColor = System.Drawing.Color.White;
this.btnDebugAxis.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDebugAxis.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDebugAxis.Location = new System.Drawing.Point(240, 3);
this.btnDebugAxis.Name = "btnDebugAxis";
this.btnDebugAxis.Size = new System.Drawing.Size(105, 40);
this.btnDebugAxis.TabIndex = 263;
this.btnDebugAxis.Text = "点位调试";
this.btnDebugAxis.UseVisualStyleBackColor = false;
this.btnDebugAxis.Click += new System.EventHandler(this.btnDebugAxis_Click);
// groupBox2
//
this.groupBox2.Controls.Add(this.pictureBox1);
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Left;
this.groupBox2.Location = new System.Drawing.Point(0, 176);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(407, 345);
this.groupBox2.TabIndex = 279;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "A面相机";
//
// groupBox5
//
this.groupBox5.Controls.Add(this.pictureBox2);
this.groupBox5.Dock = System.Windows.Forms.DockStyle.Right;
this.groupBox5.Location = new System.Drawing.Point(578, 176);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(407, 345);
this.groupBox5.TabIndex = 280;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "B面相机";
//
// pictureBox1
//
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Location = new System.Drawing.Point(3, 19);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(401, 323);
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// pictureBox2
//
this.pictureBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox2.Location = new System.Drawing.Point(3, 19);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(401, 323);
this.pictureBox2.TabIndex = 1;
this.pictureBox2.TabStop = false;
//
// FrmBoxEquip
//
......@@ -507,6 +555,10 @@
this.tabPage1.ResumeLayout(false);
this.panBase.ResumeLayout(false);
this.panBase.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox5.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
this.ResumeLayout(false);
}
......@@ -546,6 +598,10 @@
protected System.Windows.Forms.Button btnStop;
private System.Windows.Forms.TabPage tabPage3;
protected System.Windows.Forms.Button btnDebugAxis;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox1;
}
}
......@@ -43,8 +43,25 @@ namespace OnlineStore.XLRStore
chbDebug.Checked = boxBean.IsDebug;
FrmAutoFindPos frmAutoFindPos = new FrmAutoFindPos();
AddForm(tabControl1, " 视觉对位 ", frmAutoFindPos);
boxBean.camera_event += BoxBean_camera_event;
IsLoad = true;
}
/// <summary>
/// 监控相机采集图像事件
/// </summary>
/// <param name="cameraArgs"></param>
private void BoxBean_camera_event(CameraArgs cameraArgs)
{
if(cameraArgs.Index.Equals(0))
{
pictureBox1.Image = cameraArgs.Image;
}
else if(cameraArgs.Index.Equals(1))
{
pictureBox2.Image = cameraArgs.Image;
}
}
protected Dictionary<string, IOTextControl> DIControlList = new Dictionary<string, IOTextControl>();
protected Dictionary<string, IOTextControl> DOControlList = new Dictionary<string, IOTextControl>();
protected void ReadIOList()
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!