using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Advantech.Motion;
using Newtonsoft.Json;
using ProductionControl.UI;
using static ProductionControl.UI.UIAxis;

namespace ProductionControl.Device
{ 
    public class Relaxometer
    {
        //public int readData(string comNum,int baudRate=2400)
        //{
        //    // Open Com
        //    SerialPort _serialPort = new SerialPort(comNum, baudRate);
        //    if (_serialPort.IsOpen) 
        //        _serialPort.Close();

        //    // Set the read / write timeouts
        //    _serialPort.ReadTimeout = 500;
        //    _serialPort.WriteTimeout = 500;

        //    // Set read / write buffer Size，the default of value is 1MB
        //    _serialPort.ReadBufferSize = 128 * 128;
        //    _serialPort.WriteBufferSize = 128 * 128;

        //    _serialPort.Open();

        //    // Discard Buffer
        //    _serialPort.DiscardInBuffer();
        //    _serialPort.DiscardOutBuffer();
        //}
        [Browsable(true), Category("布局"), Description(" int test")]
        public int testArr1 {  get; private set; }
        //[NonSerialized]
        [Browsable(true), Category("布局"), Description(" int test"), ReadOnly(true)]
        public int testArr2 { get; set; }
        public string strArr1 { get; set; }
    }
}
