MycronicControl.cs
3.1 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
using DeviceLibrary;
using OnlineStore;
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 TheMachine.device.Other
{
public partial class MycronicControl : UserControl
{
public MycronicControl()
{
InitializeComponent();
}
private void MycronicControl_Load(object sender, EventArgs e)
{
uc_boxdebug1.Init(RobotManage.MI1Postion);
uc_boxdebug2.Init(RobotManage.MI2Postion);
uc_boxdebug3.Init(RobotManage.CIPostion);
ucurRobot1.Init(RobotManage.Robot_MI1);
ucurRobot2.Init(RobotManage.Robot_MI2);
ucurRobot3.Init(RobotManage.Robot_CI);
#region 状态信息listview初始化
stateView.View = View.Details;
ColumnHeader c1 = new ColumnHeader();
c1.Text = "";
c1.Width = 0;
ColumnHeader c2 = new ColumnHeader();
c2.Text = "Tower ID";
c2.Width = 120;
ColumnHeader c3 = new ColumnHeader();
c3.Text = "Status";
c3.Width = 120;
ColumnHeader c4 = new ColumnHeader();
c4.Text = crc.GetString("Form1_tabc_tabP1_Text", "信息");
c4.Width = 470;
stateView.Columns.Add(c1);
stateView.Columns.Add(c2);
stateView.Columns.Add(c3);
stateView.Columns.Add(c4);
#endregion
crc.LanguageChangeEvent += Crc_LanguageChangeEvent; ;
}
private void Crc_LanguageChangeEvent(object sender, EventArgs e)
{
stateView.Columns[1].Text = "Tower ID";
stateView.Columns[2].Text = "Status";
stateView.Columns[3].Text = crc.GetString("Form1_tabc_tabP1_Text", "信息");
}
private void tabPage4_Click(object sender, EventArgs e)
{
}
private void btn_manualout_Click(object sender, EventArgs e)
{
VStoreCollection.VStoreList.Values.First().VLog.Info("手动出库:"+ txt_reelid.Text);
VStoreCollection.VStoreList.Values.First().ServerCM.BeginOutStore(new JobInfo(txt_reelid.Text, "", 0, 0), RobotManage.VStoreCollection.VLog);
}
private void timer1_Tick(object sender, EventArgs e)
{
stateView.Items.Clear();
foreach (var store in VStoreCollection.VStoreList.Values.ToList()) {
ListViewItem lvi = new ListViewItem(new string[] { "", TowerList.List[store.CID].TowerName+"-"+store.CID, store.RTStoreStatus.ToString(), store.GetStateStr() });
stateView.Items.Add(lvi);
}
}
private void btn_ResetRobot_Click(object sender, EventArgs e)
{
if (RobotManage.isRunning)
{
MessageBox.Show(crc.GetString("Res0072","请先停止系统运行"));
return;
}
MI.DeviceList["AMH-MI1"].Reset();
}
}
}