示例#1
0
 private void printService(object sender, PlcFinishReadEventArgs args)
 {
     //if (args.TestResult>0)
     //{
     //    rtbOutput.Text += "Reading Completed" + args.TestResult.ToString() + Environment.NewLine;
     //    progressBarDashboard.Value = args.TestResult;
     //}
     //else
     //{
     //    rtbOutput.Text += "Reading in progress" + args.CurrentValue.ToString() + Environment.NewLine;
     //    progressBarDashboard.Value = args.CurrentValue;
     //}
 }
示例#2
0
        private void UpdateUIservice_read(object sender, PlcFinishReadEventArgs e)
        {
            dataGridViewAll.DataSource          = null;
            dataGridViewAll.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;

            dataGridViewAll.DataSource = PlcDataMapper.DataNameValue_Rlist.Select(u => new
            {
                Name  = u.Key,
                Value = u.Value
            }).ToList();
            rtbOutput.Text += "read 255words: ticks" + e.ticks + "  ms time" + e._ms1 + Environment.NewLine;
            rtbOutput.Text += "total ms" + e._ms + Environment.NewLine;
        }