Exemple #1
0
        public FormChildTexture(FormMDIParent form)
        {
            myParentForm = form;
            myUart       = form.myUart;
            myConfig     = form.myConfig;
            myApi        = form.myApi;

            timerHighVoltage_10min           = new System.Timers.Timer(1000 * 60 * 10); // 10min
            timerHighVoltage_10min.Elapsed  += new System.Timers.ElapsedEventHandler(timerHighVoltage_10min_Timeout);
            timerHighVoltage_10min.AutoReset = true;
            timerHighVoltage_10min.Enabled   = false;

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

            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;

            if (myUart.port_UART.IsOpen)
            {
                deviceStateBackup  = myUart.DeviceState;
                myUart.DeviceState = DEVICE_STATE.TEXTURE;
                myUart.RegControl(this, UartRecv_Texture, DEVICE_STATE.TEXTURE);
            }
        }
Exemple #2
0
        public FormShortcutHighVoltage(FormMDIParent form)
        {
            myParentForm = form;
            myUart       = form.myUart;
            myConfig     = form.myConfig;
            myApi        = form.myApi;
            // timer
            timerUartRecv           = new System.Timers.Timer(10000);
            timerUartRecv.Elapsed  += new System.Timers.ElapsedEventHandler(timerUartRecv_Timeout);
            timerUartRecv.AutoReset = true;
            timerUartRecv.Enabled   = false;

            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;

            if (myUart.port_UART.IsOpen)
            {
                deviceStateBackup  = myUart.DeviceState;
                myUart.DeviceState = DEVICE_STATE.SHORTCUT_HIGH_VOLTAGE;
                myUart.RegControl(this, UartRecv_HighVoltage, DEVICE_STATE.SHORTCUT_HIGH_VOLTAGE);
            }
            else
            {
            }
        }
Exemple #3
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
            {
            }
        }
Exemple #4
0
        public FormUserLogin()
        {
            myUart   = new SerialPortCommon();
            myConfig = new XrdConfig();

            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;
        }
Exemple #5
0
        public FormWarmUpProgress(FormDeviceInit form)
        {
            this.myUart   = form.myUart;
            this.myConfig = form.myConfig;
            this.myApi    = form.myApi;

            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;
        }
Exemple #6
0
        public FormChildDevParam(FormMDIParent form)
        {
            myParentForm = form;
            myUart       = form.myUart;
            myConfig     = form.myConfig;
            myApi        = form.myApi;

            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;
        }
Exemple #7
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;
        }
Exemple #8
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;
        }
Exemple #9
0
        public TCPClient(SerialPortCommon uart, Print print = null, string ipServer = null, string portServer = "-1")
        {
            myUart = uart;

            this.print = print;
            if (ipServer != null)
            {
                this.ipServer = ipServer;
            }

            int port_int = Int32.Parse(portServer);

            if (port_int >= 0)
            {
                this.portServer = port_int;
            }
        }
        public FormChildAccessPort(FormMDIParent form)
        {
            myUart = form.myUart;
            myApi  = form.myApi;
            // timer
            timerUartRecv           = new System.Timers.Timer(10000);
            timerUartRecv.Elapsed  += new System.Timers.ElapsedEventHandler(timerUartRecv_Timeout);
            timerUartRecv.AutoReset = true;
            timerUartRecv.Enabled   = false;

            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;

            //注册事件
            if (myUart.port_UART.IsOpen)
            {
                deviceStateBackup  = myUart.DeviceState;
                myUart.DeviceState = DEVICE_STATE.DEVICE_DEBUG;
                myUart.RegControl(this, UartRecv_AccessPort, DEVICE_STATE.DEVICE_DEBUG);
            }
        }
Exemple #11
0
        public FormShortcutAutoFocus(FormMDIParent form)
        {
            myUart          = form.myUart;
            myApi           = form.myApi;
            myApi.AutoFocus = form.myConfig.AutoFocus;
            // timer
            timerUartRecv           = new System.Timers.Timer(10000);
            timerUartRecv.Elapsed  += new System.Timers.ElapsedEventHandler(timerUartRecv_Timeout);
            timerUartRecv.AutoReset = true;
            timerUartRecv.Enabled   = false;

            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;

            if (myUart.port_UART.IsOpen)
            {
                deviceStateBackup  = myUart.DeviceState;
                myUart.DeviceState = DEVICE_STATE.SHORTCUT_AUTO_FOCUS;
                myUart.RegControl(this, UartRecv_AutoFocus, DEVICE_STATE.SHORTCUT_AUTO_FOCUS);
            }
            else
            {
            }
        }