示例#1
0
 public static DeviceCollection GetDeviceCollection(this PosDeviceTypes type)
 {
     if (type == PosDeviceTypes.BumpBar)
     {
         return(DeviceManager.BumpBarDeviceCollection);
     }
     if (type == PosDeviceTypes.CardScanner)
     {
         return(DeviceManager.ScannerDeviceCollection);
     }
     if (type == PosDeviceTypes.CashDrawer)
     {
         return(DeviceManager.CashDrawerDeviceCollection);
     }
     if (type == PosDeviceTypes.CoinDispenser)
     {
         return(DeviceManager.CoinDispenserDeviceCollection);
     }
     if (type == PosDeviceTypes.ReceiptPrinter)
     {
         return(DeviceManager.PosPrinterDeviceCollection);
     }
     return(null);
 }
示例#2
0
 public static Type GetPosClassType(this PosDeviceTypes type)
 {
     if (type == PosDeviceTypes.BumpBar)
     {
         return(typeof(BumpBar));
     }
     if (type == PosDeviceTypes.CardScanner)
     {
         return(typeof(Scanner));
     }
     if (type == PosDeviceTypes.CashDrawer)
     {
         return(typeof(CashDrawer));
     }
     if (type == PosDeviceTypes.CoinDispenser)
     {
         return(typeof(CoinDispenser));
     }
     if (type == PosDeviceTypes.ReceiptPrinter)
     {
         return(typeof(PosPrinter));
     }
     return(null);
 }