DebugVcuUI.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using ProjectManagementSystem.Common.Config;
  2. using ProjectManagementSystem.Common.Core;
  3. using ProjectManagementSystem.Common.Logger;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.ComponentModel;
  7. using System.Data;
  8. using System.Drawing;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Threading.Tasks;
  12. using System.Windows.Forms;
  13. namespace ProjectManagementSystem.UI
  14. {
  15. public partial class DebugVcuUI : UserControl, IDisplayUI
  16. {
  17. public DebugVcuUI()
  18. {
  19. InitializeComponent();
  20. }
  21. public bool Init()
  22. {
  23. dataGridUI1.dataGridView1.CellClick += DataGridView1_CellClick;
  24. return true;
  25. }
  26. private void DataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
  27. {
  28. textBox1.Text = dataGridUI1.GetCurrentColValue("AgvId");
  29. }
  30. public void UpdateDisplay()
  31. {
  32. if (!this.Visible) return;
  33. var dataList = DeviceControl.Instance.Communication.InfoVcuDictionary.Values.ToList();
  34. dataGridUI1.ShowDataGrid(dataList);
  35. }
  36. }
  37. }