using Model;
using PlcComponent;
using PlcUiControl;
using PlcUiForm;
using StandardLibrary;
using Sunny.UI;
using Sunny.UI.Win32;
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 YangjieTester.主界面
{
    [FormDescriptionAttribute("当前批次报告")]
    public partial class BatchReportForm : PlcBaseForm
    {
        private BatchReportForm()
        {
            InitializeComponent();
        }
        public BatchReportForm(Batch batch):this()
        {
            this.Batch = batch;
        }
        Batch Batch;
        private void BatchReportForm_Load(object sender, EventArgs e)
        {
            BackgroundService.Instance.RefreshInstanceFromPLC(Batch);
            //后续增加批次中的各种报警代码计数，MTTB之类的计算。
            uiRichTextBox1.Text = BatchReport.GenerateBatchReport(Batch);
        }
    }
}
