Ejemplo n.º 1
0
        public FormDeviceInit(FormMDIParent form)
        {
            myUart   = form.myUart;
            myConfig = form.myConfig;
            myTCP    = new TCPClient(myUart, null, ServerIP, ServerPort);
            myApi    = new MeasureApi(this);
            // timer
            timerUartRecv           = new System.Timers.Timer(10000);
            timerUartRecv.Elapsed  += new System.Timers.ElapsedEventHandler(timerUartRecv_Timeout);
            timerUartRecv.AutoReset = true;
            timerUartRecv.Enabled   = false;

            // timer
            timerTCPRecv           = new System.Timers.Timer(10000);
            timerTCPRecv.Elapsed  += new System.Timers.ElapsedEventHandler(timerTCPRecv_Timeout);
            timerTCPRecv.AutoReset = true;
            timerTCPRecv.Enabled   = false;

            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;

            if (myUart.port_UART.IsOpen)
            {
                deviceStateBackup  = myUart.DeviceState;
                myUart.DeviceState = DEVICE_STATE.DEVICE_INIT;
                myUart.RegControl(this, UartRecv_DeviceInit, DEVICE_STATE.DEVICE_INIT);

                myTCP.DeviceState = DEVICE_STATE.DEVICE_INIT;
                myTCP.RegControl(this, TCPRecv_DeviceInit, DEVICE_STATE.DEVICE_INIT);
            }
            else
            {
            }
        }
Ejemplo n.º 2
0
        public ZZZFormCurveFitting(XrdConfig config)
        {
            myConfig = config;

            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;
        }
Ejemplo n.º 3
0
        public FormShowSettings(FormChildMeasure form)
        {
            myParentForm = form;
            myConfig     = form.myConfig;

            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;
        }
Ejemplo n.º 4
0
        public FormUserLogin()
        {
            myUart   = new SerialPortCommon();
            myConfig = new XrdConfig();

            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;
        }
Ejemplo n.º 5
0
        public FormChildCurveFitting(FormMDIParent form)
        {
            myParentForm = form;
            myConfig     = form.myConfig;


            InitializeComponent();
        }
Ejemplo n.º 6
0
        public FormWarmUpProgress(FormDeviceInit form)
        {
            this.myUart   = form.myUart;
            this.myConfig = form.myConfig;
            this.myApi    = form.myApi;

            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;
        }
Ejemplo n.º 7
0
        public FormChildDevParam(FormMDIParent form)
        {
            myParentForm = form;
            myUart       = form.myUart;
            myConfig     = form.myConfig;
            myApi        = form.myApi;

            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;
        }
Ejemplo n.º 8
0
        public FormChildDeviceParam(FormMDIParent form)
        {
            myParentForm = form;
            myUart       = form.myUart;
            myConfig     = form.myConfig;
            myApi        = form.myApi;

            iniE.IniEditConfig("数据字典.ini");
            iniE1.IniEditConfig("参数设置.ini");
            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;
        }
Ejemplo n.º 9
0
        public FormMDIParent(FormDeviceInit form)
        {
            myFormInit = form;
            myUart     = form.myUart;
            myTCP      = form.myTCP;
            myConfig   = form.myConfig;
            myApi      = form.myApi;

            myCurveFit = new CurveFitting(myConfig);

            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;
        }
Ejemplo n.º 10
0
 public CurveFitting(XrdConfig config)
 {
     myConfig = config;
 }