Esempio n. 1
0
        private void FormMain_Load(object sender, EventArgs e)
        {
            //GlobalData.serverUtil.DataReceived += new EventHandler(DataReceive);



            ReadConfigure();
            Global_TestTypeChanged(null, null);
            GlobalCofigData.SystemConfig.TestTypeChanged += new TestTypeChangedEventHandler(Global_TestTypeChanged);
            this.Cursor = System.Windows.Forms.Cursors.WaitCursor;

            if (frmDebugInfo == null)
            {
                frmDebugInfo = new FormFriction();
            }
            frmDebugInfo.Show(this.dockPanel1);
            this.Cursor = System.Windows.Forms.Cursors.Arrow;


            GlobalData.frmStatus = new FormStatus();
            GlobalCofigData.SystemConfig.AutoOffFireDelayTime = 15;
            tmrAutoStopTest.Interval = GlobalCofigData.SystemConfig.AutoOffFireDelayTime * 1000;
            GlobalData.frmStatus.WriteLogImmediately(Properties.Resources.LogStartUp);

            GlobalData.SystemStatusChanged += new SystemStatusChangedEventHandler(GlobalData_SystemStatusChanged);
            GlobalData.SystemStatus         = SystemStatuses.SystemReady;//激活SystemStatusChanged事件
            GlobalData.SystemStatus         = SystemStatuses.NotConnected;



            tmrDisplay.Enabled = true;

            GlobalCofigData.SystemConfig.PassWord = (string)Microsoft.Win32.Registry.GetValue(@"HKEY_LOCAL_MACHINE\Software\Sundy\SDAF", @"PassWord", "");
            if (GlobalCofigData.SystemConfig.PassWord == null)
            {
                GlobalCofigData.SystemConfig.PassWord = "";
            }

            plcZM = new ClassPLCzm();
            plcZM.Connect();
            plcZM.SetManualAutoMode(true);

            if (GlobalCofigData.SystemConfig.TestType == TestTypes.摩擦感度)
            {
                plcZM.SetHitOrFrictionMode(true);
            }
            else
            {
                plcZM.SetHitOrFrictionMode(false);
            }
        }
Esempio n. 2
0
        private void FormMain_Load(object sender, EventArgs e)
        {
            ReadConfigure();
            Global_TestTypeChanged(null, null);
            GlobalCofigData.SystemConfig.TestTypeChanged += new TestTypeChangedEventHandler(Global_TestTypeChanged);
            this.Cursor = System.Windows.Forms.Cursors.WaitCursor;

            if (frmDebugInfo == null)
            {
                frmDebugInfo = new FormFriction();
            }
            frmDebugInfo.Show(this.dockPanel1);
            this.Cursor = System.Windows.Forms.Cursors.Arrow;


            GlobalData.frmStatus = new FormStatus();
            GlobalCofigData.SystemConfig.AutoOffFireDelayTime = 15;
            tmrAutoStopFire.Interval = GlobalCofigData.SystemConfig.AutoOffFireDelayTime * 100;
            GlobalData.frmStatus.WriteLogImmediately(Properties.Resources.LogStartUp);

            GlobalData.SystemStatusChanged += new SystemStatusChangedEventHandler(GlobalData_SystemStatusChanged);



            GlobalData.SystemStatus = SystemStatuses.SystemReady;//激活SystemStatusChanged事件

            GlobalData.SystemStatus = SystemStatuses.NotConnected;



            tmrDisplay.Enabled = true;

            GlobalCofigData.SystemConfig.PassWord = (string)Microsoft.Win32.Registry.GetValue(@"HKEY_LOCAL_MACHINE\Software\Sundy\SDAF", @"PassWord", "");
            if (GlobalCofigData.SystemConfig.PassWord == null)
            {
                GlobalCofigData.SystemConfig.PassWord = "";
            }

            int aWidth  = Screen.PrimaryScreen.Bounds.Width;
            int aHeight = Screen.PrimaryScreen.Bounds.Height;

            this.Size = new System.Drawing.Size(aWidth, aHeight);

            control6024 = new ClassControl6024old();
            control6024.Connect();
        }
Esempio n. 3
0
        private void FormMain_Load(object sender, EventArgs e)
        {
            serverUtil.DataReceived += new EventHandler(DataReceive);

            ReadConfigure();
            Global_TestTypeChanged(null, null);
            GlobalCofigData.SystemConfig.TestTypeChanged += new TestTypeChangedEventHandler(Global_TestTypeChanged);
            this.Cursor = System.Windows.Forms.Cursors.WaitCursor;

            if (frmDebugInfo == null)
            {
                frmDebugInfo = new FormFriction();
            }
            frmDebugInfo.Show(this.dockPanel1);
            this.Cursor = System.Windows.Forms.Cursors.Arrow;


            GlobalData.frmStatus = new FormStatus();
            GlobalCofigData.SystemConfig.AutoOffFireDelayTime = 15;
            //zhj delete /V1.08  tmrAutoStopFire.Interval = GlobalCofigData.SystemConfig.AutoOffFireDelayTime * 100;
            GlobalData.frmStatus.WriteLogImmediately(Properties.Resources.LogStartUp);

            GlobalData.SystemStatusChanged     += new SystemStatusChangedEventHandler(GlobalData_SystemStatusChanged);
            GlobalData.ConstantTempModeChanged += new ConstantTemperatureStatusChangedEventHandler(GlobalData_ConstantTemperatureStatusChanged);
            GlobalData.SystemStatus             = SystemStatuses.SystemReady;//激活SystemStatusChanged事件
            //GlobalData.SystemStatus = SystemStatuses.NotConnected;


            rsport = new SerialPort();
            rsport.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(rsport_DataReceived);
            rsport.BaudRate      = 19200;
            rsport.DataBits      = 8;
            rsport.StopBits      = StopBits.One;
            rsport.PortName      = "COM6";
            rsport.Parity        = System.IO.Ports.Parity.None;
            rsport.ReadTimeout   = 1000;
            rsport.RtsEnable     = false;
            rsport.DtrEnable     = false;
            try
            {
                //rsport.Open();
            }
            catch (Exception aa)
            {
                MessageBox.Show(aa.Message);
            }



            GlobalData.serialPort = new SerialPortControl();
            GlobalData.serialPort.Init_SerialPort();
            GlobalData.serialPort.TxdCommand(SerialPortControl.爆发点_向上发送设置参数);
            tmrDisplay.Enabled = true;

            GlobalCofigData.SystemConfig.PassWord = (string)Microsoft.Win32.Registry.GetValue(@"HKEY_LOCAL_MACHINE\Software\Sundy\SDAF", @"PassWord", "");
            if (GlobalCofigData.SystemConfig.PassWord == null)
            {
                GlobalCofigData.SystemConfig.PassWord = "";
            }

            int aWidth  = Screen.PrimaryScreen.Bounds.Width;
            int aHeight = Screen.PrimaryScreen.Bounds.Height;

            this.Size = new System.Drawing.Size(aWidth, aHeight);
        }