Ejemplo n.º 1
0
        /// <summary>
        ///检查新版本的打印接口的打印配置
        /// </summary>
        /// <param name="labelFilePath">标签模板路径</param>
        /// <param name="lang">语言</param>
        /// <param name="obj">反射类型</param>
        /// <param name="errorCode">错误码</param>
        /// <param name="errorMessage">错误消息</param>
        private void CheckPrintConfig9(string labelFilePath, string lang, Type obj, ref int errorCode, ref String errorMessage)
        {
            if (!File.Exists(labelFilePath))
            {
                string message;
                if (lang == "cn")
                {
                    message = string.Format(new ResourceManager(obj).GetString("NotFountLabTemplate1"), labelFilePath);
                }
                else
                {
                    message = string.Format(new ResourceManager(obj).GetString("NotFountLabTemplate2"), labelFilePath);
                }
                errorCode    = -1;
                errorMessage = message;
                throw new ApplicationException(message);
            }
            if (!Deserialization.ComIsRegistered(this.TLB_CLASS_ID))
            {
                string @string;
                if (lang == "cn")
                {
                    @string = new ResourceManager(obj).GetString("NotFountCodeSoft1");
                }
                else
                {
                    @string = new ResourceManager(obj).GetString("NotFountCodeSoft2");
                }

                errorCode    = -1;
                errorMessage = @string;
                throw new ApplicationException(@string);
            }
        }