Commit a4651d4c 张东亮

1

1 个父辈 219495b4
...@@ -351,6 +351,11 @@ namespace AGVControl ...@@ -351,6 +351,11 @@ namespace AGVControl
public bool IsClearRunInfo = false; public bool IsClearRunInfo = false;
public string CurTaskName { get; set; } public string CurTaskName { get; set; }
/// <summary>
/// 剩余出库任务,针对包装仓出库
/// </summary>
public int LeftTaskCnt { get; set; } = 0;
public struct DockingStru public struct DockingStru
{ {
public DateTime startTime; public DateTime startTime;
......
...@@ -30,6 +30,17 @@ ...@@ -30,6 +30,17 @@
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
this.DgvAgv = new System.Windows.Forms.DataGridView(); this.DgvAgv = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column22 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column23 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column18 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column19 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column11 = new System.Windows.Forms.DataGridViewButtonColumn();
this.Column17 = new System.Windows.Forms.DataGridViewButtonColumn();
this.DgvNode = new System.Windows.Forms.DataGridView(); this.DgvNode = new System.Windows.Forms.DataGridView();
this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
...@@ -72,21 +83,12 @@ ...@@ -72,21 +83,12 @@
this.LstAgvPlace = new System.Windows.Forms.ListBox(); this.LstAgvPlace = new System.Windows.Forms.ListBox();
this.tabPage2 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.dgvMission = new System.Windows.Forms.DataGridView(); this.dgvMission = new System.Windows.Forms.DataGridView();
this.Column20 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column20 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column24 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column24 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column21 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column21 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.label4 = new System.Windows.Forms.Label();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column22 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column23 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column18 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column19 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column11 = new System.Windows.Forms.DataGridViewButtonColumn();
this.Column17 = new System.Windows.Forms.DataGridViewButtonColumn();
((System.ComponentModel.ISupportInitialize)(this.DgvAgv)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.DgvAgv)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DgvNode)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.DgvNode)).BeginInit();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
...@@ -94,6 +96,7 @@ ...@@ -94,6 +96,7 @@
this.tabPage3.SuspendLayout(); this.tabPage3.SuspendLayout();
this.tabPage2.SuspendLayout(); this.tabPage2.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvMission)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvMission)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
...@@ -128,6 +131,100 @@ ...@@ -128,6 +131,100 @@
this.DgvAgv.TabIndex = 0; this.DgvAgv.TabIndex = 0;
this.DgvAgv.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DgvAgv_CellClick); this.DgvAgv.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DgvAgv_CellClick);
// //
// Column1
//
this.Column1.HeaderText = "AGV名称";
this.Column1.MinimumWidth = 6;
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column1.Width = 80;
//
// Column3
//
this.Column3.HeaderText = "AGV状态";
this.Column3.MinimumWidth = 6;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column3.Width = 125;
//
// Column14
//
this.Column14.HeaderText = "任务状态";
this.Column14.MinimumWidth = 6;
this.Column14.Name = "Column14";
this.Column14.ReadOnly = true;
this.Column14.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column14.Width = 120;
//
// Column22
//
this.Column22.HeaderText = "标志";
this.Column22.MinimumWidth = 6;
this.Column22.Name = "Column22";
this.Column22.ReadOnly = true;
this.Column22.Width = 80;
//
// Column23
//
this.Column23.HeaderText = "RFID";
this.Column23.MinimumWidth = 6;
this.Column23.Name = "Column23";
this.Column23.ReadOnly = true;
this.Column23.Width = 125;
//
// Column18
//
this.Column18.HeaderText = "目标地点";
this.Column18.MinimumWidth = 6;
this.Column18.Name = "Column18";
this.Column18.ReadOnly = true;
this.Column18.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column18.Width = 80;
//
// Column4
//
this.Column4.HeaderText = "后续任务";
this.Column4.MinimumWidth = 6;
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
this.Column4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column4.Width = 80;
//
// Column13
//
this.Column13.HeaderText = "在线";
this.Column13.MinimumWidth = 6;
this.Column13.Name = "Column13";
this.Column13.ReadOnly = true;
this.Column13.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column13.Width = 60;
//
// Column19
//
this.Column19.HeaderText = "电量";
this.Column19.MinimumWidth = 6;
this.Column19.Name = "Column19";
this.Column19.ReadOnly = true;
this.Column19.Width = 60;
//
// Column11
//
this.Column11.HeaderText = "调用";
this.Column11.MinimumWidth = 6;
this.Column11.Name = "Column11";
this.Column11.ReadOnly = true;
this.Column11.Width = 60;
//
// Column17
//
this.Column17.HeaderText = "清除缓存";
this.Column17.MinimumWidth = 6;
this.Column17.Name = "Column17";
this.Column17.ReadOnly = true;
this.Column17.Width = 80;
//
// DgvNode // DgvNode
// //
this.DgvNode.AllowUserToAddRows = false; this.DgvNode.AllowUserToAddRows = false;
...@@ -580,7 +677,7 @@ ...@@ -580,7 +677,7 @@
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 35.06064F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 35.06064F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 64.93936F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 64.93936F));
this.tableLayoutPanel1.Controls.Add(this.TxtLog, 0, 0); this.tableLayoutPanel1.Controls.Add(this.TxtLog, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.dgvMission, 1, 0); this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 1, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3); this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.Name = "tableLayoutPanel1";
...@@ -589,6 +686,21 @@ ...@@ -589,6 +686,21 @@
this.tableLayoutPanel1.Size = new System.Drawing.Size(974, 492); this.tableLayoutPanel1.Size = new System.Drawing.Size(974, 492);
this.tableLayoutPanel1.TabIndex = 5; this.tableLayoutPanel1.TabIndex = 5;
// //
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 1;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Controls.Add(this.dgvMission, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.label4, 0, 1);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(344, 3);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 2;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(627, 486);
this.tableLayoutPanel2.TabIndex = 5;
//
// dgvMission // dgvMission
// //
this.dgvMission.AllowUserToAddRows = false; this.dgvMission.AllowUserToAddRows = false;
...@@ -597,14 +709,14 @@ ...@@ -597,14 +709,14 @@
this.Column20, this.Column20,
this.Column24, this.Column24,
this.Column21}); this.Column21});
this.dgvMission.Dock = System.Windows.Forms.DockStyle.Top; this.dgvMission.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvMission.Location = new System.Drawing.Point(344, 3); this.dgvMission.Location = new System.Drawing.Point(3, 3);
this.dgvMission.Name = "dgvMission"; this.dgvMission.Name = "dgvMission";
this.dgvMission.RowHeadersVisible = false; this.dgvMission.RowHeadersVisible = false;
this.dgvMission.RowHeadersWidth = 51; this.dgvMission.RowHeadersWidth = 51;
this.dgvMission.RowTemplate.Height = 27; this.dgvMission.RowTemplate.Height = 27;
this.dgvMission.Size = new System.Drawing.Size(627, 186); this.dgvMission.Size = new System.Drawing.Size(621, 237);
this.dgvMission.TabIndex = 5; this.dgvMission.TabIndex = 6;
// //
// Column20 // Column20
// //
...@@ -627,99 +739,14 @@ ...@@ -627,99 +739,14 @@
this.Column21.Name = "Column21"; this.Column21.Name = "Column21";
this.Column21.Width = 450; this.Column21.Width = 450;
// //
// Column1 // label4
//
this.Column1.HeaderText = "AGV名称";
this.Column1.MinimumWidth = 6;
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column1.Width = 80;
//
// Column3
//
this.Column3.HeaderText = "AGV状态";
this.Column3.MinimumWidth = 6;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column3.Width = 125;
//
// Column14
//
this.Column14.HeaderText = "任务状态";
this.Column14.MinimumWidth = 6;
this.Column14.Name = "Column14";
this.Column14.ReadOnly = true;
this.Column14.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column14.Width = 120;
//
// Column22
//
this.Column22.HeaderText = "标志";
this.Column22.MinimumWidth = 6;
this.Column22.Name = "Column22";
this.Column22.ReadOnly = true;
this.Column22.Width = 80;
//
// Column23
//
this.Column23.HeaderText = "RFID";
this.Column23.MinimumWidth = 6;
this.Column23.Name = "Column23";
this.Column23.ReadOnly = true;
this.Column23.Width = 125;
//
// Column18
//
this.Column18.HeaderText = "目标地点";
this.Column18.MinimumWidth = 6;
this.Column18.Name = "Column18";
this.Column18.ReadOnly = true;
this.Column18.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column18.Width = 80;
//
// Column4
//
this.Column4.HeaderText = "后续任务";
this.Column4.MinimumWidth = 6;
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
this.Column4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column4.Width = 80;
//
// Column13
//
this.Column13.HeaderText = "在线";
this.Column13.MinimumWidth = 6;
this.Column13.Name = "Column13";
this.Column13.ReadOnly = true;
this.Column13.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column13.Width = 60;
//
// Column19
//
this.Column19.HeaderText = "电量";
this.Column19.MinimumWidth = 6;
this.Column19.Name = "Column19";
this.Column19.ReadOnly = true;
this.Column19.Width = 60;
//
// Column11
//
this.Column11.HeaderText = "调用";
this.Column11.MinimumWidth = 6;
this.Column11.Name = "Column11";
this.Column11.ReadOnly = true;
this.Column11.Width = 60;
// //
// Column17 this.label4.AutoSize = true;
// this.label4.Location = new System.Drawing.Point(3, 243);
this.Column17.HeaderText = "清除缓存"; this.label4.Name = "label4";
this.Column17.MinimumWidth = 6; this.label4.Size = new System.Drawing.Size(55, 15);
this.Column17.Name = "Column17"; this.label4.TabIndex = 7;
this.Column17.ReadOnly = true; this.label4.Text = "label4";
this.Column17.Width = 80;
// //
// FrmMain // FrmMain
// //
...@@ -742,6 +769,8 @@ ...@@ -742,6 +769,8 @@
this.tabPage2.ResumeLayout(false); this.tabPage2.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout(); this.tableLayoutPanel1.PerformLayout();
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvMission)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvMission)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
...@@ -791,10 +820,6 @@ ...@@ -791,10 +820,6 @@
private System.Windows.Forms.Button BtnOpenExcel; private System.Windows.Forms.Button BtnOpenExcel;
private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.DataGridView dgvMission;
private System.Windows.Forms.DataGridViewTextBoxColumn Column20;
private System.Windows.Forms.DataGridViewTextBoxColumn Column24;
private System.Windows.Forms.DataGridViewTextBoxColumn Column21;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1; private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column3; private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
private System.Windows.Forms.DataGridViewTextBoxColumn Column14; private System.Windows.Forms.DataGridViewTextBoxColumn Column14;
...@@ -806,6 +831,12 @@ ...@@ -806,6 +831,12 @@
private System.Windows.Forms.DataGridViewTextBoxColumn Column19; private System.Windows.Forms.DataGridViewTextBoxColumn Column19;
private System.Windows.Forms.DataGridViewButtonColumn Column11; private System.Windows.Forms.DataGridViewButtonColumn Column11;
private System.Windows.Forms.DataGridViewButtonColumn Column17; private System.Windows.Forms.DataGridViewButtonColumn Column17;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.DataGridView dgvMission;
private System.Windows.Forms.DataGridViewTextBoxColumn Column20;
private System.Windows.Forms.DataGridViewTextBoxColumn Column24;
private System.Windows.Forms.DataGridViewTextBoxColumn Column21;
private System.Windows.Forms.Label label4;
} }
} }
...@@ -179,7 +179,12 @@ namespace AGVControl ...@@ -179,7 +179,12 @@ namespace AGVControl
Common.nodeInfo[idx].AgvName = ""; Common.nodeInfo[idx].AgvName = "";
DgvNode.Rows[idx].Cells[5].Value = ""; DgvNode.Rows[idx].Cells[5].Value = "";
} }
idx = Common.nodeInfo.FindIndex(s => s.AgvName == Common.agvInfo[e.RowIndex].Name);
if (idx > -1)
{
Common.nodeInfo[idx].AgvName = "";
DgvNode.Rows[idx].Cells[5].Value = "";
}
//添加Init任务 //添加Init任务
Common.mir.Add_Mission_Fleet(Common.agvInfo[e.RowIndex], Common.agvMission["Init"]); Common.mir.Add_Mission_Fleet(Common.agvInfo[e.RowIndex], Common.agvMission["Init"]);
Common.mir.State_Ready(Common.agvInfo[e.RowIndex]); Common.mir.State_Ready(Common.agvInfo[e.RowIndex]);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!