Beispiel #1
0
        /// <summary>
        /// 创建硬件配置时的板卡轴配置
        /// [需要根据项目情况重定义]
        /// </summary>
        /// <param name="axesList"></param>
        /// <returns></returns>
        private bool CreateAxesInstance(ref ProCommon.Communal.AxisList axesList)
        {
            bool rt = false;

            if (axesList != null)
            {
                axesList.Clear();
                int tmpServoOnPort = 0, tmpALMIn = 0, tmpDatumIn = 0, tmpHFwdIn = 0, tmpHRevIn = 0, tmpALMCLROut = 0;
                ProCommon.Communal.Axis axis = null;
                for (int i = 0; i < 3; i++)
                {
                    axis              = new ProCommon.Communal.Axis("Axis_" + i.ToString("00"));
                    axis.AxisType     = 1;
                    axis.PulseOutMode = 0;
                    axis.ServoOnLevel = ProCommon.Communal.ElectricalLevel.Low;
                    axis.PulseUnit    = 100;
                    switch (i)
                    {
                    case 0:
                    {
                        axis.Name          = "X";
                        tmpServoOnPort     = 16;
                        tmpALMIn           = 40;
                        tmpDatumIn         = 16;
                        tmpHFwdIn          = 20;
                        tmpHRevIn          = 21;
                        tmpALMCLROut       = 17;
                        axis.HelicalPitch  = 10.0f;
                        axis.PulsePerRound = 4000;
                        axis.PulseUnit     = 400;
                    }
                    break;

                    case 1:
                    {
                        axis.Name          = "Y";
                        tmpServoOnPort     = 18;
                        tmpALMIn           = 41;
                        tmpDatumIn         = 17;
                        tmpHFwdIn          = 22;
                        tmpHRevIn          = 23;
                        tmpALMCLROut       = 19;
                        axis.HelicalPitch  = 20.0f;
                        axis.PulsePerRound = 4000;
                        axis.PulseUnit     = 200;
                    }
                    break;

                    case 2:
                    {
                        axis.Name          = "R";
                        tmpServoOnPort     = 20;
                        tmpALMIn           = 42;
                        tmpDatumIn         = 18;
                        tmpHFwdIn          = 24;
                        tmpHRevIn          = 25;
                        tmpALMCLROut       = 21;
                        axis.HelicalPitch  = 360.0f;
                        axis.PulsePerRound = 4000;
                        axis.PulseUnit     = 11.11f;
                    }
                    break;

                    case 3:
                    {
                        axis.Name      = "U";
                        tmpServoOnPort = 22;
                        tmpALMIn       = 43;
                        tmpDatumIn     = 19;
                        tmpHFwdIn      = 26;
                        tmpHRevIn      = 27;
                        tmpALMCLROut   = 23;
                    }
                    break;

                    case 4:
                    {
                        tmpServoOnPort = 24;
                        tmpALMIn       = 44;
                        tmpDatumIn     = 28;
                        tmpHFwdIn      = 32;
                        tmpHRevIn      = 33;
                        tmpALMCLROut   = 25;
                    }
                    break;

                    case 5:
                    {
                        tmpServoOnPort = 26;
                        tmpALMIn       = 45;
                        tmpDatumIn     = 29;
                        tmpHFwdIn      = 34;
                        tmpHRevIn      = 35;
                        tmpALMCLROut   = 27;
                    }
                    break;

                    case 6:
                    {
                        tmpServoOnPort = 28;
                        tmpALMIn       = 46;
                        tmpDatumIn     = 30;
                        tmpHFwdIn      = 36;
                        tmpHRevIn      = 37;
                        tmpALMCLROut   = 29;
                    }
                    break;

                    case 7:
                    {
                        tmpServoOnPort = 30;
                        tmpALMIn       = 47;
                        tmpDatumIn     = 31;
                        tmpHFwdIn      = 38;
                        tmpHRevIn      = 39;
                        tmpALMCLROut   = 31;
                    }
                    break;
                    }

                    //通用输入或输出口做专用信号
                    axis.ServoOnOutBitNumber    = tmpServoOnPort;
                    axis.AlarmInBitNumber       = tmpALMIn;
                    axis.AlarmInLevel           = ProCommon.Communal.ElectricalLevel.High;
                    axis.AlarmClearOutBitNumber = tmpALMCLROut;
                    axis.AlarmClearOutLevel     = ProCommon.Communal.ElectricalLevel.Low;
                    axis.StatusALM              = false;
                    axis.DatumInBitNumber       = tmpDatumIn;
                    axis.DatumInLevel           = ProCommon.Communal.ElectricalLevel.Low;
                    axis.StatusOfHardDatum      = false;
                    axis.HardForwarInBitNumber  = tmpHFwdIn;
                    axis.HardForwardInLevel     = ProCommon.Communal.ElectricalLevel.Low;
                    axis.StatusOfHardForward    = false;
                    axis.HardReverseInBitNumber = tmpHRevIn;
                    axis.HardReverseInLevel     = ProCommon.Communal.ElectricalLevel.Low;
                    axis.StatusOfHardReverse    = false;
                    axis.DatumDirection         = "负向";
                    axis.DatumMode              = 14;

                    axis.StartSpeed      = 50.0f;
                    axis.RunSpeed        = 500.0f;
                    axis.Accel           = 1000.0f;
                    axis.Decel           = 1000.0f;
                    axis.DatumCreepSpeed = 20.0f;
                    axis.DatumSpeed      = 100.0f;
                    axis.EndSpeed        = 200.0f;

                    axis.SoftReverseLimit = 0.0f;
                    axis.SoftForwardLimit = 200.0f;

                    axis.CurrentPos = 0.0f;
                    axis.FirstPos   = 10.0f;
                    axis.SecondPos  = 50.0f;
                    axis.ThirdPos   = 80.0f;

                    axesList.Add(axis);
                }

                rt = true;
            }
            return(rt);
        }
Beispiel #2
0
        /// <summary>
        /// 检测配置文件
        /// </summary>
        /// <param name="fileDirectory"></param>
        /// <param name="fileName"></param>
        /// <param name="bkgrdWorker"></param>
        private bool CheckConfigFile(string fileDirectory, string fileName, System.ComponentModel.BackgroundWorker bkgrdWorker)
        {
            SysChkStepNumber += 1;
            bool rt = false;

            if (!System.IO.File.Exists(fileDirectory + "\\" + fileName))
            {
                try
                {
                    switch (fileName)
                    {
                        #region 系统配置
                    case ProLaminator.Config.CfgManager.SYSTEM_CONFIG_FILE_NAME:
                    {
                        _cfgSysTmp = new ProLaminator.Config.CfgSystem();
                        _cfgSysTmp.LanguageVersion      = ProCommon.Communal.Language.Chinese;
                        _cfgSysTmp.EnableAutoLaunch     = false;
                        _cfgSysTmp.GlassStationName     = "GLASS";
                        _cfgSysTmp.Membrane1StationName = "UPMEMBRANE";
                        _cfgSysTmp.Membrane2StationName = "DOWNMEMBRANE";
                        _cfgSysTmp.SerialPortNameForPlc = "COM1";

                        _cfgSysTmp.SpeedLow          = 10.0f;
                        _cfgSysTmp.SpeedMedium       = 30.0f;
                        _cfgSysTmp.SpeedHigh         = 60.0f;
                        _cfgSysTmp.ToolCenterOffsetX = 0.0f;
                        _cfgSysTmp.ToolCenterOffsetY = 0.0f;

                        _cfgSysTmp.ClientName           = "深圳市智显科技有限公司";
                        _cfgSysTmp.CtrllerCategoryArray = new ProCommon.Communal.DeviceCategory[] {
                            ProCommon.Communal.DeviceCategory.Camera,
                            //ProCommon.Communal.DeviceCategory.Board,
                            ProCommon.Communal.DeviceCategory.SerialPort
                            //ProCommon.Communal.DeviceCategory.Socket,
                            //ProCommon.Communal.DeviceCategory.Web
                        };

                        _cfgSysTmp.EnableLastRoutine = false;      //运行软件时不启用上次生产程式
                        _cfgSysTmp.LastRoutinePath   = null;       //上次生产程式(默认为空)
                        _cfgSysTmp.RoutineDirectory  = null;       //生产程式目录(转到默认)
                        _cfgSysTmp.DataBaseDirectory = null;       //数据和日志目录(数据库,转到默认)

                        _cfgSysTmp.RunDataSheetName    = null;     //流水结果表名称(转到默认)
                        _cfgSysTmp.EnableSaveRunData   = false;
                        _cfgSysTmp.SaveRunDataDays     = 7;
                        _cfgSysTmp.DisplayRunDataCount = 10;

                        _cfgSysTmp.RunLogSheetName    = null;     //流水日志表名称(转到默认)
                        _cfgSysTmp.EnableSaveRunLog   = false;
                        _cfgSysTmp.SaveRunLogDays     = 7;
                        _cfgSysTmp.DisplayRunLogCount = 15;

                        _cfgSysTmp.AlarmLogSheetName  = null;       //报警日志表名称(转到默认)
                        _cfgSysTmp.EnableSaveAlarmLog = false;
                        _cfgSysTmp.SaveAlarmLogDays   = 7;

                        _cfgSysTmp.SystemLogFilePath    = null;     //系统日志文件路径(转到默认)
                        _cfgSysTmp.ExceptionLogFilePath = null;     //异常日志文件路径(转到默认)

                        ProCommon.Communal.CfgAPI.Save <ProLaminator.Config.CfgSystem>(_cfgSysTmp,
                                                                                       ProLaminator.Config.CfgManager.ConfigDirectory
                                                                                       + "\\"
                                                                                       + ProLaminator.Config.CfgManager.SYSTEM_CONFIG_FILE_NAME);
                    }
                    break;
                        #endregion

                        #region 用户配置
                    case ProLaminator.Config.CfgManager.ACCOUNT_CONFIG_FILE_NAME:
                    {
                        //新增加账户时,按照如下规则:账户列表中最后一个账户的Number,然后加1
                        ProCommon.Communal.Account acc = new ProCommon.Communal.Account(0, "ACC_0000");
                        acc.Name      = "Admin";
                        acc.Authority = ProCommon.Communal.AccountAuthority.Administrator;
                        acc.PassWord  = ProCommon.Communal.DESEncrypt.Encrypt("123");

                        ProLaminator.Config.CfgAccount cfgAcc = new Config.CfgAccount();
                        cfgAcc.AccList.Add(acc);
                        ProCommon.Communal.CfgAPI.Save <ProLaminator.Config.CfgAccount>(cfgAcc,
                                                                                        ProLaminator.Config.CfgManager.ConfigDirectory
                                                                                        + "\\"
                                                                                        + ProLaminator.Config.CfgManager.ACCOUNT_CONFIG_FILE_NAME);
                    }
                    break;
                        #endregion

                        #region 报警配置
                    case ProLaminator.Config.CfgManager.ALARM_CONFIG_FILE_NAME:
                        break;
                        #endregion

                        #region 相机配置
                    case ProLaminator.Config.CfgManager.CAMERA_CONFIG_FILE_NAME:
                    {
                        if (_cfgSysTmp != null &&
                            _cfgSysTmp.CtrllerCategoryArray != null)
                        {
                            bool isCreate = false;
                            foreach (ProCommon.Communal.DeviceCategory cc in _cfgSysTmp.CtrllerCategoryArray)
                            {
                                if (cc == ProCommon.Communal.DeviceCategory.Camera)
                                {
                                    isCreate = true;
                                    break;
                                }
                            }

                            if (isCreate)
                            {
                                if (_cfgCam == null)
                                {
                                    _cfgCam = new Config.CfgCamera();
                                }

                                _defaultCameraName = "玻璃工位";

                                //根据项目需要,创建建默的相机配置文件
                                //新增加相机属性时,按照如下规则:相机属性列表中最后一个相机属性的Number,然后加1
                                ProCommon.Communal.CameraProperty camProGlass = new ProCommon.Communal.CameraProperty(ProCommon.Communal.DeviceBrand.HikVision, 0, "Cam_00");
                                camProGlass.Name              = _defaultCameraName;
                                camProGlass.ExposureTime      = 0.5f;
                                camProGlass.FPS               = 15;
                                camProGlass.Gain              = 1.0f;
                                camProGlass.ReconnectInterval = 500;
                                camProGlass.SerialNo          = "00D22898505";
                                camProGlass.StationName       = _cfgSysTmp.GlassStationName;
                                _cfgCam.PropertyList.Add(camProGlass);


                                _defaultCameraName = "左片工位";
                                ProCommon.Communal.CameraProperty camProMembrane1 = new ProCommon.Communal.CameraProperty(ProCommon.Communal.DeviceBrand.HikVision, 1, "Cam_01");
                                camProMembrane1.Name              = _defaultCameraName;
                                camProMembrane1.ExposureTime      = 0.35f;
                                camProMembrane1.FPS               = 15;
                                camProMembrane1.Gain              = 1.0f;
                                camProMembrane1.ReconnectInterval = 500;
                                camProMembrane1.SerialNo          = "00D22898327";
                                camProMembrane1.StationName       = _cfgSysTmp.Membrane1StationName;
                                _cfgCam.PropertyList.Add(camProMembrane1);

                                _defaultCameraName = "右片工位";
                                ProCommon.Communal.CameraProperty camProMembrane2 = new ProCommon.Communal.CameraProperty(ProCommon.Communal.DeviceBrand.HikVision, 2, "Cam_02");
                                camProMembrane2.Name              = _defaultCameraName;
                                camProMembrane2.ExposureTime      = 0.35f;
                                camProMembrane2.FPS               = 15;
                                camProMembrane2.Gain              = 1.0f;
                                camProMembrane2.ReconnectInterval = 500;
                                camProMembrane2.SerialNo          = "00D22898383";
                                camProMembrane2.StationName       = _cfgSysTmp.Membrane2StationName;

                                _cfgCam.PropertyList.Add(camProMembrane2);


                                ProCommon.Communal.CfgAPI.Save <ProLaminator.Config.CfgCamera>(_cfgCam, ProLaminator.Config.CfgManager.ConfigDirectory
                                                                                               + "\\"
                                                                                               + ProLaminator.Config.CfgManager.CAMERA_CONFIG_FILE_NAME);
                            }
                        }
                    }
                    break;
                        #endregion

                        #region 标定方案配置
                    case ProLaminator.Config.CfgManager.CALIBRATIONSOLUTION_CONFIG_FILE_NAME:
                    {
                        if (_cfgSysTmp != null &&
                            _cfgSysTmp.CtrllerCategoryArray != null)
                        {
                            bool isCreate = false;
                            foreach (ProCommon.Communal.DeviceCategory cc in _cfgSysTmp.CtrllerCategoryArray)
                            {
                                if (cc == ProCommon.Communal.DeviceCategory.Camera)
                                {
                                    isCreate = true;
                                }
                            }

                            if (isCreate)
                            {
                                ProLaminator.Config.CfgCalibration cfgCal = new ProLaminator.Config.CfgCalibration();
                                //根据项目需要,创建建默的标定方案配置文件
                                //新增加标定方案时,按照如下规则:标定方案ID与相机ID一致
                                if (_cfgCam != null &&
                                    _cfgCam.PropertyList != null)
                                {
                                    int cnt = _cfgCam.PropertyList.Count;

                                    for (int i = 0; i < cnt; i++)
                                    {
                                        ProVision.Communal.CalibrationSolution calSl = new ProVision.Communal.CalibrationSolution(ProVision.Communal.CalibrationType.CALIBRATION_UNIT, _cfgCam.PropertyList[i].Name, _cfgCam.PropertyList[i].ID);
                                        calSl.IsActive    = true;
                                        calSl.IsEffective = true;
                                        calSl.RowUnit     = 0.0f;
                                        calSl.ColUnit     = 0.0f;
                                        cfgCal.CalSolutionList.Add(calSl);
                                    }
                                }

                                ProCommon.Communal.CfgAPI.Save <ProLaminator.Config.CfgCalibration>(cfgCal, ProLaminator.Config.CfgManager.ConfigDirectory
                                                                                                    + "\\"
                                                                                                    + ProLaminator.Config.CfgManager.CALIBRATIONSOLUTION_CONFIG_FILE_NAME);
                            }
                        }
                    }
                    break;
                        #endregion

                        #region 控制卡配置
                    case ProLaminator.Config.CfgManager.BOARD_CONFIG_FILE_NAME:
                    {
                        if (_cfgSysTmp != null &&
                            _cfgSysTmp.CtrllerCategoryArray != null)
                        {
                            bool isCreate = false;
                            foreach (ProCommon.Communal.DeviceCategory cc in _cfgSysTmp.CtrllerCategoryArray)
                            {
                                if (cc == ProCommon.Communal.DeviceCategory.Board)
                                {
                                    isCreate = true;
                                    break;
                                }
                            }

                            if (isCreate)
                            {
                                if (_cfgBoard == null)
                                {
                                    _cfgBoard = new ProLaminator.Config.CfgBoard();
                                }

                                //根据项目需要,创建建默的控制卡配置文件
                                //新增加控制卡属性时,按照如下规则:控制卡属性列表中最后一个控制卡属性的Number,然后加1
                                ProCommon.Communal.BoardProperty boardPro = new ProCommon.Communal.BoardProperty(ProCommon.Communal.DeviceBrand.ZMotion, 0, "Brd_0000");
                                boardPro.IsConnected       = false;
                                boardPro.ReconnectInterval = 500;
                                boardPro.EtherNetIP        = "192.168.1.30";
                                boardPro.EtherNetPort      = 8089;
                                boardPro.ReconnectInterval = 50;
                                boardPro.Name        = "BrdForShller";
                                boardPro.StationName = _cfgSysTmp.GlassStationName;

                                //创建硬件配置时的板卡轴配置
                                ProCommon.Communal.AxisList axisList = new ProCommon.Communal.AxisList();
                                CreateAxesInstance(ref axisList);
                                for (int i = 0; i < axisList.Count; i++)
                                {
                                    boardPro.AxisList.Add(axisList[i]);
                                }

                                _cfgBoard.PropertyList.Add(boardPro);

                                ProCommon.Communal.CfgAPI.Save <ProLaminator.Config.CfgBoard>(_cfgBoard,
                                                                                              ProLaminator.Config.CfgManager.ConfigDirectory
                                                                                              + "\\"
                                                                                              + ProLaminator.Config.CfgManager.BOARD_CONFIG_FILE_NAME);
                            }
                        }
                    }
                    break;
                        #endregion

                        #region 通信Socket配置
                    case ProLaminator.Config.CfgManager.COMSOCKET_CONFIG_FILE_NAME:
                    {
                        if (_cfgSysTmp != null &&
                            _cfgSysTmp.CtrllerCategoryArray != null)
                        {
                            bool isCreate = false;
                            foreach (ProCommon.Communal.DeviceCategory cc in _cfgSysTmp.CtrllerCategoryArray)
                            {
                                if (cc == ProCommon.Communal.DeviceCategory.Socket)
                                {
                                    isCreate = true;
                                    break;
                                }
                            }

                            if (isCreate)
                            {
                                //根据项目需要,创建建默的Socket配置文件
                                //新增加Socket属性时,按照如下规则:Socekt属性列表中最后一个Socket属性的Number,然后加1
                                ProLaminator.Config.CfgSocket cfgSkt = new ProLaminator.Config.CfgSocket();

                                ProCommon.Communal.SocketProperty sktPro = new ProCommon.Communal.SocketProperty(ProCommon.Communal.DeviceBrand.Microsoft, 0, "Skt_0000");
                                sktPro.IP          = "192.168.1.11";
                                sktPro.Name        = "测试网口";
                                sktPro.StationName = _cfgSysTmp.GlassStationName;
                                cfgSkt.PropertyList.Add(sktPro);

                                ProCommon.Communal.CfgAPI.Save <ProLaminator.Config.CfgSocket>(cfgSkt, ProLaminator.Config.CfgManager.ConfigDirectory
                                                                                               + "\\"
                                                                                               + ProLaminator.Config.CfgManager.COMSOCKET_CONFIG_FILE_NAME);
                            }
                        }
                    }
                    break;
                        #endregion

                        #region 通信Serial配置
                    case ProLaminator.Config.CfgManager.COMSERIAL_CONFIG_FILE_NAME:
                    {
                        if (_cfgSysTmp != null &&
                            _cfgSysTmp.CtrllerCategoryArray != null)
                        {
                            bool isCreate = false;
                            foreach (ProCommon.Communal.DeviceCategory cc in _cfgSysTmp.CtrllerCategoryArray)
                            {
                                if (cc == ProCommon.Communal.DeviceCategory.SerialPort)
                                {
                                    isCreate = true;
                                    break;
                                }
                            }

                            if (isCreate)
                            {
                                ProLaminator.Config.CfgSerialPort cfgSrlPt = new ProLaminator.Config.CfgSerialPort();
                                //根据项目需要,创建建默的SerialPort配置文件
                                //新增加SerialPort属性时,按照如下规则:SerialPort属性列表中最后一个SerialPort属性的Number,然后加1
                                ProCommon.Communal.SerialPortProperty srlPro = new ProCommon.Communal.SerialPortProperty(ProCommon.Communal.DeviceBrand.Microsoft, 0, "Srl_0000");
                                srlPro.ReceiveTimeOut         = 500;
                                srlPro.ReconnectInterval      = 1000;
                                srlPro.SendTimeOut            = 500;
                                srlPro.HandShake              = System.IO.Ports.Handshake.None;
                                srlPro.BaudRate               = 115200;
                                srlPro.DataBits               = 8;
                                srlPro.StopBits               = System.IO.Ports.StopBits.One;
                                srlPro.Parity                 = System.IO.Ports.Parity.Even;
                                srlPro.DtrEnable              = true;
                                srlPro.RtsEnable              = true;
                                srlPro.ReceivedBytesThreshold = 8;
                                srlPro.NewLine                = "/r/n";
                                srlPro.StationName            = _cfgSysTmp.SerialPortNameForPlc;

                                cfgSrlPt.PropertyList.Add(srlPro);
                                ProCommon.Communal.CfgAPI.Save <ProLaminator.Config.CfgSerialPort>(cfgSrlPt, ProLaminator.Config.CfgManager.ConfigDirectory
                                                                                                   + "\\"
                                                                                                   + ProLaminator.Config.CfgManager.COMSERIAL_CONFIG_FILE_NAME);
                            }
                        }
                    }
                    break;
                        #endregion

                        #region 通信WebService配置
                    case ProLaminator.Config.CfgManager.COMWEB_CONFIG_FILE_NAME:
                    {
                        if (_cfgSysTmp != null &&
                            _cfgSysTmp.CtrllerCategoryArray != null)
                        {
                            bool isCreate = false;
                            foreach (ProCommon.Communal.DeviceCategory cc in _cfgSysTmp.CtrllerCategoryArray)
                            {
                                if (cc == ProCommon.Communal.DeviceCategory.Web)
                                {
                                    isCreate = true;
                                    break;
                                }
                            }

                            if (isCreate)
                            {
                                //根据项目需要,创建建默的Web配置文件
                                //新增加Web属性时,按照如下规则:Web属性列表中最后一个Web属性的Number,然后加1

                                ProLaminator.Config.CfgWeb cfgWb = new ProLaminator.Config.CfgWeb();

                                ProCommon.Communal.WebProperty webPro = new ProCommon.Communal.WebProperty(ProCommon.Communal.DeviceBrand.Microsoft, 0, "Web_00");
                                webPro.Name        = "测试网络";
                                webPro.StationName = _cfgSysTmp.GlassStationName;

                                cfgWb.PropertyList.Add(webPro);
                                ProCommon.Communal.CfgAPI.Save <ProLaminator.Config.CfgWeb>(cfgWb, ProLaminator.Config.CfgManager.ConfigDirectory
                                                                                            + "\\"
                                                                                            + ProLaminator.Config.CfgManager.COMWEB_CONFIG_FILE_NAME);
                            }
                        }
                    }
                    break;
                        #endregion

                        #region 视觉参数配置
                    case ProLaminator.Config.CfgManager.VISIONPARA_CONFIG_FILE_NAME:
                    {
                        ProLaminator.Config.CfgVisionPara cfgVsPara = new ProLaminator.Config.CfgVisionPara();
                        ProCommon.Communal.CfgAPI.Save <ProLaminator.Config.CfgVisionPara>(cfgVsPara, ProLaminator.Config.CfgManager.ConfigDirectory
                                                                                           + "\\"
                                                                                           + ProLaminator.Config.CfgManager.VISIONPARA_CONFIG_FILE_NAME);
                    }
                    break;
                        #endregion

                        #region 运控参数配置
                    case ProLaminator.Config.CfgManager.MOTIONPARA_CONFIG_FILE_NAME:
                    {
                    }
                    break;
                        #endregion

                    default:
                        break;
                    }

                    SysChkError = ChkLangIsChinese?("创建文件[" + fileName + "]成功!")
                        : ("Create file[" + fileName + "]successfully!");
                    if (bkgrdWorker != null)
                    {
                        bkgrdWorker.ReportProgress(SysChkStepNumber, SysChkError);
                    }
                    rt = true;
                }
                catch (System.Exception ex)
                {
                    SysChkError = (ChkLangIsChinese?("创建文件[" + fileName + "]失败!异常描述:\r\n")
                        : ("Create file[" + fileName + "]failed!Description:\r\n")) + ex.Message;
                    if (bkgrdWorker != null)
                    {
                        bkgrdWorker.ReportProgress(SysChkStepNumber, SysChkError);
                    }
                }
            }
            else
            {
                //若系统配置文件存在,加载系统配置文件,为其他依赖系统配置的配置做准备
                if (fileName == ProLaminator.Config.CfgManager.SYSTEM_CONFIG_FILE_NAME)
                {
                    _cfgSysTmp = ProCommon.Communal.CfgAPI.Load <ProLaminator.Config.CfgSystem>(ProLaminator.Config.CfgManager.ConfigDirectory
                                                                                                + "\\"
                                                                                                + ProLaminator.Config.CfgManager.SYSTEM_CONFIG_FILE_NAME);
                }

                SysChkError = ChkLangIsChinese ?("找到文件[" + fileName + "]"): ("Find file[" + fileName + "]");
                if (bkgrdWorker != null)
                {
                    bkgrdWorker.ReportProgress(SysChkStepNumber, SysChkError);
                }
                rt = true;
            }
            return(rt);
        }