Ejemplo n.º 1
0
        private static void CloseQuietly(Connection connection, ZebraCardPrinter zebraCardPrinter)
        {
            try
            {
                if (zebraCardPrinter != null)
                {
                    zebraCardPrinter.Destroy();
                }
            }
            catch { }

            try
            {
                if (connection != null)
                {
                    connection.Close();
                }
            }
            catch { }
        }
Ejemplo n.º 2
0
        public static void CleanUpQuietly(ZebraCardPrinter zebraCardPrinter, Connection connection)
        {
            try {
                if (zebraCardPrinter != null)
                {
                    zebraCardPrinter.Destroy();
                }
            } catch (ZebraCardException) {
                // Do nothing
            }

            try {
                if (connection != null)
                {
                    connection.Close();
                }
            } catch (ConnectionException) {
                // Do nothing
            }
        }