Usb
|
The UsbDiscoverer type exposes the following members.
Name | Description | |
---|---|---|
UsbDiscoverer | A class used to discover USB connected Zebra printers. Printers can be accessed either directly or through a USB printer driver. |
Name | Description | |
---|---|---|
Equals | (Inherited from Object) | |
FindPrinters(Context, DiscoveryHandler) | Enumerate all currently connected Zebra USB printers. | |
FindPrinters(UsbManager, DiscoveryHandler) | Enumerate all currently connected Zebra USB printers. | |
GetHashCode | (Inherited from Object) | |
GetType | (Inherited from Object) | |
GetZebraDriverPrinters | Enumerate locally installed Zebra Designer Drivers. | |
GetZebraUsbPrinters | Enumerate all currently connected Zebra USB printers. | |
GetZebraUsbPrinters(DiscoveredPrinterFilter) | Enumerate currently connected Zebra USB printers that meet the specified DiscoveredPrinterFilter criteria. | |
IsZebraUsbDevice | Determines if the UsbDevice is a Zebra printer. | |
ToString | (Inherited from Object) |
using System; using Zebra.Sdk.Comm; using Zebra.Sdk.Printer.Discovery; public class UsbDiscovererExample { public static void Main(string[] args) { try { foreach (DiscoveredPrinterDriver printer in UsbDiscoverer.GetZebraDriverPrinters()) { Console.WriteLine(printer); } foreach (DiscoveredUsbPrinter usbPrinter in UsbDiscoverer.GetZebraUsbPrinters(new ZebraPrinterFilter())) { Console.WriteLine(usbPrinter); } } catch (ConnectionException e) { Console.WriteLine($"Error discovering local printers: {e.Message}"); } Console.WriteLine("Done discovering local printers."); } }