BatchReportForm.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using Model;
  2. using PlcComponent;
  3. using PlcUiControl;
  4. using PlcUiForm;
  5. using StandardLibrary;
  6. using Sunny.UI;
  7. using Sunny.UI.Win32;
  8. using System;
  9. using System.Collections.Generic;
  10. using System.ComponentModel;
  11. using System.Data;
  12. using System.Drawing;
  13. using System.Linq;
  14. using System.Text;
  15. using System.Threading.Tasks;
  16. using System.Windows.Forms;
  17. namespace YangjieTester.主界面
  18. {
  19. [FormDescriptionAttribute("当前批次报告")]
  20. public partial class BatchReportForm : PlcBaseForm
  21. {
  22. private BatchReportForm()
  23. {
  24. InitializeComponent();
  25. }
  26. public BatchReportForm(Batch batch):this()
  27. {
  28. this.Batch = batch;
  29. }
  30. Batch Batch;
  31. private void BatchReportForm_Load(object sender, EventArgs e)
  32. {
  33. BackgroundService.Instance.RefreshInstanceFromPLC(Batch);
  34. //后续增加批次中的各种报警代码计数,MTTB之类的计算。
  35. uiRichTextBox1.Text = BatchReport.GenerateBatchReport(Batch);
  36. }
  37. }
  38. }