FrmPosDebug.cs
4.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
using OnlineStore.Common;
using OnlineStore.DeviceLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.XLRStore
{
public partial class FrmPosDebug : Form
{
public FrmPosDebug()
{
CheckForIllegalCrossThreadCalls = false;
InitializeComponent();
boxEquip = StoreManager.XLRStore.boxEquip;
}
BoxEquip boxEquip;
private void btnStart_Click(object sender, EventArgs e)
{
if(MessageBox.Show("是否开始库位调试?","提示",MessageBoxButtons.YesNo).Equals(DialogResult.Yes))
{
boxEquip.posDebugInfo.IsBreak = false;
int startDrawerRow = int.Parse(txtStartDrawerRow.Text);
int startDrawerCol = int.Parse(txtStartDrawerCol.Text);
int endDrawerRow = int.Parse(txtEndDrawerRow.Text);
int endDrawerCol = int.Parse(txtEndDrawerCol.Text);
int startRowInDrawer = int.Parse(txtStartRowInDrawer.Text);
int startColInDrawer = int.Parse(txtStartColInDrawer.Text);
int endRowInDrawer = int.Parse(txtEndRowInDrawer.Text);
int endColInDrawer = int.Parse(txtEndColInDrawer.Text);
boxEquip.posDebugInfo.SetDrawerParam(startDrawerRow,startDrawerCol,endDrawerRow,endDrawerCol);
boxEquip.posDebugInfo.SetGridParam(startRowInDrawer,startColInDrawer,endRowInDrawer,endColInDrawer);
InOutParam inOutParam = new InOutParam(new InOutPosInfo("PosDebug", $"{boxEquip.posDebugInfo.CurGrid}"));
//boxEquip.Test();
boxEquip.StartPosDebug(inOutParam);
}
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
if(radioButton1.Checked)
{
boxEquip.posDebugInfo.PosSide = "AA";
}
if(radioButton2.Checked)
boxEquip.posDebugInfo.PosSide = "BB";
}
private void btnStop_Click(object sender, EventArgs e)
{
if (MessageBox.Show("确认停止库位调试?", "提示", MessageBoxButtons.OKCancel).Equals(DialogResult.OK))
boxEquip.posDebugInfo.IsBreak = true;
}
FrmPosResult frmPosResult = null;
private void btnPosResult_Click(object sender, EventArgs e)
{
if(frmPosResult ==null)
{
frmPosResult = new FrmPosResult();
frmPosResult.Show();
}
else
{
if(frmPosResult.IsDisposed)
{
frmPosResult = new FrmPosResult();
frmPosResult.Show();
}
else
{
frmPosResult.Activate();
}
}
}
FrmMoveAxisDebug frmMoveAxisDebug = null;
private void button1_Click(object sender, EventArgs e)
{
try
{
FrmPwd fw = new FrmPwd(10);
DialogResult result = fw.ShowDialog();
if (!result.Equals(DialogResult.OK))
{
LogUtil.info("打开行走机构循环测试时,没有正确输入密码");
return;
}
if (frmMoveAxisDebug == null)
{
frmMoveAxisDebug = new FrmMoveAxisDebug();
frmMoveAxisDebug.Show();
}
else
{
if (frmMoveAxisDebug.IsDisposed)
{
frmMoveAxisDebug = new FrmMoveAxisDebug();
frmMoveAxisDebug.Show();
}
else
{
frmMoveAxisDebug.Activate();
}
}
}
catch (Exception ex)
{
LogUtil.error("打开行走机构循环测试时出错:", ex);
}
}
}
}