You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Rs.DeweyTester/Rs.DeweyTester/NozzleStatusFrm.cs

46 lines
1.3 KiB
C#

using Rs.MotionPlat.Commom;
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 Rs.MotionPlat
{
public partial class NozzleStatusFrm : BaseFormHeader
{
public NozzleStatusFrm()
{
InitializeComponent();
}
private void timer1_Tick(object sender, EventArgs e)
{
List<Nozzle> nozzles = NozzleManager.GetAllNozzles();
this.dataGridView1.Rows.Clear();
foreach (Nozzle item in nozzles)
{
int rowIndex = this.dataGridView1.Rows.Add();
this.dataGridView1.Rows[rowIndex].Cells[0].Value = item.NozzleIndex;
this.dataGridView1.Rows[rowIndex].Cells[1].Value = item.Status;
if(item.Product!=null)
{
this.dataGridView1.Rows[rowIndex].Cells[2].Value = item.Product.SN;
this.dataGridView1.Rows[rowIndex].Cells[3].Value = item.Product.Bin;
}
}
}
private void NozzleStatusFrm_Load(object sender, EventArgs e)
{
this.dataGridView1.AutoGenerateColumns = false;
this.timer1.Enabled = true;
}
}
}