Beispiel #1
0
        /// <summary>
        /// 测试线程 输出结果
        /// </summary>
        /// <param name="un"></param>
        /// <param name="result"></param>
        public void PutResult(int result)
        {
            StringBuilder log = new StringBuilder();

            if (result == 0)
            {
                log.Append("\r\n");
                log.Append("########     ###     ######   ######\r\n");
                log.Append("##     ##   ## ##   ##    ## ##    ##\r\n");
                log.Append("##     ##  ##   ##  ##       ##\r\n");
                log.Append("########  ##     ##  ######   ######\r\n");
                log.Append("##        #########       ##       ##\r\n");
                log.Append("##        ##     ## ##    ## ##    ##\r\n");
                log.Append("##        ##     ##  ######   ######\r\n");

                frmMain.SetTextBoxColor(EnumControlWidget.txtLog.ToString(),
                                        Color.Green);

                lock (obj)
                {
                    frmMain.DisplayResultStatistics(ResultInfo.Pass = ResultInfo.Pass + 1, ResultInfo.Fail);
                }
            }
            else
            {
                log.Append("\r\n");
                log.Append("########    ###     ####  ##\r\n");
                log.Append("##         ## ##     ##   ##\r\n");
                log.Append("##        ##   ##    ##   ##\r\n");
                log.Append("######   ##     ##   ##   ##\r\n");
                log.Append("##       #########   ##   ##\r\n");
                log.Append("##       ##     ##   ##   ##\r\n");
                log.Append("##       ##     ##  ####  ########\r\n");

                frmMain.SetTextBoxColor(EnumControlWidget.txtLog.ToString(),
                                        Color.Red);

                lock (obj)
                {
                    frmMain.DisplayResultStatistics(ResultInfo.Pass, ResultInfo.Fail = ResultInfo.Fail + 1);
                }
            }

            frmMain.DisplayLog(log.ToString());
        }
Beispiel #2
0
        /// <summary>
        /// 测试线程 输出结果
        /// </summary>
        /// <param name="un"></param>
        /// <param name="result"></param>
        public void PutResult(string un, int result)
        {
            StringBuilder log = new StringBuilder();

            if (result == 0)
            {
                log.Append("\r\n");
                log.Append("########     ###     ######   ######\r\n");
                log.Append("##     ##   ## ##   ##    ## ##    ##\r\n");
                log.Append("##     ##  ##   ##  ##       ##\r\n");
                log.Append("########  ##     ##  ######   ######\r\n");
                log.Append("##        #########       ##       ##\r\n");
                log.Append("##        ##     ## ##    ## ##    ##\r\n");
                log.Append("##        ##     ##  ######   ######\r\n");

                frmMain.SetTextBoxColor(EnumControlWidget.txtLog.ToString(),
                                        Color.Green);

                lock (obj)
                {
                    frmMain.DisplayResultStatistics(ResultInfo.Pass = ResultInfo.Pass + 1, ResultInfo.Fail);
                }
            }
            else
            {
                log.Append("\r\n");
                log.Append("########    ###     ####  ##\r\n");
                log.Append("##         ## ##     ##   ##\r\n");
                log.Append("##        ##   ##    ##   ##\r\n");
                log.Append("######   ##     ##   ##   ##\r\n");
                log.Append("##       #########   ##   ##\r\n");
                log.Append("##       ##     ##   ##   ##\r\n");
                log.Append("##       ##     ##  ####  ########\r\n");

                frmMain.SetTextBoxColor(EnumControlWidget.txtLog.ToString(),
                                        Color.Red);

                lock (obj)
                {
                    frmMain.DisplayResultStatistics(ResultInfo.Pass, ResultInfo.Fail = ResultInfo.Fail + 1);
                }
            }

            frmMain.DisplayLog(log.ToString());
            if (ProductionInfo.Type == ProductionInfo.SystemType.iMES)
            {
                string logTest = frmMain.ReadLog();
                FactoryAuto.CommonFunc.Common.WriteLogForiMes(imei, iccid, null, eid, sn, result, logTest);
            }
            else if (ProductionInfo.Type == ProductionInfo.SystemType.GSMMES)
            {
                string logTest = frmMain.ReadLog();
                FactoryAuto.CommonFunc.Common.WriteLogForiMes(imei, iccid, null, eid, sn, result, logTest);
            }
            else
            {
                //string logTest = frmMain.ReadLog();
                //FactoryAuto.CommonFunc.Common.WriteLogForiMes(imei, iccid, null, eid, sn, result, logTest);
                WritePassResult(un, result);
            }
        }