public void PrintDocment()
        {
            String error_str;

            this.Wait();
#if true
            bool Success = false;


        #if true
            Success = printerOnLocal.PrintDocment();
        #endif


            if (Success == false)
            {
        #if true
                /*---本地打印失败-----*/
                try {
                    Success = printerOnNet.PrintDocment();
                }catch (Exception e) {
                    LogHelper.WriteLog(this.GetType(), e);
                }
        #endif
            }
            LibCui.DeleteFile(file.mFileFullPath);
            LibCui.DeleteFile(file.GetPCLprnfullPath());
#endif
            this.Release();
            if (Success == true)
            {
                PrintRecord pp = new PrintRecord();
                pp.WriteRecord2Disk(file);
            }
        }
        public String PrintDocment()
        {
            String error_str_t = null;

            this.Wait();
            Debug.WriteLine(">>>>>>>>>进入打印+/n" + file.GetFileName());
            LogHelper.WriteLog(this.GetType(), i++.ToString());
            LogHelper.WriteLog(this.GetType(), ">>>>>>>>>进入打印+/n" + file.GetFileName());
#if true
            bool Success = false;


#if true
            Success = printerOnLocal.PrintDocment();
#endif


            if (Success == false)
            {
                LogHelper.WriteLog(this.GetType(), "本地打印【失败】");
                error_str_t = "机器故障";
#if USE_NET
                /*---本地打印失败-----*/
                try {
                    Success = printerOnNet.PrintDocment();
                }catch (Exception e) {
                    LogHelper.WriteLog(this.GetType(), e);
                }
#endif
            }
            else
            {
                LogHelper.WriteLog(this.GetType(), "本地打印【成功】");
            }

            /* if (false||LibCui.DeleteFileForce(file.mFileFullPath))
             * {
             *   LogHelper.WriteLog(this.GetType(), "文件【已删除】");
             * }
             * else {
             *   LogHelper.WriteLog(this.GetType(), "文件【删除失败】");
             * }*/
            //   LibCui.DeleteFile(file.GetPCLprnfullPath());
#endif

            if (Success == true)
            {
                //打印成功--
                PrintRecord pp = new PrintRecord();
                pp.WriteRecord2Disk(file);
                //
                PcCloudComm.Notify_Thread();
            }

            Debug.WriteLine("<<<<<<<<<<<退出打印");
            LogHelper.WriteLog(this.GetType(), "<<<<<<<<<<<退出打印");
            this.Release();

            return(error_str_t);
        }