Example #1
0
        private void Plc_Writing(object sender, WritingEventArgs e)
        {
            this.InvokeEx(new Action(() =>
            {
                dgvWrite.Rows.Add(DateTime.Now.ToString("MM-dd HH:mm:ss:fff"), e.Address, string.Join(",", e.Values.Select(x => x.ToString()).ToArray()));

                dgvWrite.FirstDisplayedScrollingRowIndex = dgvWrite.RowCount - 1;
            }));
        }
        public void Write <TValue>(DataAddress address, IEnumerable <TValue> values)
        {
            var ea = new WritingEventArgs()
            {
                Address = address
            };

            values.ToList().ForEach(e => ea.Values.Add(e));

            Writing(this, ea);
        }