예제 #1
0
        /// <summary>
        /// 重启打印机
        /// </summary>
        internal void ResetPrinter()
        {
            if (TryOpenPrinterConnection())
            {
                if (printer != null)
                {
                    lock (printerHelper)
                    {
                        printer.Reset();
                        printer = null;
                    }
                    lock (connectionHelper)
                    {
                        connection = null;
                    }

                    //printer = GetPrinter();
                    myEventLog.Log.Warn("正在重置打印机状态!");
                }
            }
        }